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

com.amazonaws.services.sagemaker.model.ImageConfig Maven / Gradle / Ivy

/*
 * Copyright 2019-2024 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 com.amazonaws.services.sagemaker.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Specifies whether the model container is in Amazon ECR or a private Docker registry accessible from your Amazon * Virtual Private Cloud (VPC). *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ImageConfig implements Serializable, Cloneable, StructuredPojo { /** *

* Set this to one of the following values: *

*
    *
  • *

    * Platform - The model image is hosted in Amazon ECR. *

    *
  • *
  • *

    * Vpc - The model image is hosted in a private Docker registry in your VPC. *

    *
  • *
*/ private String repositoryAccessMode; /** *

* (Optional) Specifies an authentication configuration for the private docker registry where your model image is * hosted. Specify a value for this property only if you specified Vpc as the value for the * RepositoryAccessMode field, and the private Docker registry where the model image is hosted requires * authentication. *

*/ private RepositoryAuthConfig repositoryAuthConfig; /** *

* Set this to one of the following values: *

*
    *
  • *

    * Platform - The model image is hosted in Amazon ECR. *

    *
  • *
  • *

    * Vpc - The model image is hosted in a private Docker registry in your VPC. *

    *
  • *
* * @param repositoryAccessMode * Set this to one of the following values:

*
    *
  • *

    * Platform - The model image is hosted in Amazon ECR. *

    *
  • *
  • *

    * Vpc - The model image is hosted in a private Docker registry in your VPC. *

    *
  • * @see RepositoryAccessMode */ public void setRepositoryAccessMode(String repositoryAccessMode) { this.repositoryAccessMode = repositoryAccessMode; } /** *

    * Set this to one of the following values: *

    *
      *
    • *

      * Platform - The model image is hosted in Amazon ECR. *

      *
    • *
    • *

      * Vpc - The model image is hosted in a private Docker registry in your VPC. *

      *
    • *
    * * @return Set this to one of the following values:

    *
      *
    • *

      * Platform - The model image is hosted in Amazon ECR. *

      *
    • *
    • *

      * Vpc - The model image is hosted in a private Docker registry in your VPC. *

      *
    • * @see RepositoryAccessMode */ public String getRepositoryAccessMode() { return this.repositoryAccessMode; } /** *

      * Set this to one of the following values: *

      *
        *
      • *

        * Platform - The model image is hosted in Amazon ECR. *

        *
      • *
      • *

        * Vpc - The model image is hosted in a private Docker registry in your VPC. *

        *
      • *
      * * @param repositoryAccessMode * Set this to one of the following values:

      *
        *
      • *

        * Platform - The model image is hosted in Amazon ECR. *

        *
      • *
      • *

        * Vpc - The model image is hosted in a private Docker registry in your VPC. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see RepositoryAccessMode */ public ImageConfig withRepositoryAccessMode(String repositoryAccessMode) { setRepositoryAccessMode(repositoryAccessMode); return this; } /** *

        * Set this to one of the following values: *

        *
          *
        • *

          * Platform - The model image is hosted in Amazon ECR. *

          *
        • *
        • *

          * Vpc - The model image is hosted in a private Docker registry in your VPC. *

          *
        • *
        * * @param repositoryAccessMode * Set this to one of the following values:

        *
          *
        • *

          * Platform - The model image is hosted in Amazon ECR. *

          *
        • *
        • *

          * Vpc - The model image is hosted in a private Docker registry in your VPC. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see RepositoryAccessMode */ public ImageConfig withRepositoryAccessMode(RepositoryAccessMode repositoryAccessMode) { this.repositoryAccessMode = repositoryAccessMode.toString(); return this; } /** *

          * (Optional) Specifies an authentication configuration for the private docker registry where your model image is * hosted. Specify a value for this property only if you specified Vpc as the value for the * RepositoryAccessMode field, and the private Docker registry where the model image is hosted requires * authentication. *

          * * @param repositoryAuthConfig * (Optional) Specifies an authentication configuration for the private docker registry where your model * image is hosted. Specify a value for this property only if you specified Vpc as the value for * the RepositoryAccessMode field, and the private Docker registry where the model image is * hosted requires authentication. */ public void setRepositoryAuthConfig(RepositoryAuthConfig repositoryAuthConfig) { this.repositoryAuthConfig = repositoryAuthConfig; } /** *

          * (Optional) Specifies an authentication configuration for the private docker registry where your model image is * hosted. Specify a value for this property only if you specified Vpc as the value for the * RepositoryAccessMode field, and the private Docker registry where the model image is hosted requires * authentication. *

          * * @return (Optional) Specifies an authentication configuration for the private docker registry where your model * image is hosted. Specify a value for this property only if you specified Vpc as the value * for the RepositoryAccessMode field, and the private Docker registry where the model image is * hosted requires authentication. */ public RepositoryAuthConfig getRepositoryAuthConfig() { return this.repositoryAuthConfig; } /** *

          * (Optional) Specifies an authentication configuration for the private docker registry where your model image is * hosted. Specify a value for this property only if you specified Vpc as the value for the * RepositoryAccessMode field, and the private Docker registry where the model image is hosted requires * authentication. *

          * * @param repositoryAuthConfig * (Optional) Specifies an authentication configuration for the private docker registry where your model * image is hosted. Specify a value for this property only if you specified Vpc as the value for * the RepositoryAccessMode field, and the private Docker registry where the model image is * hosted requires authentication. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageConfig withRepositoryAuthConfig(RepositoryAuthConfig repositoryAuthConfig) { setRepositoryAuthConfig(repositoryAuthConfig); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getRepositoryAccessMode() != null) sb.append("RepositoryAccessMode: ").append(getRepositoryAccessMode()).append(","); if (getRepositoryAuthConfig() != null) sb.append("RepositoryAuthConfig: ").append(getRepositoryAuthConfig()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ImageConfig == false) return false; ImageConfig other = (ImageConfig) obj; if (other.getRepositoryAccessMode() == null ^ this.getRepositoryAccessMode() == null) return false; if (other.getRepositoryAccessMode() != null && other.getRepositoryAccessMode().equals(this.getRepositoryAccessMode()) == false) return false; if (other.getRepositoryAuthConfig() == null ^ this.getRepositoryAuthConfig() == null) return false; if (other.getRepositoryAuthConfig() != null && other.getRepositoryAuthConfig().equals(this.getRepositoryAuthConfig()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRepositoryAccessMode() == null) ? 0 : getRepositoryAccessMode().hashCode()); hashCode = prime * hashCode + ((getRepositoryAuthConfig() == null) ? 0 : getRepositoryAuthConfig().hashCode()); return hashCode; } @Override public ImageConfig clone() { try { return (ImageConfig) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.sagemaker.model.transform.ImageConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy