/* * Copyright 2018-2023 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.budgets.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The Identity and Access Management (IAM) action definition details. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class IamActionDefinition implements Serializable, Cloneable, StructuredPojo { /** ** The Amazon Resource Name (ARN) of the policy to be attached. *
*/ private String policyArn; /** ** A list of roles to be attached. There must be at least one role. *
*/ private java.util.List* A list of groups to be attached. There must be at least one group. *
*/ private java.util.List* A list of users to be attached. There must be at least one user. *
*/ private java.util.List* The Amazon Resource Name (ARN) of the policy to be attached. *
* * @param policyArn * The Amazon Resource Name (ARN) of the policy to be attached. */ public void setPolicyArn(String policyArn) { this.policyArn = policyArn; } /** ** The Amazon Resource Name (ARN) of the policy to be attached. *
* * @return The Amazon Resource Name (ARN) of the policy to be attached. */ public String getPolicyArn() { return this.policyArn; } /** ** The Amazon Resource Name (ARN) of the policy to be attached. *
* * @param policyArn * The Amazon Resource Name (ARN) of the policy to be attached. * @return Returns a reference to this object so that method calls can be chained together. */ public IamActionDefinition withPolicyArn(String policyArn) { setPolicyArn(policyArn); return this; } /** ** A list of roles to be attached. There must be at least one role. *
* * @return A list of roles to be attached. There must be at least one role. */ public java.util.List* A list of roles to be attached. There must be at least one role. *
* * @param roles * A list of roles to be attached. There must be at least one role. */ public void setRoles(java.util.Collection* A list of roles to be attached. There must be at least one role. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setRoles(java.util.Collection)} or {@link #withRoles(java.util.Collection)} if you want to override the * existing values. *
* * @param roles * A list of roles to be attached. There must be at least one role. * @return Returns a reference to this object so that method calls can be chained together. */ public IamActionDefinition withRoles(String... roles) { if (this.roles == null) { setRoles(new java.util.ArrayList* A list of roles to be attached. There must be at least one role. *
* * @param roles * A list of roles to be attached. There must be at least one role. * @return Returns a reference to this object so that method calls can be chained together. */ public IamActionDefinition withRoles(java.util.Collection* A list of groups to be attached. There must be at least one group. *
* * @return A list of groups to be attached. There must be at least one group. */ public java.util.List* A list of groups to be attached. There must be at least one group. *
* * @param groups * A list of groups to be attached. There must be at least one group. */ public void setGroups(java.util.Collection* A list of groups to be attached. There must be at least one group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setGroups(java.util.Collection)} or {@link #withGroups(java.util.Collection)} if you want to override the * existing values. *
* * @param groups * A list of groups to be attached. There must be at least one group. * @return Returns a reference to this object so that method calls can be chained together. */ public IamActionDefinition withGroups(String... groups) { if (this.groups == null) { setGroups(new java.util.ArrayList* A list of groups to be attached. There must be at least one group. *
* * @param groups * A list of groups to be attached. There must be at least one group. * @return Returns a reference to this object so that method calls can be chained together. */ public IamActionDefinition withGroups(java.util.Collection* A list of users to be attached. There must be at least one user. *
* * @return A list of users to be attached. There must be at least one user. */ public java.util.List* A list of users to be attached. There must be at least one user. *
* * @param users * A list of users to be attached. There must be at least one user. */ public void setUsers(java.util.Collection* A list of users to be attached. There must be at least one user. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setUsers(java.util.Collection)} or {@link #withUsers(java.util.Collection)} if you want to override the * existing values. *
* * @param users * A list of users to be attached. There must be at least one user. * @return Returns a reference to this object so that method calls can be chained together. */ public IamActionDefinition withUsers(String... users) { if (this.users == null) { setUsers(new java.util.ArrayList* A list of users to be attached. There must be at least one user. *
* * @param users * A list of users to be attached. There must be at least one user. * @return Returns a reference to this object so that method calls can be chained together. */ public IamActionDefinition withUsers(java.util.Collection