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

software.amazon.awssdk.services.sagemaker.model.ProductionVariantStatus 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.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;

/**
 * 

* Describes the status of the production variant. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ProductionVariantStatus implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Status") .getter(getter(ProductionVariantStatus::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build(); private static final SdkField STATUS_MESSAGE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StatusMessage").getter(getter(ProductionVariantStatus::statusMessage)) .setter(setter(Builder::statusMessage)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StatusMessage").build()).build(); private static final SdkField START_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("StartTime").getter(getter(ProductionVariantStatus::startTime)).setter(setter(Builder::startTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StartTime").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(STATUS_FIELD, STATUS_MESSAGE_FIELD, START_TIME_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final String status; private final String statusMessage; private final Instant startTime; private ProductionVariantStatus(BuilderImpl builder) { this.status = builder.status; this.statusMessage = builder.statusMessage; this.startTime = builder.startTime; } /** *

* The endpoint variant status which describes the current deployment stage status or operational status. *

*
    *
  • *

    * Creating: Creating inference resources for the production variant. *

    *
  • *
  • *

    * Deleting: Terminating inference resources for the production variant. *

    *
  • *
  • *

    * Updating: Updating capacity for the production variant. *

    *
  • *
  • *

    * ActivatingTraffic: Turning on traffic for the production variant. *

    *
  • *
  • *

    * Baking: Waiting period to monitor the CloudWatch alarms in the automatic rollback configuration. *

    *
  • *
*

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

* * @return The endpoint variant status which describes the current deployment stage status or operational * status.

*
    *
  • *

    * Creating: Creating inference resources for the production variant. *

    *
  • *
  • *

    * Deleting: Terminating inference resources for the production variant. *

    *
  • *
  • *

    * Updating: Updating capacity for the production variant. *

    *
  • *
  • *

    * ActivatingTraffic: Turning on traffic for the production variant. *

    *
  • *
  • *

    * Baking: Waiting period to monitor the CloudWatch alarms in the automatic rollback * configuration. *

    *
  • * @see VariantStatus */ public final VariantStatus status() { return VariantStatus.fromValue(status); } /** *

    * The endpoint variant status which describes the current deployment stage status or operational status. *

    *
      *
    • *

      * Creating: Creating inference resources for the production variant. *

      *
    • *
    • *

      * Deleting: Terminating inference resources for the production variant. *

      *
    • *
    • *

      * Updating: Updating capacity for the production variant. *

      *
    • *
    • *

      * ActivatingTraffic: Turning on traffic for the production variant. *

      *
    • *
    • *

      * Baking: Waiting period to monitor the CloudWatch alarms in the automatic rollback configuration. *

      *
    • *
    *

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

    * * @return The endpoint variant status which describes the current deployment stage status or operational * status.

    *
      *
    • *

      * Creating: Creating inference resources for the production variant. *

      *
    • *
    • *

      * Deleting: Terminating inference resources for the production variant. *

      *
    • *
    • *

      * Updating: Updating capacity for the production variant. *

      *
    • *
    • *

      * ActivatingTraffic: Turning on traffic for the production variant. *

      *
    • *
    • *

      * Baking: Waiting period to monitor the CloudWatch alarms in the automatic rollback * configuration. *

      *
    • * @see VariantStatus */ public final String statusAsString() { return status; } /** *

      * A message that describes the status of the production variant. *

      * * @return A message that describes the status of the production variant. */ public final String statusMessage() { return statusMessage; } /** *

      * The start time of the current status change. *

      * * @return The start time of the current status change. */ public final Instant startTime() { return startTime; } @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(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(statusMessage()); hashCode = 31 * hashCode + Objects.hashCode(startTime()); 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 ProductionVariantStatus)) { return false; } ProductionVariantStatus other = (ProductionVariantStatus) obj; return Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(statusMessage(), other.statusMessage()) && Objects.equals(startTime(), other.startTime()); } /** * 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("ProductionVariantStatus").add("Status", statusAsString()).add("StatusMessage", statusMessage()) .add("StartTime", startTime()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Status": return Optional.ofNullable(clazz.cast(statusAsString())); case "StatusMessage": return Optional.ofNullable(clazz.cast(statusMessage())); case "StartTime": return Optional.ofNullable(clazz.cast(startTime())); 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("Status", STATUS_FIELD); map.put("StatusMessage", STATUS_MESSAGE_FIELD); map.put("StartTime", START_TIME_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((ProductionVariantStatus) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

      * The endpoint variant status which describes the current deployment stage status or operational status. *

      *
        *
      • *

        * Creating: Creating inference resources for the production variant. *

        *
      • *
      • *

        * Deleting: Terminating inference resources for the production variant. *

        *
      • *
      • *

        * Updating: Updating capacity for the production variant. *

        *
      • *
      • *

        * ActivatingTraffic: Turning on traffic for the production variant. *

        *
      • *
      • *

        * Baking: Waiting period to monitor the CloudWatch alarms in the automatic rollback configuration. *

        *
      • *
      * * @param status * The endpoint variant status which describes the current deployment stage status or operational * status.

      *
        *
      • *

        * Creating: Creating inference resources for the production variant. *

        *
      • *
      • *

        * Deleting: Terminating inference resources for the production variant. *

        *
      • *
      • *

        * Updating: Updating capacity for the production variant. *

        *
      • *
      • *

        * ActivatingTraffic: Turning on traffic for the production variant. *

        *
      • *
      • *

        * Baking: Waiting period to monitor the CloudWatch alarms in the automatic rollback * configuration. *

        *
      • * @see VariantStatus * @return Returns a reference to this object so that method calls can be chained together. * @see VariantStatus */ Builder status(String status); /** *

        * The endpoint variant status which describes the current deployment stage status or operational status. *

        *
          *
        • *

          * Creating: Creating inference resources for the production variant. *

          *
        • *
        • *

          * Deleting: Terminating inference resources for the production variant. *

          *
        • *
        • *

          * Updating: Updating capacity for the production variant. *

          *
        • *
        • *

          * ActivatingTraffic: Turning on traffic for the production variant. *

          *
        • *
        • *

          * Baking: Waiting period to monitor the CloudWatch alarms in the automatic rollback configuration. *

          *
        • *
        * * @param status * The endpoint variant status which describes the current deployment stage status or operational * status.

        *
          *
        • *

          * Creating: Creating inference resources for the production variant. *

          *
        • *
        • *

          * Deleting: Terminating inference resources for the production variant. *

          *
        • *
        • *

          * Updating: Updating capacity for the production variant. *

          *
        • *
        • *

          * ActivatingTraffic: Turning on traffic for the production variant. *

          *
        • *
        • *

          * Baking: Waiting period to monitor the CloudWatch alarms in the automatic rollback * configuration. *

          *
        • * @see VariantStatus * @return Returns a reference to this object so that method calls can be chained together. * @see VariantStatus */ Builder status(VariantStatus status); /** *

          * A message that describes the status of the production variant. *

          * * @param statusMessage * A message that describes the status of the production variant. * @return Returns a reference to this object so that method calls can be chained together. */ Builder statusMessage(String statusMessage); /** *

          * The start time of the current status change. *

          * * @param startTime * The start time of the current status change. * @return Returns a reference to this object so that method calls can be chained together. */ Builder startTime(Instant startTime); } static final class BuilderImpl implements Builder { private String status; private String statusMessage; private Instant startTime; private BuilderImpl() { } private BuilderImpl(ProductionVariantStatus model) { status(model.status); statusMessage(model.statusMessage); startTime(model.startTime); } public final String getStatus() { return status; } public final void setStatus(String status) { this.status = status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(VariantStatus status) { this.status(status == null ? null : status.toString()); return this; } public final String getStatusMessage() { return statusMessage; } public final void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } @Override public final Builder statusMessage(String statusMessage) { this.statusMessage = statusMessage; return this; } public final Instant getStartTime() { return startTime; } public final void setStartTime(Instant startTime) { this.startTime = startTime; } @Override public final Builder startTime(Instant startTime) { this.startTime = startTime; return this; } @Override public ProductionVariantStatus build() { return new ProductionVariantStatus(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy