
com.amazonaws.services.appconfig.model.CreateHostedConfigurationVersionRequest Maven / Gradle / Ivy
/*
* 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.appconfig.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 CreateHostedConfigurationVersionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The application ID.
*
*/
private String applicationId;
/**
*
* The configuration profile ID.
*
*/
private String configurationProfileId;
/**
*
* A description of the configuration.
*
*/
private String description;
/**
*
* The content of the configuration or the configuration data.
*
*/
private java.nio.ByteBuffer content;
/**
*
* A standard MIME type describing the format of the configuration content. For more information, see Content-Type.
*
*/
private String contentType;
/**
*
* An optional locking token used to prevent race conditions from overwriting configuration updates when creating a
* new version. To ensure your data is not overwritten when creating multiple hosted configuration versions in rapid
* succession, specify the version number of the latest hosted configuration version.
*
*/
private Integer latestVersionNumber;
/**
*
* An optional, user-defined label for the AppConfig hosted configuration version. This value must contain at least
* one non-numeric character. For example, "v2.2.0".
*
*/
private String versionLabel;
/**
*
* The application ID.
*
*
* @param applicationId
* The application ID.
*/
public void setApplicationId(String applicationId) {
this.applicationId = applicationId;
}
/**
*
* The application ID.
*
*
* @return The application ID.
*/
public String getApplicationId() {
return this.applicationId;
}
/**
*
* The application ID.
*
*
* @param applicationId
* The application ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateHostedConfigurationVersionRequest withApplicationId(String applicationId) {
setApplicationId(applicationId);
return this;
}
/**
*
* The configuration profile ID.
*
*
* @param configurationProfileId
* The configuration profile ID.
*/
public void setConfigurationProfileId(String configurationProfileId) {
this.configurationProfileId = configurationProfileId;
}
/**
*
* The configuration profile ID.
*
*
* @return The configuration profile ID.
*/
public String getConfigurationProfileId() {
return this.configurationProfileId;
}
/**
*
* The configuration profile ID.
*
*
* @param configurationProfileId
* The configuration profile ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateHostedConfigurationVersionRequest withConfigurationProfileId(String configurationProfileId) {
setConfigurationProfileId(configurationProfileId);
return this;
}
/**
*
* A description of the configuration.
*
*
* @param description
* A description of the configuration.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description of the configuration.
*
*
* @return A description of the configuration.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description of the configuration.
*
*
* @param description
* A description of the configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateHostedConfigurationVersionRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The content of the configuration or the configuration data.
*
*
* The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service.
* Users of the SDK should not perform Base64 encoding on this field.
*
*
* Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will
* be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or
* ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future
* major version of the SDK.
*
*
* @param content
* The content of the configuration or the configuration data.
*/
public void setContent(java.nio.ByteBuffer content) {
this.content = content;
}
/**
*
* The content of the configuration or the configuration data.
*
*
* {@code ByteBuffer}s are stateful. Calling their {@code get} methods changes their {@code position}. We recommend
* using {@link java.nio.ByteBuffer#asReadOnlyBuffer()} to create a read-only view of the buffer with an independent
* {@code position}, and calling {@code get} methods on this rather than directly on the returned {@code ByteBuffer}.
* Doing so will ensure that anyone else using the {@code ByteBuffer} will not be affected by changes to the
* {@code position}.
*
*
* @return The content of the configuration or the configuration data.
*/
public java.nio.ByteBuffer getContent() {
return this.content;
}
/**
*
* The content of the configuration or the configuration data.
*
*
* The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service.
* Users of the SDK should not perform Base64 encoding on this field.
*
*
* Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will
* be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or
* ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future
* major version of the SDK.
*
*
* @param content
* The content of the configuration or the configuration data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateHostedConfigurationVersionRequest withContent(java.nio.ByteBuffer content) {
setContent(content);
return this;
}
/**
*
* A standard MIME type describing the format of the configuration content. For more information, see Content-Type.
*
*
* @param contentType
* A standard MIME type describing the format of the configuration content. For more information, see Content-Type.
*/
public void setContentType(String contentType) {
this.contentType = contentType;
}
/**
*
* A standard MIME type describing the format of the configuration content. For more information, see Content-Type.
*
*
* @return A standard MIME type describing the format of the configuration content. For more information, see Content-Type.
*/
public String getContentType() {
return this.contentType;
}
/**
*
* A standard MIME type describing the format of the configuration content. For more information, see Content-Type.
*
*
* @param contentType
* A standard MIME type describing the format of the configuration content. For more information, see Content-Type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateHostedConfigurationVersionRequest withContentType(String contentType) {
setContentType(contentType);
return this;
}
/**
*
* An optional locking token used to prevent race conditions from overwriting configuration updates when creating a
* new version. To ensure your data is not overwritten when creating multiple hosted configuration versions in rapid
* succession, specify the version number of the latest hosted configuration version.
*
*
* @param latestVersionNumber
* An optional locking token used to prevent race conditions from overwriting configuration updates when
* creating a new version. To ensure your data is not overwritten when creating multiple hosted configuration
* versions in rapid succession, specify the version number of the latest hosted configuration version.
*/
public void setLatestVersionNumber(Integer latestVersionNumber) {
this.latestVersionNumber = latestVersionNumber;
}
/**
*
* An optional locking token used to prevent race conditions from overwriting configuration updates when creating a
* new version. To ensure your data is not overwritten when creating multiple hosted configuration versions in rapid
* succession, specify the version number of the latest hosted configuration version.
*
*
* @return An optional locking token used to prevent race conditions from overwriting configuration updates when
* creating a new version. To ensure your data is not overwritten when creating multiple hosted
* configuration versions in rapid succession, specify the version number of the latest hosted configuration
* version.
*/
public Integer getLatestVersionNumber() {
return this.latestVersionNumber;
}
/**
*
* An optional locking token used to prevent race conditions from overwriting configuration updates when creating a
* new version. To ensure your data is not overwritten when creating multiple hosted configuration versions in rapid
* succession, specify the version number of the latest hosted configuration version.
*
*
* @param latestVersionNumber
* An optional locking token used to prevent race conditions from overwriting configuration updates when
* creating a new version. To ensure your data is not overwritten when creating multiple hosted configuration
* versions in rapid succession, specify the version number of the latest hosted configuration version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateHostedConfigurationVersionRequest withLatestVersionNumber(Integer latestVersionNumber) {
setLatestVersionNumber(latestVersionNumber);
return this;
}
/**
*
* An optional, user-defined label for the AppConfig hosted configuration version. This value must contain at least
* one non-numeric character. For example, "v2.2.0".
*
*
* @param versionLabel
* An optional, user-defined label for the AppConfig hosted configuration version. This value must contain at
* least one non-numeric character. For example, "v2.2.0".
*/
public void setVersionLabel(String versionLabel) {
this.versionLabel = versionLabel;
}
/**
*
* An optional, user-defined label for the AppConfig hosted configuration version. This value must contain at least
* one non-numeric character. For example, "v2.2.0".
*
*
* @return An optional, user-defined label for the AppConfig hosted configuration version. This value must contain
* at least one non-numeric character. For example, "v2.2.0".
*/
public String getVersionLabel() {
return this.versionLabel;
}
/**
*
* An optional, user-defined label for the AppConfig hosted configuration version. This value must contain at least
* one non-numeric character. For example, "v2.2.0".
*
*
* @param versionLabel
* An optional, user-defined label for the AppConfig hosted configuration version. This value must contain at
* least one non-numeric character. For example, "v2.2.0".
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateHostedConfigurationVersionRequest withVersionLabel(String versionLabel) {
setVersionLabel(versionLabel);
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 (getApplicationId() != null)
sb.append("ApplicationId: ").append(getApplicationId()).append(",");
if (getConfigurationProfileId() != null)
sb.append("ConfigurationProfileId: ").append(getConfigurationProfileId()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getContent() != null)
sb.append("Content: ").append("***Sensitive Data Redacted***").append(",");
if (getContentType() != null)
sb.append("ContentType: ").append(getContentType()).append(",");
if (getLatestVersionNumber() != null)
sb.append("LatestVersionNumber: ").append(getLatestVersionNumber()).append(",");
if (getVersionLabel() != null)
sb.append("VersionLabel: ").append(getVersionLabel());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateHostedConfigurationVersionRequest == false)
return false;
CreateHostedConfigurationVersionRequest other = (CreateHostedConfigurationVersionRequest) obj;
if (other.getApplicationId() == null ^ this.getApplicationId() == null)
return false;
if (other.getApplicationId() != null && other.getApplicationId().equals(this.getApplicationId()) == false)
return false;
if (other.getConfigurationProfileId() == null ^ this.getConfigurationProfileId() == null)
return false;
if (other.getConfigurationProfileId() != null && other.getConfigurationProfileId().equals(this.getConfigurationProfileId()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getContent() == null ^ this.getContent() == null)
return false;
if (other.getContent() != null && other.getContent().equals(this.getContent()) == false)
return false;
if (other.getContentType() == null ^ this.getContentType() == null)
return false;
if (other.getContentType() != null && other.getContentType().equals(this.getContentType()) == false)
return false;
if (other.getLatestVersionNumber() == null ^ this.getLatestVersionNumber() == null)
return false;
if (other.getLatestVersionNumber() != null && other.getLatestVersionNumber().equals(this.getLatestVersionNumber()) == false)
return false;
if (other.getVersionLabel() == null ^ this.getVersionLabel() == null)
return false;
if (other.getVersionLabel() != null && other.getVersionLabel().equals(this.getVersionLabel()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getApplicationId() == null) ? 0 : getApplicationId().hashCode());
hashCode = prime * hashCode + ((getConfigurationProfileId() == null) ? 0 : getConfigurationProfileId().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getContent() == null) ? 0 : getContent().hashCode());
hashCode = prime * hashCode + ((getContentType() == null) ? 0 : getContentType().hashCode());
hashCode = prime * hashCode + ((getLatestVersionNumber() == null) ? 0 : getLatestVersionNumber().hashCode());
hashCode = prime * hashCode + ((getVersionLabel() == null) ? 0 : getVersionLabel().hashCode());
return hashCode;
}
@Override
public CreateHostedConfigurationVersionRequest clone() {
return (CreateHostedConfigurationVersionRequest) super.clone();
}
}