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

software.amazon.awssdk.services.sagemaker.model.DataQualityBaselineConfig 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.beans.Transient;
import java.io.Serializable;
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.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;

/**
 * 

* Configuration for monitoring constraints and monitoring statistics. These baseline resources are compared against the * results of the current job from the series of jobs scheduled to collect data periodically. *

*/ @Generated("software.amazon.awssdk:codegen") public final class DataQualityBaselineConfig implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField BASELINING_JOB_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("BaseliningJobName").getter(getter(DataQualityBaselineConfig::baseliningJobName)) .setter(setter(Builder::baseliningJobName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BaseliningJobName").build()).build(); private static final SdkField CONSTRAINTS_RESOURCE_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ConstraintsResource") .getter(getter(DataQualityBaselineConfig::constraintsResource)).setter(setter(Builder::constraintsResource)) .constructor(MonitoringConstraintsResource::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ConstraintsResource").build()) .build(); private static final SdkField STATISTICS_RESOURCE_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("StatisticsResource") .getter(getter(DataQualityBaselineConfig::statisticsResource)).setter(setter(Builder::statisticsResource)) .constructor(MonitoringStatisticsResource::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StatisticsResource").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BASELINING_JOB_NAME_FIELD, CONSTRAINTS_RESOURCE_FIELD, STATISTICS_RESOURCE_FIELD)); private static final long serialVersionUID = 1L; private final String baseliningJobName; private final MonitoringConstraintsResource constraintsResource; private final MonitoringStatisticsResource statisticsResource; private DataQualityBaselineConfig(BuilderImpl builder) { this.baseliningJobName = builder.baseliningJobName; this.constraintsResource = builder.constraintsResource; this.statisticsResource = builder.statisticsResource; } /** *

* The name of the job that performs baselining for the data quality monitoring job. *

* * @return The name of the job that performs baselining for the data quality monitoring job. */ public final String baseliningJobName() { return baseliningJobName; } /** * Returns the value of the ConstraintsResource property for this object. * * @return The value of the ConstraintsResource property for this object. */ public final MonitoringConstraintsResource constraintsResource() { return constraintsResource; } /** * Returns the value of the StatisticsResource property for this object. * * @return The value of the StatisticsResource property for this object. */ public final MonitoringStatisticsResource statisticsResource() { return statisticsResource; } @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(baseliningJobName()); hashCode = 31 * hashCode + Objects.hashCode(constraintsResource()); hashCode = 31 * hashCode + Objects.hashCode(statisticsResource()); 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 DataQualityBaselineConfig)) { return false; } DataQualityBaselineConfig other = (DataQualityBaselineConfig) obj; return Objects.equals(baseliningJobName(), other.baseliningJobName()) && Objects.equals(constraintsResource(), other.constraintsResource()) && Objects.equals(statisticsResource(), other.statisticsResource()); } /** * 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("DataQualityBaselineConfig").add("BaseliningJobName", baseliningJobName()) .add("ConstraintsResource", constraintsResource()).add("StatisticsResource", statisticsResource()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "BaseliningJobName": return Optional.ofNullable(clazz.cast(baseliningJobName())); case "ConstraintsResource": return Optional.ofNullable(clazz.cast(constraintsResource())); case "StatisticsResource": return Optional.ofNullable(clazz.cast(statisticsResource())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((DataQualityBaselineConfig) 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 job that performs baselining for the data quality monitoring job. *

* * @param baseliningJobName * The name of the job that performs baselining for the data quality monitoring job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder baseliningJobName(String baseliningJobName); /** * Sets the value of the ConstraintsResource property for this object. * * @param constraintsResource * The new value for the ConstraintsResource property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder constraintsResource(MonitoringConstraintsResource constraintsResource); /** * Sets the value of the ConstraintsResource property for this object. * * This is a convenience that creates an instance of the {@link MonitoringConstraintsResource.Builder} avoiding * the need to create one manually via {@link MonitoringConstraintsResource#builder()}. * * When the {@link Consumer} completes, {@link MonitoringConstraintsResource.Builder#build()} is called * immediately and its result is passed to {@link #constraintsResource(MonitoringConstraintsResource)}. * * @param constraintsResource * a consumer that will call methods on {@link MonitoringConstraintsResource.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #constraintsResource(MonitoringConstraintsResource) */ default Builder constraintsResource(Consumer constraintsResource) { return constraintsResource(MonitoringConstraintsResource.builder().applyMutation(constraintsResource).build()); } /** * Sets the value of the StatisticsResource property for this object. * * @param statisticsResource * The new value for the StatisticsResource property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder statisticsResource(MonitoringStatisticsResource statisticsResource); /** * Sets the value of the StatisticsResource property for this object. * * This is a convenience that creates an instance of the {@link MonitoringStatisticsResource.Builder} avoiding * the need to create one manually via {@link MonitoringStatisticsResource#builder()}. * * When the {@link Consumer} completes, {@link MonitoringStatisticsResource.Builder#build()} is called * immediately and its result is passed to {@link #statisticsResource(MonitoringStatisticsResource)}. * * @param statisticsResource * a consumer that will call methods on {@link MonitoringStatisticsResource.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #statisticsResource(MonitoringStatisticsResource) */ default Builder statisticsResource(Consumer statisticsResource) { return statisticsResource(MonitoringStatisticsResource.builder().applyMutation(statisticsResource).build()); } } static final class BuilderImpl implements Builder { private String baseliningJobName; private MonitoringConstraintsResource constraintsResource; private MonitoringStatisticsResource statisticsResource; private BuilderImpl() { } private BuilderImpl(DataQualityBaselineConfig model) { baseliningJobName(model.baseliningJobName); constraintsResource(model.constraintsResource); statisticsResource(model.statisticsResource); } public final String getBaseliningJobName() { return baseliningJobName; } public final void setBaseliningJobName(String baseliningJobName) { this.baseliningJobName = baseliningJobName; } @Override @Transient public final Builder baseliningJobName(String baseliningJobName) { this.baseliningJobName = baseliningJobName; return this; } public final MonitoringConstraintsResource.Builder getConstraintsResource() { return constraintsResource != null ? constraintsResource.toBuilder() : null; } public final void setConstraintsResource(MonitoringConstraintsResource.BuilderImpl constraintsResource) { this.constraintsResource = constraintsResource != null ? constraintsResource.build() : null; } @Override @Transient public final Builder constraintsResource(MonitoringConstraintsResource constraintsResource) { this.constraintsResource = constraintsResource; return this; } public final MonitoringStatisticsResource.Builder getStatisticsResource() { return statisticsResource != null ? statisticsResource.toBuilder() : null; } public final void setStatisticsResource(MonitoringStatisticsResource.BuilderImpl statisticsResource) { this.statisticsResource = statisticsResource != null ? statisticsResource.build() : null; } @Override @Transient public final Builder statisticsResource(MonitoringStatisticsResource statisticsResource) { this.statisticsResource = statisticsResource; return this; } @Override public DataQualityBaselineConfig build() { return new DataQualityBaselineConfig(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy