* The ID of the policy store that contains the policy that you want information about. *
*/ private String policyStoreId; /** ** The unique ID of the policy that you want information about. *
*/ private String policyId; /** ** The type of the policy. *
*/ private String policyType; /** *
* The principal specified in the policy's scope. This element isn't included in the response when
* Principal
isn't present in the policy content.
*
* The resource specified in the policy's scope. This element isn't included in the response when
* Resource
isn't present in the policy content.
*
* The definition of the requested policy. *
*/ private PolicyDefinitionDetail definition; /** ** The date and time that the policy was originally created. *
*/ private java.util.Date createdDate; /** ** The date and time that the policy was last updated. *
*/ private java.util.Date lastUpdatedDate; /** ** The ID of the policy store that contains the policy that you want information about. *
* * @param policyStoreId * The ID of the policy store that contains the policy that you want information about. */ public void setPolicyStoreId(String policyStoreId) { this.policyStoreId = policyStoreId; } /** ** The ID of the policy store that contains the policy that you want information about. *
* * @return The ID of the policy store that contains the policy that you want information about. */ public String getPolicyStoreId() { return this.policyStoreId; } /** ** The ID of the policy store that contains the policy that you want information about. *
* * @param policyStoreId * The ID of the policy store that contains the policy that you want information about. * @return Returns a reference to this object so that method calls can be chained together. */ public GetPolicyResult withPolicyStoreId(String policyStoreId) { setPolicyStoreId(policyStoreId); return this; } /** ** The unique ID of the policy that you want information about. *
* * @param policyId * The unique ID of the policy that you want information about. */ public void setPolicyId(String policyId) { this.policyId = policyId; } /** ** The unique ID of the policy that you want information about. *
* * @return The unique ID of the policy that you want information about. */ public String getPolicyId() { return this.policyId; } /** ** The unique ID of the policy that you want information about. *
* * @param policyId * The unique ID of the policy that you want information about. * @return Returns a reference to this object so that method calls can be chained together. */ public GetPolicyResult withPolicyId(String policyId) { setPolicyId(policyId); return this; } /** ** The type of the policy. *
* * @param policyType * The type of the policy. * @see PolicyType */ public void setPolicyType(String policyType) { this.policyType = policyType; } /** ** The type of the policy. *
* * @return The type of the policy. * @see PolicyType */ public String getPolicyType() { return this.policyType; } /** ** The type of the policy. *
* * @param policyType * The type of the policy. * @return Returns a reference to this object so that method calls can be chained together. * @see PolicyType */ public GetPolicyResult withPolicyType(String policyType) { setPolicyType(policyType); return this; } /** ** The type of the policy. *
* * @param policyType * The type of the policy. * @return Returns a reference to this object so that method calls can be chained together. * @see PolicyType */ public GetPolicyResult withPolicyType(PolicyType policyType) { this.policyType = policyType.toString(); return this; } /** *
* The principal specified in the policy's scope. This element isn't included in the response when
* Principal
isn't present in the policy content.
*
Principal
isn't present in the policy content.
*/
public void setPrincipal(EntityIdentifier principal) {
this.principal = principal;
}
/**
*
* The principal specified in the policy's scope. This element isn't included in the response when
* Principal
isn't present in the policy content.
*
Principal
isn't present in the policy content.
*/
public EntityIdentifier getPrincipal() {
return this.principal;
}
/**
*
* The principal specified in the policy's scope. This element isn't included in the response when
* Principal
isn't present in the policy content.
*
Principal
isn't present in the policy content.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetPolicyResult withPrincipal(EntityIdentifier principal) {
setPrincipal(principal);
return this;
}
/**
*
* The resource specified in the policy's scope. This element isn't included in the response when
* Resource
isn't present in the policy content.
*
Resource
isn't present in the policy content.
*/
public void setResource(EntityIdentifier resource) {
this.resource = resource;
}
/**
*
* The resource specified in the policy's scope. This element isn't included in the response when
* Resource
isn't present in the policy content.
*
Resource
isn't present in the policy content.
*/
public EntityIdentifier getResource() {
return this.resource;
}
/**
*
* The resource specified in the policy's scope. This element isn't included in the response when
* Resource
isn't present in the policy content.
*
Resource
isn't present in the policy content.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetPolicyResult withResource(EntityIdentifier resource) {
setResource(resource);
return this;
}
/**
* * The definition of the requested policy. *
* * @param definition * The definition of the requested policy. */ public void setDefinition(PolicyDefinitionDetail definition) { this.definition = definition; } /** ** The definition of the requested policy. *
* * @return The definition of the requested policy. */ public PolicyDefinitionDetail getDefinition() { return this.definition; } /** ** The definition of the requested policy. *
* * @param definition * The definition of the requested policy. * @return Returns a reference to this object so that method calls can be chained together. */ public GetPolicyResult withDefinition(PolicyDefinitionDetail definition) { setDefinition(definition); return this; } /** ** The date and time that the policy was originally created. *
* * @param createdDate * The date and time that the policy was originally created. */ public void setCreatedDate(java.util.Date createdDate) { this.createdDate = createdDate; } /** ** The date and time that the policy was originally created. *
* * @return The date and time that the policy was originally created. */ public java.util.Date getCreatedDate() { return this.createdDate; } /** ** The date and time that the policy was originally created. *
* * @param createdDate * The date and time that the policy was originally created. * @return Returns a reference to this object so that method calls can be chained together. */ public GetPolicyResult withCreatedDate(java.util.Date createdDate) { setCreatedDate(createdDate); return this; } /** ** The date and time that the policy was last updated. *
* * @param lastUpdatedDate * The date and time that the policy was last updated. */ public void setLastUpdatedDate(java.util.Date lastUpdatedDate) { this.lastUpdatedDate = lastUpdatedDate; } /** ** The date and time that the policy was last updated. *
* * @return The date and time that the policy was last updated. */ public java.util.Date getLastUpdatedDate() { return this.lastUpdatedDate; } /** ** The date and time that the policy was last updated. *
* * @param lastUpdatedDate * The date and time that the policy was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public GetPolicyResult withLastUpdatedDate(java.util.Date lastUpdatedDate) { setLastUpdatedDate(lastUpdatedDate); 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 (getPolicyStoreId() != null) sb.append("PolicyStoreId: ").append(getPolicyStoreId()).append(","); if (getPolicyId() != null) sb.append("PolicyId: ").append(getPolicyId()).append(","); if (getPolicyType() != null) sb.append("PolicyType: ").append(getPolicyType()).append(","); if (getPrincipal() != null) sb.append("Principal: ").append(getPrincipal()).append(","); if (getResource() != null) sb.append("Resource: ").append(getResource()).append(","); if (getDefinition() != null) sb.append("Definition: ").append(getDefinition()).append(","); if (getCreatedDate() != null) sb.append("CreatedDate: ").append(getCreatedDate()).append(","); if (getLastUpdatedDate() != null) sb.append("LastUpdatedDate: ").append(getLastUpdatedDate()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetPolicyResult == false) return false; GetPolicyResult other = (GetPolicyResult) obj; if (other.getPolicyStoreId() == null ^ this.getPolicyStoreId() == null) return false; if (other.getPolicyStoreId() != null && other.getPolicyStoreId().equals(this.getPolicyStoreId()) == false) return false; if (other.getPolicyId() == null ^ this.getPolicyId() == null) return false; if (other.getPolicyId() != null && other.getPolicyId().equals(this.getPolicyId()) == false) return false; if (other.getPolicyType() == null ^ this.getPolicyType() == null) return false; if (other.getPolicyType() != null && other.getPolicyType().equals(this.getPolicyType()) == false) return false; if (other.getPrincipal() == null ^ this.getPrincipal() == null) return false; if (other.getPrincipal() != null && other.getPrincipal().equals(this.getPrincipal()) == false) return false; if (other.getResource() == null ^ this.getResource() == null) return false; if (other.getResource() != null && other.getResource().equals(this.getResource()) == false) return false; if (other.getDefinition() == null ^ this.getDefinition() == null) return false; if (other.getDefinition() != null && other.getDefinition().equals(this.getDefinition()) == false) return false; if (other.getCreatedDate() == null ^ this.getCreatedDate() == null) return false; if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == false) return false; if (other.getLastUpdatedDate() == null ^ this.getLastUpdatedDate() == null) return false; if (other.getLastUpdatedDate() != null && other.getLastUpdatedDate().equals(this.getLastUpdatedDate()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPolicyStoreId() == null) ? 0 : getPolicyStoreId().hashCode()); hashCode = prime * hashCode + ((getPolicyId() == null) ? 0 : getPolicyId().hashCode()); hashCode = prime * hashCode + ((getPolicyType() == null) ? 0 : getPolicyType().hashCode()); hashCode = prime * hashCode + ((getPrincipal() == null) ? 0 : getPrincipal().hashCode()); hashCode = prime * hashCode + ((getResource() == null) ? 0 : getResource().hashCode()); hashCode = prime * hashCode + ((getDefinition() == null) ? 0 : getDefinition().hashCode()); hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedDate() == null) ? 0 : getLastUpdatedDate().hashCode()); return hashCode; } @Override public GetPolicyResult clone() { try { return (GetPolicyResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }