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

com.amazonaws.services.secretsmanager.model.PutSecretValueResult 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.secretsmanager.model;

import java.io.Serializable;
import javax.annotation.Generated;

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

    /**
     * 

* The ARN of the secret. *

*/ private String aRN; /** *

* The name of the secret. *

*/ private String name; /** *

* The unique identifier of the version of the secret. *

*/ private String versionId; /** *

* The list of staging labels that are currently attached to this version of the secret. Secrets Manager uses * staging labels to track a version as it progresses through the secret rotation process. *

*/ private java.util.List versionStages; /** *

* The ARN of the secret. *

* * @param aRN * The ARN of the secret. */ public void setARN(String aRN) { this.aRN = aRN; } /** *

* The ARN of the secret. *

* * @return The ARN of the secret. */ public String getARN() { return this.aRN; } /** *

* The ARN of the secret. *

* * @param aRN * The ARN of the secret. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSecretValueResult withARN(String aRN) { setARN(aRN); return this; } /** *

* The name of the secret. *

* * @param name * The name of the secret. */ public void setName(String name) { this.name = name; } /** *

* The name of the secret. *

* * @return The name of the secret. */ public String getName() { return this.name; } /** *

* The name of the secret. *

* * @param name * The name of the secret. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSecretValueResult withName(String name) { setName(name); return this; } /** *

* The unique identifier of the version of the secret. *

* * @param versionId * The unique identifier of the version of the secret. */ public void setVersionId(String versionId) { this.versionId = versionId; } /** *

* The unique identifier of the version of the secret. *

* * @return The unique identifier of the version of the secret. */ public String getVersionId() { return this.versionId; } /** *

* The unique identifier of the version of the secret. *

* * @param versionId * The unique identifier of the version of the secret. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSecretValueResult withVersionId(String versionId) { setVersionId(versionId); return this; } /** *

* The list of staging labels that are currently attached to this version of the secret. Secrets Manager uses * staging labels to track a version as it progresses through the secret rotation process. *

* * @return The list of staging labels that are currently attached to this version of the secret. Secrets Manager * uses staging labels to track a version as it progresses through the secret rotation process. */ public java.util.List getVersionStages() { return versionStages; } /** *

* The list of staging labels that are currently attached to this version of the secret. Secrets Manager uses * staging labels to track a version as it progresses through the secret rotation process. *

* * @param versionStages * The list of staging labels that are currently attached to this version of the secret. Secrets Manager uses * staging labels to track a version as it progresses through the secret rotation process. */ public void setVersionStages(java.util.Collection versionStages) { if (versionStages == null) { this.versionStages = null; return; } this.versionStages = new java.util.ArrayList(versionStages); } /** *

* The list of staging labels that are currently attached to this version of the secret. Secrets Manager uses * staging labels to track a version as it progresses through the secret rotation process. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setVersionStages(java.util.Collection)} or {@link #withVersionStages(java.util.Collection)} if you want * to override the existing values. *

* * @param versionStages * The list of staging labels that are currently attached to this version of the secret. Secrets Manager uses * staging labels to track a version as it progresses through the secret rotation process. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSecretValueResult withVersionStages(String... versionStages) { if (this.versionStages == null) { setVersionStages(new java.util.ArrayList(versionStages.length)); } for (String ele : versionStages) { this.versionStages.add(ele); } return this; } /** *

* The list of staging labels that are currently attached to this version of the secret. Secrets Manager uses * staging labels to track a version as it progresses through the secret rotation process. *

* * @param versionStages * The list of staging labels that are currently attached to this version of the secret. Secrets Manager uses * staging labels to track a version as it progresses through the secret rotation process. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSecretValueResult withVersionStages(java.util.Collection versionStages) { setVersionStages(versionStages); 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 (getARN() != null) sb.append("ARN: ").append(getARN()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getVersionId() != null) sb.append("VersionId: ").append(getVersionId()).append(","); if (getVersionStages() != null) sb.append("VersionStages: ").append(getVersionStages()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutSecretValueResult == false) return false; PutSecretValueResult other = (PutSecretValueResult) obj; if (other.getARN() == null ^ this.getARN() == null) return false; if (other.getARN() != null && other.getARN().equals(this.getARN()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getVersionId() == null ^ this.getVersionId() == null) return false; if (other.getVersionId() != null && other.getVersionId().equals(this.getVersionId()) == false) return false; if (other.getVersionStages() == null ^ this.getVersionStages() == null) return false; if (other.getVersionStages() != null && other.getVersionStages().equals(this.getVersionStages()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getARN() == null) ? 0 : getARN().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getVersionId() == null) ? 0 : getVersionId().hashCode()); hashCode = prime * hashCode + ((getVersionStages() == null) ? 0 : getVersionStages().hashCode()); return hashCode; } @Override public PutSecretValueResult clone() { try { return (PutSecretValueResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy