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

software.amazon.awssdk.services.cleanroomsml.model.CollaborationTrainedModelSummary Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Clean Rooms ML module holds the client classes that are used for communicating with Clean Rooms ML.

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.cleanroomsml.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.core.traits.TimestampFormatTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Provides summary information about a trained model in a collaboration. *

*/ @Generated("software.amazon.awssdk:codegen") public final class CollaborationTrainedModelSummary implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField CREATE_TIME_FIELD = SdkField . builder(MarshallingType.INSTANT) .memberName("createTime") .getter(getter(CollaborationTrainedModelSummary::createTime)) .setter(setter(Builder::createTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createTime").build(), TimestampFormatTrait.create(TimestampFormatTrait.Format.ISO_8601)).build(); private static final SdkField UPDATE_TIME_FIELD = SdkField . builder(MarshallingType.INSTANT) .memberName("updateTime") .getter(getter(CollaborationTrainedModelSummary::updateTime)) .setter(setter(Builder::updateTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updateTime").build(), TimestampFormatTrait.create(TimestampFormatTrait.Format.ISO_8601)).build(); private static final SdkField TRAINED_MODEL_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("trainedModelArn").getter(getter(CollaborationTrainedModelSummary::trainedModelArn)) .setter(setter(Builder::trainedModelArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("trainedModelArn").build()).build(); private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name") .getter(getter(CollaborationTrainedModelSummary::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("description").getter(getter(CollaborationTrainedModelSummary::description)) .setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("description").build()).build(); private static final SdkField MEMBERSHIP_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("membershipIdentifier").getter(getter(CollaborationTrainedModelSummary::membershipIdentifier)) .setter(setter(Builder::membershipIdentifier)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("membershipIdentifier").build()) .build(); private static final SdkField COLLABORATION_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("collaborationIdentifier").getter(getter(CollaborationTrainedModelSummary::collaborationIdentifier)) .setter(setter(Builder::collaborationIdentifier)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("collaborationIdentifier").build()) .build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status") .getter(getter(CollaborationTrainedModelSummary::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build(); private static final SdkField CONFIGURED_MODEL_ALGORITHM_ASSOCIATION_ARN_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("configuredModelAlgorithmAssociationArn") .getter(getter(CollaborationTrainedModelSummary::configuredModelAlgorithmAssociationArn)) .setter(setter(Builder::configuredModelAlgorithmAssociationArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("configuredModelAlgorithmAssociationArn").build()).build(); private static final SdkField CREATOR_ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("creatorAccountId").getter(getter(CollaborationTrainedModelSummary::creatorAccountId)) .setter(setter(Builder::creatorAccountId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("creatorAccountId").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CREATE_TIME_FIELD, UPDATE_TIME_FIELD, TRAINED_MODEL_ARN_FIELD, NAME_FIELD, DESCRIPTION_FIELD, MEMBERSHIP_IDENTIFIER_FIELD, COLLABORATION_IDENTIFIER_FIELD, STATUS_FIELD, CONFIGURED_MODEL_ALGORITHM_ASSOCIATION_ARN_FIELD, CREATOR_ACCOUNT_ID_FIELD)); private static final Map> SDK_NAME_TO_FIELD = Collections .unmodifiableMap(new HashMap>() { { put("createTime", CREATE_TIME_FIELD); put("updateTime", UPDATE_TIME_FIELD); put("trainedModelArn", TRAINED_MODEL_ARN_FIELD); put("name", NAME_FIELD); put("description", DESCRIPTION_FIELD); put("membershipIdentifier", MEMBERSHIP_IDENTIFIER_FIELD); put("collaborationIdentifier", COLLABORATION_IDENTIFIER_FIELD); put("status", STATUS_FIELD); put("configuredModelAlgorithmAssociationArn", CONFIGURED_MODEL_ALGORITHM_ASSOCIATION_ARN_FIELD); put("creatorAccountId", CREATOR_ACCOUNT_ID_FIELD); } }); private static final long serialVersionUID = 1L; private final Instant createTime; private final Instant updateTime; private final String trainedModelArn; private final String name; private final String description; private final String membershipIdentifier; private final String collaborationIdentifier; private final String status; private final String configuredModelAlgorithmAssociationArn; private final String creatorAccountId; private CollaborationTrainedModelSummary(BuilderImpl builder) { this.createTime = builder.createTime; this.updateTime = builder.updateTime; this.trainedModelArn = builder.trainedModelArn; this.name = builder.name; this.description = builder.description; this.membershipIdentifier = builder.membershipIdentifier; this.collaborationIdentifier = builder.collaborationIdentifier; this.status = builder.status; this.configuredModelAlgorithmAssociationArn = builder.configuredModelAlgorithmAssociationArn; this.creatorAccountId = builder.creatorAccountId; } /** *

* The time at which the trained model was created. *

* * @return The time at which the trained model was created. */ public final Instant createTime() { return createTime; } /** *

* The most recent time at which the trained model was updated. *

* * @return The most recent time at which the trained model was updated. */ public final Instant updateTime() { return updateTime; } /** *

* The Amazon Resource Name (ARN) of the trained model. *

* * @return The Amazon Resource Name (ARN) of the trained model. */ public final String trainedModelArn() { return trainedModelArn; } /** *

* The name of the trained model. *

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

* The description of the trained model. *

* * @return The description of the trained model. */ public final String description() { return description; } /** *

* The membership ID of the member that created the trained model. *

* * @return The membership ID of the member that created the trained model. */ public final String membershipIdentifier() { return membershipIdentifier; } /** *

* The collaboration ID of the collaboration that contains the trained model. *

* * @return The collaboration ID of the collaboration that contains the trained model. */ public final String collaborationIdentifier() { return collaborationIdentifier; } /** *

* The status of the trained model. *

*

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

* * @return The status of the trained model. * @see TrainedModelStatus */ public final TrainedModelStatus status() { return TrainedModelStatus.fromValue(status); } /** *

* The status of the trained model. *

*

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

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

* The Amazon Resource Name (ARN) of the configured model algorithm association that is used for this trained model. *

* * @return The Amazon Resource Name (ARN) of the configured model algorithm association that is used for this * trained model. */ public final String configuredModelAlgorithmAssociationArn() { return configuredModelAlgorithmAssociationArn; } /** *

* The account ID of the member that created the trained model. *

* * @return The account ID of the member that created the trained model. */ public final String creatorAccountId() { return creatorAccountId; } @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(createTime()); hashCode = 31 * hashCode + Objects.hashCode(updateTime()); hashCode = 31 * hashCode + Objects.hashCode(trainedModelArn()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(membershipIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(collaborationIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(configuredModelAlgorithmAssociationArn()); hashCode = 31 * hashCode + Objects.hashCode(creatorAccountId()); 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 CollaborationTrainedModelSummary)) { return false; } CollaborationTrainedModelSummary other = (CollaborationTrainedModelSummary) obj; return Objects.equals(createTime(), other.createTime()) && Objects.equals(updateTime(), other.updateTime()) && Objects.equals(trainedModelArn(), other.trainedModelArn()) && Objects.equals(name(), other.name()) && Objects.equals(description(), other.description()) && Objects.equals(membershipIdentifier(), other.membershipIdentifier()) && Objects.equals(collaborationIdentifier(), other.collaborationIdentifier()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(configuredModelAlgorithmAssociationArn(), other.configuredModelAlgorithmAssociationArn()) && Objects.equals(creatorAccountId(), other.creatorAccountId()); } /** * 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("CollaborationTrainedModelSummary").add("CreateTime", createTime()) .add("UpdateTime", updateTime()).add("TrainedModelArn", trainedModelArn()).add("Name", name()) .add("Description", description()).add("MembershipIdentifier", membershipIdentifier()) .add("CollaborationIdentifier", collaborationIdentifier()).add("Status", statusAsString()) .add("ConfiguredModelAlgorithmAssociationArn", configuredModelAlgorithmAssociationArn()) .add("CreatorAccountId", creatorAccountId()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "createTime": return Optional.ofNullable(clazz.cast(createTime())); case "updateTime": return Optional.ofNullable(clazz.cast(updateTime())); case "trainedModelArn": return Optional.ofNullable(clazz.cast(trainedModelArn())); case "name": return Optional.ofNullable(clazz.cast(name())); case "description": return Optional.ofNullable(clazz.cast(description())); case "membershipIdentifier": return Optional.ofNullable(clazz.cast(membershipIdentifier())); case "collaborationIdentifier": return Optional.ofNullable(clazz.cast(collaborationIdentifier())); case "status": return Optional.ofNullable(clazz.cast(statusAsString())); case "configuredModelAlgorithmAssociationArn": return Optional.ofNullable(clazz.cast(configuredModelAlgorithmAssociationArn())); case "creatorAccountId": return Optional.ofNullable(clazz.cast(creatorAccountId())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((CollaborationTrainedModelSummary) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The time at which the trained model was created. *

* * @param createTime * The time at which the trained model was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createTime(Instant createTime); /** *

* The most recent time at which the trained model was updated. *

* * @param updateTime * The most recent time at which the trained model was updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder updateTime(Instant updateTime); /** *

* The Amazon Resource Name (ARN) of the trained model. *

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

* The name of the trained model. *

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

* The description of the trained model. *

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

* The membership ID of the member that created the trained model. *

* * @param membershipIdentifier * The membership ID of the member that created the trained model. * @return Returns a reference to this object so that method calls can be chained together. */ Builder membershipIdentifier(String membershipIdentifier); /** *

* The collaboration ID of the collaboration that contains the trained model. *

* * @param collaborationIdentifier * The collaboration ID of the collaboration that contains the trained model. * @return Returns a reference to this object so that method calls can be chained together. */ Builder collaborationIdentifier(String collaborationIdentifier); /** *

* The status of the trained model. *

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

* The status of the trained model. *

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

* The Amazon Resource Name (ARN) of the configured model algorithm association that is used for this trained * model. *

* * @param configuredModelAlgorithmAssociationArn * The Amazon Resource Name (ARN) of the configured model algorithm association that is used for this * trained model. * @return Returns a reference to this object so that method calls can be chained together. */ Builder configuredModelAlgorithmAssociationArn(String configuredModelAlgorithmAssociationArn); /** *

* The account ID of the member that created the trained model. *

* * @param creatorAccountId * The account ID of the member that created the trained model. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creatorAccountId(String creatorAccountId); } static final class BuilderImpl implements Builder { private Instant createTime; private Instant updateTime; private String trainedModelArn; private String name; private String description; private String membershipIdentifier; private String collaborationIdentifier; private String status; private String configuredModelAlgorithmAssociationArn; private String creatorAccountId; private BuilderImpl() { } private BuilderImpl(CollaborationTrainedModelSummary model) { createTime(model.createTime); updateTime(model.updateTime); trainedModelArn(model.trainedModelArn); name(model.name); description(model.description); membershipIdentifier(model.membershipIdentifier); collaborationIdentifier(model.collaborationIdentifier); status(model.status); configuredModelAlgorithmAssociationArn(model.configuredModelAlgorithmAssociationArn); creatorAccountId(model.creatorAccountId); } public final Instant getCreateTime() { return createTime; } public final void setCreateTime(Instant createTime) { this.createTime = createTime; } @Override public final Builder createTime(Instant createTime) { this.createTime = createTime; return this; } public final Instant getUpdateTime() { return updateTime; } public final void setUpdateTime(Instant updateTime) { this.updateTime = updateTime; } @Override public final Builder updateTime(Instant updateTime) { this.updateTime = updateTime; return this; } public final String getTrainedModelArn() { return trainedModelArn; } public final void setTrainedModelArn(String trainedModelArn) { this.trainedModelArn = trainedModelArn; } @Override public final Builder trainedModelArn(String trainedModelArn) { this.trainedModelArn = trainedModelArn; return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override public final Builder description(String description) { this.description = description; return this; } public final String getMembershipIdentifier() { return membershipIdentifier; } public final void setMembershipIdentifier(String membershipIdentifier) { this.membershipIdentifier = membershipIdentifier; } @Override public final Builder membershipIdentifier(String membershipIdentifier) { this.membershipIdentifier = membershipIdentifier; return this; } public final String getCollaborationIdentifier() { return collaborationIdentifier; } public final void setCollaborationIdentifier(String collaborationIdentifier) { this.collaborationIdentifier = collaborationIdentifier; } @Override public final Builder collaborationIdentifier(String collaborationIdentifier) { this.collaborationIdentifier = collaborationIdentifier; 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(TrainedModelStatus status) { this.status(status == null ? null : status.toString()); return this; } public final String getConfiguredModelAlgorithmAssociationArn() { return configuredModelAlgorithmAssociationArn; } public final void setConfiguredModelAlgorithmAssociationArn(String configuredModelAlgorithmAssociationArn) { this.configuredModelAlgorithmAssociationArn = configuredModelAlgorithmAssociationArn; } @Override public final Builder configuredModelAlgorithmAssociationArn(String configuredModelAlgorithmAssociationArn) { this.configuredModelAlgorithmAssociationArn = configuredModelAlgorithmAssociationArn; return this; } public final String getCreatorAccountId() { return creatorAccountId; } public final void setCreatorAccountId(String creatorAccountId) { this.creatorAccountId = creatorAccountId; } @Override public final Builder creatorAccountId(String creatorAccountId) { this.creatorAccountId = creatorAccountId; return this; } @Override public CollaborationTrainedModelSummary build() { return new CollaborationTrainedModelSummary(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy