software.amazon.awssdk.services.emr.model.Studio Maven / Gradle / Ivy
Show all versions of emr Show documentation
/*
* 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 extends Builder> 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