* The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based policy. *
*/ private String resourceArn; /** ** A JSON-formatted string that contains the resource-based policy attached to the CloudTrail channel. *
*/ private String resourcePolicy; /** ** The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based policy. *
* * @param resourceArn * The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based policy. */ public void setResourceArn(String resourceArn) { this.resourceArn = resourceArn; } /** ** The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based policy. *
* * @return The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based policy. */ public String getResourceArn() { return this.resourceArn; } /** ** The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based policy. *
* * @param resourceArn * The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based policy. * @return Returns a reference to this object so that method calls can be chained together. */ public GetResourcePolicyResult withResourceArn(String resourceArn) { setResourceArn(resourceArn); return this; } /** ** A JSON-formatted string that contains the resource-based policy attached to the CloudTrail channel. *
* * @param resourcePolicy * A JSON-formatted string that contains the resource-based policy attached to the CloudTrail channel. */ public void setResourcePolicy(String resourcePolicy) { this.resourcePolicy = resourcePolicy; } /** ** A JSON-formatted string that contains the resource-based policy attached to the CloudTrail channel. *
* * @return A JSON-formatted string that contains the resource-based policy attached to the CloudTrail channel. */ public String getResourcePolicy() { return this.resourcePolicy; } /** ** A JSON-formatted string that contains the resource-based policy attached to the CloudTrail channel. *
* * @param resourcePolicy * A JSON-formatted string that contains the resource-based policy attached to the CloudTrail channel. * @return Returns a reference to this object so that method calls can be chained together. */ public GetResourcePolicyResult withResourcePolicy(String resourcePolicy) { setResourcePolicy(resourcePolicy); 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 (getResourceArn() != null) sb.append("ResourceArn: ").append(getResourceArn()).append(","); if (getResourcePolicy() != null) sb.append("ResourcePolicy: ").append(getResourcePolicy()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetResourcePolicyResult == false) return false; GetResourcePolicyResult other = (GetResourcePolicyResult) obj; if (other.getResourceArn() == null ^ this.getResourceArn() == null) return false; if (other.getResourceArn() != null && other.getResourceArn().equals(this.getResourceArn()) == false) return false; if (other.getResourcePolicy() == null ^ this.getResourcePolicy() == null) return false; if (other.getResourcePolicy() != null && other.getResourcePolicy().equals(this.getResourcePolicy()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceArn() == null) ? 0 : getResourceArn().hashCode()); hashCode = prime * hashCode + ((getResourcePolicy() == null) ? 0 : getResourcePolicy().hashCode()); return hashCode; } @Override public GetResourcePolicyResult clone() { try { return (GetResourcePolicyResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }