software.amazon.awssdk.services.emr.model.CreateStudioRequest 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.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.awscore.AwsRequestOverrideConfiguration;
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;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class CreateStudioRequest extends EmrRequest implements
ToCopyableBuilder {
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name")
.getter(getter(CreateStudioRequest::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(CreateStudioRequest::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(CreateStudioRequest::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(CreateStudioRequest::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(CreateStudioRequest::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(CreateStudioRequest::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(CreateStudioRequest::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(CreateStudioRequest::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(CreateStudioRequest::engineSecurityGroupId))
.setter(setter(Builder::engineSecurityGroupId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineSecurityGroupId").build())
.build();
private static final SdkField DEFAULT_S3_LOCATION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DefaultS3Location").getter(getter(CreateStudioRequest::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(CreateStudioRequest::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(CreateStudioRequest::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(CreateStudioRequest::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 TRUSTED_IDENTITY_PROPAGATION_ENABLED_FIELD = SdkField
. builder(MarshallingType.BOOLEAN)
.memberName("TrustedIdentityPropagationEnabled")
.getter(getter(CreateStudioRequest::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(CreateStudioRequest::idcUserAssignmentAsString))
.setter(setter(Builder::idcUserAssignment))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdcUserAssignment").build()).build();
private static final SdkField IDC_INSTANCE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("IdcInstanceArn").getter(getter(CreateStudioRequest::idcInstanceArn))
.setter(setter(Builder::idcInstanceArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdcInstanceArn").build()).build();
private static final SdkField ENCRYPTION_KEY_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("EncryptionKeyArn").getter(getter(CreateStudioRequest::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(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, DEFAULT_S3_LOCATION_FIELD, IDP_AUTH_URL_FIELD,
IDP_RELAY_STATE_PARAMETER_NAME_FIELD, TAGS_FIELD, TRUSTED_IDENTITY_PROPAGATION_ENABLED_FIELD,
IDC_USER_ASSIGNMENT_FIELD, IDC_INSTANCE_ARN_FIELD, ENCRYPTION_KEY_ARN_FIELD));
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 defaultS3Location;
private final String idpAuthUrl;
private final String idpRelayStateParameterName;
private final List tags;
private final Boolean trustedIdentityPropagationEnabled;
private final String idcUserAssignment;
private final String idcInstanceArn;
private final String encryptionKeyArn;
private CreateStudioRequest(BuilderImpl builder) {
super(builder);
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.defaultS3Location = builder.defaultS3Location;
this.idpAuthUrl = builder.idpAuthUrl;
this.idpRelayStateParameterName = builder.idpRelayStateParameterName;
this.tags = builder.tags;
this.trustedIdentityPropagationEnabled = builder.trustedIdentityPropagationEnabled;
this.idcUserAssignment = builder.idcUserAssignment;
this.idcInstanceArn = builder.idcInstanceArn;
this.encryptionKeyArn = builder.encryptionKeyArn;
}
/**
*
* A descriptive name for the Amazon EMR Studio.
*
*
* @return A descriptive name for the Amazon EMR Studio.
*/
public final String name() {
return name;
}
/**
*
* A detailed description of the Amazon EMR Studio.
*
*
* @return A detailed description of the Amazon EMR Studio.
*/
public final String description() {
return description;
}
/**
*
* Specifies whether the Studio authenticates users using 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 Studio authenticates users using IAM or IAM Identity Center.
* @see AuthMode
*/
public final AuthMode authMode() {
return AuthMode.fromValue(authMode);
}
/**
*
* Specifies whether the Studio authenticates users using 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 Studio authenticates users using IAM or IAM Identity Center.
* @see AuthMode
*/
public final String authModeAsString() {
return authMode;
}
/**
*
* The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with the Studio.
*
*
* @return The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with the 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);
}
/**
*
* A list of subnet IDs to associate with the Amazon EMR Studio. A Studio can have a maximum of 5 subnets. The
* subnets must belong to the VPC specified by VpcId
. Studio users can create a Workspace in any of the
* specified subnets.
*
*
* 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 A list of subnet IDs to associate with the Amazon EMR Studio. A Studio can have a maximum of 5 subnets.
* The subnets must belong to the VPC specified by VpcId
. Studio users can create a Workspace
* in any of the specified subnets.
*/
public final List subnetIds() {
return subnetIds;
}
/**
*
* The IAM role that the Amazon EMR Studio assumes. The service role provides a way for Amazon EMR Studio to
* interoperate with other Amazon Web Services services.
*
*
* @return The IAM role that the Amazon EMR Studio assumes. The service role provides a way for Amazon EMR Studio to
* interoperate with other Amazon Web Services services.
*/
public final String serviceRole() {
return serviceRole;
}
/**
*
* The IAM user role that users and groups assume when logged in to an Amazon EMR Studio. Only specify a
* UserRole
when you use IAM Identity Center authentication. The permissions attached to the
* UserRole
can be scoped down for each user or group using session policies.
*
*
* @return The IAM user role that users and groups assume when logged in to an Amazon EMR Studio. Only specify a
* UserRole
when you use IAM Identity Center authentication. The permissions attached to the
* UserRole
can be scoped down for each user or group using session policies.
*/
public final String userRole() {
return userRole;
}
/**
*
* The ID of the Amazon EMR Studio Workspace security group. The Workspace security group allows outbound network
* traffic to resources in the Engine security group, and it must be in the same VPC specified by VpcId
* .
*
*
* @return The ID of the Amazon EMR Studio Workspace security group. The Workspace security group allows outbound
* network traffic to resources in the Engine security group, and it must be in the same VPC specified by
* VpcId
.
*/
public final String workspaceSecurityGroupId() {
return workspaceSecurityGroupId;
}
/**
*
* The ID of the Amazon EMR Studio Engine security group. The Engine security group allows inbound network traffic
* from the Workspace security group, and it must be in the same VPC specified by VpcId
.
*
*
* @return The ID of the Amazon EMR Studio Engine security group. The Engine security group allows inbound network
* traffic from the Workspace security group, and it must be in the same VPC specified by VpcId
* .
*/
public final String engineSecurityGroupId() {
return engineSecurityGroupId;
}
/**
*
* 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;
}
/**
*
* The authentication endpoint of your identity provider (IdP). Specify this value when you use IAM authentication
* and want to let federated users log in to a Studio with the Studio URL and credentials from your IdP. Amazon EMR
* Studio redirects users to this endpoint to enter credentials.
*
*
* @return The authentication endpoint of your identity provider (IdP). Specify this value when you use IAM
* authentication and want to let federated users log in to a Studio with the Studio URL and credentials
* from your IdP. Amazon EMR Studio redirects users to this endpoint to enter credentials.
*/
public final String idpAuthUrl() {
return idpAuthUrl;
}
/**
*
* The name that your identity provider (IdP) uses for its RelayState
parameter. For example,
* RelayState
or TargetSource
. Specify this value when you use IAM authentication and want
* to let federated users log in to a Studio using the Studio URL. The RelayState
parameter differs by
* IdP.
*
*
* @return The name that your identity provider (IdP) uses for its RelayState
parameter. For example,
* RelayState
or TargetSource
. Specify this value when you use IAM authentication
* and want to let federated users log in to a Studio using the Studio URL. The RelayState
* parameter differs by IdP.
*/
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 to associate with the Amazon EMR Studio. Tags are user-defined key-value pairs that consist of a
* required key string with a maximum of 128 characters, and an optional value string with a maximum of 256
* characters.
*
*
* 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 to associate with the Amazon EMR Studio. Tags are user-defined key-value pairs that
* consist of a required key string with a maximum of 128 characters, and an optional value string with a
* maximum of 256 characters.
*/
public final List tags() {
return tags;
}
/**
*
* A Boolean indicating whether to enable Trusted identity propagation for the Studio. The default value is
* false
.
*
*
* @return A Boolean indicating whether to enable Trusted identity propagation for the Studio. The default value is
* false
.
*/
public final Boolean trustedIdentityPropagationEnabled() {
return trustedIdentityPropagationEnabled;
}
/**
*
* Specifies whether IAM Identity Center user assignment is REQUIRED
or OPTIONAL
. 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 Specifies whether IAM Identity Center user assignment is REQUIRED
or OPTIONAL
.
* 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);
}
/**
*
* Specifies whether IAM Identity Center user assignment is REQUIRED
or OPTIONAL
. 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 Specifies whether IAM Identity Center user assignment is REQUIRED
or OPTIONAL
.
* 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 ARN of the IAM Identity Center instance to create the Studio application.
*
*
* @return The ARN of the IAM Identity Center instance to create the Studio application.
*/
public final String idcInstanceArn() {
return idcInstanceArn;
}
/**
*
* 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 + super.hashCode();
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(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(trustedIdentityPropagationEnabled());
hashCode = 31 * hashCode + Objects.hashCode(idcUserAssignmentAsString());
hashCode = 31 * hashCode + Objects.hashCode(idcInstanceArn());
hashCode = 31 * hashCode + Objects.hashCode(encryptionKeyArn());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CreateStudioRequest)) {
return false;
}
CreateStudioRequest other = (CreateStudioRequest) obj;
return 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(defaultS3Location(), other.defaultS3Location())
&& Objects.equals(idpAuthUrl(), other.idpAuthUrl())
&& Objects.equals(idpRelayStateParameterName(), other.idpRelayStateParameterName())
&& hasTags() == other.hasTags() && Objects.equals(tags(), other.tags())
&& Objects.equals(trustedIdentityPropagationEnabled(), other.trustedIdentityPropagationEnabled())
&& Objects.equals(idcUserAssignmentAsString(), other.idcUserAssignmentAsString())
&& Objects.equals(idcInstanceArn(), other.idcInstanceArn())
&& 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("CreateStudioRequest").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("DefaultS3Location", defaultS3Location())
.add("IdpAuthUrl", idpAuthUrl()).add("IdpRelayStateParameterName", idpRelayStateParameterName())
.add("Tags", hasTags() ? tags() : null)
.add("TrustedIdentityPropagationEnabled", trustedIdentityPropagationEnabled())
.add("IdcUserAssignment", idcUserAssignmentAsString()).add("IdcInstanceArn", idcInstanceArn())
.add("EncryptionKeyArn", encryptionKeyArn()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
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 "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 "TrustedIdentityPropagationEnabled":
return Optional.ofNullable(clazz.cast(trustedIdentityPropagationEnabled()));
case "IdcUserAssignment":
return Optional.ofNullable(clazz.cast(idcUserAssignmentAsString()));
case "IdcInstanceArn":
return Optional.ofNullable(clazz.cast(idcInstanceArn()));
case "EncryptionKeyArn":
return Optional.ofNullable(clazz.cast(encryptionKeyArn()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function