software.amazon.awssdk.services.sagemaker.model.UserSettings Maven / Gradle / Ivy
Show all versions of sagemaker 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.sagemaker.model;
import java.io.Serializable;
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;
/**
*
* A collection of settings that apply to users in a domain. These settings are specified when the
* CreateUserProfile
API is called, and as DefaultUserSettings
when the
* CreateDomain
API is called.
*
*
* SecurityGroups
is aggregated when specified in both calls. For all other settings in
* UserSettings
, the values specified in CreateUserProfile
take precedence over those
* specified in CreateDomain
.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class UserSettings implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField EXECUTION_ROLE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ExecutionRole").getter(getter(UserSettings::executionRole)).setter(setter(Builder::executionRole))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExecutionRole").build()).build();
private static final SdkField> SECURITY_GROUPS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("SecurityGroups")
.getter(getter(UserSettings::securityGroups))
.setter(setter(Builder::securityGroups))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecurityGroups").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 SHARING_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("SharingSettings")
.getter(getter(UserSettings::sharingSettings)).setter(setter(Builder::sharingSettings))
.constructor(SharingSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SharingSettings").build()).build();
private static final SdkField JUPYTER_SERVER_APP_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("JupyterServerAppSettings")
.getter(getter(UserSettings::jupyterServerAppSettings)).setter(setter(Builder::jupyterServerAppSettings))
.constructor(JupyterServerAppSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("JupyterServerAppSettings").build())
.build();
private static final SdkField KERNEL_GATEWAY_APP_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("KernelGatewayAppSettings")
.getter(getter(UserSettings::kernelGatewayAppSettings)).setter(setter(Builder::kernelGatewayAppSettings))
.constructor(KernelGatewayAppSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KernelGatewayAppSettings").build())
.build();
private static final SdkField TENSOR_BOARD_APP_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("TensorBoardAppSettings")
.getter(getter(UserSettings::tensorBoardAppSettings)).setter(setter(Builder::tensorBoardAppSettings))
.constructor(TensorBoardAppSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TensorBoardAppSettings").build())
.build();
private static final SdkField R_STUDIO_SERVER_PRO_APP_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("RStudioServerProAppSettings")
.getter(getter(UserSettings::rStudioServerProAppSettings))
.setter(setter(Builder::rStudioServerProAppSettings))
.constructor(RStudioServerProAppSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RStudioServerProAppSettings")
.build()).build();
private static final SdkField R_SESSION_APP_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RSessionAppSettings")
.getter(getter(UserSettings::rSessionAppSettings)).setter(setter(Builder::rSessionAppSettings))
.constructor(RSessionAppSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RSessionAppSettings").build())
.build();
private static final SdkField CANVAS_APP_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CanvasAppSettings")
.getter(getter(UserSettings::canvasAppSettings)).setter(setter(Builder::canvasAppSettings))
.constructor(CanvasAppSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CanvasAppSettings").build()).build();
private static final SdkField CODE_EDITOR_APP_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CodeEditorAppSettings")
.getter(getter(UserSettings::codeEditorAppSettings)).setter(setter(Builder::codeEditorAppSettings))
.constructor(CodeEditorAppSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CodeEditorAppSettings").build())
.build();
private static final SdkField JUPYTER_LAB_APP_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("JupyterLabAppSettings")
.getter(getter(UserSettings::jupyterLabAppSettings)).setter(setter(Builder::jupyterLabAppSettings))
.constructor(JupyterLabAppSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("JupyterLabAppSettings").build())
.build();
private static final SdkField SPACE_STORAGE_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("SpaceStorageSettings")
.getter(getter(UserSettings::spaceStorageSettings)).setter(setter(Builder::spaceStorageSettings))
.constructor(DefaultSpaceStorageSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SpaceStorageSettings").build())
.build();
private static final SdkField DEFAULT_LANDING_URI_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DefaultLandingUri").getter(getter(UserSettings::defaultLandingUri))
.setter(setter(Builder::defaultLandingUri))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DefaultLandingUri").build()).build();
private static final SdkField STUDIO_WEB_PORTAL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("StudioWebPortal").getter(getter(UserSettings::studioWebPortalAsString))
.setter(setter(Builder::studioWebPortal))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StudioWebPortal").build()).build();
private static final SdkField CUSTOM_POSIX_USER_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CustomPosixUserConfig")
.getter(getter(UserSettings::customPosixUserConfig)).setter(setter(Builder::customPosixUserConfig))
.constructor(CustomPosixUserConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomPosixUserConfig").build())
.build();
private static final SdkField> CUSTOM_FILE_SYSTEM_CONFIGS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("CustomFileSystemConfigs")
.getter(getter(UserSettings::customFileSystemConfigs))
.setter(setter(Builder::customFileSystemConfigs))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomFileSystemConfigs").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(CustomFileSystemConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField STUDIO_WEB_PORTAL_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("StudioWebPortalSettings")
.getter(getter(UserSettings::studioWebPortalSettings)).setter(setter(Builder::studioWebPortalSettings))
.constructor(StudioWebPortalSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StudioWebPortalSettings").build())
.build();
private static final SdkField AUTO_MOUNT_HOME_EFS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AutoMountHomeEFS").getter(getter(UserSettings::autoMountHomeEFSAsString))
.setter(setter(Builder::autoMountHomeEFS))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoMountHomeEFS").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(EXECUTION_ROLE_FIELD,
SECURITY_GROUPS_FIELD, SHARING_SETTINGS_FIELD, JUPYTER_SERVER_APP_SETTINGS_FIELD, KERNEL_GATEWAY_APP_SETTINGS_FIELD,
TENSOR_BOARD_APP_SETTINGS_FIELD, R_STUDIO_SERVER_PRO_APP_SETTINGS_FIELD, R_SESSION_APP_SETTINGS_FIELD,
CANVAS_APP_SETTINGS_FIELD, CODE_EDITOR_APP_SETTINGS_FIELD, JUPYTER_LAB_APP_SETTINGS_FIELD,
SPACE_STORAGE_SETTINGS_FIELD, DEFAULT_LANDING_URI_FIELD, STUDIO_WEB_PORTAL_FIELD, CUSTOM_POSIX_USER_CONFIG_FIELD,
CUSTOM_FILE_SYSTEM_CONFIGS_FIELD, STUDIO_WEB_PORTAL_SETTINGS_FIELD, AUTO_MOUNT_HOME_EFS_FIELD));
private static final long serialVersionUID = 1L;
private final String executionRole;
private final List securityGroups;
private final SharingSettings sharingSettings;
private final JupyterServerAppSettings jupyterServerAppSettings;
private final KernelGatewayAppSettings kernelGatewayAppSettings;
private final TensorBoardAppSettings tensorBoardAppSettings;
private final RStudioServerProAppSettings rStudioServerProAppSettings;
private final RSessionAppSettings rSessionAppSettings;
private final CanvasAppSettings canvasAppSettings;
private final CodeEditorAppSettings codeEditorAppSettings;
private final JupyterLabAppSettings jupyterLabAppSettings;
private final DefaultSpaceStorageSettings spaceStorageSettings;
private final String defaultLandingUri;
private final String studioWebPortal;
private final CustomPosixUserConfig customPosixUserConfig;
private final List customFileSystemConfigs;
private final StudioWebPortalSettings studioWebPortalSettings;
private final String autoMountHomeEFS;
private UserSettings(BuilderImpl builder) {
this.executionRole = builder.executionRole;
this.securityGroups = builder.securityGroups;
this.sharingSettings = builder.sharingSettings;
this.jupyterServerAppSettings = builder.jupyterServerAppSettings;
this.kernelGatewayAppSettings = builder.kernelGatewayAppSettings;
this.tensorBoardAppSettings = builder.tensorBoardAppSettings;
this.rStudioServerProAppSettings = builder.rStudioServerProAppSettings;
this.rSessionAppSettings = builder.rSessionAppSettings;
this.canvasAppSettings = builder.canvasAppSettings;
this.codeEditorAppSettings = builder.codeEditorAppSettings;
this.jupyterLabAppSettings = builder.jupyterLabAppSettings;
this.spaceStorageSettings = builder.spaceStorageSettings;
this.defaultLandingUri = builder.defaultLandingUri;
this.studioWebPortal = builder.studioWebPortal;
this.customPosixUserConfig = builder.customPosixUserConfig;
this.customFileSystemConfigs = builder.customFileSystemConfigs;
this.studioWebPortalSettings = builder.studioWebPortalSettings;
this.autoMountHomeEFS = builder.autoMountHomeEFS;
}
/**
*
* The execution role for the user.
*
*
* @return The execution role for the user.
*/
public final String executionRole() {
return executionRole;
}
/**
* For responses, this returns true if the service returned a value for the SecurityGroups 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 hasSecurityGroups() {
return securityGroups != null && !(securityGroups instanceof SdkAutoConstructList);
}
/**
*
* The security groups for the Amazon Virtual Private Cloud (VPC) that the domain uses for communication.
*
*
* Optional when the CreateDomain.AppNetworkAccessType
parameter is set to
* PublicInternetOnly
.
*
*
* Required when the CreateDomain.AppNetworkAccessType
parameter is set to VpcOnly
, unless
* specified as part of the DefaultUserSettings
for the domain.
*
*
* Amazon SageMaker adds a security group to allow NFS traffic from Amazon SageMaker Studio. Therefore, the number
* of security groups that you can specify is one less than the maximum number shown.
*
*
* 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 #hasSecurityGroups} method.
*
*
* @return The security groups for the Amazon Virtual Private Cloud (VPC) that the domain uses for
* communication.
*
* Optional when the CreateDomain.AppNetworkAccessType
parameter is set to
* PublicInternetOnly
.
*
*
* Required when the CreateDomain.AppNetworkAccessType
parameter is set to VpcOnly
* , unless specified as part of the DefaultUserSettings
for the domain.
*
*
* Amazon SageMaker adds a security group to allow NFS traffic from Amazon SageMaker Studio. Therefore, the
* number of security groups that you can specify is one less than the maximum number shown.
*/
public final List securityGroups() {
return securityGroups;
}
/**
*
* Specifies options for sharing Amazon SageMaker Studio notebooks.
*
*
* @return Specifies options for sharing Amazon SageMaker Studio notebooks.
*/
public final SharingSettings sharingSettings() {
return sharingSettings;
}
/**
*
* The Jupyter server's app settings.
*
*
* @return The Jupyter server's app settings.
*/
public final JupyterServerAppSettings jupyterServerAppSettings() {
return jupyterServerAppSettings;
}
/**
*
* The kernel gateway app settings.
*
*
* @return The kernel gateway app settings.
*/
public final KernelGatewayAppSettings kernelGatewayAppSettings() {
return kernelGatewayAppSettings;
}
/**
*
* The TensorBoard app settings.
*
*
* @return The TensorBoard app settings.
*/
public final TensorBoardAppSettings tensorBoardAppSettings() {
return tensorBoardAppSettings;
}
/**
*
* A collection of settings that configure user interaction with the RStudioServerPro
app.
*
*
* @return A collection of settings that configure user interaction with the RStudioServerPro
app.
*/
public final RStudioServerProAppSettings rStudioServerProAppSettings() {
return rStudioServerProAppSettings;
}
/**
*
* A collection of settings that configure the RSessionGateway
app.
*
*
* @return A collection of settings that configure the RSessionGateway
app.
*/
public final RSessionAppSettings rSessionAppSettings() {
return rSessionAppSettings;
}
/**
*
* The Canvas app settings.
*
*
* @return The Canvas app settings.
*/
public final CanvasAppSettings canvasAppSettings() {
return canvasAppSettings;
}
/**
*
* The Code Editor application settings.
*
*
* @return The Code Editor application settings.
*/
public final CodeEditorAppSettings codeEditorAppSettings() {
return codeEditorAppSettings;
}
/**
*
* The settings for the JupyterLab application.
*
*
* @return The settings for the JupyterLab application.
*/
public final JupyterLabAppSettings jupyterLabAppSettings() {
return jupyterLabAppSettings;
}
/**
*
* The storage settings for a space.
*
*
* @return The storage settings for a space.
*/
public final DefaultSpaceStorageSettings spaceStorageSettings() {
return spaceStorageSettings;
}
/**
*
* The default experience that the user is directed to when accessing the domain. The supported values are:
*
*
* -
*
* studio::
: Indicates that Studio is the default experience. This value can only be passed if
* StudioWebPortal
is set to ENABLED
.
*
*
* -
*
* app:JupyterServer:
: Indicates that Studio Classic is the default experience.
*
*
*
*
* @return The default experience that the user is directed to when accessing the domain. The supported values
* are:
*
* -
*
* studio::
: Indicates that Studio is the default experience. This value can only be passed if
* StudioWebPortal
is set to ENABLED
.
*
*
* -
*
* app:JupyterServer:
: Indicates that Studio Classic is the default experience.
*
*
*/
public final String defaultLandingUri() {
return defaultLandingUri;
}
/**
*
* Whether the user can access Studio. If this value is set to DISABLED
, the user cannot access Studio,
* even if that is the default experience for the domain.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #studioWebPortal}
* will return {@link StudioWebPortal#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #studioWebPortalAsString}.
*
*
* @return Whether the user can access Studio. If this value is set to DISABLED
, the user cannot access
* Studio, even if that is the default experience for the domain.
* @see StudioWebPortal
*/
public final StudioWebPortal studioWebPortal() {
return StudioWebPortal.fromValue(studioWebPortal);
}
/**
*
* Whether the user can access Studio. If this value is set to DISABLED
, the user cannot access Studio,
* even if that is the default experience for the domain.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #studioWebPortal}
* will return {@link StudioWebPortal#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #studioWebPortalAsString}.
*
*
* @return Whether the user can access Studio. If this value is set to DISABLED
, the user cannot access
* Studio, even if that is the default experience for the domain.
* @see StudioWebPortal
*/
public final String studioWebPortalAsString() {
return studioWebPortal;
}
/**
*
* Details about the POSIX identity that is used for file system operations.
*
*
* @return Details about the POSIX identity that is used for file system operations.
*/
public final CustomPosixUserConfig customPosixUserConfig() {
return customPosixUserConfig;
}
/**
* For responses, this returns true if the service returned a value for the CustomFileSystemConfigs 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 hasCustomFileSystemConfigs() {
return customFileSystemConfigs != null && !(customFileSystemConfigs instanceof SdkAutoConstructList);
}
/**
*
* The settings for assigning a custom file system to a user profile. Permitted users can access this file system in
* Amazon SageMaker 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 #hasCustomFileSystemConfigs} method.
*
*
* @return The settings for assigning a custom file system to a user profile. Permitted users can access this file
* system in Amazon SageMaker Studio.
*/
public final List customFileSystemConfigs() {
return customFileSystemConfigs;
}
/**
*
* Studio settings. If these settings are applied on a user level, they take priority over the settings applied on a
* domain level.
*
*
* @return Studio settings. If these settings are applied on a user level, they take priority over the settings
* applied on a domain level.
*/
public final StudioWebPortalSettings studioWebPortalSettings() {
return studioWebPortalSettings;
}
/**
*
* Indicates whether auto-mounting of an EFS volume is supported for the user profile. The
* DefaultAsDomain
value is only supported for user profiles. Do not use the
* DefaultAsDomain
value when setting this parameter for a domain.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #autoMountHomeEFS}
* will return {@link AutoMountHomeEFS#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #autoMountHomeEFSAsString}.
*
*
* @return Indicates whether auto-mounting of an EFS volume is supported for the user profile. The
* DefaultAsDomain
value is only supported for user profiles. Do not use the
* DefaultAsDomain
value when setting this parameter for a domain.
* @see AutoMountHomeEFS
*/
public final AutoMountHomeEFS autoMountHomeEFS() {
return AutoMountHomeEFS.fromValue(autoMountHomeEFS);
}
/**
*
* Indicates whether auto-mounting of an EFS volume is supported for the user profile. The
* DefaultAsDomain
value is only supported for user profiles. Do not use the
* DefaultAsDomain
value when setting this parameter for a domain.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #autoMountHomeEFS}
* will return {@link AutoMountHomeEFS#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #autoMountHomeEFSAsString}.
*
*
* @return Indicates whether auto-mounting of an EFS volume is supported for the user profile. The
* DefaultAsDomain
value is only supported for user profiles. Do not use the
* DefaultAsDomain
value when setting this parameter for a domain.
* @see AutoMountHomeEFS
*/
public final String autoMountHomeEFSAsString() {
return autoMountHomeEFS;
}
@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(executionRole());
hashCode = 31 * hashCode + Objects.hashCode(hasSecurityGroups() ? securityGroups() : null);
hashCode = 31 * hashCode + Objects.hashCode(sharingSettings());
hashCode = 31 * hashCode + Objects.hashCode(jupyterServerAppSettings());
hashCode = 31 * hashCode + Objects.hashCode(kernelGatewayAppSettings());
hashCode = 31 * hashCode + Objects.hashCode(tensorBoardAppSettings());
hashCode = 31 * hashCode + Objects.hashCode(rStudioServerProAppSettings());
hashCode = 31 * hashCode + Objects.hashCode(rSessionAppSettings());
hashCode = 31 * hashCode + Objects.hashCode(canvasAppSettings());
hashCode = 31 * hashCode + Objects.hashCode(codeEditorAppSettings());
hashCode = 31 * hashCode + Objects.hashCode(jupyterLabAppSettings());
hashCode = 31 * hashCode + Objects.hashCode(spaceStorageSettings());
hashCode = 31 * hashCode + Objects.hashCode(defaultLandingUri());
hashCode = 31 * hashCode + Objects.hashCode(studioWebPortalAsString());
hashCode = 31 * hashCode + Objects.hashCode(customPosixUserConfig());
hashCode = 31 * hashCode + Objects.hashCode(hasCustomFileSystemConfigs() ? customFileSystemConfigs() : null);
hashCode = 31 * hashCode + Objects.hashCode(studioWebPortalSettings());
hashCode = 31 * hashCode + Objects.hashCode(autoMountHomeEFSAsString());
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 UserSettings)) {
return false;
}
UserSettings other = (UserSettings) obj;
return Objects.equals(executionRole(), other.executionRole()) && hasSecurityGroups() == other.hasSecurityGroups()
&& Objects.equals(securityGroups(), other.securityGroups())
&& Objects.equals(sharingSettings(), other.sharingSettings())
&& Objects.equals(jupyterServerAppSettings(), other.jupyterServerAppSettings())
&& Objects.equals(kernelGatewayAppSettings(), other.kernelGatewayAppSettings())
&& Objects.equals(tensorBoardAppSettings(), other.tensorBoardAppSettings())
&& Objects.equals(rStudioServerProAppSettings(), other.rStudioServerProAppSettings())
&& Objects.equals(rSessionAppSettings(), other.rSessionAppSettings())
&& Objects.equals(canvasAppSettings(), other.canvasAppSettings())
&& Objects.equals(codeEditorAppSettings(), other.codeEditorAppSettings())
&& Objects.equals(jupyterLabAppSettings(), other.jupyterLabAppSettings())
&& Objects.equals(spaceStorageSettings(), other.spaceStorageSettings())
&& Objects.equals(defaultLandingUri(), other.defaultLandingUri())
&& Objects.equals(studioWebPortalAsString(), other.studioWebPortalAsString())
&& Objects.equals(customPosixUserConfig(), other.customPosixUserConfig())
&& hasCustomFileSystemConfigs() == other.hasCustomFileSystemConfigs()
&& Objects.equals(customFileSystemConfigs(), other.customFileSystemConfigs())
&& Objects.equals(studioWebPortalSettings(), other.studioWebPortalSettings())
&& Objects.equals(autoMountHomeEFSAsString(), other.autoMountHomeEFSAsString());
}
/**
* 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("UserSettings").add("ExecutionRole", executionRole())
.add("SecurityGroups", hasSecurityGroups() ? securityGroups() : null).add("SharingSettings", sharingSettings())
.add("JupyterServerAppSettings", jupyterServerAppSettings())
.add("KernelGatewayAppSettings", kernelGatewayAppSettings())
.add("TensorBoardAppSettings", tensorBoardAppSettings())
.add("RStudioServerProAppSettings", rStudioServerProAppSettings())
.add("RSessionAppSettings", rSessionAppSettings()).add("CanvasAppSettings", canvasAppSettings())
.add("CodeEditorAppSettings", codeEditorAppSettings()).add("JupyterLabAppSettings", jupyterLabAppSettings())
.add("SpaceStorageSettings", spaceStorageSettings()).add("DefaultLandingUri", defaultLandingUri())
.add("StudioWebPortal", studioWebPortalAsString()).add("CustomPosixUserConfig", customPosixUserConfig())
.add("CustomFileSystemConfigs", hasCustomFileSystemConfigs() ? customFileSystemConfigs() : null)
.add("StudioWebPortalSettings", studioWebPortalSettings()).add("AutoMountHomeEFS", autoMountHomeEFSAsString())
.build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "ExecutionRole":
return Optional.ofNullable(clazz.cast(executionRole()));
case "SecurityGroups":
return Optional.ofNullable(clazz.cast(securityGroups()));
case "SharingSettings":
return Optional.ofNullable(clazz.cast(sharingSettings()));
case "JupyterServerAppSettings":
return Optional.ofNullable(clazz.cast(jupyterServerAppSettings()));
case "KernelGatewayAppSettings":
return Optional.ofNullable(clazz.cast(kernelGatewayAppSettings()));
case "TensorBoardAppSettings":
return Optional.ofNullable(clazz.cast(tensorBoardAppSettings()));
case "RStudioServerProAppSettings":
return Optional.ofNullable(clazz.cast(rStudioServerProAppSettings()));
case "RSessionAppSettings":
return Optional.ofNullable(clazz.cast(rSessionAppSettings()));
case "CanvasAppSettings":
return Optional.ofNullable(clazz.cast(canvasAppSettings()));
case "CodeEditorAppSettings":
return Optional.ofNullable(clazz.cast(codeEditorAppSettings()));
case "JupyterLabAppSettings":
return Optional.ofNullable(clazz.cast(jupyterLabAppSettings()));
case "SpaceStorageSettings":
return Optional.ofNullable(clazz.cast(spaceStorageSettings()));
case "DefaultLandingUri":
return Optional.ofNullable(clazz.cast(defaultLandingUri()));
case "StudioWebPortal":
return Optional.ofNullable(clazz.cast(studioWebPortalAsString()));
case "CustomPosixUserConfig":
return Optional.ofNullable(clazz.cast(customPosixUserConfig()));
case "CustomFileSystemConfigs":
return Optional.ofNullable(clazz.cast(customFileSystemConfigs()));
case "StudioWebPortalSettings":
return Optional.ofNullable(clazz.cast(studioWebPortalSettings()));
case "AutoMountHomeEFS":
return Optional.ofNullable(clazz.cast(autoMountHomeEFSAsString()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function