com.amazonaws.services.simplesystemsmanagement.model.UnlabelParameterVersionResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ssm Show documentation
/*
* 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.simplesystemsmanagement.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UnlabelParameterVersionResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* A list of all labels deleted from the parameter.
*
*/
private com.amazonaws.internal.SdkInternalList removedLabels;
/**
*
* The labels that aren't attached to the given parameter version.
*
*/
private com.amazonaws.internal.SdkInternalList invalidLabels;
/**
*
* A list of all labels deleted from the parameter.
*
*
* @return A list of all labels deleted from the parameter.
*/
public java.util.List getRemovedLabels() {
if (removedLabels == null) {
removedLabels = new com.amazonaws.internal.SdkInternalList();
}
return removedLabels;
}
/**
*
* A list of all labels deleted from the parameter.
*
*
* @param removedLabels
* A list of all labels deleted from the parameter.
*/
public void setRemovedLabels(java.util.Collection removedLabels) {
if (removedLabels == null) {
this.removedLabels = null;
return;
}
this.removedLabels = new com.amazonaws.internal.SdkInternalList(removedLabels);
}
/**
*
* A list of all labels deleted from the parameter.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRemovedLabels(java.util.Collection)} or {@link #withRemovedLabels(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param removedLabels
* A list of all labels deleted from the parameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UnlabelParameterVersionResult withRemovedLabels(String... removedLabels) {
if (this.removedLabels == null) {
setRemovedLabels(new com.amazonaws.internal.SdkInternalList(removedLabels.length));
}
for (String ele : removedLabels) {
this.removedLabels.add(ele);
}
return this;
}
/**
*
* A list of all labels deleted from the parameter.
*
*
* @param removedLabels
* A list of all labels deleted from the parameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UnlabelParameterVersionResult withRemovedLabels(java.util.Collection removedLabels) {
setRemovedLabels(removedLabels);
return this;
}
/**
*
* The labels that aren't attached to the given parameter version.
*
*
* @return The labels that aren't attached to the given parameter version.
*/
public java.util.List getInvalidLabels() {
if (invalidLabels == null) {
invalidLabels = new com.amazonaws.internal.SdkInternalList();
}
return invalidLabels;
}
/**
*
* The labels that aren't attached to the given parameter version.
*
*
* @param invalidLabels
* The labels that aren't attached to the given parameter version.
*/
public void setInvalidLabels(java.util.Collection invalidLabels) {
if (invalidLabels == null) {
this.invalidLabels = null;
return;
}
this.invalidLabels = new com.amazonaws.internal.SdkInternalList(invalidLabels);
}
/**
*
* The labels that aren't attached to the given parameter version.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInvalidLabels(java.util.Collection)} or {@link #withInvalidLabels(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param invalidLabels
* The labels that aren't attached to the given parameter version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UnlabelParameterVersionResult withInvalidLabels(String... invalidLabels) {
if (this.invalidLabels == null) {
setInvalidLabels(new com.amazonaws.internal.SdkInternalList(invalidLabels.length));
}
for (String ele : invalidLabels) {
this.invalidLabels.add(ele);
}
return this;
}
/**
*
* The labels that aren't attached to the given parameter version.
*
*
* @param invalidLabels
* The labels that aren't attached to the given parameter version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UnlabelParameterVersionResult withInvalidLabels(java.util.Collection invalidLabels) {
setInvalidLabels(invalidLabels);
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 (getRemovedLabels() != null)
sb.append("RemovedLabels: ").append(getRemovedLabels()).append(",");
if (getInvalidLabels() != null)
sb.append("InvalidLabels: ").append(getInvalidLabels());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UnlabelParameterVersionResult == false)
return false;
UnlabelParameterVersionResult other = (UnlabelParameterVersionResult) obj;
if (other.getRemovedLabels() == null ^ this.getRemovedLabels() == null)
return false;
if (other.getRemovedLabels() != null && other.getRemovedLabels().equals(this.getRemovedLabels()) == false)
return false;
if (other.getInvalidLabels() == null ^ this.getInvalidLabels() == null)
return false;
if (other.getInvalidLabels() != null && other.getInvalidLabels().equals(this.getInvalidLabels()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRemovedLabels() == null) ? 0 : getRemovedLabels().hashCode());
hashCode = prime * hashCode + ((getInvalidLabels() == null) ? 0 : getInvalidLabels().hashCode());
return hashCode;
}
@Override
public UnlabelParameterVersionResult clone() {
try {
return (UnlabelParameterVersionResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}