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

software.amazon.awssdk.services.emr.model.Studio Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EMR module holds the client classes that are used for communicating with Amazon Elastic MapReduce Service

There is a newer version: 2.29.15
Show newest version
/*
 * Copyright 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 software.amazon.awssdk.services.emr.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Details for an Amazon EMR Studio including ID, creation time, name, and so on. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Studio implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField STUDIO_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StudioId").getter(getter(Studio::studioId)).setter(setter(Builder::studioId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StudioId").build()).build(); private static final SdkField STUDIO_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StudioArn").getter(getter(Studio::studioArn)).setter(setter(Builder::studioArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StudioArn").build()).build(); private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name") .getter(getter(Studio::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Description").getter(getter(Studio::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build(); private static final SdkField AUTH_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AuthMode").getter(getter(Studio::authModeAsString)).setter(setter(Builder::authMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AuthMode").build()).build(); private static final SdkField VPC_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("VpcId") .getter(getter(Studio::vpcId)).setter(setter(Builder::vpcId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcId").build()).build(); private static final SdkField> SUBNET_IDS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("SubnetIds") .getter(getter(Studio::subnetIds)) .setter(setter(Builder::subnetIds)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SubnetIds").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField SERVICE_ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ServiceRole").getter(getter(Studio::serviceRole)).setter(setter(Builder::serviceRole)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceRole").build()).build(); private static final SdkField USER_ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("UserRole").getter(getter(Studio::userRole)).setter(setter(Builder::userRole)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UserRole").build()).build(); private static final SdkField WORKSPACE_SECURITY_GROUP_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("WorkspaceSecurityGroupId").getter(getter(Studio::workspaceSecurityGroupId)) .setter(setter(Builder::workspaceSecurityGroupId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("WorkspaceSecurityGroupId").build()) .build(); private static final SdkField ENGINE_SECURITY_GROUP_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EngineSecurityGroupId").getter(getter(Studio::engineSecurityGroupId)) .setter(setter(Builder::engineSecurityGroupId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineSecurityGroupId").build()) .build(); private static final SdkField URL_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Url") .getter(getter(Studio::url)).setter(setter(Builder::url)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Url").build()).build(); private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreationTime").getter(getter(Studio::creationTime)).setter(setter(Builder::creationTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build(); private static final SdkField DEFAULT_S3_LOCATION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("DefaultS3Location").getter(getter(Studio::defaultS3Location)).setter(setter(Builder::defaultS3Location)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DefaultS3Location").build()).build(); private static final SdkField IDP_AUTH_URL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("IdpAuthUrl").getter(getter(Studio::idpAuthUrl)).setter(setter(Builder::idpAuthUrl)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdpAuthUrl").build()).build(); private static final SdkField IDP_RELAY_STATE_PARAMETER_NAME_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("IdpRelayStateParameterName") .getter(getter(Studio::idpRelayStateParameterName)) .setter(setter(Builder::idpRelayStateParameterName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdpRelayStateParameterName").build()) .build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Tags") .getter(getter(Studio::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Tag::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField IDC_INSTANCE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("IdcInstanceArn").getter(getter(Studio::idcInstanceArn)).setter(setter(Builder::idcInstanceArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdcInstanceArn").build()).build(); private static final SdkField TRUSTED_IDENTITY_PROPAGATION_ENABLED_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("TrustedIdentityPropagationEnabled") .getter(getter(Studio::trustedIdentityPropagationEnabled)) .setter(setter(Builder::trustedIdentityPropagationEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TrustedIdentityPropagationEnabled") .build()).build(); private static final SdkField IDC_USER_ASSIGNMENT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("IdcUserAssignment").getter(getter(Studio::idcUserAssignmentAsString)) .setter(setter(Builder::idcUserAssignment)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdcUserAssignment").build()).build(); private static final SdkField ENCRYPTION_KEY_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EncryptionKeyArn").getter(getter(Studio::encryptionKeyArn)).setter(setter(Builder::encryptionKeyArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EncryptionKeyArn").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(STUDIO_ID_FIELD, STUDIO_ARN_FIELD, NAME_FIELD, DESCRIPTION_FIELD, AUTH_MODE_FIELD, VPC_ID_FIELD, SUBNET_IDS_FIELD, SERVICE_ROLE_FIELD, USER_ROLE_FIELD, WORKSPACE_SECURITY_GROUP_ID_FIELD, ENGINE_SECURITY_GROUP_ID_FIELD, URL_FIELD, CREATION_TIME_FIELD, DEFAULT_S3_LOCATION_FIELD, IDP_AUTH_URL_FIELD, IDP_RELAY_STATE_PARAMETER_NAME_FIELD, TAGS_FIELD, IDC_INSTANCE_ARN_FIELD, TRUSTED_IDENTITY_PROPAGATION_ENABLED_FIELD, IDC_USER_ASSIGNMENT_FIELD, ENCRYPTION_KEY_ARN_FIELD)); private static final long serialVersionUID = 1L; private final String studioId; private final String studioArn; private final String name; private final String description; private final String authMode; private final String vpcId; private final List subnetIds; private final String serviceRole; private final String userRole; private final String workspaceSecurityGroupId; private final String engineSecurityGroupId; private final String url; private final Instant creationTime; private final String defaultS3Location; private final String idpAuthUrl; private final String idpRelayStateParameterName; private final List tags; private final String idcInstanceArn; private final Boolean trustedIdentityPropagationEnabled; private final String idcUserAssignment; private final String encryptionKeyArn; private Studio(BuilderImpl builder) { this.studioId = builder.studioId; this.studioArn = builder.studioArn; this.name = builder.name; this.description = builder.description; this.authMode = builder.authMode; this.vpcId = builder.vpcId; this.subnetIds = builder.subnetIds; this.serviceRole = builder.serviceRole; this.userRole = builder.userRole; this.workspaceSecurityGroupId = builder.workspaceSecurityGroupId; this.engineSecurityGroupId = builder.engineSecurityGroupId; this.url = builder.url; this.creationTime = builder.creationTime; this.defaultS3Location = builder.defaultS3Location; this.idpAuthUrl = builder.idpAuthUrl; this.idpRelayStateParameterName = builder.idpRelayStateParameterName; this.tags = builder.tags; this.idcInstanceArn = builder.idcInstanceArn; this.trustedIdentityPropagationEnabled = builder.trustedIdentityPropagationEnabled; this.idcUserAssignment = builder.idcUserAssignment; this.encryptionKeyArn = builder.encryptionKeyArn; } /** *

* The ID of the Amazon EMR Studio. *

* * @return The ID of the Amazon EMR Studio. */ public final String studioId() { return studioId; } /** *

* The Amazon Resource Name (ARN) of the Amazon EMR Studio. *

* * @return The Amazon Resource Name (ARN) of the Amazon EMR Studio. */ public final String studioArn() { return studioArn; } /** *

* The name of the Amazon EMR Studio. *

* * @return The name of the Amazon EMR Studio. */ public final String name() { return name; } /** *

* The detailed description of the Amazon EMR Studio. *

* * @return The detailed description of the Amazon EMR Studio. */ public final String description() { return description; } /** *

* Specifies whether the Amazon EMR Studio authenticates users with IAM or IAM Identity Center. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #authMode} will * return {@link AuthMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #authModeAsString}. *

* * @return Specifies whether the Amazon EMR Studio authenticates users with IAM or IAM Identity Center. * @see AuthMode */ public final AuthMode authMode() { return AuthMode.fromValue(authMode); } /** *

* Specifies whether the Amazon EMR Studio authenticates users with IAM or IAM Identity Center. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #authMode} will * return {@link AuthMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #authModeAsString}. *

* * @return Specifies whether the Amazon EMR Studio authenticates users with IAM or IAM Identity Center. * @see AuthMode */ public final String authModeAsString() { return authMode; } /** *

* The ID of the VPC associated with the Amazon EMR Studio. *

* * @return The ID of the VPC associated with the Amazon EMR Studio. */ public final String vpcId() { return vpcId; } /** * For responses, this returns true if the service returned a value for the SubnetIds property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasSubnetIds() { return subnetIds != null && !(subnetIds instanceof SdkAutoConstructList); } /** *

* The list of IDs of the subnets associated with the Amazon EMR Studio. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasSubnetIds} method. *

* * @return The list of IDs of the subnets associated with the Amazon EMR Studio. */ public final List subnetIds() { return subnetIds; } /** *

* The name of the IAM role assumed by the Amazon EMR Studio. *

* * @return The name of the IAM role assumed by the Amazon EMR Studio. */ public final String serviceRole() { return serviceRole; } /** *

* The name of the IAM role assumed by users logged in to the Amazon EMR Studio. A Studio only requires a * UserRole when you use IAM authentication. *

* * @return The name of the IAM role assumed by users logged in to the Amazon EMR Studio. A Studio only requires a * UserRole when you use IAM authentication. */ public final String userRole() { return userRole; } /** *

* The ID of the Workspace security group associated with the Amazon EMR Studio. The Workspace security group allows * outbound network traffic to resources in the Engine security group and to the internet. *

* * @return The ID of the Workspace security group associated with the Amazon EMR Studio. The Workspace security * group allows outbound network traffic to resources in the Engine security group and to the internet. */ public final String workspaceSecurityGroupId() { return workspaceSecurityGroupId; } /** *

* The ID of the Engine security group associated with the Amazon EMR Studio. The Engine security group allows * inbound network traffic from resources in the Workspace security group. *

* * @return The ID of the Engine security group associated with the Amazon EMR Studio. The Engine security group * allows inbound network traffic from resources in the Workspace security group. */ public final String engineSecurityGroupId() { return engineSecurityGroupId; } /** *

* The unique access URL of the Amazon EMR Studio. *

* * @return The unique access URL of the Amazon EMR Studio. */ public final String url() { return url; } /** *

* The time the Amazon EMR Studio was created. *

* * @return The time the Amazon EMR Studio was created. */ public final Instant creationTime() { return creationTime; } /** *

* The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files. *

* * @return The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files. */ public final String defaultS3Location() { return defaultS3Location; } /** *

* Your identity provider's authentication endpoint. Amazon EMR Studio redirects federated users to this endpoint * for authentication when logging in to a Studio with the Studio URL. *

* * @return Your identity provider's authentication endpoint. Amazon EMR Studio redirects federated users to this * endpoint for authentication when logging in to a Studio with the Studio URL. */ public final String idpAuthUrl() { return idpAuthUrl; } /** *

* The name of your identity provider's RelayState parameter. *

* * @return The name of your identity provider's RelayState parameter. */ public final String idpRelayStateParameterName() { return idpRelayStateParameterName; } /** * For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

* A list of tags associated with the Amazon EMR Studio. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTags} method. *

* * @return A list of tags associated with the Amazon EMR Studio. */ public final List tags() { return tags; } /** *

* The ARN of the IAM Identity Center instance the Studio application belongs to. *

* * @return The ARN of the IAM Identity Center instance the Studio application belongs to. */ public final String idcInstanceArn() { return idcInstanceArn; } /** *

* Indicates whether the Studio has Trusted identity propagation enabled. The default value is false. *

* * @return Indicates whether the Studio has Trusted identity propagation enabled. The default value is * false. */ public final Boolean trustedIdentityPropagationEnabled() { return trustedIdentityPropagationEnabled; } /** *

* Indicates whether the Studio has REQUIRED or OPTIONAL IAM Identity Center user * assignment. If the value is set to REQUIRED, users must be explicitly assigned to the Studio * application to access the Studio. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #idcUserAssignment} * will return {@link IdcUserAssignment#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #idcUserAssignmentAsString}. *

* * @return Indicates whether the Studio has REQUIRED or OPTIONAL IAM Identity Center user * assignment. If the value is set to REQUIRED, users must be explicitly assigned to the Studio * application to access the Studio. * @see IdcUserAssignment */ public final IdcUserAssignment idcUserAssignment() { return IdcUserAssignment.fromValue(idcUserAssignment); } /** *

* Indicates whether the Studio has REQUIRED or OPTIONAL IAM Identity Center user * assignment. If the value is set to REQUIRED, users must be explicitly assigned to the Studio * application to access the Studio. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #idcUserAssignment} * will return {@link IdcUserAssignment#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #idcUserAssignmentAsString}. *

* * @return Indicates whether the Studio has REQUIRED or OPTIONAL IAM Identity Center user * assignment. If the value is set to REQUIRED, users must be explicitly assigned to the Studio * application to access the Studio. * @see IdcUserAssignment */ public final String idcUserAssignmentAsString() { return idcUserAssignment; } /** *

* The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to * Amazon S3. *

* * @return The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed * up to Amazon S3. */ public final String encryptionKeyArn() { return encryptionKeyArn; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(studioId()); hashCode = 31 * hashCode + Objects.hashCode(studioArn()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(authModeAsString()); hashCode = 31 * hashCode + Objects.hashCode(vpcId()); hashCode = 31 * hashCode + Objects.hashCode(hasSubnetIds() ? subnetIds() : null); hashCode = 31 * hashCode + Objects.hashCode(serviceRole()); hashCode = 31 * hashCode + Objects.hashCode(userRole()); hashCode = 31 * hashCode + Objects.hashCode(workspaceSecurityGroupId()); hashCode = 31 * hashCode + Objects.hashCode(engineSecurityGroupId()); hashCode = 31 * hashCode + Objects.hashCode(url()); hashCode = 31 * hashCode + Objects.hashCode(creationTime()); hashCode = 31 * hashCode + Objects.hashCode(defaultS3Location()); hashCode = 31 * hashCode + Objects.hashCode(idpAuthUrl()); hashCode = 31 * hashCode + Objects.hashCode(idpRelayStateParameterName()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(idcInstanceArn()); hashCode = 31 * hashCode + Objects.hashCode(trustedIdentityPropagationEnabled()); hashCode = 31 * hashCode + Objects.hashCode(idcUserAssignmentAsString()); hashCode = 31 * hashCode + Objects.hashCode(encryptionKeyArn()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Studio)) { return false; } Studio other = (Studio) obj; return Objects.equals(studioId(), other.studioId()) && Objects.equals(studioArn(), other.studioArn()) && Objects.equals(name(), other.name()) && Objects.equals(description(), other.description()) && Objects.equals(authModeAsString(), other.authModeAsString()) && Objects.equals(vpcId(), other.vpcId()) && hasSubnetIds() == other.hasSubnetIds() && Objects.equals(subnetIds(), other.subnetIds()) && Objects.equals(serviceRole(), other.serviceRole()) && Objects.equals(userRole(), other.userRole()) && Objects.equals(workspaceSecurityGroupId(), other.workspaceSecurityGroupId()) && Objects.equals(engineSecurityGroupId(), other.engineSecurityGroupId()) && Objects.equals(url(), other.url()) && Objects.equals(creationTime(), other.creationTime()) && Objects.equals(defaultS3Location(), other.defaultS3Location()) && Objects.equals(idpAuthUrl(), other.idpAuthUrl()) && Objects.equals(idpRelayStateParameterName(), other.idpRelayStateParameterName()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(idcInstanceArn(), other.idcInstanceArn()) && Objects.equals(trustedIdentityPropagationEnabled(), other.trustedIdentityPropagationEnabled()) && Objects.equals(idcUserAssignmentAsString(), other.idcUserAssignmentAsString()) && Objects.equals(encryptionKeyArn(), other.encryptionKeyArn()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("Studio").add("StudioId", studioId()).add("StudioArn", studioArn()).add("Name", name()) .add("Description", description()).add("AuthMode", authModeAsString()).add("VpcId", vpcId()) .add("SubnetIds", hasSubnetIds() ? subnetIds() : null).add("ServiceRole", serviceRole()) .add("UserRole", userRole()).add("WorkspaceSecurityGroupId", workspaceSecurityGroupId()) .add("EngineSecurityGroupId", engineSecurityGroupId()).add("Url", url()).add("CreationTime", creationTime()) .add("DefaultS3Location", defaultS3Location()).add("IdpAuthUrl", idpAuthUrl()) .add("IdpRelayStateParameterName", idpRelayStateParameterName()).add("Tags", hasTags() ? tags() : null) .add("IdcInstanceArn", idcInstanceArn()) .add("TrustedIdentityPropagationEnabled", trustedIdentityPropagationEnabled()) .add("IdcUserAssignment", idcUserAssignmentAsString()).add("EncryptionKeyArn", encryptionKeyArn()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "StudioId": return Optional.ofNullable(clazz.cast(studioId())); case "StudioArn": return Optional.ofNullable(clazz.cast(studioArn())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "AuthMode": return Optional.ofNullable(clazz.cast(authModeAsString())); case "VpcId": return Optional.ofNullable(clazz.cast(vpcId())); case "SubnetIds": return Optional.ofNullable(clazz.cast(subnetIds())); case "ServiceRole": return Optional.ofNullable(clazz.cast(serviceRole())); case "UserRole": return Optional.ofNullable(clazz.cast(userRole())); case "WorkspaceSecurityGroupId": return Optional.ofNullable(clazz.cast(workspaceSecurityGroupId())); case "EngineSecurityGroupId": return Optional.ofNullable(clazz.cast(engineSecurityGroupId())); case "Url": return Optional.ofNullable(clazz.cast(url())); case "CreationTime": return Optional.ofNullable(clazz.cast(creationTime())); case "DefaultS3Location": return Optional.ofNullable(clazz.cast(defaultS3Location())); case "IdpAuthUrl": return Optional.ofNullable(clazz.cast(idpAuthUrl())); case "IdpRelayStateParameterName": return Optional.ofNullable(clazz.cast(idpRelayStateParameterName())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "IdcInstanceArn": return Optional.ofNullable(clazz.cast(idcInstanceArn())); case "TrustedIdentityPropagationEnabled": return Optional.ofNullable(clazz.cast(trustedIdentityPropagationEnabled())); case "IdcUserAssignment": return Optional.ofNullable(clazz.cast(idcUserAssignmentAsString())); case "EncryptionKeyArn": return Optional.ofNullable(clazz.cast(encryptionKeyArn())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Studio) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The ID of the Amazon EMR Studio. *

* * @param studioId * The ID of the Amazon EMR Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder studioId(String studioId); /** *

* The Amazon Resource Name (ARN) of the Amazon EMR Studio. *

* * @param studioArn * The Amazon Resource Name (ARN) of the Amazon EMR Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder studioArn(String studioArn); /** *

* The name of the Amazon EMR Studio. *

* * @param name * The name of the Amazon EMR Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

* The detailed description of the Amazon EMR Studio. *

* * @param description * The detailed description of the Amazon EMR Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

* Specifies whether the Amazon EMR Studio authenticates users with IAM or IAM Identity Center. *

* * @param authMode * Specifies whether the Amazon EMR Studio authenticates users with IAM or IAM Identity Center. * @see AuthMode * @return Returns a reference to this object so that method calls can be chained together. * @see AuthMode */ Builder authMode(String authMode); /** *

* Specifies whether the Amazon EMR Studio authenticates users with IAM or IAM Identity Center. *

* * @param authMode * Specifies whether the Amazon EMR Studio authenticates users with IAM or IAM Identity Center. * @see AuthMode * @return Returns a reference to this object so that method calls can be chained together. * @see AuthMode */ Builder authMode(AuthMode authMode); /** *

* The ID of the VPC associated with the Amazon EMR Studio. *

* * @param vpcId * The ID of the VPC associated with the Amazon EMR Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcId(String vpcId); /** *

* The list of IDs of the subnets associated with the Amazon EMR Studio. *

* * @param subnetIds * The list of IDs of the subnets associated with the Amazon EMR Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder subnetIds(Collection subnetIds); /** *

* The list of IDs of the subnets associated with the Amazon EMR Studio. *

* * @param subnetIds * The list of IDs of the subnets associated with the Amazon EMR Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder subnetIds(String... subnetIds); /** *

* The name of the IAM role assumed by the Amazon EMR Studio. *

* * @param serviceRole * The name of the IAM role assumed by the Amazon EMR Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceRole(String serviceRole); /** *

* The name of the IAM role assumed by users logged in to the Amazon EMR Studio. A Studio only requires a * UserRole when you use IAM authentication. *

* * @param userRole * The name of the IAM role assumed by users logged in to the Amazon EMR Studio. A Studio only requires a * UserRole when you use IAM authentication. * @return Returns a reference to this object so that method calls can be chained together. */ Builder userRole(String userRole); /** *

* The ID of the Workspace security group associated with the Amazon EMR Studio. The Workspace security group * allows outbound network traffic to resources in the Engine security group and to the internet. *

* * @param workspaceSecurityGroupId * The ID of the Workspace security group associated with the Amazon EMR Studio. The Workspace security * group allows outbound network traffic to resources in the Engine security group and to the internet. * @return Returns a reference to this object so that method calls can be chained together. */ Builder workspaceSecurityGroupId(String workspaceSecurityGroupId); /** *

* The ID of the Engine security group associated with the Amazon EMR Studio. The Engine security group allows * inbound network traffic from resources in the Workspace security group. *

* * @param engineSecurityGroupId * The ID of the Engine security group associated with the Amazon EMR Studio. The Engine security group * allows inbound network traffic from resources in the Workspace security group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder engineSecurityGroupId(String engineSecurityGroupId); /** *

* The unique access URL of the Amazon EMR Studio. *

* * @param url * The unique access URL of the Amazon EMR Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder url(String url); /** *

* The time the Amazon EMR Studio was created. *

* * @param creationTime * The time the Amazon EMR Studio was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creationTime(Instant creationTime); /** *

* The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files. *

* * @param defaultS3Location * The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files. * @return Returns a reference to this object so that method calls can be chained together. */ Builder defaultS3Location(String defaultS3Location); /** *

* Your identity provider's authentication endpoint. Amazon EMR Studio redirects federated users to this * endpoint for authentication when logging in to a Studio with the Studio URL. *

* * @param idpAuthUrl * Your identity provider's authentication endpoint. Amazon EMR Studio redirects federated users to this * endpoint for authentication when logging in to a Studio with the Studio URL. * @return Returns a reference to this object so that method calls can be chained together. */ Builder idpAuthUrl(String idpAuthUrl); /** *

* The name of your identity provider's RelayState parameter. *

* * @param idpRelayStateParameterName * The name of your identity provider's RelayState parameter. * @return Returns a reference to this object so that method calls can be chained together. */ Builder idpRelayStateParameterName(String idpRelayStateParameterName); /** *

* A list of tags associated with the Amazon EMR Studio. *

* * @param tags * A list of tags associated with the Amazon EMR Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* A list of tags associated with the Amazon EMR Studio. *

* * @param tags * A list of tags associated with the Amazon EMR Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

* A list of tags associated with the Amazon EMR Studio. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.emr.model.Tag.Builder} avoiding the need to create one manually via * {@link software.amazon.awssdk.services.emr.model.Tag#builder()}. * *

* When the {@link Consumer} completes, {@link software.amazon.awssdk.services.emr.model.Tag.Builder#build()} is * called immediately and its result is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on {@link software.amazon.awssdk.services.emr.model.Tag.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(java.util.Collection) */ Builder tags(Consumer... tags); /** *

* The ARN of the IAM Identity Center instance the Studio application belongs to. *

* * @param idcInstanceArn * The ARN of the IAM Identity Center instance the Studio application belongs to. * @return Returns a reference to this object so that method calls can be chained together. */ Builder idcInstanceArn(String idcInstanceArn); /** *

* Indicates whether the Studio has Trusted identity propagation enabled. The default value is * false. *

* * @param trustedIdentityPropagationEnabled * Indicates whether the Studio has Trusted identity propagation enabled. The default value is * false. * @return Returns a reference to this object so that method calls can be chained together. */ Builder trustedIdentityPropagationEnabled(Boolean trustedIdentityPropagationEnabled); /** *

* Indicates whether the Studio has REQUIRED or OPTIONAL IAM Identity Center user * assignment. If the value is set to REQUIRED, users must be explicitly assigned to the Studio * application to access the Studio. *

* * @param idcUserAssignment * Indicates whether the Studio has REQUIRED or OPTIONAL IAM Identity Center * user assignment. If the value is set to REQUIRED, users must be explicitly assigned to * the Studio application to access the Studio. * @see IdcUserAssignment * @return Returns a reference to this object so that method calls can be chained together. * @see IdcUserAssignment */ Builder idcUserAssignment(String idcUserAssignment); /** *

* Indicates whether the Studio has REQUIRED or OPTIONAL IAM Identity Center user * assignment. If the value is set to REQUIRED, users must be explicitly assigned to the Studio * application to access the Studio. *

* * @param idcUserAssignment * Indicates whether the Studio has REQUIRED or OPTIONAL IAM Identity Center * user assignment. If the value is set to REQUIRED, users must be explicitly assigned to * the Studio application to access the Studio. * @see IdcUserAssignment * @return Returns a reference to this object so that method calls can be chained together. * @see IdcUserAssignment */ Builder idcUserAssignment(IdcUserAssignment idcUserAssignment); /** *

* The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to * Amazon S3. *

* * @param encryptionKeyArn * The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when * backed up to Amazon S3. * @return Returns a reference to this object so that method calls can be chained together. */ Builder encryptionKeyArn(String encryptionKeyArn); } static final class BuilderImpl implements Builder { private String studioId; private String studioArn; private String name; private String description; private String authMode; private String vpcId; private List subnetIds = DefaultSdkAutoConstructList.getInstance(); private String serviceRole; private String userRole; private String workspaceSecurityGroupId; private String engineSecurityGroupId; private String url; private Instant creationTime; private String defaultS3Location; private String idpAuthUrl; private String idpRelayStateParameterName; private List tags = DefaultSdkAutoConstructList.getInstance(); private String idcInstanceArn; private Boolean trustedIdentityPropagationEnabled; private String idcUserAssignment; private String encryptionKeyArn; private BuilderImpl() { } private BuilderImpl(Studio model) { studioId(model.studioId); studioArn(model.studioArn); name(model.name); description(model.description); authMode(model.authMode); vpcId(model.vpcId); subnetIds(model.subnetIds); serviceRole(model.serviceRole); userRole(model.userRole); workspaceSecurityGroupId(model.workspaceSecurityGroupId); engineSecurityGroupId(model.engineSecurityGroupId); url(model.url); creationTime(model.creationTime); defaultS3Location(model.defaultS3Location); idpAuthUrl(model.idpAuthUrl); idpRelayStateParameterName(model.idpRelayStateParameterName); tags(model.tags); idcInstanceArn(model.idcInstanceArn); trustedIdentityPropagationEnabled(model.trustedIdentityPropagationEnabled); idcUserAssignment(model.idcUserAssignment); encryptionKeyArn(model.encryptionKeyArn); } public final String getStudioId() { return studioId; } public final void setStudioId(String studioId) { this.studioId = studioId; } @Override public final Builder studioId(String studioId) { this.studioId = studioId; return this; } public final String getStudioArn() { return studioArn; } public final void setStudioArn(String studioArn) { this.studioArn = studioArn; } @Override public final Builder studioArn(String studioArn) { this.studioArn = studioArn; return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override public final Builder description(String description) { this.description = description; return this; } public final String getAuthMode() { return authMode; } public final void setAuthMode(String authMode) { this.authMode = authMode; } @Override public final Builder authMode(String authMode) { this.authMode = authMode; return this; } @Override public final Builder authMode(AuthMode authMode) { this.authMode(authMode == null ? null : authMode.toString()); return this; } public final String getVpcId() { return vpcId; } public final void setVpcId(String vpcId) { this.vpcId = vpcId; } @Override public final Builder vpcId(String vpcId) { this.vpcId = vpcId; return this; } public final Collection getSubnetIds() { if (subnetIds instanceof SdkAutoConstructList) { return null; } return subnetIds; } public final void setSubnetIds(Collection subnetIds) { this.subnetIds = SubnetIdListCopier.copy(subnetIds); } @Override public final Builder subnetIds(Collection subnetIds) { this.subnetIds = SubnetIdListCopier.copy(subnetIds); return this; } @Override @SafeVarargs public final Builder subnetIds(String... subnetIds) { subnetIds(Arrays.asList(subnetIds)); return this; } public final String getServiceRole() { return serviceRole; } public final void setServiceRole(String serviceRole) { this.serviceRole = serviceRole; } @Override public final Builder serviceRole(String serviceRole) { this.serviceRole = serviceRole; return this; } public final String getUserRole() { return userRole; } public final void setUserRole(String userRole) { this.userRole = userRole; } @Override public final Builder userRole(String userRole) { this.userRole = userRole; return this; } public final String getWorkspaceSecurityGroupId() { return workspaceSecurityGroupId; } public final void setWorkspaceSecurityGroupId(String workspaceSecurityGroupId) { this.workspaceSecurityGroupId = workspaceSecurityGroupId; } @Override public final Builder workspaceSecurityGroupId(String workspaceSecurityGroupId) { this.workspaceSecurityGroupId = workspaceSecurityGroupId; return this; } public final String getEngineSecurityGroupId() { return engineSecurityGroupId; } public final void setEngineSecurityGroupId(String engineSecurityGroupId) { this.engineSecurityGroupId = engineSecurityGroupId; } @Override public final Builder engineSecurityGroupId(String engineSecurityGroupId) { this.engineSecurityGroupId = engineSecurityGroupId; return this; } public final String getUrl() { return url; } public final void setUrl(String url) { this.url = url; } @Override public final Builder url(String url) { this.url = url; return this; } public final Instant getCreationTime() { return creationTime; } public final void setCreationTime(Instant creationTime) { this.creationTime = creationTime; } @Override public final Builder creationTime(Instant creationTime) { this.creationTime = creationTime; return this; } public final String getDefaultS3Location() { return defaultS3Location; } public final void setDefaultS3Location(String defaultS3Location) { this.defaultS3Location = defaultS3Location; } @Override public final Builder defaultS3Location(String defaultS3Location) { this.defaultS3Location = defaultS3Location; return this; } public final String getIdpAuthUrl() { return idpAuthUrl; } public final void setIdpAuthUrl(String idpAuthUrl) { this.idpAuthUrl = idpAuthUrl; } @Override public final Builder idpAuthUrl(String idpAuthUrl) { this.idpAuthUrl = idpAuthUrl; return this; } public final String getIdpRelayStateParameterName() { return idpRelayStateParameterName; } public final void setIdpRelayStateParameterName(String idpRelayStateParameterName) { this.idpRelayStateParameterName = idpRelayStateParameterName; } @Override public final Builder idpRelayStateParameterName(String idpRelayStateParameterName) { this.idpRelayStateParameterName = idpRelayStateParameterName; return this; } public final List getTags() { List result = TagListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final String getIdcInstanceArn() { return idcInstanceArn; } public final void setIdcInstanceArn(String idcInstanceArn) { this.idcInstanceArn = idcInstanceArn; } @Override public final Builder idcInstanceArn(String idcInstanceArn) { this.idcInstanceArn = idcInstanceArn; return this; } public final Boolean getTrustedIdentityPropagationEnabled() { return trustedIdentityPropagationEnabled; } public final void setTrustedIdentityPropagationEnabled(Boolean trustedIdentityPropagationEnabled) { this.trustedIdentityPropagationEnabled = trustedIdentityPropagationEnabled; } @Override public final Builder trustedIdentityPropagationEnabled(Boolean trustedIdentityPropagationEnabled) { this.trustedIdentityPropagationEnabled = trustedIdentityPropagationEnabled; return this; } public final String getIdcUserAssignment() { return idcUserAssignment; } public final void setIdcUserAssignment(String idcUserAssignment) { this.idcUserAssignment = idcUserAssignment; } @Override public final Builder idcUserAssignment(String idcUserAssignment) { this.idcUserAssignment = idcUserAssignment; return this; } @Override public final Builder idcUserAssignment(IdcUserAssignment idcUserAssignment) { this.idcUserAssignment(idcUserAssignment == null ? null : idcUserAssignment.toString()); return this; } public final String getEncryptionKeyArn() { return encryptionKeyArn; } public final void setEncryptionKeyArn(String encryptionKeyArn) { this.encryptionKeyArn = encryptionKeyArn; } @Override public final Builder encryptionKeyArn(String encryptionKeyArn) { this.encryptionKeyArn = encryptionKeyArn; return this; } @Override public Studio build() { return new Studio(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy