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

software.amazon.awssdk.services.sagemaker.model.UpdatePipelineRequest 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.29.39
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.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 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 getter(Function g) { return obj -> g.apply((UpdatePipelineRequest) 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 pipeline to update. *

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

* The display name of the pipeline. *

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

* The JSON pipeline definition. *

* * @param pipelineDefinition * The JSON pipeline definition. * @return Returns a reference to this object so that method calls can be chained together. */ Builder pipelineDefinition(String pipelineDefinition); /** *

* The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the * pipeline definition from this location. *

* * @param pipelineDefinitionS3Location * The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the * pipeline definition from this location. * @return Returns a reference to this object so that method calls can be chained together. */ Builder pipelineDefinitionS3Location(PipelineDefinitionS3Location pipelineDefinitionS3Location); /** *

* The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the * pipeline definition from this location. *

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

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

* The description of the pipeline. *

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

* The Amazon Resource Name (ARN) that the pipeline uses to execute. *

* * @param roleArn * The Amazon Resource Name (ARN) that the pipeline uses to execute. * @return Returns a reference to this object so that method calls can be chained together. */ Builder roleArn(String roleArn); /** *

* If specified, it applies to all executions of this pipeline by default. *

* * @param parallelismConfiguration * If specified, it applies to all executions of this pipeline by default. * @return Returns a reference to this object so that method calls can be chained together. */ Builder parallelismConfiguration(ParallelismConfiguration parallelismConfiguration); /** *

* If specified, it applies to all executions of this pipeline by default. *

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

* When the {@link Consumer} completes, {@link ParallelismConfiguration.Builder#build()} is called immediately * and its result is passed to {@link #parallelismConfiguration(ParallelismConfiguration)}. * * @param parallelismConfiguration * a consumer that will call methods on {@link ParallelismConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #parallelismConfiguration(ParallelismConfiguration) */ default Builder parallelismConfiguration(Consumer parallelismConfiguration) { return parallelismConfiguration(ParallelismConfiguration.builder().applyMutation(parallelismConfiguration).build()); } @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends SageMakerRequest.BuilderImpl implements Builder { private String pipelineName; private String pipelineDisplayName; private String pipelineDefinition; private PipelineDefinitionS3Location pipelineDefinitionS3Location; private String pipelineDescription; private String roleArn; private ParallelismConfiguration parallelismConfiguration; private BuilderImpl() { } private BuilderImpl(UpdatePipelineRequest model) { super(model); pipelineName(model.pipelineName); pipelineDisplayName(model.pipelineDisplayName); pipelineDefinition(model.pipelineDefinition); pipelineDefinitionS3Location(model.pipelineDefinitionS3Location); pipelineDescription(model.pipelineDescription); roleArn(model.roleArn); parallelismConfiguration(model.parallelismConfiguration); } public final String getPipelineName() { return pipelineName; } public final void setPipelineName(String pipelineName) { this.pipelineName = pipelineName; } @Override public final Builder pipelineName(String pipelineName) { this.pipelineName = pipelineName; return this; } public final String getPipelineDisplayName() { return pipelineDisplayName; } public final void setPipelineDisplayName(String pipelineDisplayName) { this.pipelineDisplayName = pipelineDisplayName; } @Override public final Builder pipelineDisplayName(String pipelineDisplayName) { this.pipelineDisplayName = pipelineDisplayName; return this; } public final String getPipelineDefinition() { return pipelineDefinition; } public final void setPipelineDefinition(String pipelineDefinition) { this.pipelineDefinition = pipelineDefinition; } @Override public final Builder pipelineDefinition(String pipelineDefinition) { this.pipelineDefinition = pipelineDefinition; return this; } public final PipelineDefinitionS3Location.Builder getPipelineDefinitionS3Location() { return pipelineDefinitionS3Location != null ? pipelineDefinitionS3Location.toBuilder() : null; } public final void setPipelineDefinitionS3Location(PipelineDefinitionS3Location.BuilderImpl pipelineDefinitionS3Location) { this.pipelineDefinitionS3Location = pipelineDefinitionS3Location != null ? pipelineDefinitionS3Location.build() : null; } @Override public final Builder pipelineDefinitionS3Location(PipelineDefinitionS3Location pipelineDefinitionS3Location) { this.pipelineDefinitionS3Location = pipelineDefinitionS3Location; return this; } public final String getPipelineDescription() { return pipelineDescription; } public final void setPipelineDescription(String pipelineDescription) { this.pipelineDescription = pipelineDescription; } @Override public final Builder pipelineDescription(String pipelineDescription) { this.pipelineDescription = pipelineDescription; return this; } public final String getRoleArn() { return roleArn; } public final void setRoleArn(String roleArn) { this.roleArn = roleArn; } @Override public final Builder roleArn(String roleArn) { this.roleArn = roleArn; return this; } public final ParallelismConfiguration.Builder getParallelismConfiguration() { return parallelismConfiguration != null ? parallelismConfiguration.toBuilder() : null; } public final void setParallelismConfiguration(ParallelismConfiguration.BuilderImpl parallelismConfiguration) { this.parallelismConfiguration = parallelismConfiguration != null ? parallelismConfiguration.build() : null; } @Override public final Builder parallelismConfiguration(ParallelismConfiguration parallelismConfiguration) { this.parallelismConfiguration = parallelismConfiguration; 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 UpdatePipelineRequest build() { return new UpdatePipelineRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy