/* * 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.licensemanager.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateGrantRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
*/ private String clientToken; /** ** Grant name. *
*/ private String grantName; /** ** Amazon Resource Name (ARN) of the license. *
*/ private String licenseArn; /** ** The grant principals. You can specify one of the following as an Amazon Resource Name (ARN): *
** An Amazon Web Services account, which includes only the account specified. *
** An organizational unit (OU), which includes all accounts in the OU. *
** An organization, which will include all accounts across your organization. *
** Home Region of the grant. *
*/ private String homeRegion; /** ** Allowed operations for the grant. *
*/ private java.util.List* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public String getClientToken() { return this.clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGrantRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** ** Grant name. *
* * @param grantName * Grant name. */ public void setGrantName(String grantName) { this.grantName = grantName; } /** ** Grant name. *
* * @return Grant name. */ public String getGrantName() { return this.grantName; } /** ** Grant name. *
* * @param grantName * Grant name. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGrantRequest withGrantName(String grantName) { setGrantName(grantName); return this; } /** ** Amazon Resource Name (ARN) of the license. *
* * @param licenseArn * Amazon Resource Name (ARN) of the license. */ public void setLicenseArn(String licenseArn) { this.licenseArn = licenseArn; } /** ** Amazon Resource Name (ARN) of the license. *
* * @return Amazon Resource Name (ARN) of the license. */ public String getLicenseArn() { return this.licenseArn; } /** ** Amazon Resource Name (ARN) of the license. *
* * @param licenseArn * Amazon Resource Name (ARN) of the license. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGrantRequest withLicenseArn(String licenseArn) { setLicenseArn(licenseArn); return this; } /** ** The grant principals. You can specify one of the following as an Amazon Resource Name (ARN): *
** An Amazon Web Services account, which includes only the account specified. *
** An organizational unit (OU), which includes all accounts in the OU. *
** An organization, which will include all accounts across your organization. *
** An Amazon Web Services account, which includes only the account specified. *
** An organizational unit (OU), which includes all accounts in the OU. *
** An organization, which will include all accounts across your organization. *
** The grant principals. You can specify one of the following as an Amazon Resource Name (ARN): *
** An Amazon Web Services account, which includes only the account specified. *
** An organizational unit (OU), which includes all accounts in the OU. *
** An organization, which will include all accounts across your organization. *
** An Amazon Web Services account, which includes only the account specified. *
** An organizational unit (OU), which includes all accounts in the OU. *
** An organization, which will include all accounts across your organization. *
** The grant principals. You can specify one of the following as an Amazon Resource Name (ARN): *
** An Amazon Web Services account, which includes only the account specified. *
** An organizational unit (OU), which includes all accounts in the OU. *
** An organization, which will include all accounts across your organization. *
** 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 * The grant principals. You can specify one of the following as an Amazon Resource Name (ARN): ** An Amazon Web Services account, which includes only the account specified. *
** An organizational unit (OU), which includes all accounts in the OU. *
** An organization, which will include all accounts across your organization. *
** The grant principals. You can specify one of the following as an Amazon Resource Name (ARN): *
** An Amazon Web Services account, which includes only the account specified. *
** An organizational unit (OU), which includes all accounts in the OU. *
** An organization, which will include all accounts across your organization. *
** An Amazon Web Services account, which includes only the account specified. *
** An organizational unit (OU), which includes all accounts in the OU. *
** An organization, which will include all accounts across your organization. *
** Home Region of the grant. *
* * @param homeRegion * Home Region of the grant. */ public void setHomeRegion(String homeRegion) { this.homeRegion = homeRegion; } /** ** Home Region of the grant. *
* * @return Home Region of the grant. */ public String getHomeRegion() { return this.homeRegion; } /** ** Home Region of the grant. *
* * @param homeRegion * Home Region of the grant. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGrantRequest withHomeRegion(String homeRegion) { setHomeRegion(homeRegion); return this; } /** ** Allowed operations for the grant. *
* * @return Allowed operations for the grant. * @see AllowedOperation */ public java.util.List* Allowed operations for the grant. *
* * @param allowedOperations * Allowed operations for the grant. * @see AllowedOperation */ public void setAllowedOperations(java.util.Collection* Allowed operations for the grant. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAllowedOperations(java.util.Collection)} or {@link #withAllowedOperations(java.util.Collection)} if * you want to override the existing values. *
* * @param allowedOperations * Allowed operations for the grant. * @return Returns a reference to this object so that method calls can be chained together. * @see AllowedOperation */ public CreateGrantRequest withAllowedOperations(String... allowedOperations) { if (this.allowedOperations == null) { setAllowedOperations(new java.util.ArrayList* Allowed operations for the grant. *
* * @param allowedOperations * Allowed operations for the grant. * @return Returns a reference to this object so that method calls can be chained together. * @see AllowedOperation */ public CreateGrantRequest withAllowedOperations(java.util.Collection* Allowed operations for the grant. *
* * @param allowedOperations * Allowed operations for the grant. * @return Returns a reference to this object so that method calls can be chained together. * @see AllowedOperation */ public CreateGrantRequest withAllowedOperations(AllowedOperation... allowedOperations) { java.util.ArrayList