
com.amazonaws.services.iotsitewise.model.DescribeAccessPolicyResult Maven / Gradle / Ivy
/*
* Copyright 2016-2021 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.iotsitewise.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeAccessPolicyResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ID of the access policy.
*
*/
private String accessPolicyId;
/**
*
* The ARN of the access
* policy, which has the following format.
*
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:access-policy/${AccessPolicyId}
*
*/
private String accessPolicyArn;
/**
*
* The identity (Amazon Web Services SSO user, Amazon Web Services SSO group, or IAM user) to which this access
* policy applies.
*
*/
private Identity accessPolicyIdentity;
/**
*
* The IoT SiteWise Monitor resource (portal or project) to which this access policy provides access.
*
*/
private Resource accessPolicyResource;
/**
*
* The access policy permission. Note that a project ADMINISTRATOR
is also known as a project owner.
*
*/
private String accessPolicyPermission;
/**
*
* The date the access policy was created, in Unix epoch time.
*
*/
private java.util.Date accessPolicyCreationDate;
/**
*
* The date the access policy was last updated, in Unix epoch time.
*
*/
private java.util.Date accessPolicyLastUpdateDate;
/**
*
* The ID of the access policy.
*
*
* @param accessPolicyId
* The ID of the access policy.
*/
public void setAccessPolicyId(String accessPolicyId) {
this.accessPolicyId = accessPolicyId;
}
/**
*
* The ID of the access policy.
*
*
* @return The ID of the access policy.
*/
public String getAccessPolicyId() {
return this.accessPolicyId;
}
/**
*
* The ID of the access policy.
*
*
* @param accessPolicyId
* The ID of the access policy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAccessPolicyResult withAccessPolicyId(String accessPolicyId) {
setAccessPolicyId(accessPolicyId);
return this;
}
/**
*
* The ARN of the access
* policy, which has the following format.
*
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:access-policy/${AccessPolicyId}
*
*
* @param accessPolicyArn
* The ARN of the
* access policy, which has the following format.
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:access-policy/${AccessPolicyId}
*/
public void setAccessPolicyArn(String accessPolicyArn) {
this.accessPolicyArn = accessPolicyArn;
}
/**
*
* The ARN of the access
* policy, which has the following format.
*
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:access-policy/${AccessPolicyId}
*
*
* @return The ARN of the
* access policy, which has the following format.
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:access-policy/${AccessPolicyId}
*/
public String getAccessPolicyArn() {
return this.accessPolicyArn;
}
/**
*
* The ARN of the access
* policy, which has the following format.
*
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:access-policy/${AccessPolicyId}
*
*
* @param accessPolicyArn
* The ARN of the
* access policy, which has the following format.
*
* arn:${Partition}:iotsitewise:${Region}:${Account}:access-policy/${AccessPolicyId}
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAccessPolicyResult withAccessPolicyArn(String accessPolicyArn) {
setAccessPolicyArn(accessPolicyArn);
return this;
}
/**
*
* The identity (Amazon Web Services SSO user, Amazon Web Services SSO group, or IAM user) to which this access
* policy applies.
*
*
* @param accessPolicyIdentity
* The identity (Amazon Web Services SSO user, Amazon Web Services SSO group, or IAM user) to which this
* access policy applies.
*/
public void setAccessPolicyIdentity(Identity accessPolicyIdentity) {
this.accessPolicyIdentity = accessPolicyIdentity;
}
/**
*
* The identity (Amazon Web Services SSO user, Amazon Web Services SSO group, or IAM user) to which this access
* policy applies.
*
*
* @return The identity (Amazon Web Services SSO user, Amazon Web Services SSO group, or IAM user) to which this
* access policy applies.
*/
public Identity getAccessPolicyIdentity() {
return this.accessPolicyIdentity;
}
/**
*
* The identity (Amazon Web Services SSO user, Amazon Web Services SSO group, or IAM user) to which this access
* policy applies.
*
*
* @param accessPolicyIdentity
* The identity (Amazon Web Services SSO user, Amazon Web Services SSO group, or IAM user) to which this
* access policy applies.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAccessPolicyResult withAccessPolicyIdentity(Identity accessPolicyIdentity) {
setAccessPolicyIdentity(accessPolicyIdentity);
return this;
}
/**
*
* The IoT SiteWise Monitor resource (portal or project) to which this access policy provides access.
*
*
* @param accessPolicyResource
* The IoT SiteWise Monitor resource (portal or project) to which this access policy provides access.
*/
public void setAccessPolicyResource(Resource accessPolicyResource) {
this.accessPolicyResource = accessPolicyResource;
}
/**
*
* The IoT SiteWise Monitor resource (portal or project) to which this access policy provides access.
*
*
* @return The IoT SiteWise Monitor resource (portal or project) to which this access policy provides access.
*/
public Resource getAccessPolicyResource() {
return this.accessPolicyResource;
}
/**
*
* The IoT SiteWise Monitor resource (portal or project) to which this access policy provides access.
*
*
* @param accessPolicyResource
* The IoT SiteWise Monitor resource (portal or project) to which this access policy provides access.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAccessPolicyResult withAccessPolicyResource(Resource accessPolicyResource) {
setAccessPolicyResource(accessPolicyResource);
return this;
}
/**
*
* The access policy permission. Note that a project ADMINISTRATOR
is also known as a project owner.
*
*
* @param accessPolicyPermission
* The access policy permission. Note that a project ADMINISTRATOR
is also known as a project
* owner.
* @see Permission
*/
public void setAccessPolicyPermission(String accessPolicyPermission) {
this.accessPolicyPermission = accessPolicyPermission;
}
/**
*
* The access policy permission. Note that a project ADMINISTRATOR
is also known as a project owner.
*
*
* @return The access policy permission. Note that a project ADMINISTRATOR
is also known as a project
* owner.
* @see Permission
*/
public String getAccessPolicyPermission() {
return this.accessPolicyPermission;
}
/**
*
* The access policy permission. Note that a project ADMINISTRATOR
is also known as a project owner.
*
*
* @param accessPolicyPermission
* The access policy permission. Note that a project ADMINISTRATOR
is also known as a project
* owner.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Permission
*/
public DescribeAccessPolicyResult withAccessPolicyPermission(String accessPolicyPermission) {
setAccessPolicyPermission(accessPolicyPermission);
return this;
}
/**
*
* The access policy permission. Note that a project ADMINISTRATOR
is also known as a project owner.
*
*
* @param accessPolicyPermission
* The access policy permission. Note that a project ADMINISTRATOR
is also known as a project
* owner.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Permission
*/
public DescribeAccessPolicyResult withAccessPolicyPermission(Permission accessPolicyPermission) {
this.accessPolicyPermission = accessPolicyPermission.toString();
return this;
}
/**
*
* The date the access policy was created, in Unix epoch time.
*
*
* @param accessPolicyCreationDate
* The date the access policy was created, in Unix epoch time.
*/
public void setAccessPolicyCreationDate(java.util.Date accessPolicyCreationDate) {
this.accessPolicyCreationDate = accessPolicyCreationDate;
}
/**
*
* The date the access policy was created, in Unix epoch time.
*
*
* @return The date the access policy was created, in Unix epoch time.
*/
public java.util.Date getAccessPolicyCreationDate() {
return this.accessPolicyCreationDate;
}
/**
*
* The date the access policy was created, in Unix epoch time.
*
*
* @param accessPolicyCreationDate
* The date the access policy was created, in Unix epoch time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAccessPolicyResult withAccessPolicyCreationDate(java.util.Date accessPolicyCreationDate) {
setAccessPolicyCreationDate(accessPolicyCreationDate);
return this;
}
/**
*
* The date the access policy was last updated, in Unix epoch time.
*
*
* @param accessPolicyLastUpdateDate
* The date the access policy was last updated, in Unix epoch time.
*/
public void setAccessPolicyLastUpdateDate(java.util.Date accessPolicyLastUpdateDate) {
this.accessPolicyLastUpdateDate = accessPolicyLastUpdateDate;
}
/**
*
* The date the access policy was last updated, in Unix epoch time.
*
*
* @return The date the access policy was last updated, in Unix epoch time.
*/
public java.util.Date getAccessPolicyLastUpdateDate() {
return this.accessPolicyLastUpdateDate;
}
/**
*
* The date the access policy was last updated, in Unix epoch time.
*
*
* @param accessPolicyLastUpdateDate
* The date the access policy was last updated, in Unix epoch time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAccessPolicyResult withAccessPolicyLastUpdateDate(java.util.Date accessPolicyLastUpdateDate) {
setAccessPolicyLastUpdateDate(accessPolicyLastUpdateDate);
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 (getAccessPolicyId() != null)
sb.append("AccessPolicyId: ").append(getAccessPolicyId()).append(",");
if (getAccessPolicyArn() != null)
sb.append("AccessPolicyArn: ").append(getAccessPolicyArn()).append(",");
if (getAccessPolicyIdentity() != null)
sb.append("AccessPolicyIdentity: ").append(getAccessPolicyIdentity()).append(",");
if (getAccessPolicyResource() != null)
sb.append("AccessPolicyResource: ").append(getAccessPolicyResource()).append(",");
if (getAccessPolicyPermission() != null)
sb.append("AccessPolicyPermission: ").append(getAccessPolicyPermission()).append(",");
if (getAccessPolicyCreationDate() != null)
sb.append("AccessPolicyCreationDate: ").append(getAccessPolicyCreationDate()).append(",");
if (getAccessPolicyLastUpdateDate() != null)
sb.append("AccessPolicyLastUpdateDate: ").append(getAccessPolicyLastUpdateDate());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeAccessPolicyResult == false)
return false;
DescribeAccessPolicyResult other = (DescribeAccessPolicyResult) obj;
if (other.getAccessPolicyId() == null ^ this.getAccessPolicyId() == null)
return false;
if (other.getAccessPolicyId() != null && other.getAccessPolicyId().equals(this.getAccessPolicyId()) == false)
return false;
if (other.getAccessPolicyArn() == null ^ this.getAccessPolicyArn() == null)
return false;
if (other.getAccessPolicyArn() != null && other.getAccessPolicyArn().equals(this.getAccessPolicyArn()) == false)
return false;
if (other.getAccessPolicyIdentity() == null ^ this.getAccessPolicyIdentity() == null)
return false;
if (other.getAccessPolicyIdentity() != null && other.getAccessPolicyIdentity().equals(this.getAccessPolicyIdentity()) == false)
return false;
if (other.getAccessPolicyResource() == null ^ this.getAccessPolicyResource() == null)
return false;
if (other.getAccessPolicyResource() != null && other.getAccessPolicyResource().equals(this.getAccessPolicyResource()) == false)
return false;
if (other.getAccessPolicyPermission() == null ^ this.getAccessPolicyPermission() == null)
return false;
if (other.getAccessPolicyPermission() != null && other.getAccessPolicyPermission().equals(this.getAccessPolicyPermission()) == false)
return false;
if (other.getAccessPolicyCreationDate() == null ^ this.getAccessPolicyCreationDate() == null)
return false;
if (other.getAccessPolicyCreationDate() != null && other.getAccessPolicyCreationDate().equals(this.getAccessPolicyCreationDate()) == false)
return false;
if (other.getAccessPolicyLastUpdateDate() == null ^ this.getAccessPolicyLastUpdateDate() == null)
return false;
if (other.getAccessPolicyLastUpdateDate() != null && other.getAccessPolicyLastUpdateDate().equals(this.getAccessPolicyLastUpdateDate()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAccessPolicyId() == null) ? 0 : getAccessPolicyId().hashCode());
hashCode = prime * hashCode + ((getAccessPolicyArn() == null) ? 0 : getAccessPolicyArn().hashCode());
hashCode = prime * hashCode + ((getAccessPolicyIdentity() == null) ? 0 : getAccessPolicyIdentity().hashCode());
hashCode = prime * hashCode + ((getAccessPolicyResource() == null) ? 0 : getAccessPolicyResource().hashCode());
hashCode = prime * hashCode + ((getAccessPolicyPermission() == null) ? 0 : getAccessPolicyPermission().hashCode());
hashCode = prime * hashCode + ((getAccessPolicyCreationDate() == null) ? 0 : getAccessPolicyCreationDate().hashCode());
hashCode = prime * hashCode + ((getAccessPolicyLastUpdateDate() == null) ? 0 : getAccessPolicyLastUpdateDate().hashCode());
return hashCode;
}
@Override
public DescribeAccessPolicyResult clone() {
try {
return (DescribeAccessPolicyResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}