org.mongodb.awscdk.resources.mongodbatlas.AtlasRole Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.876Z")
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.AtlasRole")
@software.amazon.jsii.Jsii.Proxy(AtlasRole.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface AtlasRole extends software.amazon.jsii.JsiiSerializable {
/**
* Unique 24-hexadecimal digit string that identifies the organization to which this role belongs.
*
* You can set a value for this parameter or groupId but not both in the same request
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getOrgId() {
return null;
}
/**
* Unique 24-hexadecimal digit string that identifies the project to which this role belongs.
*
* You can set a value for this parameter or orgId but not both in the same request.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getProjectId() {
return null;
}
/**
* Human-readable label that identifies the collection of privileges that MongoDB Cloud grants a specific API key, MongoDB Cloud user, or MongoDB Cloud team.
*
* These roles include organization- and project-level roles.
*
* Organization Roles
*
*
* - ORG_OWNER
* - ORG_MEMBER
* - ORG_GROUP_CREATOR
* - ORG_BILLING_ADMIN
* - ORG_READ_ONLY
*
*
* Project Roles
*
*
* - GROUP_CLUSTER_MANAGER
* - GROUP_DATA_ACCESS_ADMIN
* - GROUP_DATA_ACCESS_READ_ONLY
* - GROUP_DATA_ACCESS_READ_WRITE
* - GROUP_OWNER
* - GROUP_READ_ONLY
*
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.mongodb.awscdk.resources.mongodbatlas.AtlasRoleRoleName getRoleName() {
return null;
}
/**
* @return a {@link Builder} of {@link AtlasRole}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link AtlasRole}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String orgId;
java.lang.String projectId;
org.mongodb.awscdk.resources.mongodbatlas.AtlasRoleRoleName roleName;
/**
* Sets the value of {@link AtlasRole#getOrgId}
* @param orgId Unique 24-hexadecimal digit string that identifies the organization to which this role belongs.
* You can set a value for this parameter or groupId but not both in the same request
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder orgId(java.lang.String orgId) {
this.orgId = orgId;
return this;
}
/**
* Sets the value of {@link AtlasRole#getProjectId}
* @param projectId Unique 24-hexadecimal digit string that identifies the project to which this role belongs.
* You can set a value for this parameter or orgId but not both in the same request.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder projectId(java.lang.String projectId) {
this.projectId = projectId;
return this;
}
/**
* Sets the value of {@link AtlasRole#getRoleName}
* @param roleName Human-readable label that identifies the collection of privileges that MongoDB Cloud grants a specific API key, MongoDB Cloud user, or MongoDB Cloud team.
* These roles include organization- and project-level roles.
*
* Organization Roles
*
*
* - ORG_OWNER
* - ORG_MEMBER
* - ORG_GROUP_CREATOR
* - ORG_BILLING_ADMIN
* - ORG_READ_ONLY
*
*
* Project Roles
*
*
* - GROUP_CLUSTER_MANAGER
* - GROUP_DATA_ACCESS_ADMIN
* - GROUP_DATA_ACCESS_READ_ONLY
* - GROUP_DATA_ACCESS_READ_WRITE
* - GROUP_OWNER
* - GROUP_READ_ONLY
*
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder roleName(org.mongodb.awscdk.resources.mongodbatlas.AtlasRoleRoleName roleName) {
this.roleName = roleName;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link AtlasRole}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public AtlasRole build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link AtlasRole}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AtlasRole {
private final java.lang.String orgId;
private final java.lang.String projectId;
private final org.mongodb.awscdk.resources.mongodbatlas.AtlasRoleRoleName roleName;
/**
* 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.orgId = software.amazon.jsii.Kernel.get(this, "orgId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.projectId = software.amazon.jsii.Kernel.get(this, "projectId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.roleName = software.amazon.jsii.Kernel.get(this, "roleName", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.AtlasRoleRoleName.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.orgId = builder.orgId;
this.projectId = builder.projectId;
this.roleName = builder.roleName;
}
@Override
public final java.lang.String getOrgId() {
return this.orgId;
}
@Override
public final java.lang.String getProjectId() {
return this.projectId;
}
@Override
public final org.mongodb.awscdk.resources.mongodbatlas.AtlasRoleRoleName getRoleName() {
return this.roleName;
}
@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();
if (this.getOrgId() != null) {
data.set("orgId", om.valueToTree(this.getOrgId()));
}
if (this.getProjectId() != null) {
data.set("projectId", om.valueToTree(this.getProjectId()));
}
if (this.getRoleName() != null) {
data.set("roleName", om.valueToTree(this.getRoleName()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.AtlasRole"));
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;
AtlasRole.Jsii$Proxy that = (AtlasRole.Jsii$Proxy) o;
if (this.orgId != null ? !this.orgId.equals(that.orgId) : that.orgId != null) return false;
if (this.projectId != null ? !this.projectId.equals(that.projectId) : that.projectId != null) return false;
return this.roleName != null ? this.roleName.equals(that.roleName) : that.roleName == null;
}
@Override
public final int hashCode() {
int result = this.orgId != null ? this.orgId.hashCode() : 0;
result = 31 * result + (this.projectId != null ? this.projectId.hashCode() : 0);
result = 31 * result + (this.roleName != null ? this.roleName.hashCode() : 0);
return result;
}
}
}