Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.sagemaker.model.CreateTrialComponentRequest 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.sagemaker.model;
import java.beans.Transient;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class CreateTrialComponentRequest extends SageMakerRequest implements
ToCopyableBuilder {
private static final SdkField TRIAL_COMPONENT_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TrialComponentName").getter(getter(CreateTrialComponentRequest::trialComponentName))
.setter(setter(Builder::trialComponentName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TrialComponentName").build())
.build();
private static final SdkField DISPLAY_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DisplayName").getter(getter(CreateTrialComponentRequest::displayName))
.setter(setter(Builder::displayName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DisplayName").build()).build();
private static final SdkField STATUS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("Status")
.getter(getter(CreateTrialComponentRequest::status)).setter(setter(Builder::status))
.constructor(TrialComponentStatus::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build();
private static final SdkField START_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("StartTime").getter(getter(CreateTrialComponentRequest::startTime)).setter(setter(Builder::startTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StartTime").build()).build();
private static final SdkField END_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("EndTime").getter(getter(CreateTrialComponentRequest::endTime)).setter(setter(Builder::endTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndTime").build()).build();
private static final SdkField> PARAMETERS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("Parameters")
.getter(getter(CreateTrialComponentRequest::parameters))
.setter(setter(Builder::parameters))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Parameters").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(TrialComponentParameterValue::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField> INPUT_ARTIFACTS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("InputArtifacts")
.getter(getter(CreateTrialComponentRequest::inputArtifacts))
.setter(setter(Builder::inputArtifacts))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InputArtifacts").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(TrialComponentArtifact::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField> OUTPUT_ARTIFACTS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("OutputArtifacts")
.getter(getter(CreateTrialComponentRequest::outputArtifacts))
.setter(setter(Builder::outputArtifacts))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputArtifacts").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(TrialComponentArtifact::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField METADATA_PROPERTIES_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("MetadataProperties")
.getter(getter(CreateTrialComponentRequest::metadataProperties)).setter(setter(Builder::metadataProperties))
.constructor(MetadataProperties::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MetadataProperties").build())
.build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Tags")
.getter(getter(CreateTrialComponentRequest::tags))
.setter(setter(Builder::tags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(Tag::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(TRIAL_COMPONENT_NAME_FIELD,
DISPLAY_NAME_FIELD, STATUS_FIELD, START_TIME_FIELD, END_TIME_FIELD, PARAMETERS_FIELD, INPUT_ARTIFACTS_FIELD,
OUTPUT_ARTIFACTS_FIELD, METADATA_PROPERTIES_FIELD, TAGS_FIELD));
private final String trialComponentName;
private final String displayName;
private final TrialComponentStatus status;
private final Instant startTime;
private final Instant endTime;
private final Map parameters;
private final Map inputArtifacts;
private final Map outputArtifacts;
private final MetadataProperties metadataProperties;
private final List tags;
private CreateTrialComponentRequest(BuilderImpl builder) {
super(builder);
this.trialComponentName = builder.trialComponentName;
this.displayName = builder.displayName;
this.status = builder.status;
this.startTime = builder.startTime;
this.endTime = builder.endTime;
this.parameters = builder.parameters;
this.inputArtifacts = builder.inputArtifacts;
this.outputArtifacts = builder.outputArtifacts;
this.metadataProperties = builder.metadataProperties;
this.tags = builder.tags;
}
/**
*
* The name of the component. The name must be unique in your Amazon Web Services account and is not case-sensitive.
*
*
* @return The name of the component. The name must be unique in your Amazon Web Services account and is not
* case-sensitive.
*/
public final String trialComponentName() {
return trialComponentName;
}
/**
*
* The name of the component as displayed. The name doesn't need to be unique. If DisplayName
isn't
* specified, TrialComponentName
is displayed.
*
*
* @return The name of the component as displayed. The name doesn't need to be unique. If DisplayName
* isn't specified, TrialComponentName
is displayed.
*/
public final String displayName() {
return displayName;
}
/**
*
* The status of the component. States include:
*
*
*
*
* InProgress
*
*
*
*
* Completed
*
*
*
*
* Failed
*
*
*
*
* @return The status of the component. States include:
*
*
*
* InProgress
*
*
*
*
* Completed
*
*
*
*
* Failed
*
*
*/
public final TrialComponentStatus status() {
return status;
}
/**
*
* When the component started.
*
*
* @return When the component started.
*/
public final Instant startTime() {
return startTime;
}
/**
*
* When the component ended.
*
*
* @return When the component ended.
*/
public final Instant endTime() {
return endTime;
}
/**
* For responses, this returns true if the service returned a value for the Parameters 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 hasParameters() {
return parameters != null && !(parameters instanceof SdkAutoConstructMap);
}
/**
*
* The hyperparameters for the component.
*
*
* 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 #hasParameters} method.
*
*
* @return The hyperparameters for the component.
*/
public final Map parameters() {
return parameters;
}
/**
* For responses, this returns true if the service returned a value for the InputArtifacts 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 hasInputArtifacts() {
return inputArtifacts != null && !(inputArtifacts instanceof SdkAutoConstructMap);
}
/**
*
* The input artifacts for the component. Examples of input artifacts are datasets, algorithms, hyperparameters,
* source code, and instance types.
*
*
* 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 #hasInputArtifacts} method.
*
*
* @return The input artifacts for the component. Examples of input artifacts are datasets, algorithms,
* hyperparameters, source code, and instance types.
*/
public final Map inputArtifacts() {
return inputArtifacts;
}
/**
* For responses, this returns true if the service returned a value for the OutputArtifacts 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 hasOutputArtifacts() {
return outputArtifacts != null && !(outputArtifacts instanceof SdkAutoConstructMap);
}
/**
*
* The output artifacts for the component. Examples of output artifacts are metrics, snapshots, logs, and images.
*
*
* 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 #hasOutputArtifacts} method.
*
*
* @return The output artifacts for the component. Examples of output artifacts are metrics, snapshots, logs, and
* images.
*/
public final Map outputArtifacts() {
return outputArtifacts;
}
/**
* Returns the value of the MetadataProperties property for this object.
*
* @return The value of the MetadataProperties property for this object.
*/
public final MetadataProperties metadataProperties() {
return metadataProperties;
}
/**
* For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that
* the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful
* because the SDK will never return a null collection or map, but you may need to differentiate between the service
* returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true
* if a value for the property was specified in the request builder, and false if a value was not specified.
*/
public final boolean hasTags() {
return tags != null && !(tags instanceof SdkAutoConstructList);
}
/**
*
* A list of tags to associate with the component. You can use Search API to search on the tags.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasTags} method.
*
*
* @return A list of tags to associate with the component. You can use Search API to search on the tags.
*/
public final List tags() {
return tags;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(trialComponentName());
hashCode = 31 * hashCode + Objects.hashCode(displayName());
hashCode = 31 * hashCode + Objects.hashCode(status());
hashCode = 31 * hashCode + Objects.hashCode(startTime());
hashCode = 31 * hashCode + Objects.hashCode(endTime());
hashCode = 31 * hashCode + Objects.hashCode(hasParameters() ? parameters() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasInputArtifacts() ? inputArtifacts() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasOutputArtifacts() ? outputArtifacts() : null);
hashCode = 31 * hashCode + Objects.hashCode(metadataProperties());
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null);
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CreateTrialComponentRequest)) {
return false;
}
CreateTrialComponentRequest other = (CreateTrialComponentRequest) obj;
return Objects.equals(trialComponentName(), other.trialComponentName())
&& Objects.equals(displayName(), other.displayName()) && Objects.equals(status(), other.status())
&& Objects.equals(startTime(), other.startTime()) && Objects.equals(endTime(), other.endTime())
&& hasParameters() == other.hasParameters() && Objects.equals(parameters(), other.parameters())
&& hasInputArtifacts() == other.hasInputArtifacts() && Objects.equals(inputArtifacts(), other.inputArtifacts())
&& hasOutputArtifacts() == other.hasOutputArtifacts()
&& Objects.equals(outputArtifacts(), other.outputArtifacts())
&& Objects.equals(metadataProperties(), other.metadataProperties()) && hasTags() == other.hasTags()
&& Objects.equals(tags(), other.tags());
}
/**
* 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("CreateTrialComponentRequest").add("TrialComponentName", trialComponentName())
.add("DisplayName", displayName()).add("Status", status()).add("StartTime", startTime())
.add("EndTime", endTime()).add("Parameters", hasParameters() ? parameters() : null)
.add("InputArtifacts", hasInputArtifacts() ? inputArtifacts() : null)
.add("OutputArtifacts", hasOutputArtifacts() ? outputArtifacts() : null)
.add("MetadataProperties", metadataProperties()).add("Tags", hasTags() ? tags() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "TrialComponentName":
return Optional.ofNullable(clazz.cast(trialComponentName()));
case "DisplayName":
return Optional.ofNullable(clazz.cast(displayName()));
case "Status":
return Optional.ofNullable(clazz.cast(status()));
case "StartTime":
return Optional.ofNullable(clazz.cast(startTime()));
case "EndTime":
return Optional.ofNullable(clazz.cast(endTime()));
case "Parameters":
return Optional.ofNullable(clazz.cast(parameters()));
case "InputArtifacts":
return Optional.ofNullable(clazz.cast(inputArtifacts()));
case "OutputArtifacts":
return Optional.ofNullable(clazz.cast(outputArtifacts()));
case "MetadataProperties":
return Optional.ofNullable(clazz.cast(metadataProperties()));
case "Tags":
return Optional.ofNullable(clazz.cast(tags()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((CreateTrialComponentRequest) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SageMakerRequest.Builder, SdkPojo, CopyableBuilder {
/**
*
* The name of the component. The name must be unique in your Amazon Web Services account and is not
* case-sensitive.
*
*
* @param trialComponentName
* The name of the component. The name must be unique in your Amazon Web Services account and is not
* case-sensitive.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder trialComponentName(String trialComponentName);
/**
*
* The name of the component as displayed. The name doesn't need to be unique. If DisplayName
isn't
* specified, TrialComponentName
is displayed.
*
*
* @param displayName
* The name of the component as displayed. The name doesn't need to be unique. If
* DisplayName
isn't specified, TrialComponentName
is displayed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder displayName(String displayName);
/**
*
* The status of the component. States include:
*
*
*
*
* InProgress
*
*
*
*
* Completed
*
*
*
*
* Failed
*
*
*
*
* @param status
* The status of the component. States include:
*
*
*
* InProgress
*
*
*
*
* Completed
*
*
*
*
* Failed
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder status(TrialComponentStatus status);
/**
*
* The status of the component. States include:
*
*
*
*
* InProgress
*
*
*
*
* Completed
*
*
*
*
* Failed
*
*
*
* This is a convenience that creates an instance of the {@link TrialComponentStatus.Builder} avoiding the need
* to create one manually via {@link TrialComponentStatus#builder()}.
*
* When the {@link Consumer} completes, {@link TrialComponentStatus.Builder#build()} is called immediately and
* its result is passed to {@link #status(TrialComponentStatus)}.
*
* @param status
* a consumer that will call methods on {@link TrialComponentStatus.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #status(TrialComponentStatus)
*/
default Builder status(Consumer status) {
return status(TrialComponentStatus.builder().applyMutation(status).build());
}
/**
*
* When the component started.
*
*
* @param startTime
* When the component started.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder startTime(Instant startTime);
/**
*
* When the component ended.
*
*
* @param endTime
* When the component ended.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder endTime(Instant endTime);
/**
*
* The hyperparameters for the component.
*
*
* @param parameters
* The hyperparameters for the component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder parameters(Map parameters);
/**
*
* The input artifacts for the component. Examples of input artifacts are datasets, algorithms, hyperparameters,
* source code, and instance types.
*
*
* @param inputArtifacts
* The input artifacts for the component. Examples of input artifacts are datasets, algorithms,
* hyperparameters, source code, and instance types.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder inputArtifacts(Map inputArtifacts);
/**
*
* The output artifacts for the component. Examples of output artifacts are metrics, snapshots, logs, and
* images.
*
*
* @param outputArtifacts
* The output artifacts for the component. Examples of output artifacts are metrics, snapshots, logs, and
* images.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outputArtifacts(Map outputArtifacts);
/**
* Sets the value of the MetadataProperties property for this object.
*
* @param metadataProperties
* The new value for the MetadataProperties property for this object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder metadataProperties(MetadataProperties metadataProperties);
/**
* Sets the value of the MetadataProperties property for this object.
*
* This is a convenience that creates an instance of the {@link MetadataProperties.Builder} avoiding the need to
* create one manually via {@link MetadataProperties#builder()}.
*
* When the {@link Consumer} completes, {@link MetadataProperties.Builder#build()} is called immediately and its
* result is passed to {@link #metadataProperties(MetadataProperties)}.
*
* @param metadataProperties
* a consumer that will call methods on {@link MetadataProperties.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #metadataProperties(MetadataProperties)
*/
default Builder metadataProperties(Consumer metadataProperties) {
return metadataProperties(MetadataProperties.builder().applyMutation(metadataProperties).build());
}
/**
*
* A list of tags to associate with the component. You can use Search API to search on the tags.
*
*
* @param tags
* A list of tags to associate with the component. You can use Search API to search on the tags.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Collection tags);
/**
*
* A list of tags to associate with the component. You can use Search API to search on the tags.
*
*
* @param tags
* A list of tags to associate with the component. You can use Search API to search on the tags.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Tag... tags);
/**
*
* A list of tags to associate with the component. You can use Search API to search on the tags.
*
* This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to create
* one manually via {@link List#builder()}.
*
* When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its result
* is passed to {@link #tags(List)}.
*
* @param tags
* a consumer that will call methods on {@link List.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #tags(List)
*/
Builder tags(Consumer... tags);
@Override
Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
@Override
Builder overrideConfiguration(Consumer builderConsumer);
}
static final class BuilderImpl extends SageMakerRequest.BuilderImpl implements Builder {
private String trialComponentName;
private String displayName;
private TrialComponentStatus status;
private Instant startTime;
private Instant endTime;
private Map parameters = DefaultSdkAutoConstructMap.getInstance();
private Map inputArtifacts = DefaultSdkAutoConstructMap.getInstance();
private Map outputArtifacts = DefaultSdkAutoConstructMap.getInstance();
private MetadataProperties metadataProperties;
private List tags = DefaultSdkAutoConstructList.getInstance();
private BuilderImpl() {
}
private BuilderImpl(CreateTrialComponentRequest model) {
super(model);
trialComponentName(model.trialComponentName);
displayName(model.displayName);
status(model.status);
startTime(model.startTime);
endTime(model.endTime);
parameters(model.parameters);
inputArtifacts(model.inputArtifacts);
outputArtifacts(model.outputArtifacts);
metadataProperties(model.metadataProperties);
tags(model.tags);
}
public final String getTrialComponentName() {
return trialComponentName;
}
public final void setTrialComponentName(String trialComponentName) {
this.trialComponentName = trialComponentName;
}
@Override
@Transient
public final Builder trialComponentName(String trialComponentName) {
this.trialComponentName = trialComponentName;
return this;
}
public final String getDisplayName() {
return displayName;
}
public final void setDisplayName(String displayName) {
this.displayName = displayName;
}
@Override
@Transient
public final Builder displayName(String displayName) {
this.displayName = displayName;
return this;
}
public final TrialComponentStatus.Builder getStatus() {
return status != null ? status.toBuilder() : null;
}
public final void setStatus(TrialComponentStatus.BuilderImpl status) {
this.status = status != null ? status.build() : null;
}
@Override
@Transient
public final Builder status(TrialComponentStatus status) {
this.status = status;
return this;
}
public final Instant getStartTime() {
return startTime;
}
public final void setStartTime(Instant startTime) {
this.startTime = startTime;
}
@Override
@Transient
public final Builder startTime(Instant startTime) {
this.startTime = startTime;
return this;
}
public final Instant getEndTime() {
return endTime;
}
public final void setEndTime(Instant endTime) {
this.endTime = endTime;
}
@Override
@Transient
public final Builder endTime(Instant endTime) {
this.endTime = endTime;
return this;
}
public final Map getParameters() {
Map result = TrialComponentParametersCopier
.copyToBuilder(this.parameters);
if (result instanceof SdkAutoConstructMap) {
return null;
}
return result;
}
public final void setParameters(Map parameters) {
this.parameters = TrialComponentParametersCopier.copyFromBuilder(parameters);
}
@Override
@Transient
public final Builder parameters(Map parameters) {
this.parameters = TrialComponentParametersCopier.copy(parameters);
return this;
}
public final Map getInputArtifacts() {
Map result = TrialComponentArtifactsCopier.copyToBuilder(this.inputArtifacts);
if (result instanceof SdkAutoConstructMap) {
return null;
}
return result;
}
public final void setInputArtifacts(Map inputArtifacts) {
this.inputArtifacts = TrialComponentArtifactsCopier.copyFromBuilder(inputArtifacts);
}
@Override
@Transient
public final Builder inputArtifacts(Map inputArtifacts) {
this.inputArtifacts = TrialComponentArtifactsCopier.copy(inputArtifacts);
return this;
}
public final Map getOutputArtifacts() {
Map result = TrialComponentArtifactsCopier
.copyToBuilder(this.outputArtifacts);
if (result instanceof SdkAutoConstructMap) {
return null;
}
return result;
}
public final void setOutputArtifacts(Map outputArtifacts) {
this.outputArtifacts = TrialComponentArtifactsCopier.copyFromBuilder(outputArtifacts);
}
@Override
@Transient
public final Builder outputArtifacts(Map outputArtifacts) {
this.outputArtifacts = TrialComponentArtifactsCopier.copy(outputArtifacts);
return this;
}
public final MetadataProperties.Builder getMetadataProperties() {
return metadataProperties != null ? metadataProperties.toBuilder() : null;
}
public final void setMetadataProperties(MetadataProperties.BuilderImpl metadataProperties) {
this.metadataProperties = metadataProperties != null ? metadataProperties.build() : null;
}
@Override
@Transient
public final Builder metadataProperties(MetadataProperties metadataProperties) {
this.metadataProperties = metadataProperties;
return this;
}
public final List getTags() {
List result = TagListCopier.copyToBuilder(this.tags);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setTags(Collection tags) {
this.tags = TagListCopier.copyFromBuilder(tags);
}
@Override
@Transient
public final Builder tags(Collection tags) {
this.tags = TagListCopier.copy(tags);
return this;
}
@Override
@Transient
@SafeVarargs
public final Builder tags(Tag... tags) {
tags(Arrays.asList(tags));
return this;
}
@Override
@Transient
@SafeVarargs
public final Builder tags(Consumer... tags) {
tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList()));
return this;
}
@Override
public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) {
super.overrideConfiguration(overrideConfiguration);
return this;
}
@Override
public Builder overrideConfiguration(Consumer builderConsumer) {
super.overrideConfiguration(builderConsumer);
return this;
}
@Override
public CreateTrialComponentRequest build() {
return new CreateTrialComponentRequest(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}