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

software.amazon.awssdk.services.sagemaker.model.FlowDefinitionSummary 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.30.1
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.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
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.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;

/**
 * 

* Contains summary information about the flow definition. *

*/ @Generated("software.amazon.awssdk:codegen") public final class FlowDefinitionSummary implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField FLOW_DEFINITION_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FlowDefinitionName").getter(getter(FlowDefinitionSummary::flowDefinitionName)) .setter(setter(Builder::flowDefinitionName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FlowDefinitionName").build()) .build(); private static final SdkField FLOW_DEFINITION_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FlowDefinitionArn").getter(getter(FlowDefinitionSummary::flowDefinitionArn)) .setter(setter(Builder::flowDefinitionArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FlowDefinitionArn").build()).build(); private static final SdkField FLOW_DEFINITION_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FlowDefinitionStatus").getter(getter(FlowDefinitionSummary::flowDefinitionStatusAsString)) .setter(setter(Builder::flowDefinitionStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FlowDefinitionStatus").build()) .build(); private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreationTime").getter(getter(FlowDefinitionSummary::creationTime)).setter(setter(Builder::creationTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build(); private static final SdkField FAILURE_REASON_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FailureReason").getter(getter(FlowDefinitionSummary::failureReason)) .setter(setter(Builder::failureReason)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FailureReason").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(FLOW_DEFINITION_NAME_FIELD, FLOW_DEFINITION_ARN_FIELD, FLOW_DEFINITION_STATUS_FIELD, CREATION_TIME_FIELD, FAILURE_REASON_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final String flowDefinitionName; private final String flowDefinitionArn; private final String flowDefinitionStatus; private final Instant creationTime; private final String failureReason; private FlowDefinitionSummary(BuilderImpl builder) { this.flowDefinitionName = builder.flowDefinitionName; this.flowDefinitionArn = builder.flowDefinitionArn; this.flowDefinitionStatus = builder.flowDefinitionStatus; this.creationTime = builder.creationTime; this.failureReason = builder.failureReason; } /** *

* The name of the flow definition. *

* * @return The name of the flow definition. */ public final String flowDefinitionName() { return flowDefinitionName; } /** *

* The Amazon Resource Name (ARN) of the flow definition. *

* * @return The Amazon Resource Name (ARN) of the flow definition. */ public final String flowDefinitionArn() { return flowDefinitionArn; } /** *

* The status of the flow definition. Valid values: *

*

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

* * @return The status of the flow definition. Valid values: * @see FlowDefinitionStatus */ public final FlowDefinitionStatus flowDefinitionStatus() { return FlowDefinitionStatus.fromValue(flowDefinitionStatus); } /** *

* The status of the flow definition. Valid values: *

*

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

* * @return The status of the flow definition. Valid values: * @see FlowDefinitionStatus */ public final String flowDefinitionStatusAsString() { return flowDefinitionStatus; } /** *

* The timestamp when SageMaker created the flow definition. *

* * @return The timestamp when SageMaker created the flow definition. */ public final Instant creationTime() { return creationTime; } /** *

* The reason why the flow definition creation failed. A failure reason is returned only when the flow definition * status is Failed. *

* * @return The reason why the flow definition creation failed. A failure reason is returned only when the flow * definition status is Failed. */ public final String failureReason() { return failureReason; } @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(flowDefinitionName()); hashCode = 31 * hashCode + Objects.hashCode(flowDefinitionArn()); hashCode = 31 * hashCode + Objects.hashCode(flowDefinitionStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(creationTime()); hashCode = 31 * hashCode + Objects.hashCode(failureReason()); 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 FlowDefinitionSummary)) { return false; } FlowDefinitionSummary other = (FlowDefinitionSummary) obj; return Objects.equals(flowDefinitionName(), other.flowDefinitionName()) && Objects.equals(flowDefinitionArn(), other.flowDefinitionArn()) && Objects.equals(flowDefinitionStatusAsString(), other.flowDefinitionStatusAsString()) && Objects.equals(creationTime(), other.creationTime()) && Objects.equals(failureReason(), other.failureReason()); } /** * 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("FlowDefinitionSummary").add("FlowDefinitionName", flowDefinitionName()) .add("FlowDefinitionArn", flowDefinitionArn()).add("FlowDefinitionStatus", flowDefinitionStatusAsString()) .add("CreationTime", creationTime()).add("FailureReason", failureReason()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "FlowDefinitionName": return Optional.ofNullable(clazz.cast(flowDefinitionName())); case "FlowDefinitionArn": return Optional.ofNullable(clazz.cast(flowDefinitionArn())); case "FlowDefinitionStatus": return Optional.ofNullable(clazz.cast(flowDefinitionStatusAsString())); case "CreationTime": return Optional.ofNullable(clazz.cast(creationTime())); case "FailureReason": return Optional.ofNullable(clazz.cast(failureReason())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Map> memberNameToFieldInitializer() { Map> map = new HashMap<>(); map.put("FlowDefinitionName", FLOW_DEFINITION_NAME_FIELD); map.put("FlowDefinitionArn", FLOW_DEFINITION_ARN_FIELD); map.put("FlowDefinitionStatus", FLOW_DEFINITION_STATUS_FIELD); map.put("CreationTime", CREATION_TIME_FIELD); map.put("FailureReason", FAILURE_REASON_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((FlowDefinitionSummary) 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 flow definition. *

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

* The Amazon Resource Name (ARN) of the flow definition. *

* * @param flowDefinitionArn * The Amazon Resource Name (ARN) of the flow definition. * @return Returns a reference to this object so that method calls can be chained together. */ Builder flowDefinitionArn(String flowDefinitionArn); /** *

* The status of the flow definition. Valid values: *

* * @param flowDefinitionStatus * The status of the flow definition. Valid values: * @see FlowDefinitionStatus * @return Returns a reference to this object so that method calls can be chained together. * @see FlowDefinitionStatus */ Builder flowDefinitionStatus(String flowDefinitionStatus); /** *

* The status of the flow definition. Valid values: *

* * @param flowDefinitionStatus * The status of the flow definition. Valid values: * @see FlowDefinitionStatus * @return Returns a reference to this object so that method calls can be chained together. * @see FlowDefinitionStatus */ Builder flowDefinitionStatus(FlowDefinitionStatus flowDefinitionStatus); /** *

* The timestamp when SageMaker created the flow definition. *

* * @param creationTime * The timestamp when SageMaker created the flow definition. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creationTime(Instant creationTime); /** *

* The reason why the flow definition creation failed. A failure reason is returned only when the flow * definition status is Failed. *

* * @param failureReason * The reason why the flow definition creation failed. A failure reason is returned only when the flow * definition status is Failed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder failureReason(String failureReason); } static final class BuilderImpl implements Builder { private String flowDefinitionName; private String flowDefinitionArn; private String flowDefinitionStatus; private Instant creationTime; private String failureReason; private BuilderImpl() { } private BuilderImpl(FlowDefinitionSummary model) { flowDefinitionName(model.flowDefinitionName); flowDefinitionArn(model.flowDefinitionArn); flowDefinitionStatus(model.flowDefinitionStatus); creationTime(model.creationTime); failureReason(model.failureReason); } public final String getFlowDefinitionName() { return flowDefinitionName; } public final void setFlowDefinitionName(String flowDefinitionName) { this.flowDefinitionName = flowDefinitionName; } @Override public final Builder flowDefinitionName(String flowDefinitionName) { this.flowDefinitionName = flowDefinitionName; return this; } public final String getFlowDefinitionArn() { return flowDefinitionArn; } public final void setFlowDefinitionArn(String flowDefinitionArn) { this.flowDefinitionArn = flowDefinitionArn; } @Override public final Builder flowDefinitionArn(String flowDefinitionArn) { this.flowDefinitionArn = flowDefinitionArn; return this; } public final String getFlowDefinitionStatus() { return flowDefinitionStatus; } public final void setFlowDefinitionStatus(String flowDefinitionStatus) { this.flowDefinitionStatus = flowDefinitionStatus; } @Override public final Builder flowDefinitionStatus(String flowDefinitionStatus) { this.flowDefinitionStatus = flowDefinitionStatus; return this; } @Override public final Builder flowDefinitionStatus(FlowDefinitionStatus flowDefinitionStatus) { this.flowDefinitionStatus(flowDefinitionStatus == null ? null : flowDefinitionStatus.toString()); return this; } public final Instant getCreationTime() { return creationTime; } public final void setCreationTime(Instant creationTime) { this.creationTime = creationTime; } @Override public final Builder creationTime(Instant creationTime) { this.creationTime = creationTime; return this; } public final String getFailureReason() { return failureReason; } public final void setFailureReason(String failureReason) { this.failureReason = failureReason; } @Override public final Builder failureReason(String failureReason) { this.failureReason = failureReason; return this; } @Override public FlowDefinitionSummary build() { return new FlowDefinitionSummary(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy