org.mongodb.awscdk.resources.mongodbatlas.CfnFederatedSettingsOrgRoleMappingProps Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
* Returns, adds, edits, and removes federation-related features such as role mappings and connected organization configurations.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.935Z")
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.CfnFederatedSettingsOrgRoleMappingProps")
@software.amazon.jsii.Jsii.Proxy(CfnFederatedSettingsOrgRoleMappingProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CfnFederatedSettingsOrgRoleMappingProps extends software.amazon.jsii.JsiiSerializable {
/**
* Unique human-readable label that identifies the identity provider group to whichthis role mapping applies.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getExternalGroupName();
/**
* Unique 24-hexadecimal digit string that identifies your federation.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getFederationSettingsId();
/**
* Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getOrgId();
/**
* The profile is defined in AWS Secret manager.
*
* See Secret Manager Profile setup.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getProfile() {
return null;
}
/**
* Atlas roles and the unique identifiers of the groups and organizations associated with each role.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getRoleAssignments() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnFederatedSettingsOrgRoleMappingProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnFederatedSettingsOrgRoleMappingProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String externalGroupName;
java.lang.String federationSettingsId;
java.lang.String orgId;
java.lang.String profile;
java.util.List roleAssignments;
/**
* Sets the value of {@link CfnFederatedSettingsOrgRoleMappingProps#getExternalGroupName}
* @param externalGroupName Unique human-readable label that identifies the identity provider group to whichthis role mapping applies. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder externalGroupName(java.lang.String externalGroupName) {
this.externalGroupName = externalGroupName;
return this;
}
/**
* Sets the value of {@link CfnFederatedSettingsOrgRoleMappingProps#getFederationSettingsId}
* @param federationSettingsId Unique 24-hexadecimal digit string that identifies your federation. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder federationSettingsId(java.lang.String federationSettingsId) {
this.federationSettingsId = federationSettingsId;
return this;
}
/**
* Sets the value of {@link CfnFederatedSettingsOrgRoleMappingProps#getOrgId}
* @param orgId Unique 24-hexadecimal digit string that identifies the organization that contains your projects. This parameter is required.
* @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 CfnFederatedSettingsOrgRoleMappingProps#getProfile}
* @param profile The profile is defined in AWS Secret manager.
* See Secret Manager Profile setup.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder profile(java.lang.String profile) {
this.profile = profile;
return this;
}
/**
* Sets the value of {@link CfnFederatedSettingsOrgRoleMappingProps#getRoleAssignments}
* @param roleAssignments Atlas roles and the unique identifiers of the groups and organizations associated with each role.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder roleAssignments(java.util.List extends org.mongodb.awscdk.resources.mongodbatlas.RoleAssignment> roleAssignments) {
this.roleAssignments = (java.util.List)roleAssignments;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnFederatedSettingsOrgRoleMappingProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public CfnFederatedSettingsOrgRoleMappingProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnFederatedSettingsOrgRoleMappingProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnFederatedSettingsOrgRoleMappingProps {
private final java.lang.String externalGroupName;
private final java.lang.String federationSettingsId;
private final java.lang.String orgId;
private final java.lang.String profile;
private final java.util.List roleAssignments;
/**
* 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.externalGroupName = software.amazon.jsii.Kernel.get(this, "externalGroupName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.federationSettingsId = software.amazon.jsii.Kernel.get(this, "federationSettingsId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.orgId = software.amazon.jsii.Kernel.get(this, "orgId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.profile = software.amazon.jsii.Kernel.get(this, "profile", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.roleAssignments = software.amazon.jsii.Kernel.get(this, "roleAssignments", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.RoleAssignment.class)));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.externalGroupName = java.util.Objects.requireNonNull(builder.externalGroupName, "externalGroupName is required");
this.federationSettingsId = java.util.Objects.requireNonNull(builder.federationSettingsId, "federationSettingsId is required");
this.orgId = java.util.Objects.requireNonNull(builder.orgId, "orgId is required");
this.profile = builder.profile;
this.roleAssignments = (java.util.List)builder.roleAssignments;
}
@Override
public final java.lang.String getExternalGroupName() {
return this.externalGroupName;
}
@Override
public final java.lang.String getFederationSettingsId() {
return this.federationSettingsId;
}
@Override
public final java.lang.String getOrgId() {
return this.orgId;
}
@Override
public final java.lang.String getProfile() {
return this.profile;
}
@Override
public final java.util.List getRoleAssignments() {
return this.roleAssignments;
}
@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("externalGroupName", om.valueToTree(this.getExternalGroupName()));
data.set("federationSettingsId", om.valueToTree(this.getFederationSettingsId()));
data.set("orgId", om.valueToTree(this.getOrgId()));
if (this.getProfile() != null) {
data.set("profile", om.valueToTree(this.getProfile()));
}
if (this.getRoleAssignments() != null) {
data.set("roleAssignments", om.valueToTree(this.getRoleAssignments()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.CfnFederatedSettingsOrgRoleMappingProps"));
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;
CfnFederatedSettingsOrgRoleMappingProps.Jsii$Proxy that = (CfnFederatedSettingsOrgRoleMappingProps.Jsii$Proxy) o;
if (!externalGroupName.equals(that.externalGroupName)) return false;
if (!federationSettingsId.equals(that.federationSettingsId)) return false;
if (!orgId.equals(that.orgId)) return false;
if (this.profile != null ? !this.profile.equals(that.profile) : that.profile != null) return false;
return this.roleAssignments != null ? this.roleAssignments.equals(that.roleAssignments) : that.roleAssignments == null;
}
@Override
public final int hashCode() {
int result = this.externalGroupName.hashCode();
result = 31 * result + (this.federationSettingsId.hashCode());
result = 31 * result + (this.orgId.hashCode());
result = 31 * result + (this.profile != null ? this.profile.hashCode() : 0);
result = 31 * result + (this.roleAssignments != null ? this.roleAssignments.hashCode() : 0);
return result;
}
}
}