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

software.amazon.awssdk.services.lookoutvision.model.ModelPackagingJobMetadata Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Lookout Vision module holds the client classes that are used for communicating with Lookout Vision.

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.lookoutvision.model;

import java.io.Serializable;
import java.time.Instant;
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.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;

/**
 * 

* Metadata for a model packaging job. For more information, see ListModelPackagingJobs. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ModelPackagingJobMetadata implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField JOB_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("JobName").getter(getter(ModelPackagingJobMetadata::jobName)).setter(setter(Builder::jobName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("JobName").build()).build(); private static final SdkField PROJECT_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ProjectName").getter(getter(ModelPackagingJobMetadata::projectName)) .setter(setter(Builder::projectName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProjectName").build()).build(); private static final SdkField MODEL_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ModelVersion").getter(getter(ModelPackagingJobMetadata::modelVersion)) .setter(setter(Builder::modelVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelVersion").build()).build(); private static final SdkField MODEL_PACKAGING_JOB_DESCRIPTION_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("ModelPackagingJobDescription") .getter(getter(ModelPackagingJobMetadata::modelPackagingJobDescription)) .setter(setter(Builder::modelPackagingJobDescription)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelPackagingJobDescription") .build()).build(); private static final SdkField MODEL_PACKAGING_METHOD_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ModelPackagingMethod").getter(getter(ModelPackagingJobMetadata::modelPackagingMethod)) .setter(setter(Builder::modelPackagingMethod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelPackagingMethod").build()) .build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Status") .getter(getter(ModelPackagingJobMetadata::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(ModelPackagingJobMetadata::statusMessage)) .setter(setter(Builder::statusMessage)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StatusMessage").build()).build(); private static final SdkField CREATION_TIMESTAMP_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreationTimestamp").getter(getter(ModelPackagingJobMetadata::creationTimestamp)) .setter(setter(Builder::creationTimestamp)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTimestamp").build()).build(); private static final SdkField LAST_UPDATED_TIMESTAMP_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("LastUpdatedTimestamp").getter(getter(ModelPackagingJobMetadata::lastUpdatedTimestamp)) .setter(setter(Builder::lastUpdatedTimestamp)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastUpdatedTimestamp").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(JOB_NAME_FIELD, PROJECT_NAME_FIELD, MODEL_VERSION_FIELD, MODEL_PACKAGING_JOB_DESCRIPTION_FIELD, MODEL_PACKAGING_METHOD_FIELD, STATUS_FIELD, STATUS_MESSAGE_FIELD, CREATION_TIMESTAMP_FIELD, LAST_UPDATED_TIMESTAMP_FIELD)); private static final long serialVersionUID = 1L; private final String jobName; private final String projectName; private final String modelVersion; private final String modelPackagingJobDescription; private final String modelPackagingMethod; private final String status; private final String statusMessage; private final Instant creationTimestamp; private final Instant lastUpdatedTimestamp; private ModelPackagingJobMetadata(BuilderImpl builder) { this.jobName = builder.jobName; this.projectName = builder.projectName; this.modelVersion = builder.modelVersion; this.modelPackagingJobDescription = builder.modelPackagingJobDescription; this.modelPackagingMethod = builder.modelPackagingMethod; this.status = builder.status; this.statusMessage = builder.statusMessage; this.creationTimestamp = builder.creationTimestamp; this.lastUpdatedTimestamp = builder.lastUpdatedTimestamp; } /** *

* The name of the model packaging job. *

* * @return The name of the model packaging job. */ public final String jobName() { return jobName; } /** *

* The project that contains the model that is in the model package. *

* * @return The project that contains the model that is in the model package. */ public final String projectName() { return projectName; } /** *

* The version of the model that is in the model package. *

* * @return The version of the model that is in the model package. */ public final String modelVersion() { return modelVersion; } /** *

* The description for the model packaging job. *

* * @return The description for the model packaging job. */ public final String modelPackagingJobDescription() { return modelPackagingJobDescription; } /** *

* The AWS service used to package the job. Currently Lookout for Vision can package jobs with AWS IoT Greengrass. *

* * @return The AWS service used to package the job. Currently Lookout for Vision can package jobs with AWS IoT * Greengrass. */ public final String modelPackagingMethod() { return modelPackagingMethod; } /** *

* The status of the model packaging job. *

*

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

* * @return The status of the model packaging job. * @see ModelPackagingJobStatus */ public final ModelPackagingJobStatus status() { return ModelPackagingJobStatus.fromValue(status); } /** *

* The status of the model packaging job. *

*

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

* * @return The status of the model packaging job. * @see ModelPackagingJobStatus */ public final String statusAsString() { return status; } /** *

* The status message for the model packaging job. *

* * @return The status message for the model packaging job. */ public final String statusMessage() { return statusMessage; } /** *

* The Unix timestamp for the time and date that the model packaging job was created. *

* * @return The Unix timestamp for the time and date that the model packaging job was created. */ public final Instant creationTimestamp() { return creationTimestamp; } /** *

* The Unix timestamp for the time and date that the model packaging job was last updated. *

* * @return The Unix timestamp for the time and date that the model packaging job was last updated. */ public final Instant lastUpdatedTimestamp() { return lastUpdatedTimestamp; } @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(jobName()); hashCode = 31 * hashCode + Objects.hashCode(projectName()); hashCode = 31 * hashCode + Objects.hashCode(modelVersion()); hashCode = 31 * hashCode + Objects.hashCode(modelPackagingJobDescription()); hashCode = 31 * hashCode + Objects.hashCode(modelPackagingMethod()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(statusMessage()); hashCode = 31 * hashCode + Objects.hashCode(creationTimestamp()); hashCode = 31 * hashCode + Objects.hashCode(lastUpdatedTimestamp()); 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 ModelPackagingJobMetadata)) { return false; } ModelPackagingJobMetadata other = (ModelPackagingJobMetadata) obj; return Objects.equals(jobName(), other.jobName()) && Objects.equals(projectName(), other.projectName()) && Objects.equals(modelVersion(), other.modelVersion()) && Objects.equals(modelPackagingJobDescription(), other.modelPackagingJobDescription()) && Objects.equals(modelPackagingMethod(), other.modelPackagingMethod()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(statusMessage(), other.statusMessage()) && Objects.equals(creationTimestamp(), other.creationTimestamp()) && Objects.equals(lastUpdatedTimestamp(), other.lastUpdatedTimestamp()); } /** * 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("ModelPackagingJobMetadata").add("JobName", jobName()).add("ProjectName", projectName()) .add("ModelVersion", modelVersion()).add("ModelPackagingJobDescription", modelPackagingJobDescription()) .add("ModelPackagingMethod", modelPackagingMethod()).add("Status", statusAsString()) .add("StatusMessage", statusMessage()).add("CreationTimestamp", creationTimestamp()) .add("LastUpdatedTimestamp", lastUpdatedTimestamp()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "JobName": return Optional.ofNullable(clazz.cast(jobName())); case "ProjectName": return Optional.ofNullable(clazz.cast(projectName())); case "ModelVersion": return Optional.ofNullable(clazz.cast(modelVersion())); case "ModelPackagingJobDescription": return Optional.ofNullable(clazz.cast(modelPackagingJobDescription())); case "ModelPackagingMethod": return Optional.ofNullable(clazz.cast(modelPackagingMethod())); case "Status": return Optional.ofNullable(clazz.cast(statusAsString())); case "StatusMessage": return Optional.ofNullable(clazz.cast(statusMessage())); case "CreationTimestamp": return Optional.ofNullable(clazz.cast(creationTimestamp())); case "LastUpdatedTimestamp": return Optional.ofNullable(clazz.cast(lastUpdatedTimestamp())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ModelPackagingJobMetadata) 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 model packaging job. *

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

* The project that contains the model that is in the model package. *

* * @param projectName * The project that contains the model that is in the model package. * @return Returns a reference to this object so that method calls can be chained together. */ Builder projectName(String projectName); /** *

* The version of the model that is in the model package. *

* * @param modelVersion * The version of the model that is in the model package. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelVersion(String modelVersion); /** *

* The description for the model packaging job. *

* * @param modelPackagingJobDescription * The description for the model packaging job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelPackagingJobDescription(String modelPackagingJobDescription); /** *

* The AWS service used to package the job. Currently Lookout for Vision can package jobs with AWS IoT * Greengrass. *

* * @param modelPackagingMethod * The AWS service used to package the job. Currently Lookout for Vision can package jobs with AWS IoT * Greengrass. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelPackagingMethod(String modelPackagingMethod); /** *

* The status of the model packaging job. *

* * @param status * The status of the model packaging job. * @see ModelPackagingJobStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ModelPackagingJobStatus */ Builder status(String status); /** *

* The status of the model packaging job. *

* * @param status * The status of the model packaging job. * @see ModelPackagingJobStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ModelPackagingJobStatus */ Builder status(ModelPackagingJobStatus status); /** *

* The status message for the model packaging job. *

* * @param statusMessage * The status message for the model packaging job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder statusMessage(String statusMessage); /** *

* The Unix timestamp for the time and date that the model packaging job was created. *

* * @param creationTimestamp * The Unix timestamp for the time and date that the model packaging job was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creationTimestamp(Instant creationTimestamp); /** *

* The Unix timestamp for the time and date that the model packaging job was last updated. *

* * @param lastUpdatedTimestamp * The Unix timestamp for the time and date that the model packaging job was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastUpdatedTimestamp(Instant lastUpdatedTimestamp); } static final class BuilderImpl implements Builder { private String jobName; private String projectName; private String modelVersion; private String modelPackagingJobDescription; private String modelPackagingMethod; private String status; private String statusMessage; private Instant creationTimestamp; private Instant lastUpdatedTimestamp; private BuilderImpl() { } private BuilderImpl(ModelPackagingJobMetadata model) { jobName(model.jobName); projectName(model.projectName); modelVersion(model.modelVersion); modelPackagingJobDescription(model.modelPackagingJobDescription); modelPackagingMethod(model.modelPackagingMethod); status(model.status); statusMessage(model.statusMessage); creationTimestamp(model.creationTimestamp); lastUpdatedTimestamp(model.lastUpdatedTimestamp); } public final String getJobName() { return jobName; } public final void setJobName(String jobName) { this.jobName = jobName; } @Override public final Builder jobName(String jobName) { this.jobName = jobName; return this; } public final String getProjectName() { return projectName; } public final void setProjectName(String projectName) { this.projectName = projectName; } @Override public final Builder projectName(String projectName) { this.projectName = projectName; return this; } public final String getModelVersion() { return modelVersion; } public final void setModelVersion(String modelVersion) { this.modelVersion = modelVersion; } @Override public final Builder modelVersion(String modelVersion) { this.modelVersion = modelVersion; return this; } public final String getModelPackagingJobDescription() { return modelPackagingJobDescription; } public final void setModelPackagingJobDescription(String modelPackagingJobDescription) { this.modelPackagingJobDescription = modelPackagingJobDescription; } @Override public final Builder modelPackagingJobDescription(String modelPackagingJobDescription) { this.modelPackagingJobDescription = modelPackagingJobDescription; return this; } public final String getModelPackagingMethod() { return modelPackagingMethod; } public final void setModelPackagingMethod(String modelPackagingMethod) { this.modelPackagingMethod = modelPackagingMethod; } @Override public final Builder modelPackagingMethod(String modelPackagingMethod) { this.modelPackagingMethod = modelPackagingMethod; return this; } 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(ModelPackagingJobStatus 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 getCreationTimestamp() { return creationTimestamp; } public final void setCreationTimestamp(Instant creationTimestamp) { this.creationTimestamp = creationTimestamp; } @Override public final Builder creationTimestamp(Instant creationTimestamp) { this.creationTimestamp = creationTimestamp; return this; } public final Instant getLastUpdatedTimestamp() { return lastUpdatedTimestamp; } public final void setLastUpdatedTimestamp(Instant lastUpdatedTimestamp) { this.lastUpdatedTimestamp = lastUpdatedTimestamp; } @Override public final Builder lastUpdatedTimestamp(Instant lastUpdatedTimestamp) { this.lastUpdatedTimestamp = lastUpdatedTimestamp; return this; } @Override public ModelPackagingJobMetadata build() { return new ModelPackagingJobMetadata(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy