/* * Copyright 2018-2023 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.lightsail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RegisterContainerImageRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the container service for which to register a container image. *
*/ private String serviceName; /** ** The label for the container image when it's registered to the container service. *
** Use a descriptive label that you can use to track the different versions of your registered container images. *
*
* Use the GetContainerImages action to return the container images registered to a Lightsail container
* service. The label is the <imagelabel> portion of the following image name example:
*
* :container-service-1.<imagelabel>.1
*
* If the name of your container service is mycontainerservice, and the label that you specify is
* mystaticwebsite, then the name of the registered container image will be
* :mycontainerservice.mystaticwebsite.1.
*
* The number at the end of these image name examples represents the version of the registered container image. If
* you push and register another container image to the same Lightsail container service, with the same label, then
* the version number for the new registered container image will be 2. If you push and register
* another container image, the version number will be 3, and so on.
*
* The digest of the container image to be registered. *
*/ private String digest; /** ** The name of the container service for which to register a container image. *
* * @param serviceName * The name of the container service for which to register a container image. */ public void setServiceName(String serviceName) { this.serviceName = serviceName; } /** ** The name of the container service for which to register a container image. *
* * @return The name of the container service for which to register a container image. */ public String getServiceName() { return this.serviceName; } /** ** The name of the container service for which to register a container image. *
* * @param serviceName * The name of the container service for which to register a container image. * @return Returns a reference to this object so that method calls can be chained together. */ public RegisterContainerImageRequest withServiceName(String serviceName) { setServiceName(serviceName); return this; } /** ** The label for the container image when it's registered to the container service. *
** Use a descriptive label that you can use to track the different versions of your registered container images. *
*
* Use the GetContainerImages action to return the container images registered to a Lightsail container
* service. The label is the <imagelabel> portion of the following image name example:
*
* :container-service-1.<imagelabel>.1
*
* If the name of your container service is mycontainerservice, and the label that you specify is
* mystaticwebsite, then the name of the registered container image will be
* :mycontainerservice.mystaticwebsite.1.
*
* The number at the end of these image name examples represents the version of the registered container image. If
* you push and register another container image to the same Lightsail container service, with the same label, then
* the version number for the new registered container image will be 2. If you push and register
* another container image, the version number will be 3, and so on.
*
* Use a descriptive label that you can use to track the different versions of your registered container * images. *
*
* Use the GetContainerImages action to return the container images registered to a Lightsail
* container service. The label is the <imagelabel> portion of the following image name
* example:
*
* :container-service-1.<imagelabel>.1
*
* If the name of your container service is mycontainerservice, and the label that you specify
* is mystaticwebsite, then the name of the registered container image will be
* :mycontainerservice.mystaticwebsite.1.
*
* The number at the end of these image name examples represents the version of the registered container
* image. If you push and register another container image to the same Lightsail container service, with the
* same label, then the version number for the new registered container image will be 2. If you
* push and register another container image, the version number will be 3, and so on.
*/
public void setLabel(String label) {
this.label = label;
}
/**
*
* The label for the container image when it's registered to the container service. *
** Use a descriptive label that you can use to track the different versions of your registered container images. *
*
* Use the GetContainerImages action to return the container images registered to a Lightsail container
* service. The label is the <imagelabel> portion of the following image name example:
*
* :container-service-1.<imagelabel>.1
*
* If the name of your container service is mycontainerservice, and the label that you specify is
* mystaticwebsite, then the name of the registered container image will be
* :mycontainerservice.mystaticwebsite.1.
*
* The number at the end of these image name examples represents the version of the registered container image. If
* you push and register another container image to the same Lightsail container service, with the same label, then
* the version number for the new registered container image will be 2. If you push and register
* another container image, the version number will be 3, and so on.
*
* Use a descriptive label that you can use to track the different versions of your registered container * images. *
*
* Use the GetContainerImages action to return the container images registered to a Lightsail
* container service. The label is the <imagelabel> portion of the following image name
* example:
*
* :container-service-1.<imagelabel>.1
*
* If the name of your container service is mycontainerservice, and the label that you specify
* is mystaticwebsite, then the name of the registered container image will be
* :mycontainerservice.mystaticwebsite.1.
*
* The number at the end of these image name examples represents the version of the registered container
* image. If you push and register another container image to the same Lightsail container service, with the
* same label, then the version number for the new registered container image will be 2. If you
* push and register another container image, the version number will be 3, and so on.
*/
public String getLabel() {
return this.label;
}
/**
*
* The label for the container image when it's registered to the container service. *
** Use a descriptive label that you can use to track the different versions of your registered container images. *
*
* Use the GetContainerImages action to return the container images registered to a Lightsail container
* service. The label is the <imagelabel> portion of the following image name example:
*
* :container-service-1.<imagelabel>.1
*
* If the name of your container service is mycontainerservice, and the label that you specify is
* mystaticwebsite, then the name of the registered container image will be
* :mycontainerservice.mystaticwebsite.1.
*
* The number at the end of these image name examples represents the version of the registered container image. If
* you push and register another container image to the same Lightsail container service, with the same label, then
* the version number for the new registered container image will be 2. If you push and register
* another container image, the version number will be 3, and so on.
*
* Use a descriptive label that you can use to track the different versions of your registered container * images. *
*
* Use the GetContainerImages action to return the container images registered to a Lightsail
* container service. The label is the <imagelabel> portion of the following image name
* example:
*
* :container-service-1.<imagelabel>.1
*
* If the name of your container service is mycontainerservice, and the label that you specify
* is mystaticwebsite, then the name of the registered container image will be
* :mycontainerservice.mystaticwebsite.1.
*
* The number at the end of these image name examples represents the version of the registered container
* image. If you push and register another container image to the same Lightsail container service, with the
* same label, then the version number for the new registered container image will be 2. If you
* push and register another container image, the version number will be 3, and so on.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RegisterContainerImageRequest withLabel(String label) {
setLabel(label);
return this;
}
/**
*
* The digest of the container image to be registered. *
* * @param digest * The digest of the container image to be registered. */ public void setDigest(String digest) { this.digest = digest; } /** ** The digest of the container image to be registered. *
* * @return The digest of the container image to be registered. */ public String getDigest() { return this.digest; } /** ** The digest of the container image to be registered. *
* * @param digest * The digest of the container image to be registered. * @return Returns a reference to this object so that method calls can be chained together. */ public RegisterContainerImageRequest withDigest(String digest) { setDigest(digest); 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 (getServiceName() != null) sb.append("ServiceName: ").append(getServiceName()).append(","); if (getLabel() != null) sb.append("Label: ").append(getLabel()).append(","); if (getDigest() != null) sb.append("Digest: ").append(getDigest()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RegisterContainerImageRequest == false) return false; RegisterContainerImageRequest other = (RegisterContainerImageRequest) obj; if (other.getServiceName() == null ^ this.getServiceName() == null) return false; if (other.getServiceName() != null && other.getServiceName().equals(this.getServiceName()) == false) return false; if (other.getLabel() == null ^ this.getLabel() == null) return false; if (other.getLabel() != null && other.getLabel().equals(this.getLabel()) == false) return false; if (other.getDigest() == null ^ this.getDigest() == null) return false; if (other.getDigest() != null && other.getDigest().equals(this.getDigest()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getServiceName() == null) ? 0 : getServiceName().hashCode()); hashCode = prime * hashCode + ((getLabel() == null) ? 0 : getLabel().hashCode()); hashCode = prime * hashCode + ((getDigest() == null) ? 0 : getDigest().hashCode()); return hashCode; } @Override public RegisterContainerImageRequest clone() { return (RegisterContainerImageRequest) super.clone(); } }