software.amazon.awssdk.services.sagemaker.model.UpdatePipelineRequest 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.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.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.LocationTrait;
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 UpdatePipelineRequest extends SageMakerRequest implements
ToCopyableBuilder {
private static final SdkField PIPELINE_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("PipelineName").getter(getter(UpdatePipelineRequest::pipelineName)).setter(setter(Builder::pipelineName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PipelineName").build()).build();
private static final SdkField PIPELINE_DISPLAY_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("PipelineDisplayName").getter(getter(UpdatePipelineRequest::pipelineDisplayName))
.setter(setter(Builder::pipelineDisplayName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PipelineDisplayName").build())
.build();
private static final SdkField PIPELINE_DEFINITION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("PipelineDefinition").getter(getter(UpdatePipelineRequest::pipelineDefinition))
.setter(setter(Builder::pipelineDefinition))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PipelineDefinition").build())
.build();
private static final SdkField PIPELINE_DEFINITION_S3_LOCATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("PipelineDefinitionS3Location")
.getter(getter(UpdatePipelineRequest::pipelineDefinitionS3Location))
.setter(setter(Builder::pipelineDefinitionS3Location))
.constructor(PipelineDefinitionS3Location::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PipelineDefinitionS3Location")
.build()).build();
private static final SdkField PIPELINE_DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("PipelineDescription").getter(getter(UpdatePipelineRequest::pipelineDescription))
.setter(setter(Builder::pipelineDescription))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PipelineDescription").build())
.build();
private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RoleArn").getter(getter(UpdatePipelineRequest::roleArn)).setter(setter(Builder::roleArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RoleArn").build()).build();
private static final SdkField PARALLELISM_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ParallelismConfiguration")
.getter(getter(UpdatePipelineRequest::parallelismConfiguration)).setter(setter(Builder::parallelismConfiguration))
.constructor(ParallelismConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ParallelismConfiguration").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(PIPELINE_NAME_FIELD,
PIPELINE_DISPLAY_NAME_FIELD, PIPELINE_DEFINITION_FIELD, PIPELINE_DEFINITION_S3_LOCATION_FIELD,
PIPELINE_DESCRIPTION_FIELD, ROLE_ARN_FIELD, PARALLELISM_CONFIGURATION_FIELD));
private final String pipelineName;
private final String pipelineDisplayName;
private final String pipelineDefinition;
private final PipelineDefinitionS3Location pipelineDefinitionS3Location;
private final String pipelineDescription;
private final String roleArn;
private final ParallelismConfiguration parallelismConfiguration;
private UpdatePipelineRequest(BuilderImpl builder) {
super(builder);
this.pipelineName = builder.pipelineName;
this.pipelineDisplayName = builder.pipelineDisplayName;
this.pipelineDefinition = builder.pipelineDefinition;
this.pipelineDefinitionS3Location = builder.pipelineDefinitionS3Location;
this.pipelineDescription = builder.pipelineDescription;
this.roleArn = builder.roleArn;
this.parallelismConfiguration = builder.parallelismConfiguration;
}
/**
*
* The name of the pipeline to update.
*
*
* @return The name of the pipeline to update.
*/
public final String pipelineName() {
return pipelineName;
}
/**
*
* The display name of the pipeline.
*
*
* @return The display name of the pipeline.
*/
public final String pipelineDisplayName() {
return pipelineDisplayName;
}
/**
*
* The JSON pipeline definition.
*
*
* @return The JSON pipeline definition.
*/
public final String pipelineDefinition() {
return pipelineDefinition;
}
/**
*
* The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline
* definition from this location.
*
*
* @return The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the
* pipeline definition from this location.
*/
public final PipelineDefinitionS3Location pipelineDefinitionS3Location() {
return pipelineDefinitionS3Location;
}
/**
*
* The description of the pipeline.
*
*
* @return The description of the pipeline.
*/
public final String pipelineDescription() {
return pipelineDescription;
}
/**
*
* The Amazon Resource Name (ARN) that the pipeline uses to execute.
*
*
* @return The Amazon Resource Name (ARN) that the pipeline uses to execute.
*/
public final String roleArn() {
return roleArn;
}
/**
*
* If specified, it applies to all executions of this pipeline by default.
*
*
* @return If specified, it applies to all executions of this pipeline by default.
*/
public final ParallelismConfiguration parallelismConfiguration() {
return parallelismConfiguration;
}
@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(pipelineName());
hashCode = 31 * hashCode + Objects.hashCode(pipelineDisplayName());
hashCode = 31 * hashCode + Objects.hashCode(pipelineDefinition());
hashCode = 31 * hashCode + Objects.hashCode(pipelineDefinitionS3Location());
hashCode = 31 * hashCode + Objects.hashCode(pipelineDescription());
hashCode = 31 * hashCode + Objects.hashCode(roleArn());
hashCode = 31 * hashCode + Objects.hashCode(parallelismConfiguration());
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 UpdatePipelineRequest)) {
return false;
}
UpdatePipelineRequest other = (UpdatePipelineRequest) obj;
return Objects.equals(pipelineName(), other.pipelineName())
&& Objects.equals(pipelineDisplayName(), other.pipelineDisplayName())
&& Objects.equals(pipelineDefinition(), other.pipelineDefinition())
&& Objects.equals(pipelineDefinitionS3Location(), other.pipelineDefinitionS3Location())
&& Objects.equals(pipelineDescription(), other.pipelineDescription())
&& Objects.equals(roleArn(), other.roleArn())
&& Objects.equals(parallelismConfiguration(), other.parallelismConfiguration());
}
/**
* 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("UpdatePipelineRequest").add("PipelineName", pipelineName())
.add("PipelineDisplayName", pipelineDisplayName()).add("PipelineDefinition", pipelineDefinition())
.add("PipelineDefinitionS3Location", pipelineDefinitionS3Location())
.add("PipelineDescription", pipelineDescription()).add("RoleArn", roleArn())
.add("ParallelismConfiguration", parallelismConfiguration()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "PipelineName":
return Optional.ofNullable(clazz.cast(pipelineName()));
case "PipelineDisplayName":
return Optional.ofNullable(clazz.cast(pipelineDisplayName()));
case "PipelineDefinition":
return Optional.ofNullable(clazz.cast(pipelineDefinition()));
case "PipelineDefinitionS3Location":
return Optional.ofNullable(clazz.cast(pipelineDefinitionS3Location()));
case "PipelineDescription":
return Optional.ofNullable(clazz.cast(pipelineDescription()));
case "RoleArn":
return Optional.ofNullable(clazz.cast(roleArn()));
case "ParallelismConfiguration":
return Optional.ofNullable(clazz.cast(parallelismConfiguration()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy