All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.sagemaker.model.ModelPackage Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon SageMaker module holds the client classes that are used for communicating with Amazon SageMaker Service

There is a newer version: 2.28.4
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.sagemaker.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* A versioned model that can be deployed for SageMaker inference. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ModelPackage implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField MODEL_PACKAGE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ModelPackageName").getter(getter(ModelPackage::modelPackageName)) .setter(setter(Builder::modelPackageName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelPackageName").build()).build(); private static final SdkField MODEL_PACKAGE_GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ModelPackageGroupName").getter(getter(ModelPackage::modelPackageGroupName)) .setter(setter(Builder::modelPackageGroupName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelPackageGroupName").build()) .build(); private static final SdkField MODEL_PACKAGE_VERSION_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("ModelPackageVersion").getter(getter(ModelPackage::modelPackageVersion)) .setter(setter(Builder::modelPackageVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelPackageVersion").build()) .build(); private static final SdkField MODEL_PACKAGE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ModelPackageArn").getter(getter(ModelPackage::modelPackageArn)).setter(setter(Builder::modelPackageArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelPackageArn").build()).build(); private static final SdkField MODEL_PACKAGE_DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ModelPackageDescription").getter(getter(ModelPackage::modelPackageDescription)) .setter(setter(Builder::modelPackageDescription)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelPackageDescription").build()) .build(); private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreationTime").getter(getter(ModelPackage::creationTime)).setter(setter(Builder::creationTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build(); private static final SdkField INFERENCE_SPECIFICATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("InferenceSpecification") .getter(getter(ModelPackage::inferenceSpecification)).setter(setter(Builder::inferenceSpecification)) .constructor(InferenceSpecification::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InferenceSpecification").build()) .build(); private static final SdkField SOURCE_ALGORITHM_SPECIFICATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("SourceAlgorithmSpecification") .getter(getter(ModelPackage::sourceAlgorithmSpecification)) .setter(setter(Builder::sourceAlgorithmSpecification)) .constructor(SourceAlgorithmSpecification::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceAlgorithmSpecification") .build()).build(); private static final SdkField VALIDATION_SPECIFICATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ValidationSpecification") .getter(getter(ModelPackage::validationSpecification)).setter(setter(Builder::validationSpecification)) .constructor(ModelPackageValidationSpecification::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ValidationSpecification").build()) .build(); private static final SdkField MODEL_PACKAGE_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ModelPackageStatus").getter(getter(ModelPackage::modelPackageStatusAsString)) .setter(setter(Builder::modelPackageStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelPackageStatus").build()) .build(); private static final SdkField MODEL_PACKAGE_STATUS_DETAILS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ModelPackageStatusDetails") .getter(getter(ModelPackage::modelPackageStatusDetails)).setter(setter(Builder::modelPackageStatusDetails)) .constructor(ModelPackageStatusDetails::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelPackageStatusDetails").build()) .build(); private static final SdkField CERTIFY_FOR_MARKETPLACE_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("CertifyForMarketplace").getter(getter(ModelPackage::certifyForMarketplace)) .setter(setter(Builder::certifyForMarketplace)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CertifyForMarketplace").build()) .build(); private static final SdkField MODEL_APPROVAL_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ModelApprovalStatus").getter(getter(ModelPackage::modelApprovalStatusAsString)) .setter(setter(Builder::modelApprovalStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelApprovalStatus").build()) .build(); private static final SdkField CREATED_BY_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("CreatedBy").getter(getter(ModelPackage::createdBy)).setter(setter(Builder::createdBy)) .constructor(UserContext::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedBy").build()).build(); private static final SdkField METADATA_PROPERTIES_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("MetadataProperties") .getter(getter(ModelPackage::metadataProperties)).setter(setter(Builder::metadataProperties)) .constructor(MetadataProperties::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MetadataProperties").build()) .build(); private static final SdkField MODEL_METRICS_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("ModelMetrics").getter(getter(ModelPackage::modelMetrics)).setter(setter(Builder::modelMetrics)) .constructor(ModelMetrics::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelMetrics").build()).build(); private static final SdkField LAST_MODIFIED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("LastModifiedTime").getter(getter(ModelPackage::lastModifiedTime)) .setter(setter(Builder::lastModifiedTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedTime").build()).build(); private static final SdkField LAST_MODIFIED_BY_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("LastModifiedBy").getter(getter(ModelPackage::lastModifiedBy)).setter(setter(Builder::lastModifiedBy)) .constructor(UserContext::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedBy").build()).build(); private static final SdkField APPROVAL_DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ApprovalDescription").getter(getter(ModelPackage::approvalDescription)) .setter(setter(Builder::approvalDescription)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ApprovalDescription").build()) .build(); private static final SdkField DOMAIN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Domain") .getter(getter(ModelPackage::domain)).setter(setter(Builder::domain)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Domain").build()).build(); private static final SdkField TASK_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Task") .getter(getter(ModelPackage::task)).setter(setter(Builder::task)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Task").build()).build(); private static final SdkField SAMPLE_PAYLOAD_URL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SamplePayloadUrl").getter(getter(ModelPackage::samplePayloadUrl)) .setter(setter(Builder::samplePayloadUrl)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SamplePayloadUrl").build()).build(); private static final SdkField> ADDITIONAL_INFERENCE_SPECIFICATIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("AdditionalInferenceSpecifications") .getter(getter(ModelPackage::additionalInferenceSpecifications)) .setter(setter(Builder::additionalInferenceSpecifications)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AdditionalInferenceSpecifications") .build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(AdditionalInferenceSpecificationDefinition::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField SOURCE_URI_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SourceUri").getter(getter(ModelPackage::sourceUri)).setter(setter(Builder::sourceUri)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceUri").build()).build(); private static final SdkField SECURITY_CONFIG_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("SecurityConfig") .getter(getter(ModelPackage::securityConfig)).setter(setter(Builder::securityConfig)) .constructor(ModelPackageSecurityConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecurityConfig").build()).build(); private static final SdkField MODEL_CARD_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ModelCard") .getter(getter(ModelPackage::modelCard)).setter(setter(Builder::modelCard)) .constructor(ModelPackageModelCard::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelCard").build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Tags") .getter(getter(ModelPackage::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Tag::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> CUSTOMER_METADATA_PROPERTIES_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("CustomerMetadataProperties") .getter(getter(ModelPackage::customerMetadataProperties)) .setter(setter(Builder::customerMetadataProperties)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomerMetadataProperties").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField DRIFT_CHECK_BASELINES_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("DriftCheckBaselines") .getter(getter(ModelPackage::driftCheckBaselines)).setter(setter(Builder::driftCheckBaselines)) .constructor(DriftCheckBaselines::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DriftCheckBaselines").build()) .build(); private static final SdkField SKIP_MODEL_VALIDATION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SkipModelValidation").getter(getter(ModelPackage::skipModelValidationAsString)) .setter(setter(Builder::skipModelValidation)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SkipModelValidation").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(MODEL_PACKAGE_NAME_FIELD, MODEL_PACKAGE_GROUP_NAME_FIELD, MODEL_PACKAGE_VERSION_FIELD, MODEL_PACKAGE_ARN_FIELD, MODEL_PACKAGE_DESCRIPTION_FIELD, CREATION_TIME_FIELD, INFERENCE_SPECIFICATION_FIELD, SOURCE_ALGORITHM_SPECIFICATION_FIELD, VALIDATION_SPECIFICATION_FIELD, MODEL_PACKAGE_STATUS_FIELD, MODEL_PACKAGE_STATUS_DETAILS_FIELD, CERTIFY_FOR_MARKETPLACE_FIELD, MODEL_APPROVAL_STATUS_FIELD, CREATED_BY_FIELD, METADATA_PROPERTIES_FIELD, MODEL_METRICS_FIELD, LAST_MODIFIED_TIME_FIELD, LAST_MODIFIED_BY_FIELD, APPROVAL_DESCRIPTION_FIELD, DOMAIN_FIELD, TASK_FIELD, SAMPLE_PAYLOAD_URL_FIELD, ADDITIONAL_INFERENCE_SPECIFICATIONS_FIELD, SOURCE_URI_FIELD, SECURITY_CONFIG_FIELD, MODEL_CARD_FIELD, TAGS_FIELD, CUSTOMER_METADATA_PROPERTIES_FIELD, DRIFT_CHECK_BASELINES_FIELD, SKIP_MODEL_VALIDATION_FIELD)); private static final long serialVersionUID = 1L; private final String modelPackageName; private final String modelPackageGroupName; private final Integer modelPackageVersion; private final String modelPackageArn; private final String modelPackageDescription; private final Instant creationTime; private final InferenceSpecification inferenceSpecification; private final SourceAlgorithmSpecification sourceAlgorithmSpecification; private final ModelPackageValidationSpecification validationSpecification; private final String modelPackageStatus; private final ModelPackageStatusDetails modelPackageStatusDetails; private final Boolean certifyForMarketplace; private final String modelApprovalStatus; private final UserContext createdBy; private final MetadataProperties metadataProperties; private final ModelMetrics modelMetrics; private final Instant lastModifiedTime; private final UserContext lastModifiedBy; private final String approvalDescription; private final String domain; private final String task; private final String samplePayloadUrl; private final List additionalInferenceSpecifications; private final String sourceUri; private final ModelPackageSecurityConfig securityConfig; private final ModelPackageModelCard modelCard; private final List tags; private final Map customerMetadataProperties; private final DriftCheckBaselines driftCheckBaselines; private final String skipModelValidation; private ModelPackage(BuilderImpl builder) { this.modelPackageName = builder.modelPackageName; this.modelPackageGroupName = builder.modelPackageGroupName; this.modelPackageVersion = builder.modelPackageVersion; this.modelPackageArn = builder.modelPackageArn; this.modelPackageDescription = builder.modelPackageDescription; this.creationTime = builder.creationTime; this.inferenceSpecification = builder.inferenceSpecification; this.sourceAlgorithmSpecification = builder.sourceAlgorithmSpecification; this.validationSpecification = builder.validationSpecification; this.modelPackageStatus = builder.modelPackageStatus; this.modelPackageStatusDetails = builder.modelPackageStatusDetails; this.certifyForMarketplace = builder.certifyForMarketplace; this.modelApprovalStatus = builder.modelApprovalStatus; this.createdBy = builder.createdBy; this.metadataProperties = builder.metadataProperties; this.modelMetrics = builder.modelMetrics; this.lastModifiedTime = builder.lastModifiedTime; this.lastModifiedBy = builder.lastModifiedBy; this.approvalDescription = builder.approvalDescription; this.domain = builder.domain; this.task = builder.task; this.samplePayloadUrl = builder.samplePayloadUrl; this.additionalInferenceSpecifications = builder.additionalInferenceSpecifications; this.sourceUri = builder.sourceUri; this.securityConfig = builder.securityConfig; this.modelCard = builder.modelCard; this.tags = builder.tags; this.customerMetadataProperties = builder.customerMetadataProperties; this.driftCheckBaselines = builder.driftCheckBaselines; this.skipModelValidation = builder.skipModelValidation; } /** *

* The name of the model. *

* * @return The name of the model. */ public final String modelPackageName() { return modelPackageName; } /** *

* The model group to which the model belongs. *

* * @return The model group to which the model belongs. */ public final String modelPackageGroupName() { return modelPackageGroupName; } /** *

* The version number of a versioned model. *

* * @return The version number of a versioned model. */ public final Integer modelPackageVersion() { return modelPackageVersion; } /** *

* The Amazon Resource Name (ARN) of the model package. *

* * @return The Amazon Resource Name (ARN) of the model package. */ public final String modelPackageArn() { return modelPackageArn; } /** *

* The description of the model package. *

* * @return The description of the model package. */ public final String modelPackageDescription() { return modelPackageDescription; } /** *

* The time that the model package was created. *

* * @return The time that the model package was created. */ public final Instant creationTime() { return creationTime; } /** *

* Defines how to perform inference generation after a training job is run. *

* * @return Defines how to perform inference generation after a training job is run. */ public final InferenceSpecification inferenceSpecification() { return inferenceSpecification; } /** *

* A list of algorithms that were used to create a model package. *

* * @return A list of algorithms that were used to create a model package. */ public final SourceAlgorithmSpecification sourceAlgorithmSpecification() { return sourceAlgorithmSpecification; } /** *

* Specifies batch transform jobs that SageMaker runs to validate your model package. *

* * @return Specifies batch transform jobs that SageMaker runs to validate your model package. */ public final ModelPackageValidationSpecification validationSpecification() { return validationSpecification; } /** *

* The status of the model package. This can be one of the following values. *

*
    *
  • *

    * PENDING - The model package is pending being created. *

    *
  • *
  • *

    * IN_PROGRESS - The model package is in the process of being created. *

    *
  • *
  • *

    * COMPLETED - The model package was successfully created. *

    *
  • *
  • *

    * FAILED - The model package failed. *

    *
  • *
  • *

    * DELETING - The model package is in the process of being deleted. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, * {@link #modelPackageStatus} will return {@link ModelPackageStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #modelPackageStatusAsString}. *

* * @return The status of the model package. This can be one of the following values.

*
    *
  • *

    * PENDING - The model package is pending being created. *

    *
  • *
  • *

    * IN_PROGRESS - The model package is in the process of being created. *

    *
  • *
  • *

    * COMPLETED - The model package was successfully created. *

    *
  • *
  • *

    * FAILED - The model package failed. *

    *
  • *
  • *

    * DELETING - The model package is in the process of being deleted. *

    *
  • * @see ModelPackageStatus */ public final ModelPackageStatus modelPackageStatus() { return ModelPackageStatus.fromValue(modelPackageStatus); } /** *

    * The status of the model package. This can be one of the following values. *

    *
      *
    • *

      * PENDING - The model package is pending being created. *

      *
    • *
    • *

      * IN_PROGRESS - The model package is in the process of being created. *

      *
    • *
    • *

      * COMPLETED - The model package was successfully created. *

      *
    • *
    • *

      * FAILED - The model package failed. *

      *
    • *
    • *

      * DELETING - The model package is in the process of being deleted. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, * {@link #modelPackageStatus} will return {@link ModelPackageStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #modelPackageStatusAsString}. *

    * * @return The status of the model package. This can be one of the following values.

    *
      *
    • *

      * PENDING - The model package is pending being created. *

      *
    • *
    • *

      * IN_PROGRESS - The model package is in the process of being created. *

      *
    • *
    • *

      * COMPLETED - The model package was successfully created. *

      *
    • *
    • *

      * FAILED - The model package failed. *

      *
    • *
    • *

      * DELETING - The model package is in the process of being deleted. *

      *
    • * @see ModelPackageStatus */ public final String modelPackageStatusAsString() { return modelPackageStatus; } /** *

      * Specifies the validation and image scan statuses of the model package. *

      * * @return Specifies the validation and image scan statuses of the model package. */ public final ModelPackageStatusDetails modelPackageStatusDetails() { return modelPackageStatusDetails; } /** *

      * Whether the model package is to be certified to be listed on Amazon Web Services Marketplace. For information * about listing model packages on Amazon Web Services Marketplace, see List Your Algorithm or Model * Package on Amazon Web Services Marketplace. *

      * * @return Whether the model package is to be certified to be listed on Amazon Web Services Marketplace. For * information about listing model packages on Amazon Web Services Marketplace, see List Your Algorithm or * Model Package on Amazon Web Services Marketplace. */ public final Boolean certifyForMarketplace() { return certifyForMarketplace; } /** *

      * The approval status of the model. This can be one of the following values. *

      *
        *
      • *

        * APPROVED - The model is approved *

        *
      • *
      • *

        * REJECTED - The model is rejected. *

        *
      • *
      • *

        * PENDING_MANUAL_APPROVAL - The model is waiting for manual approval. *

        *
      • *
      *

      * If the service returns an enum value that is not available in the current SDK version, * {@link #modelApprovalStatus} will return {@link ModelApprovalStatus#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #modelApprovalStatusAsString}. *

      * * @return The approval status of the model. This can be one of the following values.

      *
        *
      • *

        * APPROVED - The model is approved *

        *
      • *
      • *

        * REJECTED - The model is rejected. *

        *
      • *
      • *

        * PENDING_MANUAL_APPROVAL - The model is waiting for manual approval. *

        *
      • * @see ModelApprovalStatus */ public final ModelApprovalStatus modelApprovalStatus() { return ModelApprovalStatus.fromValue(modelApprovalStatus); } /** *

        * The approval status of the model. This can be one of the following values. *

        *
          *
        • *

          * APPROVED - The model is approved *

          *
        • *
        • *

          * REJECTED - The model is rejected. *

          *
        • *
        • *

          * PENDING_MANUAL_APPROVAL - The model is waiting for manual approval. *

          *
        • *
        *

        * If the service returns an enum value that is not available in the current SDK version, * {@link #modelApprovalStatus} will return {@link ModelApprovalStatus#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #modelApprovalStatusAsString}. *

        * * @return The approval status of the model. This can be one of the following values.

        *
          *
        • *

          * APPROVED - The model is approved *

          *
        • *
        • *

          * REJECTED - The model is rejected. *

          *
        • *
        • *

          * PENDING_MANUAL_APPROVAL - The model is waiting for manual approval. *

          *
        • * @see ModelApprovalStatus */ public final String modelApprovalStatusAsString() { return modelApprovalStatus; } /** *

          * Information about the user who created or modified an experiment, trial, trial component, lineage group, or * project. *

          * * @return Information about the user who created or modified an experiment, trial, trial component, lineage group, * or project. */ public final UserContext createdBy() { return createdBy; } /** *

          * Metadata properties of the tracking entity, trial, or trial component. *

          * * @return Metadata properties of the tracking entity, trial, or trial component. */ public final MetadataProperties metadataProperties() { return metadataProperties; } /** *

          * Metrics for the model. *

          * * @return Metrics for the model. */ public final ModelMetrics modelMetrics() { return modelMetrics; } /** *

          * The last time the model package was modified. *

          * * @return The last time the model package was modified. */ public final Instant lastModifiedTime() { return lastModifiedTime; } /** *

          * Information about the user who created or modified an experiment, trial, trial component, lineage group, or * project. *

          * * @return Information about the user who created or modified an experiment, trial, trial component, lineage group, * or project. */ public final UserContext lastModifiedBy() { return lastModifiedBy; } /** *

          * A description provided when the model approval is set. *

          * * @return A description provided when the model approval is set. */ public final String approvalDescription() { return approvalDescription; } /** *

          * The machine learning domain of your model package and its components. Common machine learning domains include * computer vision and natural language processing. *

          * * @return The machine learning domain of your model package and its components. Common machine learning domains * include computer vision and natural language processing. */ public final String domain() { return domain; } /** *

          * The machine learning task your model package accomplishes. Common machine learning tasks include object detection * and image classification. *

          * * @return The machine learning task your model package accomplishes. Common machine learning tasks include object * detection and image classification. */ public final String task() { return task; } /** *

          * The Amazon Simple Storage Service path where the sample payload are stored. This path must point to a single gzip * compressed tar archive (.tar.gz suffix). *

          * * @return The Amazon Simple Storage Service path where the sample payload are stored. This path must point to a * single gzip compressed tar archive (.tar.gz suffix). */ public final String samplePayloadUrl() { return samplePayloadUrl; } /** * For responses, this returns true if the service returned a value for the AdditionalInferenceSpecifications * property. This DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} * method on the property). This is useful because the SDK will never return a null collection or map, but you may * need to differentiate between the service returning nothing (or null) and the service returning an empty * collection or map. For requests, this returns true if a value for the property was specified in the request * builder, and false if a value was not specified. */ public final boolean hasAdditionalInferenceSpecifications() { return additionalInferenceSpecifications != null && !(additionalInferenceSpecifications instanceof SdkAutoConstructList); } /** *

          * An array of additional Inference Specification objects. *

          *

          * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

          *

          * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasAdditionalInferenceSpecifications} * method. *

          * * @return An array of additional Inference Specification objects. */ public final List additionalInferenceSpecifications() { return additionalInferenceSpecifications; } /** *

          * The URI of the source for the model package. *

          * * @return The URI of the source for the model package. */ public final String sourceUri() { return sourceUri; } /** * Returns the value of the SecurityConfig property for this object. * * @return The value of the SecurityConfig property for this object. */ public final ModelPackageSecurityConfig securityConfig() { return securityConfig; } /** * Returns the value of the ModelCard property for this object. * * @return The value of the ModelCard property for this object. */ public final ModelPackageModelCard modelCard() { return modelCard; } /** * For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

          * A list of the tags associated with the model package. For more information, see Tagging Amazon Web Services resources * in the Amazon Web Services General Reference Guide. *

          *

          * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

          *

          * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTags} method. *

          * * @return A list of the tags associated with the model package. For more information, see Tagging Amazon Web Services * resources in the Amazon Web Services General Reference Guide. */ public final List tags() { return tags; } /** * For responses, this returns true if the service returned a value for the CustomerMetadataProperties property. * This DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the * property). This is useful because the SDK will never return a null collection or map, but you may need to * differentiate between the service returning nothing (or null) and the service returning an empty collection or * map. For requests, this returns true if a value for the property was specified in the request builder, and false * if a value was not specified. */ public final boolean hasCustomerMetadataProperties() { return customerMetadataProperties != null && !(customerMetadataProperties instanceof SdkAutoConstructMap); } /** *

          * The metadata properties for the model package. *

          *

          * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

          *

          * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasCustomerMetadataProperties} method. *

          * * @return The metadata properties for the model package. */ public final Map customerMetadataProperties() { return customerMetadataProperties; } /** *

          * Represents the drift check baselines that can be used when the model monitor is set using the model package. *

          * * @return Represents the drift check baselines that can be used when the model monitor is set using the model * package. */ public final DriftCheckBaselines driftCheckBaselines() { return driftCheckBaselines; } /** *

          * Indicates if you want to skip model validation. *

          *

          * If the service returns an enum value that is not available in the current SDK version, * {@link #skipModelValidation} will return {@link SkipModelValidation#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #skipModelValidationAsString}. *

          * * @return Indicates if you want to skip model validation. * @see SkipModelValidation */ public final SkipModelValidation skipModelValidation() { return SkipModelValidation.fromValue(skipModelValidation); } /** *

          * Indicates if you want to skip model validation. *

          *

          * If the service returns an enum value that is not available in the current SDK version, * {@link #skipModelValidation} will return {@link SkipModelValidation#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #skipModelValidationAsString}. *

          * * @return Indicates if you want to skip model validation. * @see SkipModelValidation */ public final String skipModelValidationAsString() { return skipModelValidation; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(modelPackageName()); hashCode = 31 * hashCode + Objects.hashCode(modelPackageGroupName()); hashCode = 31 * hashCode + Objects.hashCode(modelPackageVersion()); hashCode = 31 * hashCode + Objects.hashCode(modelPackageArn()); hashCode = 31 * hashCode + Objects.hashCode(modelPackageDescription()); hashCode = 31 * hashCode + Objects.hashCode(creationTime()); hashCode = 31 * hashCode + Objects.hashCode(inferenceSpecification()); hashCode = 31 * hashCode + Objects.hashCode(sourceAlgorithmSpecification()); hashCode = 31 * hashCode + Objects.hashCode(validationSpecification()); hashCode = 31 * hashCode + Objects.hashCode(modelPackageStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(modelPackageStatusDetails()); hashCode = 31 * hashCode + Objects.hashCode(certifyForMarketplace()); hashCode = 31 * hashCode + Objects.hashCode(modelApprovalStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(createdBy()); hashCode = 31 * hashCode + Objects.hashCode(metadataProperties()); hashCode = 31 * hashCode + Objects.hashCode(modelMetrics()); hashCode = 31 * hashCode + Objects.hashCode(lastModifiedTime()); hashCode = 31 * hashCode + Objects.hashCode(lastModifiedBy()); hashCode = 31 * hashCode + Objects.hashCode(approvalDescription()); hashCode = 31 * hashCode + Objects.hashCode(domain()); hashCode = 31 * hashCode + Objects.hashCode(task()); hashCode = 31 * hashCode + Objects.hashCode(samplePayloadUrl()); hashCode = 31 * hashCode + Objects.hashCode(hasAdditionalInferenceSpecifications() ? additionalInferenceSpecifications() : null); hashCode = 31 * hashCode + Objects.hashCode(sourceUri()); hashCode = 31 * hashCode + Objects.hashCode(securityConfig()); hashCode = 31 * hashCode + Objects.hashCode(modelCard()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(hasCustomerMetadataProperties() ? customerMetadataProperties() : null); hashCode = 31 * hashCode + Objects.hashCode(driftCheckBaselines()); hashCode = 31 * hashCode + Objects.hashCode(skipModelValidationAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ModelPackage)) { return false; } ModelPackage other = (ModelPackage) obj; return Objects.equals(modelPackageName(), other.modelPackageName()) && Objects.equals(modelPackageGroupName(), other.modelPackageGroupName()) && Objects.equals(modelPackageVersion(), other.modelPackageVersion()) && Objects.equals(modelPackageArn(), other.modelPackageArn()) && Objects.equals(modelPackageDescription(), other.modelPackageDescription()) && Objects.equals(creationTime(), other.creationTime()) && Objects.equals(inferenceSpecification(), other.inferenceSpecification()) && Objects.equals(sourceAlgorithmSpecification(), other.sourceAlgorithmSpecification()) && Objects.equals(validationSpecification(), other.validationSpecification()) && Objects.equals(modelPackageStatusAsString(), other.modelPackageStatusAsString()) && Objects.equals(modelPackageStatusDetails(), other.modelPackageStatusDetails()) && Objects.equals(certifyForMarketplace(), other.certifyForMarketplace()) && Objects.equals(modelApprovalStatusAsString(), other.modelApprovalStatusAsString()) && Objects.equals(createdBy(), other.createdBy()) && Objects.equals(metadataProperties(), other.metadataProperties()) && Objects.equals(modelMetrics(), other.modelMetrics()) && Objects.equals(lastModifiedTime(), other.lastModifiedTime()) && Objects.equals(lastModifiedBy(), other.lastModifiedBy()) && Objects.equals(approvalDescription(), other.approvalDescription()) && Objects.equals(domain(), other.domain()) && Objects.equals(task(), other.task()) && Objects.equals(samplePayloadUrl(), other.samplePayloadUrl()) && hasAdditionalInferenceSpecifications() == other.hasAdditionalInferenceSpecifications() && Objects.equals(additionalInferenceSpecifications(), other.additionalInferenceSpecifications()) && Objects.equals(sourceUri(), other.sourceUri()) && Objects.equals(securityConfig(), other.securityConfig()) && Objects.equals(modelCard(), other.modelCard()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && hasCustomerMetadataProperties() == other.hasCustomerMetadataProperties() && Objects.equals(customerMetadataProperties(), other.customerMetadataProperties()) && Objects.equals(driftCheckBaselines(), other.driftCheckBaselines()) && Objects.equals(skipModelValidationAsString(), other.skipModelValidationAsString()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString .builder("ModelPackage") .add("ModelPackageName", modelPackageName()) .add("ModelPackageGroupName", modelPackageGroupName()) .add("ModelPackageVersion", modelPackageVersion()) .add("ModelPackageArn", modelPackageArn()) .add("ModelPackageDescription", modelPackageDescription()) .add("CreationTime", creationTime()) .add("InferenceSpecification", inferenceSpecification()) .add("SourceAlgorithmSpecification", sourceAlgorithmSpecification()) .add("ValidationSpecification", validationSpecification()) .add("ModelPackageStatus", modelPackageStatusAsString()) .add("ModelPackageStatusDetails", modelPackageStatusDetails()) .add("CertifyForMarketplace", certifyForMarketplace()) .add("ModelApprovalStatus", modelApprovalStatusAsString()) .add("CreatedBy", createdBy()) .add("MetadataProperties", metadataProperties()) .add("ModelMetrics", modelMetrics()) .add("LastModifiedTime", lastModifiedTime()) .add("LastModifiedBy", lastModifiedBy()) .add("ApprovalDescription", approvalDescription()) .add("Domain", domain()) .add("Task", task()) .add("SamplePayloadUrl", samplePayloadUrl()) .add("AdditionalInferenceSpecifications", hasAdditionalInferenceSpecifications() ? additionalInferenceSpecifications() : null) .add("SourceUri", sourceUri()).add("SecurityConfig", securityConfig()).add("ModelCard", modelCard()) .add("Tags", hasTags() ? tags() : null) .add("CustomerMetadataProperties", hasCustomerMetadataProperties() ? customerMetadataProperties() : null) .add("DriftCheckBaselines", driftCheckBaselines()).add("SkipModelValidation", skipModelValidationAsString()) .build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ModelPackageName": return Optional.ofNullable(clazz.cast(modelPackageName())); case "ModelPackageGroupName": return Optional.ofNullable(clazz.cast(modelPackageGroupName())); case "ModelPackageVersion": return Optional.ofNullable(clazz.cast(modelPackageVersion())); case "ModelPackageArn": return Optional.ofNullable(clazz.cast(modelPackageArn())); case "ModelPackageDescription": return Optional.ofNullable(clazz.cast(modelPackageDescription())); case "CreationTime": return Optional.ofNullable(clazz.cast(creationTime())); case "InferenceSpecification": return Optional.ofNullable(clazz.cast(inferenceSpecification())); case "SourceAlgorithmSpecification": return Optional.ofNullable(clazz.cast(sourceAlgorithmSpecification())); case "ValidationSpecification": return Optional.ofNullable(clazz.cast(validationSpecification())); case "ModelPackageStatus": return Optional.ofNullable(clazz.cast(modelPackageStatusAsString())); case "ModelPackageStatusDetails": return Optional.ofNullable(clazz.cast(modelPackageStatusDetails())); case "CertifyForMarketplace": return Optional.ofNullable(clazz.cast(certifyForMarketplace())); case "ModelApprovalStatus": return Optional.ofNullable(clazz.cast(modelApprovalStatusAsString())); case "CreatedBy": return Optional.ofNullable(clazz.cast(createdBy())); case "MetadataProperties": return Optional.ofNullable(clazz.cast(metadataProperties())); case "ModelMetrics": return Optional.ofNullable(clazz.cast(modelMetrics())); case "LastModifiedTime": return Optional.ofNullable(clazz.cast(lastModifiedTime())); case "LastModifiedBy": return Optional.ofNullable(clazz.cast(lastModifiedBy())); case "ApprovalDescription": return Optional.ofNullable(clazz.cast(approvalDescription())); case "Domain": return Optional.ofNullable(clazz.cast(domain())); case "Task": return Optional.ofNullable(clazz.cast(task())); case "SamplePayloadUrl": return Optional.ofNullable(clazz.cast(samplePayloadUrl())); case "AdditionalInferenceSpecifications": return Optional.ofNullable(clazz.cast(additionalInferenceSpecifications())); case "SourceUri": return Optional.ofNullable(clazz.cast(sourceUri())); case "SecurityConfig": return Optional.ofNullable(clazz.cast(securityConfig())); case "ModelCard": return Optional.ofNullable(clazz.cast(modelCard())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "CustomerMetadataProperties": return Optional.ofNullable(clazz.cast(customerMetadataProperties())); case "DriftCheckBaselines": return Optional.ofNullable(clazz.cast(driftCheckBaselines())); case "SkipModelValidation": return Optional.ofNullable(clazz.cast(skipModelValidationAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ModelPackage) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

          * The name of the model. *

          * * @param modelPackageName * The name of the model. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelPackageName(String modelPackageName); /** *

          * The model group to which the model belongs. *

          * * @param modelPackageGroupName * The model group to which the model belongs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelPackageGroupName(String modelPackageGroupName); /** *

          * The version number of a versioned model. *

          * * @param modelPackageVersion * The version number of a versioned model. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelPackageVersion(Integer modelPackageVersion); /** *

          * The Amazon Resource Name (ARN) of the model package. *

          * * @param modelPackageArn * The Amazon Resource Name (ARN) of the model package. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelPackageArn(String modelPackageArn); /** *

          * The description of the model package. *

          * * @param modelPackageDescription * The description of the model package. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelPackageDescription(String modelPackageDescription); /** *

          * The time that the model package was created. *

          * * @param creationTime * The time that the model package was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creationTime(Instant creationTime); /** *

          * Defines how to perform inference generation after a training job is run. *

          * * @param inferenceSpecification * Defines how to perform inference generation after a training job is run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inferenceSpecification(InferenceSpecification inferenceSpecification); /** *

          * Defines how to perform inference generation after a training job is run. *

          * This is a convenience method that creates an instance of the {@link InferenceSpecification.Builder} avoiding * the need to create one manually via {@link InferenceSpecification#builder()}. * *

          * When the {@link Consumer} completes, {@link InferenceSpecification.Builder#build()} is called immediately and * its result is passed to {@link #inferenceSpecification(InferenceSpecification)}. * * @param inferenceSpecification * a consumer that will call methods on {@link InferenceSpecification.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #inferenceSpecification(InferenceSpecification) */ default Builder inferenceSpecification(Consumer inferenceSpecification) { return inferenceSpecification(InferenceSpecification.builder().applyMutation(inferenceSpecification).build()); } /** *

          * A list of algorithms that were used to create a model package. *

          * * @param sourceAlgorithmSpecification * A list of algorithms that were used to create a model package. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sourceAlgorithmSpecification(SourceAlgorithmSpecification sourceAlgorithmSpecification); /** *

          * A list of algorithms that were used to create a model package. *

          * This is a convenience method that creates an instance of the {@link SourceAlgorithmSpecification.Builder} * avoiding the need to create one manually via {@link SourceAlgorithmSpecification#builder()}. * *

          * When the {@link Consumer} completes, {@link SourceAlgorithmSpecification.Builder#build()} is called * immediately and its result is passed to {@link #sourceAlgorithmSpecification(SourceAlgorithmSpecification)}. * * @param sourceAlgorithmSpecification * a consumer that will call methods on {@link SourceAlgorithmSpecification.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #sourceAlgorithmSpecification(SourceAlgorithmSpecification) */ default Builder sourceAlgorithmSpecification(Consumer sourceAlgorithmSpecification) { return sourceAlgorithmSpecification(SourceAlgorithmSpecification.builder() .applyMutation(sourceAlgorithmSpecification).build()); } /** *

          * Specifies batch transform jobs that SageMaker runs to validate your model package. *

          * * @param validationSpecification * Specifies batch transform jobs that SageMaker runs to validate your model package. * @return Returns a reference to this object so that method calls can be chained together. */ Builder validationSpecification(ModelPackageValidationSpecification validationSpecification); /** *

          * Specifies batch transform jobs that SageMaker runs to validate your model package. *

          * This is a convenience method that creates an instance of the * {@link ModelPackageValidationSpecification.Builder} avoiding the need to create one manually via * {@link ModelPackageValidationSpecification#builder()}. * *

          * When the {@link Consumer} completes, {@link ModelPackageValidationSpecification.Builder#build()} is called * immediately and its result is passed to {@link #validationSpecification(ModelPackageValidationSpecification)}. * * @param validationSpecification * a consumer that will call methods on {@link ModelPackageValidationSpecification.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #validationSpecification(ModelPackageValidationSpecification) */ default Builder validationSpecification(Consumer validationSpecification) { return validationSpecification(ModelPackageValidationSpecification.builder().applyMutation(validationSpecification) .build()); } /** *

          * The status of the model package. This can be one of the following values. *

          *
            *
          • *

            * PENDING - The model package is pending being created. *

            *
          • *
          • *

            * IN_PROGRESS - The model package is in the process of being created. *

            *
          • *
          • *

            * COMPLETED - The model package was successfully created. *

            *
          • *
          • *

            * FAILED - The model package failed. *

            *
          • *
          • *

            * DELETING - The model package is in the process of being deleted. *

            *
          • *
          * * @param modelPackageStatus * The status of the model package. This can be one of the following values.

          *
            *
          • *

            * PENDING - The model package is pending being created. *

            *
          • *
          • *

            * IN_PROGRESS - The model package is in the process of being created. *

            *
          • *
          • *

            * COMPLETED - The model package was successfully created. *

            *
          • *
          • *

            * FAILED - The model package failed. *

            *
          • *
          • *

            * DELETING - The model package is in the process of being deleted. *

            *
          • * @see ModelPackageStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ModelPackageStatus */ Builder modelPackageStatus(String modelPackageStatus); /** *

            * The status of the model package. This can be one of the following values. *

            *
              *
            • *

              * PENDING - The model package is pending being created. *

              *
            • *
            • *

              * IN_PROGRESS - The model package is in the process of being created. *

              *
            • *
            • *

              * COMPLETED - The model package was successfully created. *

              *
            • *
            • *

              * FAILED - The model package failed. *

              *
            • *
            • *

              * DELETING - The model package is in the process of being deleted. *

              *
            • *
            * * @param modelPackageStatus * The status of the model package. This can be one of the following values.

            *
              *
            • *

              * PENDING - The model package is pending being created. *

              *
            • *
            • *

              * IN_PROGRESS - The model package is in the process of being created. *

              *
            • *
            • *

              * COMPLETED - The model package was successfully created. *

              *
            • *
            • *

              * FAILED - The model package failed. *

              *
            • *
            • *

              * DELETING - The model package is in the process of being deleted. *

              *
            • * @see ModelPackageStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ModelPackageStatus */ Builder modelPackageStatus(ModelPackageStatus modelPackageStatus); /** *

              * Specifies the validation and image scan statuses of the model package. *

              * * @param modelPackageStatusDetails * Specifies the validation and image scan statuses of the model package. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelPackageStatusDetails(ModelPackageStatusDetails modelPackageStatusDetails); /** *

              * Specifies the validation and image scan statuses of the model package. *

              * This is a convenience method that creates an instance of the {@link ModelPackageStatusDetails.Builder} * avoiding the need to create one manually via {@link ModelPackageStatusDetails#builder()}. * *

              * When the {@link Consumer} completes, {@link ModelPackageStatusDetails.Builder#build()} is called immediately * and its result is passed to {@link #modelPackageStatusDetails(ModelPackageStatusDetails)}. * * @param modelPackageStatusDetails * a consumer that will call methods on {@link ModelPackageStatusDetails.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #modelPackageStatusDetails(ModelPackageStatusDetails) */ default Builder modelPackageStatusDetails(Consumer modelPackageStatusDetails) { return modelPackageStatusDetails(ModelPackageStatusDetails.builder().applyMutation(modelPackageStatusDetails).build()); } /** *

              * Whether the model package is to be certified to be listed on Amazon Web Services Marketplace. For information * about listing model packages on Amazon Web Services Marketplace, see List Your Algorithm or Model * Package on Amazon Web Services Marketplace. *

              * * @param certifyForMarketplace * Whether the model package is to be certified to be listed on Amazon Web Services Marketplace. For * information about listing model packages on Amazon Web Services Marketplace, see List Your Algorithm or * Model Package on Amazon Web Services Marketplace. * @return Returns a reference to this object so that method calls can be chained together. */ Builder certifyForMarketplace(Boolean certifyForMarketplace); /** *

              * The approval status of the model. This can be one of the following values. *

              *
                *
              • *

                * APPROVED - The model is approved *

                *
              • *
              • *

                * REJECTED - The model is rejected. *

                *
              • *
              • *

                * PENDING_MANUAL_APPROVAL - The model is waiting for manual approval. *

                *
              • *
              * * @param modelApprovalStatus * The approval status of the model. This can be one of the following values.

              *
                *
              • *

                * APPROVED - The model is approved *

                *
              • *
              • *

                * REJECTED - The model is rejected. *

                *
              • *
              • *

                * PENDING_MANUAL_APPROVAL - The model is waiting for manual approval. *

                *
              • * @see ModelApprovalStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ModelApprovalStatus */ Builder modelApprovalStatus(String modelApprovalStatus); /** *

                * The approval status of the model. This can be one of the following values. *

                *
                  *
                • *

                  * APPROVED - The model is approved *

                  *
                • *
                • *

                  * REJECTED - The model is rejected. *

                  *
                • *
                • *

                  * PENDING_MANUAL_APPROVAL - The model is waiting for manual approval. *

                  *
                • *
                * * @param modelApprovalStatus * The approval status of the model. This can be one of the following values.

                *
                  *
                • *

                  * APPROVED - The model is approved *

                  *
                • *
                • *

                  * REJECTED - The model is rejected. *

                  *
                • *
                • *

                  * PENDING_MANUAL_APPROVAL - The model is waiting for manual approval. *

                  *
                • * @see ModelApprovalStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ModelApprovalStatus */ Builder modelApprovalStatus(ModelApprovalStatus modelApprovalStatus); /** *

                  * Information about the user who created or modified an experiment, trial, trial component, lineage group, or * project. *

                  * * @param createdBy * Information about the user who created or modified an experiment, trial, trial component, lineage * group, or project. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdBy(UserContext createdBy); /** *

                  * Information about the user who created or modified an experiment, trial, trial component, lineage group, or * project. *

                  * This is a convenience method that creates an instance of the {@link UserContext.Builder} avoiding the need to * create one manually via {@link UserContext#builder()}. * *

                  * When the {@link Consumer} completes, {@link UserContext.Builder#build()} is called immediately and its result * is passed to {@link #createdBy(UserContext)}. * * @param createdBy * a consumer that will call methods on {@link UserContext.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #createdBy(UserContext) */ default Builder createdBy(Consumer createdBy) { return createdBy(UserContext.builder().applyMutation(createdBy).build()); } /** *

                  * Metadata properties of the tracking entity, trial, or trial component. *

                  * * @param metadataProperties * Metadata properties of the tracking entity, trial, or trial component. * @return Returns a reference to this object so that method calls can be chained together. */ Builder metadataProperties(MetadataProperties metadataProperties); /** *

                  * Metadata properties of the tracking entity, trial, or trial component. *

                  * This is a convenience method that creates an instance of the {@link MetadataProperties.Builder} avoiding the * need to create one manually via {@link MetadataProperties#builder()}. * *

                  * When the {@link Consumer} completes, {@link MetadataProperties.Builder#build()} is called immediately and its * result is passed to {@link #metadataProperties(MetadataProperties)}. * * @param metadataProperties * a consumer that will call methods on {@link MetadataProperties.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #metadataProperties(MetadataProperties) */ default Builder metadataProperties(Consumer metadataProperties) { return metadataProperties(MetadataProperties.builder().applyMutation(metadataProperties).build()); } /** *

                  * Metrics for the model. *

                  * * @param modelMetrics * Metrics for the model. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelMetrics(ModelMetrics modelMetrics); /** *

                  * Metrics for the model. *

                  * This is a convenience method that creates an instance of the {@link ModelMetrics.Builder} avoiding the need * to create one manually via {@link ModelMetrics#builder()}. * *

                  * When the {@link Consumer} completes, {@link ModelMetrics.Builder#build()} is called immediately and its * result is passed to {@link #modelMetrics(ModelMetrics)}. * * @param modelMetrics * a consumer that will call methods on {@link ModelMetrics.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #modelMetrics(ModelMetrics) */ default Builder modelMetrics(Consumer modelMetrics) { return modelMetrics(ModelMetrics.builder().applyMutation(modelMetrics).build()); } /** *

                  * The last time the model package was modified. *

                  * * @param lastModifiedTime * The last time the model package was modified. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastModifiedTime(Instant lastModifiedTime); /** *

                  * Information about the user who created or modified an experiment, trial, trial component, lineage group, or * project. *

                  * * @param lastModifiedBy * Information about the user who created or modified an experiment, trial, trial component, lineage * group, or project. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastModifiedBy(UserContext lastModifiedBy); /** *

                  * Information about the user who created or modified an experiment, trial, trial component, lineage group, or * project. *

                  * This is a convenience method that creates an instance of the {@link UserContext.Builder} avoiding the need to * create one manually via {@link UserContext#builder()}. * *

                  * When the {@link Consumer} completes, {@link UserContext.Builder#build()} is called immediately and its result * is passed to {@link #lastModifiedBy(UserContext)}. * * @param lastModifiedBy * a consumer that will call methods on {@link UserContext.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #lastModifiedBy(UserContext) */ default Builder lastModifiedBy(Consumer lastModifiedBy) { return lastModifiedBy(UserContext.builder().applyMutation(lastModifiedBy).build()); } /** *

                  * A description provided when the model approval is set. *

                  * * @param approvalDescription * A description provided when the model approval is set. * @return Returns a reference to this object so that method calls can be chained together. */ Builder approvalDescription(String approvalDescription); /** *

                  * The machine learning domain of your model package and its components. Common machine learning domains include * computer vision and natural language processing. *

                  * * @param domain * The machine learning domain of your model package and its components. Common machine learning domains * include computer vision and natural language processing. * @return Returns a reference to this object so that method calls can be chained together. */ Builder domain(String domain); /** *

                  * The machine learning task your model package accomplishes. Common machine learning tasks include object * detection and image classification. *

                  * * @param task * The machine learning task your model package accomplishes. Common machine learning tasks include * object detection and image classification. * @return Returns a reference to this object so that method calls can be chained together. */ Builder task(String task); /** *

                  * The Amazon Simple Storage Service path where the sample payload are stored. This path must point to a single * gzip compressed tar archive (.tar.gz suffix). *

                  * * @param samplePayloadUrl * The Amazon Simple Storage Service path where the sample payload are stored. This path must point to a * single gzip compressed tar archive (.tar.gz suffix). * @return Returns a reference to this object so that method calls can be chained together. */ Builder samplePayloadUrl(String samplePayloadUrl); /** *

                  * An array of additional Inference Specification objects. *

                  * * @param additionalInferenceSpecifications * An array of additional Inference Specification objects. * @return Returns a reference to this object so that method calls can be chained together. */ Builder additionalInferenceSpecifications( Collection additionalInferenceSpecifications); /** *

                  * An array of additional Inference Specification objects. *

                  * * @param additionalInferenceSpecifications * An array of additional Inference Specification objects. * @return Returns a reference to this object so that method calls can be chained together. */ Builder additionalInferenceSpecifications(AdditionalInferenceSpecificationDefinition... additionalInferenceSpecifications); /** *

                  * An array of additional Inference Specification objects. *

                  * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.sagemaker.model.AdditionalInferenceSpecificationDefinition.Builder} * avoiding the need to create one manually via * {@link software.amazon.awssdk.services.sagemaker.model.AdditionalInferenceSpecificationDefinition#builder()}. * *

                  * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.sagemaker.model.AdditionalInferenceSpecificationDefinition.Builder#build()} * is called immediately and its result is passed to {@link * #additionalInferenceSpecifications(List)}. * * @param additionalInferenceSpecifications * a consumer that will call methods on * {@link software.amazon.awssdk.services.sagemaker.model.AdditionalInferenceSpecificationDefinition.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #additionalInferenceSpecifications(java.util.Collection) */ Builder additionalInferenceSpecifications( Consumer... additionalInferenceSpecifications); /** *

                  * The URI of the source for the model package. *

                  * * @param sourceUri * The URI of the source for the model package. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sourceUri(String sourceUri); /** * Sets the value of the SecurityConfig property for this object. * * @param securityConfig * The new value for the SecurityConfig property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder securityConfig(ModelPackageSecurityConfig securityConfig); /** * Sets the value of the SecurityConfig property for this object. * * This is a convenience method that creates an instance of the {@link ModelPackageSecurityConfig.Builder} * avoiding the need to create one manually via {@link ModelPackageSecurityConfig#builder()}. * *

                  * When the {@link Consumer} completes, {@link ModelPackageSecurityConfig.Builder#build()} is called immediately * and its result is passed to {@link #securityConfig(ModelPackageSecurityConfig)}. * * @param securityConfig * a consumer that will call methods on {@link ModelPackageSecurityConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #securityConfig(ModelPackageSecurityConfig) */ default Builder securityConfig(Consumer securityConfig) { return securityConfig(ModelPackageSecurityConfig.builder().applyMutation(securityConfig).build()); } /** * Sets the value of the ModelCard property for this object. * * @param modelCard * The new value for the ModelCard property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelCard(ModelPackageModelCard modelCard); /** * Sets the value of the ModelCard property for this object. * * This is a convenience method that creates an instance of the {@link ModelPackageModelCard.Builder} avoiding * the need to create one manually via {@link ModelPackageModelCard#builder()}. * *

                  * When the {@link Consumer} completes, {@link ModelPackageModelCard.Builder#build()} is called immediately and * its result is passed to {@link #modelCard(ModelPackageModelCard)}. * * @param modelCard * a consumer that will call methods on {@link ModelPackageModelCard.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #modelCard(ModelPackageModelCard) */ default Builder modelCard(Consumer modelCard) { return modelCard(ModelPackageModelCard.builder().applyMutation(modelCard).build()); } /** *

                  * A list of the tags associated with the model package. For more information, see Tagging Amazon Web Services * resources in the Amazon Web Services General Reference Guide. *

                  * * @param tags * A list of the tags associated with the model package. For more information, see Tagging Amazon Web Services * resources in the Amazon Web Services General Reference Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

                  * A list of the tags associated with the model package. For more information, see Tagging Amazon Web Services * resources in the Amazon Web Services General Reference Guide. *

                  * * @param tags * A list of the tags associated with the model package. For more information, see Tagging Amazon Web Services * resources in the Amazon Web Services General Reference Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

                  * A list of the tags associated with the model package. For more information, see Tagging Amazon Web Services * resources in the Amazon Web Services General Reference Guide. *

                  * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.sagemaker.model.Tag.Builder} avoiding the need to create one manually * via {@link software.amazon.awssdk.services.sagemaker.model.Tag#builder()}. * *

                  * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.sagemaker.model.Tag.Builder#build()} is called immediately and its * result is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on * {@link software.amazon.awssdk.services.sagemaker.model.Tag.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(java.util.Collection) */ Builder tags(Consumer... tags); /** *

                  * The metadata properties for the model package. *

                  * * @param customerMetadataProperties * The metadata properties for the model package. * @return Returns a reference to this object so that method calls can be chained together. */ Builder customerMetadataProperties(Map customerMetadataProperties); /** *

                  * Represents the drift check baselines that can be used when the model monitor is set using the model package. *

                  * * @param driftCheckBaselines * Represents the drift check baselines that can be used when the model monitor is set using the model * package. * @return Returns a reference to this object so that method calls can be chained together. */ Builder driftCheckBaselines(DriftCheckBaselines driftCheckBaselines); /** *

                  * Represents the drift check baselines that can be used when the model monitor is set using the model package. *

                  * This is a convenience method that creates an instance of the {@link DriftCheckBaselines.Builder} avoiding the * need to create one manually via {@link DriftCheckBaselines#builder()}. * *

                  * When the {@link Consumer} completes, {@link DriftCheckBaselines.Builder#build()} is called immediately and * its result is passed to {@link #driftCheckBaselines(DriftCheckBaselines)}. * * @param driftCheckBaselines * a consumer that will call methods on {@link DriftCheckBaselines.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #driftCheckBaselines(DriftCheckBaselines) */ default Builder driftCheckBaselines(Consumer driftCheckBaselines) { return driftCheckBaselines(DriftCheckBaselines.builder().applyMutation(driftCheckBaselines).build()); } /** *

                  * Indicates if you want to skip model validation. *

                  * * @param skipModelValidation * Indicates if you want to skip model validation. * @see SkipModelValidation * @return Returns a reference to this object so that method calls can be chained together. * @see SkipModelValidation */ Builder skipModelValidation(String skipModelValidation); /** *

                  * Indicates if you want to skip model validation. *

                  * * @param skipModelValidation * Indicates if you want to skip model validation. * @see SkipModelValidation * @return Returns a reference to this object so that method calls can be chained together. * @see SkipModelValidation */ Builder skipModelValidation(SkipModelValidation skipModelValidation); } static final class BuilderImpl implements Builder { private String modelPackageName; private String modelPackageGroupName; private Integer modelPackageVersion; private String modelPackageArn; private String modelPackageDescription; private Instant creationTime; private InferenceSpecification inferenceSpecification; private SourceAlgorithmSpecification sourceAlgorithmSpecification; private ModelPackageValidationSpecification validationSpecification; private String modelPackageStatus; private ModelPackageStatusDetails modelPackageStatusDetails; private Boolean certifyForMarketplace; private String modelApprovalStatus; private UserContext createdBy; private MetadataProperties metadataProperties; private ModelMetrics modelMetrics; private Instant lastModifiedTime; private UserContext lastModifiedBy; private String approvalDescription; private String domain; private String task; private String samplePayloadUrl; private List additionalInferenceSpecifications = DefaultSdkAutoConstructList .getInstance(); private String sourceUri; private ModelPackageSecurityConfig securityConfig; private ModelPackageModelCard modelCard; private List tags = DefaultSdkAutoConstructList.getInstance(); private Map customerMetadataProperties = DefaultSdkAutoConstructMap.getInstance(); private DriftCheckBaselines driftCheckBaselines; private String skipModelValidation; private BuilderImpl() { } private BuilderImpl(ModelPackage model) { modelPackageName(model.modelPackageName); modelPackageGroupName(model.modelPackageGroupName); modelPackageVersion(model.modelPackageVersion); modelPackageArn(model.modelPackageArn); modelPackageDescription(model.modelPackageDescription); creationTime(model.creationTime); inferenceSpecification(model.inferenceSpecification); sourceAlgorithmSpecification(model.sourceAlgorithmSpecification); validationSpecification(model.validationSpecification); modelPackageStatus(model.modelPackageStatus); modelPackageStatusDetails(model.modelPackageStatusDetails); certifyForMarketplace(model.certifyForMarketplace); modelApprovalStatus(model.modelApprovalStatus); createdBy(model.createdBy); metadataProperties(model.metadataProperties); modelMetrics(model.modelMetrics); lastModifiedTime(model.lastModifiedTime); lastModifiedBy(model.lastModifiedBy); approvalDescription(model.approvalDescription); domain(model.domain); task(model.task); samplePayloadUrl(model.samplePayloadUrl); additionalInferenceSpecifications(model.additionalInferenceSpecifications); sourceUri(model.sourceUri); securityConfig(model.securityConfig); modelCard(model.modelCard); tags(model.tags); customerMetadataProperties(model.customerMetadataProperties); driftCheckBaselines(model.driftCheckBaselines); skipModelValidation(model.skipModelValidation); } public final String getModelPackageName() { return modelPackageName; } public final void setModelPackageName(String modelPackageName) { this.modelPackageName = modelPackageName; } @Override public final Builder modelPackageName(String modelPackageName) { this.modelPackageName = modelPackageName; return this; } public final String getModelPackageGroupName() { return modelPackageGroupName; } public final void setModelPackageGroupName(String modelPackageGroupName) { this.modelPackageGroupName = modelPackageGroupName; } @Override public final Builder modelPackageGroupName(String modelPackageGroupName) { this.modelPackageGroupName = modelPackageGroupName; return this; } public final Integer getModelPackageVersion() { return modelPackageVersion; } public final void setModelPackageVersion(Integer modelPackageVersion) { this.modelPackageVersion = modelPackageVersion; } @Override public final Builder modelPackageVersion(Integer modelPackageVersion) { this.modelPackageVersion = modelPackageVersion; return this; } public final String getModelPackageArn() { return modelPackageArn; } public final void setModelPackageArn(String modelPackageArn) { this.modelPackageArn = modelPackageArn; } @Override public final Builder modelPackageArn(String modelPackageArn) { this.modelPackageArn = modelPackageArn; return this; } public final String getModelPackageDescription() { return modelPackageDescription; } public final void setModelPackageDescription(String modelPackageDescription) { this.modelPackageDescription = modelPackageDescription; } @Override public final Builder modelPackageDescription(String modelPackageDescription) { this.modelPackageDescription = modelPackageDescription; return this; } public final Instant getCreationTime() { return creationTime; } public final void setCreationTime(Instant creationTime) { this.creationTime = creationTime; } @Override public final Builder creationTime(Instant creationTime) { this.creationTime = creationTime; return this; } public final InferenceSpecification.Builder getInferenceSpecification() { return inferenceSpecification != null ? inferenceSpecification.toBuilder() : null; } public final void setInferenceSpecification(InferenceSpecification.BuilderImpl inferenceSpecification) { this.inferenceSpecification = inferenceSpecification != null ? inferenceSpecification.build() : null; } @Override public final Builder inferenceSpecification(InferenceSpecification inferenceSpecification) { this.inferenceSpecification = inferenceSpecification; return this; } public final SourceAlgorithmSpecification.Builder getSourceAlgorithmSpecification() { return sourceAlgorithmSpecification != null ? sourceAlgorithmSpecification.toBuilder() : null; } public final void setSourceAlgorithmSpecification(SourceAlgorithmSpecification.BuilderImpl sourceAlgorithmSpecification) { this.sourceAlgorithmSpecification = sourceAlgorithmSpecification != null ? sourceAlgorithmSpecification.build() : null; } @Override public final Builder sourceAlgorithmSpecification(SourceAlgorithmSpecification sourceAlgorithmSpecification) { this.sourceAlgorithmSpecification = sourceAlgorithmSpecification; return this; } public final ModelPackageValidationSpecification.Builder getValidationSpecification() { return validationSpecification != null ? validationSpecification.toBuilder() : null; } public final void setValidationSpecification(ModelPackageValidationSpecification.BuilderImpl validationSpecification) { this.validationSpecification = validationSpecification != null ? validationSpecification.build() : null; } @Override public final Builder validationSpecification(ModelPackageValidationSpecification validationSpecification) { this.validationSpecification = validationSpecification; return this; } public final String getModelPackageStatus() { return modelPackageStatus; } public final void setModelPackageStatus(String modelPackageStatus) { this.modelPackageStatus = modelPackageStatus; } @Override public final Builder modelPackageStatus(String modelPackageStatus) { this.modelPackageStatus = modelPackageStatus; return this; } @Override public final Builder modelPackageStatus(ModelPackageStatus modelPackageStatus) { this.modelPackageStatus(modelPackageStatus == null ? null : modelPackageStatus.toString()); return this; } public final ModelPackageStatusDetails.Builder getModelPackageStatusDetails() { return modelPackageStatusDetails != null ? modelPackageStatusDetails.toBuilder() : null; } public final void setModelPackageStatusDetails(ModelPackageStatusDetails.BuilderImpl modelPackageStatusDetails) { this.modelPackageStatusDetails = modelPackageStatusDetails != null ? modelPackageStatusDetails.build() : null; } @Override public final Builder modelPackageStatusDetails(ModelPackageStatusDetails modelPackageStatusDetails) { this.modelPackageStatusDetails = modelPackageStatusDetails; return this; } public final Boolean getCertifyForMarketplace() { return certifyForMarketplace; } public final void setCertifyForMarketplace(Boolean certifyForMarketplace) { this.certifyForMarketplace = certifyForMarketplace; } @Override public final Builder certifyForMarketplace(Boolean certifyForMarketplace) { this.certifyForMarketplace = certifyForMarketplace; return this; } public final String getModelApprovalStatus() { return modelApprovalStatus; } public final void setModelApprovalStatus(String modelApprovalStatus) { this.modelApprovalStatus = modelApprovalStatus; } @Override public final Builder modelApprovalStatus(String modelApprovalStatus) { this.modelApprovalStatus = modelApprovalStatus; return this; } @Override public final Builder modelApprovalStatus(ModelApprovalStatus modelApprovalStatus) { this.modelApprovalStatus(modelApprovalStatus == null ? null : modelApprovalStatus.toString()); return this; } public final UserContext.Builder getCreatedBy() { return createdBy != null ? createdBy.toBuilder() : null; } public final void setCreatedBy(UserContext.BuilderImpl createdBy) { this.createdBy = createdBy != null ? createdBy.build() : null; } @Override public final Builder createdBy(UserContext createdBy) { this.createdBy = createdBy; return this; } public final MetadataProperties.Builder getMetadataProperties() { return metadataProperties != null ? metadataProperties.toBuilder() : null; } public final void setMetadataProperties(MetadataProperties.BuilderImpl metadataProperties) { this.metadataProperties = metadataProperties != null ? metadataProperties.build() : null; } @Override public final Builder metadataProperties(MetadataProperties metadataProperties) { this.metadataProperties = metadataProperties; return this; } public final ModelMetrics.Builder getModelMetrics() { return modelMetrics != null ? modelMetrics.toBuilder() : null; } public final void setModelMetrics(ModelMetrics.BuilderImpl modelMetrics) { this.modelMetrics = modelMetrics != null ? modelMetrics.build() : null; } @Override public final Builder modelMetrics(ModelMetrics modelMetrics) { this.modelMetrics = modelMetrics; return this; } public final Instant getLastModifiedTime() { return lastModifiedTime; } public final void setLastModifiedTime(Instant lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } @Override public final Builder lastModifiedTime(Instant lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; return this; } public final UserContext.Builder getLastModifiedBy() { return lastModifiedBy != null ? lastModifiedBy.toBuilder() : null; } public final void setLastModifiedBy(UserContext.BuilderImpl lastModifiedBy) { this.lastModifiedBy = lastModifiedBy != null ? lastModifiedBy.build() : null; } @Override public final Builder lastModifiedBy(UserContext lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; return this; } public final String getApprovalDescription() { return approvalDescription; } public final void setApprovalDescription(String approvalDescription) { this.approvalDescription = approvalDescription; } @Override public final Builder approvalDescription(String approvalDescription) { this.approvalDescription = approvalDescription; return this; } public final String getDomain() { return domain; } public final void setDomain(String domain) { this.domain = domain; } @Override public final Builder domain(String domain) { this.domain = domain; return this; } public final String getTask() { return task; } public final void setTask(String task) { this.task = task; } @Override public final Builder task(String task) { this.task = task; return this; } public final String getSamplePayloadUrl() { return samplePayloadUrl; } public final void setSamplePayloadUrl(String samplePayloadUrl) { this.samplePayloadUrl = samplePayloadUrl; } @Override public final Builder samplePayloadUrl(String samplePayloadUrl) { this.samplePayloadUrl = samplePayloadUrl; return this; } public final List getAdditionalInferenceSpecifications() { List result = AdditionalInferenceSpecificationsCopier .copyToBuilder(this.additionalInferenceSpecifications); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setAdditionalInferenceSpecifications( Collection additionalInferenceSpecifications) { this.additionalInferenceSpecifications = AdditionalInferenceSpecificationsCopier .copyFromBuilder(additionalInferenceSpecifications); } @Override public final Builder additionalInferenceSpecifications( Collection additionalInferenceSpecifications) { this.additionalInferenceSpecifications = AdditionalInferenceSpecificationsCopier .copy(additionalInferenceSpecifications); return this; } @Override @SafeVarargs public final Builder additionalInferenceSpecifications( AdditionalInferenceSpecificationDefinition... additionalInferenceSpecifications) { additionalInferenceSpecifications(Arrays.asList(additionalInferenceSpecifications)); return this; } @Override @SafeVarargs public final Builder additionalInferenceSpecifications( Consumer... additionalInferenceSpecifications) { additionalInferenceSpecifications(Stream.of(additionalInferenceSpecifications) .map(c -> AdditionalInferenceSpecificationDefinition.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final String getSourceUri() { return sourceUri; } public final void setSourceUri(String sourceUri) { this.sourceUri = sourceUri; } @Override public final Builder sourceUri(String sourceUri) { this.sourceUri = sourceUri; return this; } public final ModelPackageSecurityConfig.Builder getSecurityConfig() { return securityConfig != null ? securityConfig.toBuilder() : null; } public final void setSecurityConfig(ModelPackageSecurityConfig.BuilderImpl securityConfig) { this.securityConfig = securityConfig != null ? securityConfig.build() : null; } @Override public final Builder securityConfig(ModelPackageSecurityConfig securityConfig) { this.securityConfig = securityConfig; return this; } public final ModelPackageModelCard.Builder getModelCard() { return modelCard != null ? modelCard.toBuilder() : null; } public final void setModelCard(ModelPackageModelCard.BuilderImpl modelCard) { this.modelCard = modelCard != null ? modelCard.build() : null; } @Override public final Builder modelCard(ModelPackageModelCard modelCard) { this.modelCard = modelCard; return this; } public final List getTags() { List result = TagListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final Map getCustomerMetadataProperties() { if (customerMetadataProperties instanceof SdkAutoConstructMap) { return null; } return customerMetadataProperties; } public final void setCustomerMetadataProperties(Map customerMetadataProperties) { this.customerMetadataProperties = CustomerMetadataMapCopier.copy(customerMetadataProperties); } @Override public final Builder customerMetadataProperties(Map customerMetadataProperties) { this.customerMetadataProperties = CustomerMetadataMapCopier.copy(customerMetadataProperties); return this; } public final DriftCheckBaselines.Builder getDriftCheckBaselines() { return driftCheckBaselines != null ? driftCheckBaselines.toBuilder() : null; } public final void setDriftCheckBaselines(DriftCheckBaselines.BuilderImpl driftCheckBaselines) { this.driftCheckBaselines = driftCheckBaselines != null ? driftCheckBaselines.build() : null; } @Override public final Builder driftCheckBaselines(DriftCheckBaselines driftCheckBaselines) { this.driftCheckBaselines = driftCheckBaselines; return this; } public final String getSkipModelValidation() { return skipModelValidation; } public final void setSkipModelValidation(String skipModelValidation) { this.skipModelValidation = skipModelValidation; } @Override public final Builder skipModelValidation(String skipModelValidation) { this.skipModelValidation = skipModelValidation; return this; } @Override public final Builder skipModelValidation(SkipModelValidation skipModelValidation) { this.skipModelValidation(skipModelValidation == null ? null : skipModelValidation.toString()); return this; } @Override public ModelPackage build() { return new ModelPackage(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy