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

software.amazon.awssdk.services.entityresolution.model.IdMappingJobMetrics Maven / Gradle / Ivy

Go to download

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

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.entityresolution.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.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;

/**
 * 

* An object containing InputRecords, RecordsNotProcessed, TotalRecordsProcessed, * TotalMappedRecords, TotalMappedSourceRecords, and TotalMappedTargetRecords. *

*/ @Generated("software.amazon.awssdk:codegen") public final class IdMappingJobMetrics implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField INPUT_RECORDS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("inputRecords").getter(getter(IdMappingJobMetrics::inputRecords)).setter(setter(Builder::inputRecords)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("inputRecords").build()).build(); private static final SdkField RECORDS_NOT_PROCESSED_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("recordsNotProcessed").getter(getter(IdMappingJobMetrics::recordsNotProcessed)) .setter(setter(Builder::recordsNotProcessed)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("recordsNotProcessed").build()) .build(); private static final SdkField TOTAL_MAPPED_RECORDS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("totalMappedRecords").getter(getter(IdMappingJobMetrics::totalMappedRecords)) .setter(setter(Builder::totalMappedRecords)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("totalMappedRecords").build()) .build(); private static final SdkField TOTAL_MAPPED_SOURCE_RECORDS_FIELD = SdkField . builder(MarshallingType.INTEGER).memberName("totalMappedSourceRecords") .getter(getter(IdMappingJobMetrics::totalMappedSourceRecords)).setter(setter(Builder::totalMappedSourceRecords)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("totalMappedSourceRecords").build()) .build(); private static final SdkField TOTAL_MAPPED_TARGET_RECORDS_FIELD = SdkField . builder(MarshallingType.INTEGER).memberName("totalMappedTargetRecords") .getter(getter(IdMappingJobMetrics::totalMappedTargetRecords)).setter(setter(Builder::totalMappedTargetRecords)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("totalMappedTargetRecords").build()) .build(); private static final SdkField TOTAL_RECORDS_PROCESSED_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("totalRecordsProcessed").getter(getter(IdMappingJobMetrics::totalRecordsProcessed)) .setter(setter(Builder::totalRecordsProcessed)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("totalRecordsProcessed").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(INPUT_RECORDS_FIELD, RECORDS_NOT_PROCESSED_FIELD, TOTAL_MAPPED_RECORDS_FIELD, TOTAL_MAPPED_SOURCE_RECORDS_FIELD, TOTAL_MAPPED_TARGET_RECORDS_FIELD, TOTAL_RECORDS_PROCESSED_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final Integer inputRecords; private final Integer recordsNotProcessed; private final Integer totalMappedRecords; private final Integer totalMappedSourceRecords; private final Integer totalMappedTargetRecords; private final Integer totalRecordsProcessed; private IdMappingJobMetrics(BuilderImpl builder) { this.inputRecords = builder.inputRecords; this.recordsNotProcessed = builder.recordsNotProcessed; this.totalMappedRecords = builder.totalMappedRecords; this.totalMappedSourceRecords = builder.totalMappedSourceRecords; this.totalMappedTargetRecords = builder.totalMappedTargetRecords; this.totalRecordsProcessed = builder.totalRecordsProcessed; } /** *

* The total number of records that were input for processing. *

* * @return The total number of records that were input for processing. */ public final Integer inputRecords() { return inputRecords; } /** *

* The total number of records that did not get processed. *

* * @return The total number of records that did not get processed. */ public final Integer recordsNotProcessed() { return recordsNotProcessed; } /** *

* The total number of records that were mapped. *

* * @return The total number of records that were mapped. */ public final Integer totalMappedRecords() { return totalMappedRecords; } /** *

* The total number of mapped source records. *

* * @return The total number of mapped source records. */ public final Integer totalMappedSourceRecords() { return totalMappedSourceRecords; } /** *

* The total number of distinct mapped target records. *

* * @return The total number of distinct mapped target records. */ public final Integer totalMappedTargetRecords() { return totalMappedTargetRecords; } /** *

* The total number of records that were processed. *

* * @return The total number of records that were processed. */ public final Integer totalRecordsProcessed() { return totalRecordsProcessed; } @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(inputRecords()); hashCode = 31 * hashCode + Objects.hashCode(recordsNotProcessed()); hashCode = 31 * hashCode + Objects.hashCode(totalMappedRecords()); hashCode = 31 * hashCode + Objects.hashCode(totalMappedSourceRecords()); hashCode = 31 * hashCode + Objects.hashCode(totalMappedTargetRecords()); hashCode = 31 * hashCode + Objects.hashCode(totalRecordsProcessed()); 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 IdMappingJobMetrics)) { return false; } IdMappingJobMetrics other = (IdMappingJobMetrics) obj; return Objects.equals(inputRecords(), other.inputRecords()) && Objects.equals(recordsNotProcessed(), other.recordsNotProcessed()) && Objects.equals(totalMappedRecords(), other.totalMappedRecords()) && Objects.equals(totalMappedSourceRecords(), other.totalMappedSourceRecords()) && Objects.equals(totalMappedTargetRecords(), other.totalMappedTargetRecords()) && Objects.equals(totalRecordsProcessed(), other.totalRecordsProcessed()); } /** * 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("IdMappingJobMetrics").add("InputRecords", inputRecords()) .add("RecordsNotProcessed", recordsNotProcessed()).add("TotalMappedRecords", totalMappedRecords()) .add("TotalMappedSourceRecords", totalMappedSourceRecords()) .add("TotalMappedTargetRecords", totalMappedTargetRecords()) .add("TotalRecordsProcessed", totalRecordsProcessed()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "inputRecords": return Optional.ofNullable(clazz.cast(inputRecords())); case "recordsNotProcessed": return Optional.ofNullable(clazz.cast(recordsNotProcessed())); case "totalMappedRecords": return Optional.ofNullable(clazz.cast(totalMappedRecords())); case "totalMappedSourceRecords": return Optional.ofNullable(clazz.cast(totalMappedSourceRecords())); case "totalMappedTargetRecords": return Optional.ofNullable(clazz.cast(totalMappedTargetRecords())); case "totalRecordsProcessed": return Optional.ofNullable(clazz.cast(totalRecordsProcessed())); 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("inputRecords", INPUT_RECORDS_FIELD); map.put("recordsNotProcessed", RECORDS_NOT_PROCESSED_FIELD); map.put("totalMappedRecords", TOTAL_MAPPED_RECORDS_FIELD); map.put("totalMappedSourceRecords", TOTAL_MAPPED_SOURCE_RECORDS_FIELD); map.put("totalMappedTargetRecords", TOTAL_MAPPED_TARGET_RECORDS_FIELD); map.put("totalRecordsProcessed", TOTAL_RECORDS_PROCESSED_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((IdMappingJobMetrics) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The total number of records that were input for processing. *

* * @param inputRecords * The total number of records that were input for processing. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inputRecords(Integer inputRecords); /** *

* The total number of records that did not get processed. *

* * @param recordsNotProcessed * The total number of records that did not get processed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder recordsNotProcessed(Integer recordsNotProcessed); /** *

* The total number of records that were mapped. *

* * @param totalMappedRecords * The total number of records that were mapped. * @return Returns a reference to this object so that method calls can be chained together. */ Builder totalMappedRecords(Integer totalMappedRecords); /** *

* The total number of mapped source records. *

* * @param totalMappedSourceRecords * The total number of mapped source records. * @return Returns a reference to this object so that method calls can be chained together. */ Builder totalMappedSourceRecords(Integer totalMappedSourceRecords); /** *

* The total number of distinct mapped target records. *

* * @param totalMappedTargetRecords * The total number of distinct mapped target records. * @return Returns a reference to this object so that method calls can be chained together. */ Builder totalMappedTargetRecords(Integer totalMappedTargetRecords); /** *

* The total number of records that were processed. *

* * @param totalRecordsProcessed * The total number of records that were processed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder totalRecordsProcessed(Integer totalRecordsProcessed); } static final class BuilderImpl implements Builder { private Integer inputRecords; private Integer recordsNotProcessed; private Integer totalMappedRecords; private Integer totalMappedSourceRecords; private Integer totalMappedTargetRecords; private Integer totalRecordsProcessed; private BuilderImpl() { } private BuilderImpl(IdMappingJobMetrics model) { inputRecords(model.inputRecords); recordsNotProcessed(model.recordsNotProcessed); totalMappedRecords(model.totalMappedRecords); totalMappedSourceRecords(model.totalMappedSourceRecords); totalMappedTargetRecords(model.totalMappedTargetRecords); totalRecordsProcessed(model.totalRecordsProcessed); } public final Integer getInputRecords() { return inputRecords; } public final void setInputRecords(Integer inputRecords) { this.inputRecords = inputRecords; } @Override public final Builder inputRecords(Integer inputRecords) { this.inputRecords = inputRecords; return this; } public final Integer getRecordsNotProcessed() { return recordsNotProcessed; } public final void setRecordsNotProcessed(Integer recordsNotProcessed) { this.recordsNotProcessed = recordsNotProcessed; } @Override public final Builder recordsNotProcessed(Integer recordsNotProcessed) { this.recordsNotProcessed = recordsNotProcessed; return this; } public final Integer getTotalMappedRecords() { return totalMappedRecords; } public final void setTotalMappedRecords(Integer totalMappedRecords) { this.totalMappedRecords = totalMappedRecords; } @Override public final Builder totalMappedRecords(Integer totalMappedRecords) { this.totalMappedRecords = totalMappedRecords; return this; } public final Integer getTotalMappedSourceRecords() { return totalMappedSourceRecords; } public final void setTotalMappedSourceRecords(Integer totalMappedSourceRecords) { this.totalMappedSourceRecords = totalMappedSourceRecords; } @Override public final Builder totalMappedSourceRecords(Integer totalMappedSourceRecords) { this.totalMappedSourceRecords = totalMappedSourceRecords; return this; } public final Integer getTotalMappedTargetRecords() { return totalMappedTargetRecords; } public final void setTotalMappedTargetRecords(Integer totalMappedTargetRecords) { this.totalMappedTargetRecords = totalMappedTargetRecords; } @Override public final Builder totalMappedTargetRecords(Integer totalMappedTargetRecords) { this.totalMappedTargetRecords = totalMappedTargetRecords; return this; } public final Integer getTotalRecordsProcessed() { return totalRecordsProcessed; } public final void setTotalRecordsProcessed(Integer totalRecordsProcessed) { this.totalRecordsProcessed = totalRecordsProcessed; } @Override public final Builder totalRecordsProcessed(Integer totalRecordsProcessed) { this.totalRecordsProcessed = totalRecordsProcessed; return this; } @Override public IdMappingJobMetrics build() { return new IdMappingJobMetrics(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy