
com.amazonaws.services.iot.model.RoleAliasDescription Maven / Gradle / Ivy
/*
* Copyright 2015-2020 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.iot.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Role alias description.
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RoleAliasDescription implements Serializable, Cloneable, StructuredPojo {
/**
*
* The role alias.
*
*/
private String roleAlias;
/**
*
* The ARN of the role alias.
*
*/
private String roleAliasArn;
/**
*
* The role ARN.
*
*/
private String roleArn;
/**
*
* The role alias owner.
*
*/
private String owner;
/**
*
* The number of seconds for which the credential is valid.
*
*/
private Integer credentialDurationSeconds;
/**
*
* The UNIX timestamp of when the role alias was created.
*
*/
private java.util.Date creationDate;
/**
*
* The UNIX timestamp of when the role alias was last modified.
*
*/
private java.util.Date lastModifiedDate;
/**
*
* The role alias.
*
*
* @param roleAlias
* The role alias.
*/
public void setRoleAlias(String roleAlias) {
this.roleAlias = roleAlias;
}
/**
*
* The role alias.
*
*
* @return The role alias.
*/
public String getRoleAlias() {
return this.roleAlias;
}
/**
*
* The role alias.
*
*
* @param roleAlias
* The role alias.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RoleAliasDescription withRoleAlias(String roleAlias) {
setRoleAlias(roleAlias);
return this;
}
/**
*
* The ARN of the role alias.
*
*
* @param roleAliasArn
* The ARN of the role alias.
*/
public void setRoleAliasArn(String roleAliasArn) {
this.roleAliasArn = roleAliasArn;
}
/**
*
* The ARN of the role alias.
*
*
* @return The ARN of the role alias.
*/
public String getRoleAliasArn() {
return this.roleAliasArn;
}
/**
*
* The ARN of the role alias.
*
*
* @param roleAliasArn
* The ARN of the role alias.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RoleAliasDescription withRoleAliasArn(String roleAliasArn) {
setRoleAliasArn(roleAliasArn);
return this;
}
/**
*
* The role ARN.
*
*
* @param roleArn
* The role ARN.
*/
public void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
/**
*
* The role ARN.
*
*
* @return The role ARN.
*/
public String getRoleArn() {
return this.roleArn;
}
/**
*
* The role ARN.
*
*
* @param roleArn
* The role ARN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RoleAliasDescription withRoleArn(String roleArn) {
setRoleArn(roleArn);
return this;
}
/**
*
* The role alias owner.
*
*
* @param owner
* The role alias owner.
*/
public void setOwner(String owner) {
this.owner = owner;
}
/**
*
* The role alias owner.
*
*
* @return The role alias owner.
*/
public String getOwner() {
return this.owner;
}
/**
*
* The role alias owner.
*
*
* @param owner
* The role alias owner.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RoleAliasDescription withOwner(String owner) {
setOwner(owner);
return this;
}
/**
*
* The number of seconds for which the credential is valid.
*
*
* @param credentialDurationSeconds
* The number of seconds for which the credential is valid.
*/
public void setCredentialDurationSeconds(Integer credentialDurationSeconds) {
this.credentialDurationSeconds = credentialDurationSeconds;
}
/**
*
* The number of seconds for which the credential is valid.
*
*
* @return The number of seconds for which the credential is valid.
*/
public Integer getCredentialDurationSeconds() {
return this.credentialDurationSeconds;
}
/**
*
* The number of seconds for which the credential is valid.
*
*
* @param credentialDurationSeconds
* The number of seconds for which the credential is valid.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RoleAliasDescription withCredentialDurationSeconds(Integer credentialDurationSeconds) {
setCredentialDurationSeconds(credentialDurationSeconds);
return this;
}
/**
*
* The UNIX timestamp of when the role alias was created.
*
*
* @param creationDate
* The UNIX timestamp of when the role alias was created.
*/
public void setCreationDate(java.util.Date creationDate) {
this.creationDate = creationDate;
}
/**
*
* The UNIX timestamp of when the role alias was created.
*
*
* @return The UNIX timestamp of when the role alias was created.
*/
public java.util.Date getCreationDate() {
return this.creationDate;
}
/**
*
* The UNIX timestamp of when the role alias was created.
*
*
* @param creationDate
* The UNIX timestamp of when the role alias was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RoleAliasDescription withCreationDate(java.util.Date creationDate) {
setCreationDate(creationDate);
return this;
}
/**
*
* The UNIX timestamp of when the role alias was last modified.
*
*
* @param lastModifiedDate
* The UNIX timestamp of when the role alias was last modified.
*/
public void setLastModifiedDate(java.util.Date lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
/**
*
* The UNIX timestamp of when the role alias was last modified.
*
*
* @return The UNIX timestamp of when the role alias was last modified.
*/
public java.util.Date getLastModifiedDate() {
return this.lastModifiedDate;
}
/**
*
* The UNIX timestamp of when the role alias was last modified.
*
*
* @param lastModifiedDate
* The UNIX timestamp of when the role alias was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RoleAliasDescription withLastModifiedDate(java.util.Date lastModifiedDate) {
setLastModifiedDate(lastModifiedDate);
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 (getRoleAlias() != null)
sb.append("RoleAlias: ").append(getRoleAlias()).append(",");
if (getRoleAliasArn() != null)
sb.append("RoleAliasArn: ").append(getRoleAliasArn()).append(",");
if (getRoleArn() != null)
sb.append("RoleArn: ").append(getRoleArn()).append(",");
if (getOwner() != null)
sb.append("Owner: ").append(getOwner()).append(",");
if (getCredentialDurationSeconds() != null)
sb.append("CredentialDurationSeconds: ").append(getCredentialDurationSeconds()).append(",");
if (getCreationDate() != null)
sb.append("CreationDate: ").append(getCreationDate()).append(",");
if (getLastModifiedDate() != null)
sb.append("LastModifiedDate: ").append(getLastModifiedDate());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RoleAliasDescription == false)
return false;
RoleAliasDescription other = (RoleAliasDescription) obj;
if (other.getRoleAlias() == null ^ this.getRoleAlias() == null)
return false;
if (other.getRoleAlias() != null && other.getRoleAlias().equals(this.getRoleAlias()) == false)
return false;
if (other.getRoleAliasArn() == null ^ this.getRoleAliasArn() == null)
return false;
if (other.getRoleAliasArn() != null && other.getRoleAliasArn().equals(this.getRoleAliasArn()) == false)
return false;
if (other.getRoleArn() == null ^ this.getRoleArn() == null)
return false;
if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
return false;
if (other.getOwner() == null ^ this.getOwner() == null)
return false;
if (other.getOwner() != null && other.getOwner().equals(this.getOwner()) == false)
return false;
if (other.getCredentialDurationSeconds() == null ^ this.getCredentialDurationSeconds() == null)
return false;
if (other.getCredentialDurationSeconds() != null && other.getCredentialDurationSeconds().equals(this.getCredentialDurationSeconds()) == false)
return false;
if (other.getCreationDate() == null ^ this.getCreationDate() == null)
return false;
if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false)
return false;
if (other.getLastModifiedDate() == null ^ this.getLastModifiedDate() == null)
return false;
if (other.getLastModifiedDate() != null && other.getLastModifiedDate().equals(this.getLastModifiedDate()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRoleAlias() == null) ? 0 : getRoleAlias().hashCode());
hashCode = prime * hashCode + ((getRoleAliasArn() == null) ? 0 : getRoleAliasArn().hashCode());
hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode());
hashCode = prime * hashCode + ((getCredentialDurationSeconds() == null) ? 0 : getCredentialDurationSeconds().hashCode());
hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode());
hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode());
return hashCode;
}
@Override
public RoleAliasDescription clone() {
try {
return (RoleAliasDescription) 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.iot.model.transform.RoleAliasDescriptionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}