DeployedModel.fromJson constructor

DeployedModel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory DeployedModel.fromJson(Map<String, dynamic> json) {
  return DeployedModel(
    dedicatedResources: decode(
      json['dedicatedResources'],
      DedicatedResources.fromJson,
    ),
    automaticResources: decode(
      json['automaticResources'],
      AutomaticResources.fromJson,
    ),
    sharedResources: json['sharedResources'],
    id: json['id'] ?? '',
    model: json['model'] ?? '',
    modelVersionId: json['modelVersionId'] ?? '',
    displayName: json['displayName'] ?? '',
    createTime: decodeCustom(json['createTime'], protobuf.Timestamp.fromJson),
    explanationSpec: decode(
      json['explanationSpec'],
      ExplanationSpec.fromJson,
    ),
    disableExplanations: json['disableExplanations'] ?? false,
    serviceAccount: json['serviceAccount'] ?? '',
    enableContainerLogging: json['enableContainerLogging'] ?? false,
    disableContainerLogging: json['disableContainerLogging'] ?? false,
    enableAccessLogging: json['enableAccessLogging'] ?? false,
    privateEndpoints: decode(
      json['privateEndpoints'],
      PrivateEndpoints.fromJson,
    ),
    fasterDeploymentConfig: decode(
      json['fasterDeploymentConfig'],
      FasterDeploymentConfig.fromJson,
    ),
    rolloutOptions: decode(json['rolloutOptions'], RolloutOptions.fromJson),
    status: decode(json['status'], DeployedModel_Status.fromJson),
    systemLabels: decodeMap(json['systemLabels']) ?? {},
    checkpointId: json['checkpointId'] ?? '',
    speculativeDecodingSpec: decode(
      json['speculativeDecodingSpec'],
      SpeculativeDecodingSpec.fromJson,
    ),
  );
}