com.amazonaws.services.iot.model.RoleAliasDescription Maven / Gradle / Ivy
Show all versions of aws-android-sdk-iot Show documentation
/*
* Copyright 2010-2018 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;
/**
*
* Role alias description.
*
*/
public class RoleAliasDescription implements Serializable {
/**
*
* The role alias.
*
*
* Constraints:
* Length: 1 - 128
* Pattern: [\w=,@-]+
*/
private String roleAlias;
/**
*
* The ARN of the role alias.
*
*/
private String roleAliasArn;
/**
*
* The role ARN.
*
*
* Constraints:
* Length: 20 - 2048
*/
private String roleArn;
/**
*
* The role alias owner.
*
*
* Constraints:
* Pattern: [0-9]{12}
*/
private String owner;
/**
*
* The number of seconds for which the credential is valid.
*
*
* Constraints:
* Range: 900 - 3600
*/
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.
*
*
* Constraints:
* Length: 1 - 128
* Pattern: [\w=,@-]+
*
* @return
* The role alias.
*
*/
public String getRoleAlias() {
return roleAlias;
}
/**
*
* The role alias.
*
*
* Constraints:
* Length: 1 - 128
* Pattern: [\w=,@-]+
*
* @param roleAlias
* The role alias.
*
*/
public void setRoleAlias(String roleAlias) {
this.roleAlias = roleAlias;
}
/**
*
* The role alias.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Length: 1 - 128
* Pattern: [\w=,@-]+
*
* @param roleAlias
* The role alias.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public RoleAliasDescription withRoleAlias(String roleAlias) {
this.roleAlias = roleAlias;
return this;
}
/**
*
* The ARN of the role alias.
*
*
* @return
* The ARN of the role alias.
*
*/
public String getRoleAliasArn() {
return roleAliasArn;
}
/**
*
* 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.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param roleAliasArn
* The ARN of the role alias.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public RoleAliasDescription withRoleAliasArn(String roleAliasArn) {
this.roleAliasArn = roleAliasArn;
return this;
}
/**
*
* The role ARN.
*
*
* Constraints:
* Length: 20 - 2048
*
* @return
* The role ARN.
*
*/
public String getRoleArn() {
return roleArn;
}
/**
*
* The role ARN.
*
*
* Constraints:
* Length: 20 - 2048
*
* @param roleArn
* The role ARN.
*
*/
public void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
/**
*
* The role ARN.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Length: 20 - 2048
*
* @param roleArn
* The role ARN.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public RoleAliasDescription withRoleArn(String roleArn) {
this.roleArn = roleArn;
return this;
}
/**
*
* The role alias owner.
*
*
* Constraints:
* Pattern: [0-9]{12}
*
* @return
* The role alias owner.
*
*/
public String getOwner() {
return owner;
}
/**
*
* The role alias owner.
*
*
* Constraints:
* Pattern: [0-9]{12}
*
* @param owner
* The role alias owner.
*
*/
public void setOwner(String owner) {
this.owner = owner;
}
/**
*
* The role alias owner.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Pattern: [0-9]{12}
*
* @param owner
* The role alias owner.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public RoleAliasDescription withOwner(String owner) {
this.owner = owner;
return this;
}
/**
*
* The number of seconds for which the credential is valid.
*
*
* Constraints:
* Range: 900 - 3600
*
* @return
* The number of seconds for which the credential is valid.
*
*/
public Integer getCredentialDurationSeconds() {
return credentialDurationSeconds;
}
/**
*
* The number of seconds for which the credential is valid.
*
*
* Constraints:
* Range: 900 - 3600
*
* @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.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Range: 900 - 3600
*
* @param credentialDurationSeconds
* The number of seconds for which the credential is valid.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public RoleAliasDescription withCredentialDurationSeconds(Integer credentialDurationSeconds) {
this.credentialDurationSeconds = credentialDurationSeconds;
return this;
}
/**
*
* 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 creationDate;
}
/**
*
* 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.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param creationDate
* The UNIX timestamp of when the role alias was created.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public RoleAliasDescription withCreationDate(java.util.Date creationDate) {
this.creationDate = creationDate;
return this;
}
/**
*
* 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 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.
*
*/
public void setLastModifiedDate(java.util.Date lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
/**
*
* The UNIX timestamp of when the role alias was last modified.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param lastModifiedDate
* The UNIX timestamp of when the role alias was last modified.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public RoleAliasDescription withLastModifiedDate(java.util.Date lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @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: " + getRoleAlias() + ",");
if (getRoleAliasArn() != null)
sb.append("roleAliasArn: " + getRoleAliasArn() + ",");
if (getRoleArn() != null)
sb.append("roleArn: " + getRoleArn() + ",");
if (getOwner() != null)
sb.append("owner: " + getOwner() + ",");
if (getCredentialDurationSeconds() != null)
sb.append("credentialDurationSeconds: " + getCredentialDurationSeconds() + ",");
if (getCreationDate() != null)
sb.append("creationDate: " + getCreationDate() + ",");
if (getLastModifiedDate() != null)
sb.append("lastModifiedDate: " + getLastModifiedDate());
sb.append("}");
return sb.toString();
}
@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 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;
}
}