software.amazon.awssdk.services.sagemaker.model.DriftCheckBaselines Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sagemaker Show documentation
Show all versions of sagemaker Show documentation
The AWS Java SDK for Amazon SageMaker module holds the client classes that are used for communicating
with Amazon SageMaker Service
/*
* 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.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.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.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Represents the drift check baselines that can be used when the model monitor is set using the model package.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class DriftCheckBaselines implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField BIAS_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Bias").getter(getter(DriftCheckBaselines::bias)).setter(setter(Builder::bias))
.constructor(DriftCheckBias::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Bias").build()).build();
private static final SdkField EXPLAINABILITY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("Explainability")
.getter(getter(DriftCheckBaselines::explainability)).setter(setter(Builder::explainability))
.constructor(DriftCheckExplainability::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Explainability").build()).build();
private static final SdkField MODEL_QUALITY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ModelQuality")
.getter(getter(DriftCheckBaselines::modelQuality)).setter(setter(Builder::modelQuality))
.constructor(DriftCheckModelQuality::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelQuality").build()).build();
private static final SdkField MODEL_DATA_QUALITY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ModelDataQuality")
.getter(getter(DriftCheckBaselines::modelDataQuality)).setter(setter(Builder::modelDataQuality))
.constructor(DriftCheckModelDataQuality::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelDataQuality").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BIAS_FIELD,
EXPLAINABILITY_FIELD, MODEL_QUALITY_FIELD, MODEL_DATA_QUALITY_FIELD));
private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer();
private static final long serialVersionUID = 1L;
private final DriftCheckBias bias;
private final DriftCheckExplainability explainability;
private final DriftCheckModelQuality modelQuality;
private final DriftCheckModelDataQuality modelDataQuality;
private DriftCheckBaselines(BuilderImpl builder) {
this.bias = builder.bias;
this.explainability = builder.explainability;
this.modelQuality = builder.modelQuality;
this.modelDataQuality = builder.modelDataQuality;
}
/**
*
* Represents the drift check bias baselines that can be used when the model monitor is set using the model package.
*
*
* @return Represents the drift check bias baselines that can be used when the model monitor is set using the model
* package.
*/
public final DriftCheckBias bias() {
return bias;
}
/**
*
* Represents the drift check explainability baselines that can be used when the model monitor is set using the
* model package.
*
*
* @return Represents the drift check explainability baselines that can be used when the model monitor is set using
* the model package.
*/
public final DriftCheckExplainability explainability() {
return explainability;
}
/**
*
* Represents the drift check model quality baselines that can be used when the model monitor is set using the model
* package.
*
*
* @return Represents the drift check model quality baselines that can be used when the model monitor is set using
* the model package.
*/
public final DriftCheckModelQuality modelQuality() {
return modelQuality;
}
/**
*
* Represents the drift check model data quality baselines that can be used when the model monitor is set using the
* model package.
*
*
* @return Represents the drift check model data quality baselines that can be used when the model monitor is set
* using the model package.
*/
public final DriftCheckModelDataQuality modelDataQuality() {
return modelDataQuality;
}
@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(bias());
hashCode = 31 * hashCode + Objects.hashCode(explainability());
hashCode = 31 * hashCode + Objects.hashCode(modelQuality());
hashCode = 31 * hashCode + Objects.hashCode(modelDataQuality());
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 DriftCheckBaselines)) {
return false;
}
DriftCheckBaselines other = (DriftCheckBaselines) obj;
return Objects.equals(bias(), other.bias()) && Objects.equals(explainability(), other.explainability())
&& Objects.equals(modelQuality(), other.modelQuality())
&& Objects.equals(modelDataQuality(), other.modelDataQuality());
}
/**
* 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("DriftCheckBaselines").add("Bias", bias()).add("Explainability", explainability())
.add("ModelQuality", modelQuality()).add("ModelDataQuality", modelDataQuality()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "Bias":
return Optional.ofNullable(clazz.cast(bias()));
case "Explainability":
return Optional.ofNullable(clazz.cast(explainability()));
case "ModelQuality":
return Optional.ofNullable(clazz.cast(modelQuality()));
case "ModelDataQuality":
return Optional.ofNullable(clazz.cast(modelDataQuality()));
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("Bias", BIAS_FIELD);
map.put("Explainability", EXPLAINABILITY_FIELD);
map.put("ModelQuality", MODEL_QUALITY_FIELD);
map.put("ModelDataQuality", MODEL_DATA_QUALITY_FIELD);
return Collections.unmodifiableMap(map);
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy