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

software.amazon.awssdk.services.entityresolution.model.IdMappingWorkflowSummary 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.entityresolution.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.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* A list of IdMappingWorkflowSummary objects, each of which contain the fields WorkflowName, * WorkflowArn, CreatedAt, and UpdatedAt. *

*/ @Generated("software.amazon.awssdk:codegen") public final class IdMappingWorkflowSummary implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("createdAt").getter(getter(IdMappingWorkflowSummary::createdAt)).setter(setter(Builder::createdAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdAt").build()).build(); private static final SdkField UPDATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("updatedAt").getter(getter(IdMappingWorkflowSummary::updatedAt)).setter(setter(Builder::updatedAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updatedAt").build()).build(); private static final SdkField WORKFLOW_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("workflowArn").getter(getter(IdMappingWorkflowSummary::workflowArn)).setter(setter(Builder::workflowArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("workflowArn").build()).build(); private static final SdkField WORKFLOW_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("workflowName").getter(getter(IdMappingWorkflowSummary::workflowName)) .setter(setter(Builder::workflowName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("workflowName").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CREATED_AT_FIELD, UPDATED_AT_FIELD, WORKFLOW_ARN_FIELD, WORKFLOW_NAME_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final Instant createdAt; private final Instant updatedAt; private final String workflowArn; private final String workflowName; private IdMappingWorkflowSummary(BuilderImpl builder) { this.createdAt = builder.createdAt; this.updatedAt = builder.updatedAt; this.workflowArn = builder.workflowArn; this.workflowName = builder.workflowName; } /** *

* The timestamp of when the workflow was created. *

* * @return The timestamp of when the workflow was created. */ public final Instant createdAt() { return createdAt; } /** *

* The timestamp of when the workflow was last updated. *

* * @return The timestamp of when the workflow was last updated. */ public final Instant updatedAt() { return updatedAt; } /** *

* The ARN (Amazon Resource Name) that Entity Resolution generated for the IdMappingWorkflow. *

* * @return The ARN (Amazon Resource Name) that Entity Resolution generated for the IdMappingWorkflow. */ public final String workflowArn() { return workflowArn; } /** *

* The name of the workflow. *

* * @return The name of the workflow. */ public final String workflowName() { return workflowName; } @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(createdAt()); hashCode = 31 * hashCode + Objects.hashCode(updatedAt()); hashCode = 31 * hashCode + Objects.hashCode(workflowArn()); hashCode = 31 * hashCode + Objects.hashCode(workflowName()); 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 IdMappingWorkflowSummary)) { return false; } IdMappingWorkflowSummary other = (IdMappingWorkflowSummary) obj; return Objects.equals(createdAt(), other.createdAt()) && Objects.equals(updatedAt(), other.updatedAt()) && Objects.equals(workflowArn(), other.workflowArn()) && Objects.equals(workflowName(), other.workflowName()); } /** * 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("IdMappingWorkflowSummary").add("CreatedAt", createdAt()).add("UpdatedAt", updatedAt()) .add("WorkflowArn", workflowArn()).add("WorkflowName", workflowName()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "createdAt": return Optional.ofNullable(clazz.cast(createdAt())); case "updatedAt": return Optional.ofNullable(clazz.cast(updatedAt())); case "workflowArn": return Optional.ofNullable(clazz.cast(workflowArn())); case "workflowName": return Optional.ofNullable(clazz.cast(workflowName())); 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("createdAt", CREATED_AT_FIELD); map.put("updatedAt", UPDATED_AT_FIELD); map.put("workflowArn", WORKFLOW_ARN_FIELD); map.put("workflowName", WORKFLOW_NAME_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((IdMappingWorkflowSummary) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The timestamp of when the workflow was created. *

* * @param createdAt * The timestamp of when the workflow was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdAt(Instant createdAt); /** *

* The timestamp of when the workflow was last updated. *

* * @param updatedAt * The timestamp of when the workflow was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder updatedAt(Instant updatedAt); /** *

* The ARN (Amazon Resource Name) that Entity Resolution generated for the IdMappingWorkflow. *

* * @param workflowArn * The ARN (Amazon Resource Name) that Entity Resolution generated for the IdMappingWorkflow * . * @return Returns a reference to this object so that method calls can be chained together. */ Builder workflowArn(String workflowArn); /** *

* The name of the workflow. *

* * @param workflowName * The name of the workflow. * @return Returns a reference to this object so that method calls can be chained together. */ Builder workflowName(String workflowName); } static final class BuilderImpl implements Builder { private Instant createdAt; private Instant updatedAt; private String workflowArn; private String workflowName; private BuilderImpl() { } private BuilderImpl(IdMappingWorkflowSummary model) { createdAt(model.createdAt); updatedAt(model.updatedAt); workflowArn(model.workflowArn); workflowName(model.workflowName); } public final Instant getCreatedAt() { return createdAt; } public final void setCreatedAt(Instant createdAt) { this.createdAt = createdAt; } @Override public final Builder createdAt(Instant createdAt) { this.createdAt = createdAt; return this; } public final Instant getUpdatedAt() { return updatedAt; } public final void setUpdatedAt(Instant updatedAt) { this.updatedAt = updatedAt; } @Override public final Builder updatedAt(Instant updatedAt) { this.updatedAt = updatedAt; return this; } public final String getWorkflowArn() { return workflowArn; } public final void setWorkflowArn(String workflowArn) { this.workflowArn = workflowArn; } @Override public final Builder workflowArn(String workflowArn) { this.workflowArn = workflowArn; return this; } public final String getWorkflowName() { return workflowName; } public final void setWorkflowName(String workflowName) { this.workflowName = workflowName; } @Override public final Builder workflowName(String workflowName) { this.workflowName = workflowName; return this; } @Override public IdMappingWorkflowSummary build() { return new IdMappingWorkflowSummary(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy