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

com.aliyun.ros.cdk.ram.RoleProps Maven / Gradle / Ivy

Go to download

Aliyun SDK Copyright (C) Alibaba Cloud Computing All rights reserved. http://www.aliyun.com

The newest version!
package com.aliyun.ros.cdk.ram;

/**
 * Properties for defining a Role.
 * 

* See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ram-role */ @javax.annotation.Generated(value = "jsii-pacmak/1.85.0 (build 08ee592)", date = "2024-12-13T06:45:10.822Z") @software.amazon.jsii.Jsii(module = com.aliyun.ros.cdk.ram.$Module.class, fqn = "@alicloud/ros-cdk-ram.RoleProps") @software.amazon.jsii.Jsii.Proxy(RoleProps.Jsii$Proxy.class) public interface RoleProps extends software.amazon.jsii.JsiiSerializable { /** * Property assumeRolePolicyDocument: The RAM assume role policy that is associated with this role. */ @org.jetbrains.annotations.NotNull java.lang.Object getAssumeRolePolicyDocument(); /** * Property roleName: Specifies the role name, containing up to 64 characters. */ @org.jetbrains.annotations.NotNull java.lang.Object getRoleName(); /** * Property deletionForce: Whether force detach the policies attached to the role. *

* Default value is false. */ default @org.jetbrains.annotations.Nullable java.lang.Object getDeletionForce() { return null; } /** * Property description: Remark information, up to 1024 characters or Chinese characters. */ default @org.jetbrains.annotations.Nullable java.lang.Object getDescription() { return null; } /** * Property ignoreExisting: Whether to ignore existing role False: ROS will perform a uniqueness check.If a role with the same name exists, an error will be reported when creating it. True: ROS will not check the uniqueness.If there is a role with the same name, the role creation process will be ignored. If the role is not created by ROS, it will be ignored during update and delete stage. */ default @org.jetbrains.annotations.Nullable java.lang.Object getIgnoreExisting() { return null; } /** * Property maxSessionDuration: The maximum session duration of the RAM role. *

* Valid values: 3600 to 43200. Unit: seconds. Default value: 3600. * The default value is used if the parameter is not specified. */ default @org.jetbrains.annotations.Nullable java.lang.Object getMaxSessionDuration() { return null; } /** * Property policies: Describes what actions are allowed on what resources. */ default @org.jetbrains.annotations.Nullable java.lang.Object getPolicies() { return null; } /** * Property policyAttachments: System and custom policy names to attach. */ default @org.jetbrains.annotations.Nullable java.lang.Object getPolicyAttachments() { return null; } /** * @return a {@link Builder} of {@link RoleProps} */ static Builder builder() { return new Builder(); } /** * A builder for {@link RoleProps} */ public static final class Builder implements software.amazon.jsii.Builder { java.lang.Object assumeRolePolicyDocument; java.lang.Object roleName; java.lang.Object deletionForce; java.lang.Object description; java.lang.Object ignoreExisting; java.lang.Object maxSessionDuration; java.lang.Object policies; java.lang.Object policyAttachments; /** * Sets the value of {@link RoleProps#getAssumeRolePolicyDocument} * @param assumeRolePolicyDocument Property assumeRolePolicyDocument: The RAM assume role policy that is associated with this role. This parameter is required. * @return {@code this} */ public Builder assumeRolePolicyDocument(com.aliyun.ros.cdk.core.IResolvable assumeRolePolicyDocument) { this.assumeRolePolicyDocument = assumeRolePolicyDocument; return this; } /** * Sets the value of {@link RoleProps#getAssumeRolePolicyDocument} * @param assumeRolePolicyDocument Property assumeRolePolicyDocument: The RAM assume role policy that is associated with this role. This parameter is required. * @return {@code this} */ public Builder assumeRolePolicyDocument(com.aliyun.ros.cdk.ram.RosRole.AssumeRolePolicyDocumentProperty assumeRolePolicyDocument) { this.assumeRolePolicyDocument = assumeRolePolicyDocument; return this; } /** * Sets the value of {@link RoleProps#getRoleName} * @param roleName Property roleName: Specifies the role name, containing up to 64 characters. This parameter is required. * @return {@code this} */ public Builder roleName(java.lang.String roleName) { this.roleName = roleName; return this; } /** * Sets the value of {@link RoleProps#getRoleName} * @param roleName Property roleName: Specifies the role name, containing up to 64 characters. This parameter is required. * @return {@code this} */ public Builder roleName(com.aliyun.ros.cdk.core.IResolvable roleName) { this.roleName = roleName; return this; } /** * Sets the value of {@link RoleProps#getDeletionForce} * @param deletionForce Property deletionForce: Whether force detach the policies attached to the role. * Default value is false. * @return {@code this} */ public Builder deletionForce(java.lang.Boolean deletionForce) { this.deletionForce = deletionForce; return this; } /** * Sets the value of {@link RoleProps#getDeletionForce} * @param deletionForce Property deletionForce: Whether force detach the policies attached to the role. * Default value is false. * @return {@code this} */ public Builder deletionForce(com.aliyun.ros.cdk.core.IResolvable deletionForce) { this.deletionForce = deletionForce; return this; } /** * Sets the value of {@link RoleProps#getDescription} * @param description Property description: Remark information, up to 1024 characters or Chinese characters. * @return {@code this} */ public Builder description(java.lang.String description) { this.description = description; return this; } /** * Sets the value of {@link RoleProps#getDescription} * @param description Property description: Remark information, up to 1024 characters or Chinese characters. * @return {@code this} */ public Builder description(com.aliyun.ros.cdk.core.IResolvable description) { this.description = description; return this; } /** * Sets the value of {@link RoleProps#getIgnoreExisting} * @param ignoreExisting Property ignoreExisting: Whether to ignore existing role False: ROS will perform a uniqueness check.If a role with the same name exists, an error will be reported when creating it. True: ROS will not check the uniqueness.If there is a role with the same name, the role creation process will be ignored. If the role is not created by ROS, it will be ignored during update and delete stage. * @return {@code this} */ public Builder ignoreExisting(java.lang.Boolean ignoreExisting) { this.ignoreExisting = ignoreExisting; return this; } /** * Sets the value of {@link RoleProps#getIgnoreExisting} * @param ignoreExisting Property ignoreExisting: Whether to ignore existing role False: ROS will perform a uniqueness check.If a role with the same name exists, an error will be reported when creating it. True: ROS will not check the uniqueness.If there is a role with the same name, the role creation process will be ignored. If the role is not created by ROS, it will be ignored during update and delete stage. * @return {@code this} */ public Builder ignoreExisting(com.aliyun.ros.cdk.core.IResolvable ignoreExisting) { this.ignoreExisting = ignoreExisting; return this; } /** * Sets the value of {@link RoleProps#getMaxSessionDuration} * @param maxSessionDuration Property maxSessionDuration: The maximum session duration of the RAM role. * Valid values: 3600 to 43200. Unit: seconds. Default value: 3600. * The default value is used if the parameter is not specified. * @return {@code this} */ public Builder maxSessionDuration(java.lang.Number maxSessionDuration) { this.maxSessionDuration = maxSessionDuration; return this; } /** * Sets the value of {@link RoleProps#getMaxSessionDuration} * @param maxSessionDuration Property maxSessionDuration: The maximum session duration of the RAM role. * Valid values: 3600 to 43200. Unit: seconds. Default value: 3600. * The default value is used if the parameter is not specified. * @return {@code this} */ public Builder maxSessionDuration(com.aliyun.ros.cdk.core.IResolvable maxSessionDuration) { this.maxSessionDuration = maxSessionDuration; return this; } /** * Sets the value of {@link RoleProps#getPolicies} * @param policies Property policies: Describes what actions are allowed on what resources. * @return {@code this} */ public Builder policies(com.aliyun.ros.cdk.core.IResolvable policies) { this.policies = policies; return this; } /** * Sets the value of {@link RoleProps#getPolicies} * @param policies Property policies: Describes what actions are allowed on what resources. * @return {@code this} */ public Builder policies(java.util.List policies) { this.policies = policies; return this; } /** * Sets the value of {@link RoleProps#getPolicyAttachments} * @param policyAttachments Property policyAttachments: System and custom policy names to attach. * @return {@code this} */ public Builder policyAttachments(com.aliyun.ros.cdk.core.IResolvable policyAttachments) { this.policyAttachments = policyAttachments; return this; } /** * Sets the value of {@link RoleProps#getPolicyAttachments} * @param policyAttachments Property policyAttachments: System and custom policy names to attach. * @return {@code this} */ public Builder policyAttachments(com.aliyun.ros.cdk.ram.RosRole.PolicyAttachmentsProperty policyAttachments) { this.policyAttachments = policyAttachments; return this; } /** * Builds the configured instance. * @return a new instance of {@link RoleProps} * @throws NullPointerException if any required attribute was not provided */ @Override public RoleProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link RoleProps} */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements RoleProps { private final java.lang.Object assumeRolePolicyDocument; private final java.lang.Object roleName; private final java.lang.Object deletionForce; private final java.lang.Object description; private final java.lang.Object ignoreExisting; private final java.lang.Object maxSessionDuration; private final java.lang.Object policies; private final java.lang.Object policyAttachments; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.assumeRolePolicyDocument = software.amazon.jsii.Kernel.get(this, "assumeRolePolicyDocument", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); this.roleName = software.amazon.jsii.Kernel.get(this, "roleName", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); this.deletionForce = software.amazon.jsii.Kernel.get(this, "deletionForce", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); this.ignoreExisting = software.amazon.jsii.Kernel.get(this, "ignoreExisting", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); this.maxSessionDuration = software.amazon.jsii.Kernel.get(this, "maxSessionDuration", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); this.policies = software.amazon.jsii.Kernel.get(this, "policies", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); this.policyAttachments = software.amazon.jsii.Kernel.get(this, "policyAttachments", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.assumeRolePolicyDocument = java.util.Objects.requireNonNull(builder.assumeRolePolicyDocument, "assumeRolePolicyDocument is required"); this.roleName = java.util.Objects.requireNonNull(builder.roleName, "roleName is required"); this.deletionForce = builder.deletionForce; this.description = builder.description; this.ignoreExisting = builder.ignoreExisting; this.maxSessionDuration = builder.maxSessionDuration; this.policies = builder.policies; this.policyAttachments = builder.policyAttachments; } @Override public final java.lang.Object getAssumeRolePolicyDocument() { return this.assumeRolePolicyDocument; } @Override public final java.lang.Object getRoleName() { return this.roleName; } @Override public final java.lang.Object getDeletionForce() { return this.deletionForce; } @Override public final java.lang.Object getDescription() { return this.description; } @Override public final java.lang.Object getIgnoreExisting() { return this.ignoreExisting; } @Override public final java.lang.Object getMaxSessionDuration() { return this.maxSessionDuration; } @Override public final java.lang.Object getPolicies() { return this.policies; } @Override public final java.lang.Object getPolicyAttachments() { return this.policyAttachments; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("assumeRolePolicyDocument", om.valueToTree(this.getAssumeRolePolicyDocument())); data.set("roleName", om.valueToTree(this.getRoleName())); if (this.getDeletionForce() != null) { data.set("deletionForce", om.valueToTree(this.getDeletionForce())); } if (this.getDescription() != null) { data.set("description", om.valueToTree(this.getDescription())); } if (this.getIgnoreExisting() != null) { data.set("ignoreExisting", om.valueToTree(this.getIgnoreExisting())); } if (this.getMaxSessionDuration() != null) { data.set("maxSessionDuration", om.valueToTree(this.getMaxSessionDuration())); } if (this.getPolicies() != null) { data.set("policies", om.valueToTree(this.getPolicies())); } if (this.getPolicyAttachments() != null) { data.set("policyAttachments", om.valueToTree(this.getPolicyAttachments())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@alicloud/ros-cdk-ram.RoleProps")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RoleProps.Jsii$Proxy that = (RoleProps.Jsii$Proxy) o; if (!assumeRolePolicyDocument.equals(that.assumeRolePolicyDocument)) return false; if (!roleName.equals(that.roleName)) return false; if (this.deletionForce != null ? !this.deletionForce.equals(that.deletionForce) : that.deletionForce != null) return false; if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false; if (this.ignoreExisting != null ? !this.ignoreExisting.equals(that.ignoreExisting) : that.ignoreExisting != null) return false; if (this.maxSessionDuration != null ? !this.maxSessionDuration.equals(that.maxSessionDuration) : that.maxSessionDuration != null) return false; if (this.policies != null ? !this.policies.equals(that.policies) : that.policies != null) return false; return this.policyAttachments != null ? this.policyAttachments.equals(that.policyAttachments) : that.policyAttachments == null; } @Override public final int hashCode() { int result = this.assumeRolePolicyDocument.hashCode(); result = 31 * result + (this.roleName.hashCode()); result = 31 * result + (this.deletionForce != null ? this.deletionForce.hashCode() : 0); result = 31 * result + (this.description != null ? this.description.hashCode() : 0); result = 31 * result + (this.ignoreExisting != null ? this.ignoreExisting.hashCode() : 0); result = 31 * result + (this.maxSessionDuration != null ? this.maxSessionDuration.hashCode() : 0); result = 31 * result + (this.policies != null ? this.policies.hashCode() : 0); result = 31 * result + (this.policyAttachments != null ? this.policyAttachments.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy