/* * 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.iotsitewise.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 CreateAccessPolicyRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The identity for this access policy. Choose an IAM Identity Center user, an IAM Identity Center group, or an IAM * user. *
*/ private Identity accessPolicyIdentity; /** ** The IoT SiteWise Monitor resource for this access policy. Choose either a portal or a project. *
*/ private Resource accessPolicyResource; /** *
* The permission level for this access policy. Note that a project ADMINISTRATOR
is also known as a
* project owner.
*
* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse * this client token if a new idempotent request is required. *
*/ private String clientToken; /** ** A list of key-value pairs that contain metadata for the access policy. For more information, see Tagging your IoT SiteWise * resources in the IoT SiteWise User Guide. *
*/ private java.util.Map* The identity for this access policy. Choose an IAM Identity Center user, an IAM Identity Center group, or an IAM * user. *
* * @param accessPolicyIdentity * The identity for this access policy. Choose an IAM Identity Center user, an IAM Identity Center group, or * an IAM user. */ public void setAccessPolicyIdentity(Identity accessPolicyIdentity) { this.accessPolicyIdentity = accessPolicyIdentity; } /** ** The identity for this access policy. Choose an IAM Identity Center user, an IAM Identity Center group, or an IAM * user. *
* * @return The identity for this access policy. Choose an IAM Identity Center user, an IAM Identity Center group, or * an IAM user. */ public Identity getAccessPolicyIdentity() { return this.accessPolicyIdentity; } /** ** The identity for this access policy. Choose an IAM Identity Center user, an IAM Identity Center group, or an IAM * user. *
* * @param accessPolicyIdentity * The identity for this access policy. Choose an IAM Identity Center user, an IAM Identity Center group, or * an IAM user. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAccessPolicyRequest withAccessPolicyIdentity(Identity accessPolicyIdentity) { setAccessPolicyIdentity(accessPolicyIdentity); return this; } /** ** The IoT SiteWise Monitor resource for this access policy. Choose either a portal or a project. *
* * @param accessPolicyResource * The IoT SiteWise Monitor resource for this access policy. Choose either a portal or a project. */ public void setAccessPolicyResource(Resource accessPolicyResource) { this.accessPolicyResource = accessPolicyResource; } /** ** The IoT SiteWise Monitor resource for this access policy. Choose either a portal or a project. *
* * @return The IoT SiteWise Monitor resource for this access policy. Choose either a portal or a project. */ public Resource getAccessPolicyResource() { return this.accessPolicyResource; } /** ** The IoT SiteWise Monitor resource for this access policy. Choose either a portal or a project. *
* * @param accessPolicyResource * The IoT SiteWise Monitor resource for this access policy. Choose either a portal or a project. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAccessPolicyRequest withAccessPolicyResource(Resource accessPolicyResource) { setAccessPolicyResource(accessPolicyResource); return this; } /** *
* The permission level for this access policy. Note that a project ADMINISTRATOR
is also known as a
* project owner.
*
ADMINISTRATOR
is also known
* as a project owner.
* @see Permission
*/
public void setAccessPolicyPermission(String accessPolicyPermission) {
this.accessPolicyPermission = accessPolicyPermission;
}
/**
*
* The permission level for this access policy. Note that a project ADMINISTRATOR
is also known as a
* project owner.
*
ADMINISTRATOR
is also known
* as a project owner.
* @see Permission
*/
public String getAccessPolicyPermission() {
return this.accessPolicyPermission;
}
/**
*
* The permission level for this access policy. Note that a project ADMINISTRATOR
is also known as a
* project owner.
*
ADMINISTRATOR
is also known
* as a project owner.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Permission
*/
public CreateAccessPolicyRequest withAccessPolicyPermission(String accessPolicyPermission) {
setAccessPolicyPermission(accessPolicyPermission);
return this;
}
/**
*
* The permission level for this access policy. Note that a project ADMINISTRATOR
is also known as a
* project owner.
*
ADMINISTRATOR
is also known
* as a project owner.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Permission
*/
public CreateAccessPolicyRequest withAccessPolicyPermission(Permission accessPolicyPermission) {
this.accessPolicyPermission = accessPolicyPermission.toString();
return this;
}
/**
* * A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse * this client token if a new idempotent request is required. *
* * @param clientToken * A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't * reuse this client token if a new idempotent request is required. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse * this client token if a new idempotent request is required. *
* * @return A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't * reuse this client token if a new idempotent request is required. */ public String getClientToken() { return this.clientToken; } /** ** A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse * this client token if a new idempotent request is required. *
* * @param clientToken * A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't * reuse this client token if a new idempotent request is required. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAccessPolicyRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** ** A list of key-value pairs that contain metadata for the access policy. For more information, see Tagging your IoT SiteWise * resources in the IoT SiteWise User Guide. *
* * @return A list of key-value pairs that contain metadata for the access policy. For more information, see Tagging your IoT * SiteWise resources in the IoT SiteWise User Guide. */ public java.util.Map* A list of key-value pairs that contain metadata for the access policy. For more information, see Tagging your IoT SiteWise * resources in the IoT SiteWise User Guide. *
* * @param tags * A list of key-value pairs that contain metadata for the access policy. For more information, see Tagging your IoT * SiteWise resources in the IoT SiteWise User Guide. */ public void setTags(java.util.Map* A list of key-value pairs that contain metadata for the access policy. For more information, see Tagging your IoT SiteWise * resources in the IoT SiteWise User Guide. *
* * @param tags * A list of key-value pairs that contain metadata for the access policy. For more information, see Tagging your IoT * SiteWise resources in the IoT SiteWise User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAccessPolicyRequest withTags(java.util.Map