All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.clouddirectory.model.PolicyAttachment Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon CloudDirectory module holds the client classes that are used for communicating with Amazon CloudDirectory Service

The newest version!
/*
 * Copyright 2020-2025 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.clouddirectory.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Contains the PolicyType, PolicyId, and the ObjectIdentifier to which it is * attached. For more information, see Policies. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PolicyAttachment implements Serializable, Cloneable, StructuredPojo { /** *

* The ID of PolicyAttachment. *

*/ private String policyId; /** *

* The ObjectIdentifier that is associated with PolicyAttachment. *

*/ private String objectIdentifier; /** *

* The type of policy that can be associated with PolicyAttachment. *

*/ private String policyType; /** *

* The ID of PolicyAttachment. *

* * @param policyId * The ID of PolicyAttachment. */ public void setPolicyId(String policyId) { this.policyId = policyId; } /** *

* The ID of PolicyAttachment. *

* * @return The ID of PolicyAttachment. */ public String getPolicyId() { return this.policyId; } /** *

* The ID of PolicyAttachment. *

* * @param policyId * The ID of PolicyAttachment. * @return Returns a reference to this object so that method calls can be chained together. */ public PolicyAttachment withPolicyId(String policyId) { setPolicyId(policyId); return this; } /** *

* The ObjectIdentifier that is associated with PolicyAttachment. *

* * @param objectIdentifier * The ObjectIdentifier that is associated with PolicyAttachment. */ public void setObjectIdentifier(String objectIdentifier) { this.objectIdentifier = objectIdentifier; } /** *

* The ObjectIdentifier that is associated with PolicyAttachment. *

* * @return The ObjectIdentifier that is associated with PolicyAttachment. */ public String getObjectIdentifier() { return this.objectIdentifier; } /** *

* The ObjectIdentifier that is associated with PolicyAttachment. *

* * @param objectIdentifier * The ObjectIdentifier that is associated with PolicyAttachment. * @return Returns a reference to this object so that method calls can be chained together. */ public PolicyAttachment withObjectIdentifier(String objectIdentifier) { setObjectIdentifier(objectIdentifier); return this; } /** *

* The type of policy that can be associated with PolicyAttachment. *

* * @param policyType * The type of policy that can be associated with PolicyAttachment. */ public void setPolicyType(String policyType) { this.policyType = policyType; } /** *

* The type of policy that can be associated with PolicyAttachment. *

* * @return The type of policy that can be associated with PolicyAttachment. */ public String getPolicyType() { return this.policyType; } /** *

* The type of policy that can be associated with PolicyAttachment. *

* * @param policyType * The type of policy that can be associated with PolicyAttachment. * @return Returns a reference to this object so that method calls can be chained together. */ public PolicyAttachment withPolicyType(String policyType) { setPolicyType(policyType); 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 (getPolicyId() != null) sb.append("PolicyId: ").append(getPolicyId()).append(","); if (getObjectIdentifier() != null) sb.append("ObjectIdentifier: ").append(getObjectIdentifier()).append(","); if (getPolicyType() != null) sb.append("PolicyType: ").append(getPolicyType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PolicyAttachment == false) return false; PolicyAttachment other = (PolicyAttachment) obj; if (other.getPolicyId() == null ^ this.getPolicyId() == null) return false; if (other.getPolicyId() != null && other.getPolicyId().equals(this.getPolicyId()) == false) return false; if (other.getObjectIdentifier() == null ^ this.getObjectIdentifier() == null) return false; if (other.getObjectIdentifier() != null && other.getObjectIdentifier().equals(this.getObjectIdentifier()) == false) return false; if (other.getPolicyType() == null ^ this.getPolicyType() == null) return false; if (other.getPolicyType() != null && other.getPolicyType().equals(this.getPolicyType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPolicyId() == null) ? 0 : getPolicyId().hashCode()); hashCode = prime * hashCode + ((getObjectIdentifier() == null) ? 0 : getObjectIdentifier().hashCode()); hashCode = prime * hashCode + ((getPolicyType() == null) ? 0 : getPolicyType().hashCode()); return hashCode; } @Override public PolicyAttachment clone() { try { return (PolicyAttachment) 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.clouddirectory.model.transform.PolicyAttachmentMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy