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

software.amazon.awssdk.services.finspace.model.Environment Maven / Gradle / Ivy

/*
 * 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.finspace.model;

import java.io.Serializable;
import java.util.Arrays;
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 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.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents an FinSpace environment. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Environment implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name") .getter(getter(Environment::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build(); private static final SdkField ENVIRONMENT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("environmentId").getter(getter(Environment::environmentId)).setter(setter(Builder::environmentId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("environmentId").build()).build(); private static final SdkField AWS_ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("awsAccountId").getter(getter(Environment::awsAccountId)).setter(setter(Builder::awsAccountId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("awsAccountId").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status") .getter(getter(Environment::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build(); private static final SdkField ENVIRONMENT_URL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("environmentUrl").getter(getter(Environment::environmentUrl)).setter(setter(Builder::environmentUrl)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("environmentUrl").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("description").getter(getter(Environment::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("description").build()).build(); private static final SdkField ENVIRONMENT_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("environmentArn").getter(getter(Environment::environmentArn)).setter(setter(Builder::environmentArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("environmentArn").build()).build(); private static final SdkField SAGE_MAKER_STUDIO_DOMAIN_URL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("sageMakerStudioDomainUrl").getter(getter(Environment::sageMakerStudioDomainUrl)) .setter(setter(Builder::sageMakerStudioDomainUrl)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sageMakerStudioDomainUrl").build()) .build(); private static final SdkField KMS_KEY_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("kmsKeyId").getter(getter(Environment::kmsKeyId)).setter(setter(Builder::kmsKeyId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("kmsKeyId").build()).build(); private static final SdkField DEDICATED_SERVICE_ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("dedicatedServiceAccountId").getter(getter(Environment::dedicatedServiceAccountId)) .setter(setter(Builder::dedicatedServiceAccountId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dedicatedServiceAccountId").build()) .build(); private static final SdkField FEDERATION_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("federationMode").getter(getter(Environment::federationModeAsString)) .setter(setter(Builder::federationMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("federationMode").build()).build(); private static final SdkField FEDERATION_PARAMETERS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("federationParameters") .getter(getter(Environment::federationParameters)).setter(setter(Builder::federationParameters)) .constructor(FederationParameters::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("federationParameters").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(NAME_FIELD, ENVIRONMENT_ID_FIELD, AWS_ACCOUNT_ID_FIELD, STATUS_FIELD, ENVIRONMENT_URL_FIELD, DESCRIPTION_FIELD, ENVIRONMENT_ARN_FIELD, SAGE_MAKER_STUDIO_DOMAIN_URL_FIELD, KMS_KEY_ID_FIELD, DEDICATED_SERVICE_ACCOUNT_ID_FIELD, FEDERATION_MODE_FIELD, FEDERATION_PARAMETERS_FIELD)); private static final long serialVersionUID = 1L; private final String name; private final String environmentId; private final String awsAccountId; private final String status; private final String environmentUrl; private final String description; private final String environmentArn; private final String sageMakerStudioDomainUrl; private final String kmsKeyId; private final String dedicatedServiceAccountId; private final String federationMode; private final FederationParameters federationParameters; private Environment(BuilderImpl builder) { this.name = builder.name; this.environmentId = builder.environmentId; this.awsAccountId = builder.awsAccountId; this.status = builder.status; this.environmentUrl = builder.environmentUrl; this.description = builder.description; this.environmentArn = builder.environmentArn; this.sageMakerStudioDomainUrl = builder.sageMakerStudioDomainUrl; this.kmsKeyId = builder.kmsKeyId; this.dedicatedServiceAccountId = builder.dedicatedServiceAccountId; this.federationMode = builder.federationMode; this.federationParameters = builder.federationParameters; } /** *

* The name of the FinSpace environment. *

* * @return The name of the FinSpace environment. */ public final String name() { return name; } /** *

* The identifier of the FinSpace environment. *

* * @return The identifier of the FinSpace environment. */ public final String environmentId() { return environmentId; } /** *

* The ID of the AWS account in which the FinSpace environment is created. *

* * @return The ID of the AWS account in which the FinSpace environment is created. */ public final String awsAccountId() { return awsAccountId; } /** *

* The current status of creation of the FinSpace environment. *

*

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

* * @return The current status of creation of the FinSpace environment. * @see EnvironmentStatus */ public final EnvironmentStatus status() { return EnvironmentStatus.fromValue(status); } /** *

* The current status of creation of the FinSpace environment. *

*

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

* * @return The current status of creation of the FinSpace environment. * @see EnvironmentStatus */ public final String statusAsString() { return status; } /** *

* The sign-in url for the web application of your FinSpace environment. *

* * @return The sign-in url for the web application of your FinSpace environment. */ public final String environmentUrl() { return environmentUrl; } /** *

* The description of the FinSpace environment. *

* * @return The description of the FinSpace environment. */ public final String description() { return description; } /** *

* The Amazon Resource Name (ARN) of your FinSpace environment. *

* * @return The Amazon Resource Name (ARN) of your FinSpace environment. */ public final String environmentArn() { return environmentArn; } /** *

* The url of the integrated FinSpace notebook environment in your web application. *

* * @return The url of the integrated FinSpace notebook environment in your web application. */ public final String sageMakerStudioDomainUrl() { return sageMakerStudioDomainUrl; } /** *

* The KMS key id used to encrypt in the FinSpace environment. *

* * @return The KMS key id used to encrypt in the FinSpace environment. */ public final String kmsKeyId() { return kmsKeyId; } /** *

* The AWS account ID of the dedicated service account associated with your FinSpace environment. *

* * @return The AWS account ID of the dedicated service account associated with your FinSpace environment. */ public final String dedicatedServiceAccountId() { return dedicatedServiceAccountId; } /** *

* The authentication mode for the environment. *

*

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

* * @return The authentication mode for the environment. * @see FederationMode */ public final FederationMode federationMode() { return FederationMode.fromValue(federationMode); } /** *

* The authentication mode for the environment. *

*

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

* * @return The authentication mode for the environment. * @see FederationMode */ public final String federationModeAsString() { return federationMode; } /** *

* Configuration information when authentication mode is FEDERATED. *

* * @return Configuration information when authentication mode is FEDERATED. */ public final FederationParameters federationParameters() { return federationParameters; } @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(name()); hashCode = 31 * hashCode + Objects.hashCode(environmentId()); hashCode = 31 * hashCode + Objects.hashCode(awsAccountId()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(environmentUrl()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(environmentArn()); hashCode = 31 * hashCode + Objects.hashCode(sageMakerStudioDomainUrl()); hashCode = 31 * hashCode + Objects.hashCode(kmsKeyId()); hashCode = 31 * hashCode + Objects.hashCode(dedicatedServiceAccountId()); hashCode = 31 * hashCode + Objects.hashCode(federationModeAsString()); hashCode = 31 * hashCode + Objects.hashCode(federationParameters()); 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 Environment)) { return false; } Environment other = (Environment) obj; return Objects.equals(name(), other.name()) && Objects.equals(environmentId(), other.environmentId()) && Objects.equals(awsAccountId(), other.awsAccountId()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(environmentUrl(), other.environmentUrl()) && Objects.equals(description(), other.description()) && Objects.equals(environmentArn(), other.environmentArn()) && Objects.equals(sageMakerStudioDomainUrl(), other.sageMakerStudioDomainUrl()) && Objects.equals(kmsKeyId(), other.kmsKeyId()) && Objects.equals(dedicatedServiceAccountId(), other.dedicatedServiceAccountId()) && Objects.equals(federationModeAsString(), other.federationModeAsString()) && Objects.equals(federationParameters(), other.federationParameters()); } /** * 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("Environment").add("Name", name()).add("EnvironmentId", environmentId()) .add("AwsAccountId", awsAccountId()).add("Status", statusAsString()).add("EnvironmentUrl", environmentUrl()) .add("Description", description()).add("EnvironmentArn", environmentArn()) .add("SageMakerStudioDomainUrl", sageMakerStudioDomainUrl()).add("KmsKeyId", kmsKeyId()) .add("DedicatedServiceAccountId", dedicatedServiceAccountId()).add("FederationMode", federationModeAsString()) .add("FederationParameters", federationParameters()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "name": return Optional.ofNullable(clazz.cast(name())); case "environmentId": return Optional.ofNullable(clazz.cast(environmentId())); case "awsAccountId": return Optional.ofNullable(clazz.cast(awsAccountId())); case "status": return Optional.ofNullable(clazz.cast(statusAsString())); case "environmentUrl": return Optional.ofNullable(clazz.cast(environmentUrl())); case "description": return Optional.ofNullable(clazz.cast(description())); case "environmentArn": return Optional.ofNullable(clazz.cast(environmentArn())); case "sageMakerStudioDomainUrl": return Optional.ofNullable(clazz.cast(sageMakerStudioDomainUrl())); case "kmsKeyId": return Optional.ofNullable(clazz.cast(kmsKeyId())); case "dedicatedServiceAccountId": return Optional.ofNullable(clazz.cast(dedicatedServiceAccountId())); case "federationMode": return Optional.ofNullable(clazz.cast(federationModeAsString())); case "federationParameters": return Optional.ofNullable(clazz.cast(federationParameters())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Environment) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The name of the FinSpace environment. *

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

* The identifier of the FinSpace environment. *

* * @param environmentId * The identifier of the FinSpace environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environmentId(String environmentId); /** *

* The ID of the AWS account in which the FinSpace environment is created. *

* * @param awsAccountId * The ID of the AWS account in which the FinSpace environment is created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder awsAccountId(String awsAccountId); /** *

* The current status of creation of the FinSpace environment. *

* * @param status * The current status of creation of the FinSpace environment. * @see EnvironmentStatus * @return Returns a reference to this object so that method calls can be chained together. * @see EnvironmentStatus */ Builder status(String status); /** *

* The current status of creation of the FinSpace environment. *

* * @param status * The current status of creation of the FinSpace environment. * @see EnvironmentStatus * @return Returns a reference to this object so that method calls can be chained together. * @see EnvironmentStatus */ Builder status(EnvironmentStatus status); /** *

* The sign-in url for the web application of your FinSpace environment. *

* * @param environmentUrl * The sign-in url for the web application of your FinSpace environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environmentUrl(String environmentUrl); /** *

* The description of the FinSpace environment. *

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

* The Amazon Resource Name (ARN) of your FinSpace environment. *

* * @param environmentArn * The Amazon Resource Name (ARN) of your FinSpace environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environmentArn(String environmentArn); /** *

* The url of the integrated FinSpace notebook environment in your web application. *

* * @param sageMakerStudioDomainUrl * The url of the integrated FinSpace notebook environment in your web application. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sageMakerStudioDomainUrl(String sageMakerStudioDomainUrl); /** *

* The KMS key id used to encrypt in the FinSpace environment. *

* * @param kmsKeyId * The KMS key id used to encrypt in the FinSpace environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder kmsKeyId(String kmsKeyId); /** *

* The AWS account ID of the dedicated service account associated with your FinSpace environment. *

* * @param dedicatedServiceAccountId * The AWS account ID of the dedicated service account associated with your FinSpace environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dedicatedServiceAccountId(String dedicatedServiceAccountId); /** *

* The authentication mode for the environment. *

* * @param federationMode * The authentication mode for the environment. * @see FederationMode * @return Returns a reference to this object so that method calls can be chained together. * @see FederationMode */ Builder federationMode(String federationMode); /** *

* The authentication mode for the environment. *

* * @param federationMode * The authentication mode for the environment. * @see FederationMode * @return Returns a reference to this object so that method calls can be chained together. * @see FederationMode */ Builder federationMode(FederationMode federationMode); /** *

* Configuration information when authentication mode is FEDERATED. *

* * @param federationParameters * Configuration information when authentication mode is FEDERATED. * @return Returns a reference to this object so that method calls can be chained together. */ Builder federationParameters(FederationParameters federationParameters); /** *

* Configuration information when authentication mode is FEDERATED. *

* This is a convenience that creates an instance of the {@link FederationParameters.Builder} avoiding the need * to create one manually via {@link FederationParameters#builder()}. * * When the {@link Consumer} completes, {@link FederationParameters.Builder#build()} is called immediately and * its result is passed to {@link #federationParameters(FederationParameters)}. * * @param federationParameters * a consumer that will call methods on {@link FederationParameters.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #federationParameters(FederationParameters) */ default Builder federationParameters(Consumer federationParameters) { return federationParameters(FederationParameters.builder().applyMutation(federationParameters).build()); } } static final class BuilderImpl implements Builder { private String name; private String environmentId; private String awsAccountId; private String status; private String environmentUrl; private String description; private String environmentArn; private String sageMakerStudioDomainUrl; private String kmsKeyId; private String dedicatedServiceAccountId; private String federationMode; private FederationParameters federationParameters; private BuilderImpl() { } private BuilderImpl(Environment model) { name(model.name); environmentId(model.environmentId); awsAccountId(model.awsAccountId); status(model.status); environmentUrl(model.environmentUrl); description(model.description); environmentArn(model.environmentArn); sageMakerStudioDomainUrl(model.sageMakerStudioDomainUrl); kmsKeyId(model.kmsKeyId); dedicatedServiceAccountId(model.dedicatedServiceAccountId); federationMode(model.federationMode); federationParameters(model.federationParameters); } public final String getName() { return name; } @Override public final Builder name(String name) { this.name = name; return this; } public final void setName(String name) { this.name = name; } public final String getEnvironmentId() { return environmentId; } @Override public final Builder environmentId(String environmentId) { this.environmentId = environmentId; return this; } public final void setEnvironmentId(String environmentId) { this.environmentId = environmentId; } public final String getAwsAccountId() { return awsAccountId; } @Override public final Builder awsAccountId(String awsAccountId) { this.awsAccountId = awsAccountId; return this; } public final void setAwsAccountId(String awsAccountId) { this.awsAccountId = awsAccountId; } public final String getStatus() { return status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(EnvironmentStatus status) { this.status(status == null ? null : status.toString()); return this; } public final void setStatus(String status) { this.status = status; } public final String getEnvironmentUrl() { return environmentUrl; } @Override public final Builder environmentUrl(String environmentUrl) { this.environmentUrl = environmentUrl; return this; } public final void setEnvironmentUrl(String environmentUrl) { this.environmentUrl = environmentUrl; } public final String getDescription() { return description; } @Override public final Builder description(String description) { this.description = description; return this; } public final void setDescription(String description) { this.description = description; } public final String getEnvironmentArn() { return environmentArn; } @Override public final Builder environmentArn(String environmentArn) { this.environmentArn = environmentArn; return this; } public final void setEnvironmentArn(String environmentArn) { this.environmentArn = environmentArn; } public final String getSageMakerStudioDomainUrl() { return sageMakerStudioDomainUrl; } @Override public final Builder sageMakerStudioDomainUrl(String sageMakerStudioDomainUrl) { this.sageMakerStudioDomainUrl = sageMakerStudioDomainUrl; return this; } public final void setSageMakerStudioDomainUrl(String sageMakerStudioDomainUrl) { this.sageMakerStudioDomainUrl = sageMakerStudioDomainUrl; } public final String getKmsKeyId() { return kmsKeyId; } @Override public final Builder kmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; return this; } public final void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } public final String getDedicatedServiceAccountId() { return dedicatedServiceAccountId; } @Override public final Builder dedicatedServiceAccountId(String dedicatedServiceAccountId) { this.dedicatedServiceAccountId = dedicatedServiceAccountId; return this; } public final void setDedicatedServiceAccountId(String dedicatedServiceAccountId) { this.dedicatedServiceAccountId = dedicatedServiceAccountId; } public final String getFederationMode() { return federationMode; } @Override public final Builder federationMode(String federationMode) { this.federationMode = federationMode; return this; } @Override public final Builder federationMode(FederationMode federationMode) { this.federationMode(federationMode == null ? null : federationMode.toString()); return this; } public final void setFederationMode(String federationMode) { this.federationMode = federationMode; } public final FederationParameters.Builder getFederationParameters() { return federationParameters != null ? federationParameters.toBuilder() : null; } @Override public final Builder federationParameters(FederationParameters federationParameters) { this.federationParameters = federationParameters; return this; } public final void setFederationParameters(FederationParameters.BuilderImpl federationParameters) { this.federationParameters = federationParameters != null ? federationParameters.build() : null; } @Override public Environment build() { return new Environment(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy