Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.personalize.model.Recommender Maven / Gradle / Ivy
/*
* 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.personalize.model;
import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
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.Consumer;
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.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Describes a recommendation generator for a Domain dataset group. You create a recommender in a Domain dataset group
* for a specific domain use case (domain recipe), and specify the recommender in a GetRecommendations
* request.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class Recommender implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField RECOMMENDER_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("recommenderArn").getter(getter(Recommender::recommenderArn)).setter(setter(Builder::recommenderArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("recommenderArn").build()).build();
private static final SdkField DATASET_GROUP_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("datasetGroupArn").getter(getter(Recommender::datasetGroupArn)).setter(setter(Builder::datasetGroupArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("datasetGroupArn").build()).build();
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
.getter(getter(Recommender::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();
private static final SdkField RECIPE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("recipeArn").getter(getter(Recommender::recipeArn)).setter(setter(Builder::recipeArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("recipeArn").build()).build();
private static final SdkField RECOMMENDER_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("recommenderConfig")
.getter(getter(Recommender::recommenderConfig)).setter(setter(Builder::recommenderConfig))
.constructor(RecommenderConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("recommenderConfig").build()).build();
private static final SdkField CREATION_DATE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("creationDateTime").getter(getter(Recommender::creationDateTime))
.setter(setter(Builder::creationDateTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("creationDateTime").build()).build();
private static final SdkField LAST_UPDATED_DATE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("lastUpdatedDateTime").getter(getter(Recommender::lastUpdatedDateTime))
.setter(setter(Builder::lastUpdatedDateTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lastUpdatedDateTime").build())
.build();
private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status")
.getter(getter(Recommender::status)).setter(setter(Builder::status))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build();
private static final SdkField FAILURE_REASON_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("failureReason").getter(getter(Recommender::failureReason)).setter(setter(Builder::failureReason))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("failureReason").build()).build();
private static final SdkField LATEST_RECOMMENDER_UPDATE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("latestRecommenderUpdate")
.getter(getter(Recommender::latestRecommenderUpdate)).setter(setter(Builder::latestRecommenderUpdate))
.constructor(RecommenderUpdateSummary::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("latestRecommenderUpdate").build())
.build();
private static final SdkField> MODEL_METRICS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("modelMetrics")
.getter(getter(Recommender::modelMetrics))
.setter(setter(Builder::modelMetrics))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("modelMetrics").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.DOUBLE)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(RECOMMENDER_ARN_FIELD,
DATASET_GROUP_ARN_FIELD, NAME_FIELD, RECIPE_ARN_FIELD, RECOMMENDER_CONFIG_FIELD, CREATION_DATE_TIME_FIELD,
LAST_UPDATED_DATE_TIME_FIELD, STATUS_FIELD, FAILURE_REASON_FIELD, LATEST_RECOMMENDER_UPDATE_FIELD,
MODEL_METRICS_FIELD));
private static final long serialVersionUID = 1L;
private final String recommenderArn;
private final String datasetGroupArn;
private final String name;
private final String recipeArn;
private final RecommenderConfig recommenderConfig;
private final Instant creationDateTime;
private final Instant lastUpdatedDateTime;
private final String status;
private final String failureReason;
private final RecommenderUpdateSummary latestRecommenderUpdate;
private final Map modelMetrics;
private Recommender(BuilderImpl builder) {
this.recommenderArn = builder.recommenderArn;
this.datasetGroupArn = builder.datasetGroupArn;
this.name = builder.name;
this.recipeArn = builder.recipeArn;
this.recommenderConfig = builder.recommenderConfig;
this.creationDateTime = builder.creationDateTime;
this.lastUpdatedDateTime = builder.lastUpdatedDateTime;
this.status = builder.status;
this.failureReason = builder.failureReason;
this.latestRecommenderUpdate = builder.latestRecommenderUpdate;
this.modelMetrics = builder.modelMetrics;
}
/**
*
* The Amazon Resource Name (ARN) of the recommender.
*
*
* @return The Amazon Resource Name (ARN) of the recommender.
*/
public final String recommenderArn() {
return recommenderArn;
}
/**
*
* The Amazon Resource Name (ARN) of the Domain dataset group that contains the recommender.
*
*
* @return The Amazon Resource Name (ARN) of the Domain dataset group that contains the recommender.
*/
public final String datasetGroupArn() {
return datasetGroupArn;
}
/**
*
* The name of the recommender.
*
*
* @return The name of the recommender.
*/
public final String name() {
return name;
}
/**
*
* The Amazon Resource Name (ARN) of the recipe (Domain dataset group use case) that the recommender was created
* for.
*
*
* @return The Amazon Resource Name (ARN) of the recipe (Domain dataset group use case) that the recommender was
* created for.
*/
public final String recipeArn() {
return recipeArn;
}
/**
*
* The configuration details of the recommender.
*
*
* @return The configuration details of the recommender.
*/
public final RecommenderConfig recommenderConfig() {
return recommenderConfig;
}
/**
*
* The date and time (in Unix format) that the recommender was created.
*
*
* @return The date and time (in Unix format) that the recommender was created.
*/
public final Instant creationDateTime() {
return creationDateTime;
}
/**
*
* The date and time (in Unix format) that the recommender was last updated.
*
*
* @return The date and time (in Unix format) that the recommender was last updated.
*/
public final Instant lastUpdatedDateTime() {
return lastUpdatedDateTime;
}
/**
*
* The status of the recommender.
*
*
* A recommender can be in one of the following states:
*
*
*
*
* CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
*
*
*
*
* STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE
*
*
*
*
* DELETE PENDING > DELETE IN_PROGRESS
*
*
*
*
* @return The status of the recommender.
*
* A recommender can be in one of the following states:
*
*
*
*
* CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
*
*
*
*
* STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE
*
*
*
*
* DELETE PENDING > DELETE IN_PROGRESS
*
*
*/
public final String status() {
return status;
}
/**
*
* If a recommender fails, the reason behind the failure.
*
*
* @return If a recommender fails, the reason behind the failure.
*/
public final String failureReason() {
return failureReason;
}
/**
*
* Provides a summary of the latest updates to the recommender.
*
*
* @return Provides a summary of the latest updates to the recommender.
*/
public final RecommenderUpdateSummary latestRecommenderUpdate() {
return latestRecommenderUpdate;
}
/**
* For responses, this returns true if the service returned a value for the ModelMetrics property. This DOES NOT
* check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasModelMetrics() {
return modelMetrics != null && !(modelMetrics instanceof SdkAutoConstructMap);
}
/**
*
* Provides evaluation metrics that help you determine the performance of a recommender. For more information, see
* Evaluating a
* recommender .
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasModelMetrics} method.
*
*
* @return Provides evaluation metrics that help you determine the performance of a recommender. For more
* information, see Evaluating a
* recommender .
*/
public final Map modelMetrics() {
return modelMetrics;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(recommenderArn());
hashCode = 31 * hashCode + Objects.hashCode(datasetGroupArn());
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(recipeArn());
hashCode = 31 * hashCode + Objects.hashCode(recommenderConfig());
hashCode = 31 * hashCode + Objects.hashCode(creationDateTime());
hashCode = 31 * hashCode + Objects.hashCode(lastUpdatedDateTime());
hashCode = 31 * hashCode + Objects.hashCode(status());
hashCode = 31 * hashCode + Objects.hashCode(failureReason());
hashCode = 31 * hashCode + Objects.hashCode(latestRecommenderUpdate());
hashCode = 31 * hashCode + Objects.hashCode(hasModelMetrics() ? modelMetrics() : null);
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 Recommender)) {
return false;
}
Recommender other = (Recommender) obj;
return Objects.equals(recommenderArn(), other.recommenderArn())
&& Objects.equals(datasetGroupArn(), other.datasetGroupArn()) && Objects.equals(name(), other.name())
&& Objects.equals(recipeArn(), other.recipeArn())
&& Objects.equals(recommenderConfig(), other.recommenderConfig())
&& Objects.equals(creationDateTime(), other.creationDateTime())
&& Objects.equals(lastUpdatedDateTime(), other.lastUpdatedDateTime()) && Objects.equals(status(), other.status())
&& Objects.equals(failureReason(), other.failureReason())
&& Objects.equals(latestRecommenderUpdate(), other.latestRecommenderUpdate())
&& hasModelMetrics() == other.hasModelMetrics() && Objects.equals(modelMetrics(), other.modelMetrics());
}
/**
* 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("Recommender").add("RecommenderArn", recommenderArn()).add("DatasetGroupArn", datasetGroupArn())
.add("Name", name()).add("RecipeArn", recipeArn()).add("RecommenderConfig", recommenderConfig())
.add("CreationDateTime", creationDateTime()).add("LastUpdatedDateTime", lastUpdatedDateTime())
.add("Status", status()).add("FailureReason", failureReason())
.add("LatestRecommenderUpdate", latestRecommenderUpdate())
.add("ModelMetrics", hasModelMetrics() ? modelMetrics() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "recommenderArn":
return Optional.ofNullable(clazz.cast(recommenderArn()));
case "datasetGroupArn":
return Optional.ofNullable(clazz.cast(datasetGroupArn()));
case "name":
return Optional.ofNullable(clazz.cast(name()));
case "recipeArn":
return Optional.ofNullable(clazz.cast(recipeArn()));
case "recommenderConfig":
return Optional.ofNullable(clazz.cast(recommenderConfig()));
case "creationDateTime":
return Optional.ofNullable(clazz.cast(creationDateTime()));
case "lastUpdatedDateTime":
return Optional.ofNullable(clazz.cast(lastUpdatedDateTime()));
case "status":
return Optional.ofNullable(clazz.cast(status()));
case "failureReason":
return Optional.ofNullable(clazz.cast(failureReason()));
case "latestRecommenderUpdate":
return Optional.ofNullable(clazz.cast(latestRecommenderUpdate()));
case "modelMetrics":
return Optional.ofNullable(clazz.cast(modelMetrics()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((Recommender) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SdkPojo, CopyableBuilder {
/**
*
* The Amazon Resource Name (ARN) of the recommender.
*
*
* @param recommenderArn
* The Amazon Resource Name (ARN) of the recommender.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder recommenderArn(String recommenderArn);
/**
*
* The Amazon Resource Name (ARN) of the Domain dataset group that contains the recommender.
*
*
* @param datasetGroupArn
* The Amazon Resource Name (ARN) of the Domain dataset group that contains the recommender.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder datasetGroupArn(String datasetGroupArn);
/**
*
* The name of the recommender.
*
*
* @param name
* The name of the recommender.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder name(String name);
/**
*
* The Amazon Resource Name (ARN) of the recipe (Domain dataset group use case) that the recommender was created
* for.
*
*
* @param recipeArn
* The Amazon Resource Name (ARN) of the recipe (Domain dataset group use case) that the recommender was
* created for.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder recipeArn(String recipeArn);
/**
*
* The configuration details of the recommender.
*
*
* @param recommenderConfig
* The configuration details of the recommender.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder recommenderConfig(RecommenderConfig recommenderConfig);
/**
*
* The configuration details of the recommender.
*
* This is a convenience method that creates an instance of the {@link RecommenderConfig.Builder} avoiding the
* need to create one manually via {@link RecommenderConfig#builder()}.
*
*
* When the {@link Consumer} completes, {@link RecommenderConfig.Builder#build()} is called immediately and its
* result is passed to {@link #recommenderConfig(RecommenderConfig)}.
*
* @param recommenderConfig
* a consumer that will call methods on {@link RecommenderConfig.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #recommenderConfig(RecommenderConfig)
*/
default Builder recommenderConfig(Consumer recommenderConfig) {
return recommenderConfig(RecommenderConfig.builder().applyMutation(recommenderConfig).build());
}
/**
*
* The date and time (in Unix format) that the recommender was created.
*
*
* @param creationDateTime
* The date and time (in Unix format) that the recommender was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder creationDateTime(Instant creationDateTime);
/**
*
* The date and time (in Unix format) that the recommender was last updated.
*
*
* @param lastUpdatedDateTime
* The date and time (in Unix format) that the recommender was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder lastUpdatedDateTime(Instant lastUpdatedDateTime);
/**
*
* The status of the recommender.
*
*
* A recommender can be in one of the following states:
*
*
*
*
* CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
*
*
*
*
* STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE
*
*
*
*
* DELETE PENDING > DELETE IN_PROGRESS
*
*
*
*
* @param status
* The status of the recommender.
*
* A recommender can be in one of the following states:
*
*
*
*
* CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
*
*
*
*
* STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE
*
*
*
*
* DELETE PENDING > DELETE IN_PROGRESS
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder status(String status);
/**
*
* If a recommender fails, the reason behind the failure.
*
*
* @param failureReason
* If a recommender fails, the reason behind the failure.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder failureReason(String failureReason);
/**
*
* Provides a summary of the latest updates to the recommender.
*
*
* @param latestRecommenderUpdate
* Provides a summary of the latest updates to the recommender.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder latestRecommenderUpdate(RecommenderUpdateSummary latestRecommenderUpdate);
/**
*
* Provides a summary of the latest updates to the recommender.
*
* This is a convenience method that creates an instance of the {@link RecommenderUpdateSummary.Builder}
* avoiding the need to create one manually via {@link RecommenderUpdateSummary#builder()}.
*
*
* When the {@link Consumer} completes, {@link RecommenderUpdateSummary.Builder#build()} is called immediately
* and its result is passed to {@link #latestRecommenderUpdate(RecommenderUpdateSummary)}.
*
* @param latestRecommenderUpdate
* a consumer that will call methods on {@link RecommenderUpdateSummary.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #latestRecommenderUpdate(RecommenderUpdateSummary)
*/
default Builder latestRecommenderUpdate(Consumer latestRecommenderUpdate) {
return latestRecommenderUpdate(RecommenderUpdateSummary.builder().applyMutation(latestRecommenderUpdate).build());
}
/**
*
* Provides evaluation metrics that help you determine the performance of a recommender. For more information,
* see Evaluating a
* recommender .
*
*
* @param modelMetrics
* Provides evaluation metrics that help you determine the performance of a recommender. For more
* information, see Evaluating a
* recommender .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder modelMetrics(Map modelMetrics);
}
static final class BuilderImpl implements Builder {
private String recommenderArn;
private String datasetGroupArn;
private String name;
private String recipeArn;
private RecommenderConfig recommenderConfig;
private Instant creationDateTime;
private Instant lastUpdatedDateTime;
private String status;
private String failureReason;
private RecommenderUpdateSummary latestRecommenderUpdate;
private Map modelMetrics = DefaultSdkAutoConstructMap.getInstance();
private BuilderImpl() {
}
private BuilderImpl(Recommender model) {
recommenderArn(model.recommenderArn);
datasetGroupArn(model.datasetGroupArn);
name(model.name);
recipeArn(model.recipeArn);
recommenderConfig(model.recommenderConfig);
creationDateTime(model.creationDateTime);
lastUpdatedDateTime(model.lastUpdatedDateTime);
status(model.status);
failureReason(model.failureReason);
latestRecommenderUpdate(model.latestRecommenderUpdate);
modelMetrics(model.modelMetrics);
}
public final String getRecommenderArn() {
return recommenderArn;
}
public final void setRecommenderArn(String recommenderArn) {
this.recommenderArn = recommenderArn;
}
@Override
public final Builder recommenderArn(String recommenderArn) {
this.recommenderArn = recommenderArn;
return this;
}
public final String getDatasetGroupArn() {
return datasetGroupArn;
}
public final void setDatasetGroupArn(String datasetGroupArn) {
this.datasetGroupArn = datasetGroupArn;
}
@Override
public final Builder datasetGroupArn(String datasetGroupArn) {
this.datasetGroupArn = datasetGroupArn;
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 getRecipeArn() {
return recipeArn;
}
public final void setRecipeArn(String recipeArn) {
this.recipeArn = recipeArn;
}
@Override
public final Builder recipeArn(String recipeArn) {
this.recipeArn = recipeArn;
return this;
}
public final RecommenderConfig.Builder getRecommenderConfig() {
return recommenderConfig != null ? recommenderConfig.toBuilder() : null;
}
public final void setRecommenderConfig(RecommenderConfig.BuilderImpl recommenderConfig) {
this.recommenderConfig = recommenderConfig != null ? recommenderConfig.build() : null;
}
@Override
public final Builder recommenderConfig(RecommenderConfig recommenderConfig) {
this.recommenderConfig = recommenderConfig;
return this;
}
public final Instant getCreationDateTime() {
return creationDateTime;
}
public final void setCreationDateTime(Instant creationDateTime) {
this.creationDateTime = creationDateTime;
}
@Override
public final Builder creationDateTime(Instant creationDateTime) {
this.creationDateTime = creationDateTime;
return this;
}
public final Instant getLastUpdatedDateTime() {
return lastUpdatedDateTime;
}
public final void setLastUpdatedDateTime(Instant lastUpdatedDateTime) {
this.lastUpdatedDateTime = lastUpdatedDateTime;
}
@Override
public final Builder lastUpdatedDateTime(Instant lastUpdatedDateTime) {
this.lastUpdatedDateTime = lastUpdatedDateTime;
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;
}
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;
}
public final RecommenderUpdateSummary.Builder getLatestRecommenderUpdate() {
return latestRecommenderUpdate != null ? latestRecommenderUpdate.toBuilder() : null;
}
public final void setLatestRecommenderUpdate(RecommenderUpdateSummary.BuilderImpl latestRecommenderUpdate) {
this.latestRecommenderUpdate = latestRecommenderUpdate != null ? latestRecommenderUpdate.build() : null;
}
@Override
public final Builder latestRecommenderUpdate(RecommenderUpdateSummary latestRecommenderUpdate) {
this.latestRecommenderUpdate = latestRecommenderUpdate;
return this;
}
public final Map getModelMetrics() {
if (modelMetrics instanceof SdkAutoConstructMap) {
return null;
}
return modelMetrics;
}
public final void setModelMetrics(Map modelMetrics) {
this.modelMetrics = MetricsCopier.copy(modelMetrics);
}
@Override
public final Builder modelMetrics(Map modelMetrics) {
this.modelMetrics = MetricsCopier.copy(modelMetrics);
return this;
}
@Override
public Recommender build() {
return new Recommender(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}