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

software.amazon.awssdk.services.sagemaker.model.UserSettings Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.28.4
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.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 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 getter(Function g) { return obj -> g.apply((UserSettings) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

    * The execution role for the user. *

    * * @param executionRole * The execution role for the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder executionRole(String executionRole); /** *

    * 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. *

    * * @param securityGroups * 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. * @return Returns a reference to this object so that method calls can be chained together. */ Builder securityGroups(Collection securityGroups); /** *

    * 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. *

    * * @param securityGroups * 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. * @return Returns a reference to this object so that method calls can be chained together. */ Builder securityGroups(String... securityGroups); /** *

    * Specifies options for sharing Amazon SageMaker Studio notebooks. *

    * * @param sharingSettings * Specifies options for sharing Amazon SageMaker Studio notebooks. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sharingSettings(SharingSettings sharingSettings); /** *

    * Specifies options for sharing Amazon SageMaker Studio notebooks. *

    * This is a convenience method that creates an instance of the {@link SharingSettings.Builder} avoiding the * need to create one manually via {@link SharingSettings#builder()}. * *

    * When the {@link Consumer} completes, {@link SharingSettings.Builder#build()} is called immediately and its * result is passed to {@link #sharingSettings(SharingSettings)}. * * @param sharingSettings * a consumer that will call methods on {@link SharingSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #sharingSettings(SharingSettings) */ default Builder sharingSettings(Consumer sharingSettings) { return sharingSettings(SharingSettings.builder().applyMutation(sharingSettings).build()); } /** *

    * The Jupyter server's app settings. *

    * * @param jupyterServerAppSettings * The Jupyter server's app settings. * @return Returns a reference to this object so that method calls can be chained together. */ Builder jupyterServerAppSettings(JupyterServerAppSettings jupyterServerAppSettings); /** *

    * The Jupyter server's app settings. *

    * This is a convenience method that creates an instance of the {@link JupyterServerAppSettings.Builder} * avoiding the need to create one manually via {@link JupyterServerAppSettings#builder()}. * *

    * When the {@link Consumer} completes, {@link JupyterServerAppSettings.Builder#build()} is called immediately * and its result is passed to {@link #jupyterServerAppSettings(JupyterServerAppSettings)}. * * @param jupyterServerAppSettings * a consumer that will call methods on {@link JupyterServerAppSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #jupyterServerAppSettings(JupyterServerAppSettings) */ default Builder jupyterServerAppSettings(Consumer jupyterServerAppSettings) { return jupyterServerAppSettings(JupyterServerAppSettings.builder().applyMutation(jupyterServerAppSettings).build()); } /** *

    * The kernel gateway app settings. *

    * * @param kernelGatewayAppSettings * The kernel gateway app settings. * @return Returns a reference to this object so that method calls can be chained together. */ Builder kernelGatewayAppSettings(KernelGatewayAppSettings kernelGatewayAppSettings); /** *

    * The kernel gateway app settings. *

    * This is a convenience method that creates an instance of the {@link KernelGatewayAppSettings.Builder} * avoiding the need to create one manually via {@link KernelGatewayAppSettings#builder()}. * *

    * When the {@link Consumer} completes, {@link KernelGatewayAppSettings.Builder#build()} is called immediately * and its result is passed to {@link #kernelGatewayAppSettings(KernelGatewayAppSettings)}. * * @param kernelGatewayAppSettings * a consumer that will call methods on {@link KernelGatewayAppSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #kernelGatewayAppSettings(KernelGatewayAppSettings) */ default Builder kernelGatewayAppSettings(Consumer kernelGatewayAppSettings) { return kernelGatewayAppSettings(KernelGatewayAppSettings.builder().applyMutation(kernelGatewayAppSettings).build()); } /** *

    * The TensorBoard app settings. *

    * * @param tensorBoardAppSettings * The TensorBoard app settings. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tensorBoardAppSettings(TensorBoardAppSettings tensorBoardAppSettings); /** *

    * The TensorBoard app settings. *

    * This is a convenience method that creates an instance of the {@link TensorBoardAppSettings.Builder} avoiding * the need to create one manually via {@link TensorBoardAppSettings#builder()}. * *

    * When the {@link Consumer} completes, {@link TensorBoardAppSettings.Builder#build()} is called immediately and * its result is passed to {@link #tensorBoardAppSettings(TensorBoardAppSettings)}. * * @param tensorBoardAppSettings * a consumer that will call methods on {@link TensorBoardAppSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tensorBoardAppSettings(TensorBoardAppSettings) */ default Builder tensorBoardAppSettings(Consumer tensorBoardAppSettings) { return tensorBoardAppSettings(TensorBoardAppSettings.builder().applyMutation(tensorBoardAppSettings).build()); } /** *

    * A collection of settings that configure user interaction with the RStudioServerPro app. *

    * * @param rStudioServerProAppSettings * A collection of settings that configure user interaction with the RStudioServerPro app. * @return Returns a reference to this object so that method calls can be chained together. */ Builder rStudioServerProAppSettings(RStudioServerProAppSettings rStudioServerProAppSettings); /** *

    * A collection of settings that configure user interaction with the RStudioServerPro app. *

    * This is a convenience method that creates an instance of the {@link RStudioServerProAppSettings.Builder} * avoiding the need to create one manually via {@link RStudioServerProAppSettings#builder()}. * *

    * When the {@link Consumer} completes, {@link RStudioServerProAppSettings.Builder#build()} is called * immediately and its result is passed to {@link #rStudioServerProAppSettings(RStudioServerProAppSettings)}. * * @param rStudioServerProAppSettings * a consumer that will call methods on {@link RStudioServerProAppSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #rStudioServerProAppSettings(RStudioServerProAppSettings) */ default Builder rStudioServerProAppSettings(Consumer rStudioServerProAppSettings) { return rStudioServerProAppSettings(RStudioServerProAppSettings.builder().applyMutation(rStudioServerProAppSettings) .build()); } /** *

    * A collection of settings that configure the RSessionGateway app. *

    * * @param rSessionAppSettings * A collection of settings that configure the RSessionGateway app. * @return Returns a reference to this object so that method calls can be chained together. */ Builder rSessionAppSettings(RSessionAppSettings rSessionAppSettings); /** *

    * A collection of settings that configure the RSessionGateway app. *

    * This is a convenience method that creates an instance of the {@link RSessionAppSettings.Builder} avoiding the * need to create one manually via {@link RSessionAppSettings#builder()}. * *

    * When the {@link Consumer} completes, {@link RSessionAppSettings.Builder#build()} is called immediately and * its result is passed to {@link #rSessionAppSettings(RSessionAppSettings)}. * * @param rSessionAppSettings * a consumer that will call methods on {@link RSessionAppSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #rSessionAppSettings(RSessionAppSettings) */ default Builder rSessionAppSettings(Consumer rSessionAppSettings) { return rSessionAppSettings(RSessionAppSettings.builder().applyMutation(rSessionAppSettings).build()); } /** *

    * The Canvas app settings. *

    * * @param canvasAppSettings * The Canvas app settings. * @return Returns a reference to this object so that method calls can be chained together. */ Builder canvasAppSettings(CanvasAppSettings canvasAppSettings); /** *

    * The Canvas app settings. *

    * This is a convenience method that creates an instance of the {@link CanvasAppSettings.Builder} avoiding the * need to create one manually via {@link CanvasAppSettings#builder()}. * *

    * When the {@link Consumer} completes, {@link CanvasAppSettings.Builder#build()} is called immediately and its * result is passed to {@link #canvasAppSettings(CanvasAppSettings)}. * * @param canvasAppSettings * a consumer that will call methods on {@link CanvasAppSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #canvasAppSettings(CanvasAppSettings) */ default Builder canvasAppSettings(Consumer canvasAppSettings) { return canvasAppSettings(CanvasAppSettings.builder().applyMutation(canvasAppSettings).build()); } /** *

    * The Code Editor application settings. *

    * * @param codeEditorAppSettings * The Code Editor application settings. * @return Returns a reference to this object so that method calls can be chained together. */ Builder codeEditorAppSettings(CodeEditorAppSettings codeEditorAppSettings); /** *

    * The Code Editor application settings. *

    * This is a convenience method that creates an instance of the {@link CodeEditorAppSettings.Builder} avoiding * the need to create one manually via {@link CodeEditorAppSettings#builder()}. * *

    * When the {@link Consumer} completes, {@link CodeEditorAppSettings.Builder#build()} is called immediately and * its result is passed to {@link #codeEditorAppSettings(CodeEditorAppSettings)}. * * @param codeEditorAppSettings * a consumer that will call methods on {@link CodeEditorAppSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #codeEditorAppSettings(CodeEditorAppSettings) */ default Builder codeEditorAppSettings(Consumer codeEditorAppSettings) { return codeEditorAppSettings(CodeEditorAppSettings.builder().applyMutation(codeEditorAppSettings).build()); } /** *

    * The settings for the JupyterLab application. *

    * * @param jupyterLabAppSettings * The settings for the JupyterLab application. * @return Returns a reference to this object so that method calls can be chained together. */ Builder jupyterLabAppSettings(JupyterLabAppSettings jupyterLabAppSettings); /** *

    * The settings for the JupyterLab application. *

    * This is a convenience method that creates an instance of the {@link JupyterLabAppSettings.Builder} avoiding * the need to create one manually via {@link JupyterLabAppSettings#builder()}. * *

    * When the {@link Consumer} completes, {@link JupyterLabAppSettings.Builder#build()} is called immediately and * its result is passed to {@link #jupyterLabAppSettings(JupyterLabAppSettings)}. * * @param jupyterLabAppSettings * a consumer that will call methods on {@link JupyterLabAppSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #jupyterLabAppSettings(JupyterLabAppSettings) */ default Builder jupyterLabAppSettings(Consumer jupyterLabAppSettings) { return jupyterLabAppSettings(JupyterLabAppSettings.builder().applyMutation(jupyterLabAppSettings).build()); } /** *

    * The storage settings for a space. *

    * * @param spaceStorageSettings * The storage settings for a space. * @return Returns a reference to this object so that method calls can be chained together. */ Builder spaceStorageSettings(DefaultSpaceStorageSettings spaceStorageSettings); /** *

    * The storage settings for a space. *

    * This is a convenience method that creates an instance of the {@link DefaultSpaceStorageSettings.Builder} * avoiding the need to create one manually via {@link DefaultSpaceStorageSettings#builder()}. * *

    * When the {@link Consumer} completes, {@link DefaultSpaceStorageSettings.Builder#build()} is called * immediately and its result is passed to {@link #spaceStorageSettings(DefaultSpaceStorageSettings)}. * * @param spaceStorageSettings * a consumer that will call methods on {@link DefaultSpaceStorageSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #spaceStorageSettings(DefaultSpaceStorageSettings) */ default Builder spaceStorageSettings(Consumer spaceStorageSettings) { return spaceStorageSettings(DefaultSpaceStorageSettings.builder().applyMutation(spaceStorageSettings).build()); } /** *

    * 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. *

      *
    • *
    * * @param defaultLandingUri * 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 Returns a reference to this object so that method calls can be chained together. */ Builder defaultLandingUri(String 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. *

      * * @param 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. * @see StudioWebPortal * @return Returns a reference to this object so that method calls can be chained together. * @see StudioWebPortal */ Builder studioWebPortal(String 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. *

      * * @param 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. * @see StudioWebPortal * @return Returns a reference to this object so that method calls can be chained together. * @see StudioWebPortal */ Builder studioWebPortal(StudioWebPortal studioWebPortal); /** *

      * Details about the POSIX identity that is used for file system operations. *

      * * @param customPosixUserConfig * Details about the POSIX identity that is used for file system operations. * @return Returns a reference to this object so that method calls can be chained together. */ Builder customPosixUserConfig(CustomPosixUserConfig customPosixUserConfig); /** *

      * Details about the POSIX identity that is used for file system operations. *

      * This is a convenience method that creates an instance of the {@link CustomPosixUserConfig.Builder} avoiding * the need to create one manually via {@link CustomPosixUserConfig#builder()}. * *

      * When the {@link Consumer} completes, {@link CustomPosixUserConfig.Builder#build()} is called immediately and * its result is passed to {@link #customPosixUserConfig(CustomPosixUserConfig)}. * * @param customPosixUserConfig * a consumer that will call methods on {@link CustomPosixUserConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #customPosixUserConfig(CustomPosixUserConfig) */ default Builder customPosixUserConfig(Consumer customPosixUserConfig) { return customPosixUserConfig(CustomPosixUserConfig.builder().applyMutation(customPosixUserConfig).build()); } /** *

      * The settings for assigning a custom file system to a user profile. Permitted users can access this file * system in Amazon SageMaker Studio. *

      * * @param customFileSystemConfigs * The settings for assigning a custom file system to a user profile. Permitted users can access this * file system in Amazon SageMaker Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder customFileSystemConfigs(Collection customFileSystemConfigs); /** *

      * The settings for assigning a custom file system to a user profile. Permitted users can access this file * system in Amazon SageMaker Studio. *

      * * @param customFileSystemConfigs * The settings for assigning a custom file system to a user profile. Permitted users can access this * file system in Amazon SageMaker Studio. * @return Returns a reference to this object so that method calls can be chained together. */ Builder customFileSystemConfigs(CustomFileSystemConfig... customFileSystemConfigs); /** *

      * The settings for assigning a custom file system to a user profile. Permitted users can access this file * system in Amazon SageMaker Studio. *

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

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

      * Studio settings. If these settings are applied on a user level, they take priority over the settings applied * on a domain level. *

      * * @param studioWebPortalSettings * Studio settings. If these settings are applied on a user level, they take priority over the settings * applied on a domain level. * @return Returns a reference to this object so that method calls can be chained together. */ Builder studioWebPortalSettings(StudioWebPortalSettings studioWebPortalSettings); /** *

      * Studio settings. If these settings are applied on a user level, they take priority over the settings applied * on a domain level. *

      * This is a convenience method that creates an instance of the {@link StudioWebPortalSettings.Builder} avoiding * the need to create one manually via {@link StudioWebPortalSettings#builder()}. * *

      * When the {@link Consumer} completes, {@link StudioWebPortalSettings.Builder#build()} is called immediately * and its result is passed to {@link #studioWebPortalSettings(StudioWebPortalSettings)}. * * @param studioWebPortalSettings * a consumer that will call methods on {@link StudioWebPortalSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #studioWebPortalSettings(StudioWebPortalSettings) */ default Builder studioWebPortalSettings(Consumer studioWebPortalSettings) { return studioWebPortalSettings(StudioWebPortalSettings.builder().applyMutation(studioWebPortalSettings).build()); } /** *

      * 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. *

      * * @param 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. * @see AutoMountHomeEFS * @return Returns a reference to this object so that method calls can be chained together. * @see AutoMountHomeEFS */ Builder autoMountHomeEFS(String 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. *

      * * @param 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. * @see AutoMountHomeEFS * @return Returns a reference to this object so that method calls can be chained together. * @see AutoMountHomeEFS */ Builder autoMountHomeEFS(AutoMountHomeEFS autoMountHomeEFS); } static final class BuilderImpl implements Builder { private String executionRole; private List securityGroups = DefaultSdkAutoConstructList.getInstance(); private SharingSettings sharingSettings; private JupyterServerAppSettings jupyterServerAppSettings; private KernelGatewayAppSettings kernelGatewayAppSettings; private TensorBoardAppSettings tensorBoardAppSettings; private RStudioServerProAppSettings rStudioServerProAppSettings; private RSessionAppSettings rSessionAppSettings; private CanvasAppSettings canvasAppSettings; private CodeEditorAppSettings codeEditorAppSettings; private JupyterLabAppSettings jupyterLabAppSettings; private DefaultSpaceStorageSettings spaceStorageSettings; private String defaultLandingUri; private String studioWebPortal; private CustomPosixUserConfig customPosixUserConfig; private List customFileSystemConfigs = DefaultSdkAutoConstructList.getInstance(); private StudioWebPortalSettings studioWebPortalSettings; private String autoMountHomeEFS; private BuilderImpl() { } private BuilderImpl(UserSettings model) { executionRole(model.executionRole); securityGroups(model.securityGroups); sharingSettings(model.sharingSettings); jupyterServerAppSettings(model.jupyterServerAppSettings); kernelGatewayAppSettings(model.kernelGatewayAppSettings); tensorBoardAppSettings(model.tensorBoardAppSettings); rStudioServerProAppSettings(model.rStudioServerProAppSettings); rSessionAppSettings(model.rSessionAppSettings); canvasAppSettings(model.canvasAppSettings); codeEditorAppSettings(model.codeEditorAppSettings); jupyterLabAppSettings(model.jupyterLabAppSettings); spaceStorageSettings(model.spaceStorageSettings); defaultLandingUri(model.defaultLandingUri); studioWebPortal(model.studioWebPortal); customPosixUserConfig(model.customPosixUserConfig); customFileSystemConfigs(model.customFileSystemConfigs); studioWebPortalSettings(model.studioWebPortalSettings); autoMountHomeEFS(model.autoMountHomeEFS); } public final String getExecutionRole() { return executionRole; } public final void setExecutionRole(String executionRole) { this.executionRole = executionRole; } @Override public final Builder executionRole(String executionRole) { this.executionRole = executionRole; return this; } public final Collection getSecurityGroups() { if (securityGroups instanceof SdkAutoConstructList) { return null; } return securityGroups; } public final void setSecurityGroups(Collection securityGroups) { this.securityGroups = SecurityGroupIdsCopier.copy(securityGroups); } @Override public final Builder securityGroups(Collection securityGroups) { this.securityGroups = SecurityGroupIdsCopier.copy(securityGroups); return this; } @Override @SafeVarargs public final Builder securityGroups(String... securityGroups) { securityGroups(Arrays.asList(securityGroups)); return this; } public final SharingSettings.Builder getSharingSettings() { return sharingSettings != null ? sharingSettings.toBuilder() : null; } public final void setSharingSettings(SharingSettings.BuilderImpl sharingSettings) { this.sharingSettings = sharingSettings != null ? sharingSettings.build() : null; } @Override public final Builder sharingSettings(SharingSettings sharingSettings) { this.sharingSettings = sharingSettings; return this; } public final JupyterServerAppSettings.Builder getJupyterServerAppSettings() { return jupyterServerAppSettings != null ? jupyterServerAppSettings.toBuilder() : null; } public final void setJupyterServerAppSettings(JupyterServerAppSettings.BuilderImpl jupyterServerAppSettings) { this.jupyterServerAppSettings = jupyterServerAppSettings != null ? jupyterServerAppSettings.build() : null; } @Override public final Builder jupyterServerAppSettings(JupyterServerAppSettings jupyterServerAppSettings) { this.jupyterServerAppSettings = jupyterServerAppSettings; return this; } public final KernelGatewayAppSettings.Builder getKernelGatewayAppSettings() { return kernelGatewayAppSettings != null ? kernelGatewayAppSettings.toBuilder() : null; } public final void setKernelGatewayAppSettings(KernelGatewayAppSettings.BuilderImpl kernelGatewayAppSettings) { this.kernelGatewayAppSettings = kernelGatewayAppSettings != null ? kernelGatewayAppSettings.build() : null; } @Override public final Builder kernelGatewayAppSettings(KernelGatewayAppSettings kernelGatewayAppSettings) { this.kernelGatewayAppSettings = kernelGatewayAppSettings; return this; } public final TensorBoardAppSettings.Builder getTensorBoardAppSettings() { return tensorBoardAppSettings != null ? tensorBoardAppSettings.toBuilder() : null; } public final void setTensorBoardAppSettings(TensorBoardAppSettings.BuilderImpl tensorBoardAppSettings) { this.tensorBoardAppSettings = tensorBoardAppSettings != null ? tensorBoardAppSettings.build() : null; } @Override public final Builder tensorBoardAppSettings(TensorBoardAppSettings tensorBoardAppSettings) { this.tensorBoardAppSettings = tensorBoardAppSettings; return this; } public final RStudioServerProAppSettings.Builder getRStudioServerProAppSettings() { return rStudioServerProAppSettings != null ? rStudioServerProAppSettings.toBuilder() : null; } public final void setRStudioServerProAppSettings(RStudioServerProAppSettings.BuilderImpl rStudioServerProAppSettings) { this.rStudioServerProAppSettings = rStudioServerProAppSettings != null ? rStudioServerProAppSettings.build() : null; } @Override public final Builder rStudioServerProAppSettings(RStudioServerProAppSettings rStudioServerProAppSettings) { this.rStudioServerProAppSettings = rStudioServerProAppSettings; return this; } public final RSessionAppSettings.Builder getRSessionAppSettings() { return rSessionAppSettings != null ? rSessionAppSettings.toBuilder() : null; } public final void setRSessionAppSettings(RSessionAppSettings.BuilderImpl rSessionAppSettings) { this.rSessionAppSettings = rSessionAppSettings != null ? rSessionAppSettings.build() : null; } @Override public final Builder rSessionAppSettings(RSessionAppSettings rSessionAppSettings) { this.rSessionAppSettings = rSessionAppSettings; return this; } public final CanvasAppSettings.Builder getCanvasAppSettings() { return canvasAppSettings != null ? canvasAppSettings.toBuilder() : null; } public final void setCanvasAppSettings(CanvasAppSettings.BuilderImpl canvasAppSettings) { this.canvasAppSettings = canvasAppSettings != null ? canvasAppSettings.build() : null; } @Override public final Builder canvasAppSettings(CanvasAppSettings canvasAppSettings) { this.canvasAppSettings = canvasAppSettings; return this; } public final CodeEditorAppSettings.Builder getCodeEditorAppSettings() { return codeEditorAppSettings != null ? codeEditorAppSettings.toBuilder() : null; } public final void setCodeEditorAppSettings(CodeEditorAppSettings.BuilderImpl codeEditorAppSettings) { this.codeEditorAppSettings = codeEditorAppSettings != null ? codeEditorAppSettings.build() : null; } @Override public final Builder codeEditorAppSettings(CodeEditorAppSettings codeEditorAppSettings) { this.codeEditorAppSettings = codeEditorAppSettings; return this; } public final JupyterLabAppSettings.Builder getJupyterLabAppSettings() { return jupyterLabAppSettings != null ? jupyterLabAppSettings.toBuilder() : null; } public final void setJupyterLabAppSettings(JupyterLabAppSettings.BuilderImpl jupyterLabAppSettings) { this.jupyterLabAppSettings = jupyterLabAppSettings != null ? jupyterLabAppSettings.build() : null; } @Override public final Builder jupyterLabAppSettings(JupyterLabAppSettings jupyterLabAppSettings) { this.jupyterLabAppSettings = jupyterLabAppSettings; return this; } public final DefaultSpaceStorageSettings.Builder getSpaceStorageSettings() { return spaceStorageSettings != null ? spaceStorageSettings.toBuilder() : null; } public final void setSpaceStorageSettings(DefaultSpaceStorageSettings.BuilderImpl spaceStorageSettings) { this.spaceStorageSettings = spaceStorageSettings != null ? spaceStorageSettings.build() : null; } @Override public final Builder spaceStorageSettings(DefaultSpaceStorageSettings spaceStorageSettings) { this.spaceStorageSettings = spaceStorageSettings; return this; } public final String getDefaultLandingUri() { return defaultLandingUri; } public final void setDefaultLandingUri(String defaultLandingUri) { this.defaultLandingUri = defaultLandingUri; } @Override public final Builder defaultLandingUri(String defaultLandingUri) { this.defaultLandingUri = defaultLandingUri; return this; } public final String getStudioWebPortal() { return studioWebPortal; } public final void setStudioWebPortal(String studioWebPortal) { this.studioWebPortal = studioWebPortal; } @Override public final Builder studioWebPortal(String studioWebPortal) { this.studioWebPortal = studioWebPortal; return this; } @Override public final Builder studioWebPortal(StudioWebPortal studioWebPortal) { this.studioWebPortal(studioWebPortal == null ? null : studioWebPortal.toString()); return this; } public final CustomPosixUserConfig.Builder getCustomPosixUserConfig() { return customPosixUserConfig != null ? customPosixUserConfig.toBuilder() : null; } public final void setCustomPosixUserConfig(CustomPosixUserConfig.BuilderImpl customPosixUserConfig) { this.customPosixUserConfig = customPosixUserConfig != null ? customPosixUserConfig.build() : null; } @Override public final Builder customPosixUserConfig(CustomPosixUserConfig customPosixUserConfig) { this.customPosixUserConfig = customPosixUserConfig; return this; } public final List getCustomFileSystemConfigs() { List result = CustomFileSystemConfigsCopier .copyToBuilder(this.customFileSystemConfigs); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setCustomFileSystemConfigs(Collection customFileSystemConfigs) { this.customFileSystemConfigs = CustomFileSystemConfigsCopier.copyFromBuilder(customFileSystemConfigs); } @Override public final Builder customFileSystemConfigs(Collection customFileSystemConfigs) { this.customFileSystemConfigs = CustomFileSystemConfigsCopier.copy(customFileSystemConfigs); return this; } @Override @SafeVarargs public final Builder customFileSystemConfigs(CustomFileSystemConfig... customFileSystemConfigs) { customFileSystemConfigs(Arrays.asList(customFileSystemConfigs)); return this; } @Override @SafeVarargs public final Builder customFileSystemConfigs(Consumer... customFileSystemConfigs) { customFileSystemConfigs(Stream.of(customFileSystemConfigs) .map(c -> CustomFileSystemConfig.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final StudioWebPortalSettings.Builder getStudioWebPortalSettings() { return studioWebPortalSettings != null ? studioWebPortalSettings.toBuilder() : null; } public final void setStudioWebPortalSettings(StudioWebPortalSettings.BuilderImpl studioWebPortalSettings) { this.studioWebPortalSettings = studioWebPortalSettings != null ? studioWebPortalSettings.build() : null; } @Override public final Builder studioWebPortalSettings(StudioWebPortalSettings studioWebPortalSettings) { this.studioWebPortalSettings = studioWebPortalSettings; return this; } public final String getAutoMountHomeEFS() { return autoMountHomeEFS; } public final void setAutoMountHomeEFS(String autoMountHomeEFS) { this.autoMountHomeEFS = autoMountHomeEFS; } @Override public final Builder autoMountHomeEFS(String autoMountHomeEFS) { this.autoMountHomeEFS = autoMountHomeEFS; return this; } @Override public final Builder autoMountHomeEFS(AutoMountHomeEFS autoMountHomeEFS) { this.autoMountHomeEFS(autoMountHomeEFS == null ? null : autoMountHomeEFS.toString()); return this; } @Override public UserSettings build() { return new UserSettings(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy