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

com.amazonaws.services.serverlessapplicationrepository.model.ApplicationPolicyStatement Maven / Gradle / Ivy

Go to download

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

The newest version!
/*
 * Copyright 2019-2024 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.serverlessapplicationrepository.model;

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

/**
 * 

* Policy statement applied to the application. *

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

* For the list of actions supported for this operation, see Application Permissions. *

*/ private java.util.List actions; /** *

* An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key. *

*/ private java.util.List principalOrgIDs; /** *

* An array of AWS account IDs, or * to make the application public. *

*/ private java.util.List principals; /** *

* A unique ID for the statement. *

*/ private String statementId; /** *

* For the list of actions supported for this operation, see Application Permissions. *

* * @return For the list of actions supported for this operation, see Application Permissions. */ public java.util.List getActions() { return actions; } /** *

* For the list of actions supported for this operation, see Application Permissions. *

* * @param actions * For the list of actions supported for this operation, see Application Permissions. */ public void setActions(java.util.Collection actions) { if (actions == null) { this.actions = null; return; } this.actions = new java.util.ArrayList(actions); } /** *

* For the list of actions supported for this operation, see Application Permissions. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setActions(java.util.Collection)} or {@link #withActions(java.util.Collection)} if you want to override * the existing values. *

* * @param actions * For the list of actions supported for this operation, see Application Permissions. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationPolicyStatement withActions(String... actions) { if (this.actions == null) { setActions(new java.util.ArrayList(actions.length)); } for (String ele : actions) { this.actions.add(ele); } return this; } /** *

* For the list of actions supported for this operation, see Application Permissions. *

* * @param actions * For the list of actions supported for this operation, see Application Permissions. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationPolicyStatement withActions(java.util.Collection actions) { setActions(actions); return this; } /** *

* An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key. *

* * @return An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key. */ public java.util.List getPrincipalOrgIDs() { return principalOrgIDs; } /** *

* An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key. *

* * @param principalOrgIDs * An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key. */ public void setPrincipalOrgIDs(java.util.Collection principalOrgIDs) { if (principalOrgIDs == null) { this.principalOrgIDs = null; return; } this.principalOrgIDs = new java.util.ArrayList(principalOrgIDs); } /** *

* An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setPrincipalOrgIDs(java.util.Collection)} or {@link #withPrincipalOrgIDs(java.util.Collection)} if you * want to override the existing values. *

* * @param principalOrgIDs * An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationPolicyStatement withPrincipalOrgIDs(String... principalOrgIDs) { if (this.principalOrgIDs == null) { setPrincipalOrgIDs(new java.util.ArrayList(principalOrgIDs.length)); } for (String ele : principalOrgIDs) { this.principalOrgIDs.add(ele); } return this; } /** *

* An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key. *

* * @param principalOrgIDs * An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationPolicyStatement withPrincipalOrgIDs(java.util.Collection principalOrgIDs) { setPrincipalOrgIDs(principalOrgIDs); return this; } /** *

* An array of AWS account IDs, or * to make the application public. *

* * @return An array of AWS account IDs, or * to make the application public. */ public java.util.List getPrincipals() { return principals; } /** *

* An array of AWS account IDs, or * to make the application public. *

* * @param principals * An array of AWS account IDs, or * to make the application public. */ public void setPrincipals(java.util.Collection principals) { if (principals == null) { this.principals = null; return; } this.principals = new java.util.ArrayList(principals); } /** *

* An array of AWS account IDs, or * to make the application public. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setPrincipals(java.util.Collection)} or {@link #withPrincipals(java.util.Collection)} if you want to * override the existing values. *

* * @param principals * An array of AWS account IDs, or * to make the application public. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationPolicyStatement withPrincipals(String... principals) { if (this.principals == null) { setPrincipals(new java.util.ArrayList(principals.length)); } for (String ele : principals) { this.principals.add(ele); } return this; } /** *

* An array of AWS account IDs, or * to make the application public. *

* * @param principals * An array of AWS account IDs, or * to make the application public. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationPolicyStatement withPrincipals(java.util.Collection principals) { setPrincipals(principals); return this; } /** *

* A unique ID for the statement. *

* * @param statementId * A unique ID for the statement. */ public void setStatementId(String statementId) { this.statementId = statementId; } /** *

* A unique ID for the statement. *

* * @return A unique ID for the statement. */ public String getStatementId() { return this.statementId; } /** *

* A unique ID for the statement. *

* * @param statementId * A unique ID for the statement. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationPolicyStatement withStatementId(String statementId) { setStatementId(statementId); 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 (getActions() != null) sb.append("Actions: ").append(getActions()).append(","); if (getPrincipalOrgIDs() != null) sb.append("PrincipalOrgIDs: ").append(getPrincipalOrgIDs()).append(","); if (getPrincipals() != null) sb.append("Principals: ").append(getPrincipals()).append(","); if (getStatementId() != null) sb.append("StatementId: ").append(getStatementId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ApplicationPolicyStatement == false) return false; ApplicationPolicyStatement other = (ApplicationPolicyStatement) obj; if (other.getActions() == null ^ this.getActions() == null) return false; if (other.getActions() != null && other.getActions().equals(this.getActions()) == false) return false; if (other.getPrincipalOrgIDs() == null ^ this.getPrincipalOrgIDs() == null) return false; if (other.getPrincipalOrgIDs() != null && other.getPrincipalOrgIDs().equals(this.getPrincipalOrgIDs()) == false) return false; if (other.getPrincipals() == null ^ this.getPrincipals() == null) return false; if (other.getPrincipals() != null && other.getPrincipals().equals(this.getPrincipals()) == false) return false; if (other.getStatementId() == null ^ this.getStatementId() == null) return false; if (other.getStatementId() != null && other.getStatementId().equals(this.getStatementId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getActions() == null) ? 0 : getActions().hashCode()); hashCode = prime * hashCode + ((getPrincipalOrgIDs() == null) ? 0 : getPrincipalOrgIDs().hashCode()); hashCode = prime * hashCode + ((getPrincipals() == null) ? 0 : getPrincipals().hashCode()); hashCode = prime * hashCode + ((getStatementId() == null) ? 0 : getStatementId().hashCode()); return hashCode; } @Override public ApplicationPolicyStatement clone() { try { return (ApplicationPolicyStatement) 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.serverlessapplicationrepository.model.transform.ApplicationPolicyStatementMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy