software.amazon.awssdk.services.datazone.model.LineageNodeSummary Maven / Gradle / Ivy
Show all versions of datazone Show documentation
/*
* 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.datazone.model;
import java.io.Serializable;
import java.time.Instant;
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.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;
/**
*
* The summary of the data lineage node.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class LineageNodeSummary implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("createdAt").getter(getter(LineageNodeSummary::createdAt)).setter(setter(Builder::createdAt))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdAt").build()).build();
private static final SdkField CREATED_BY_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("createdBy").getter(getter(LineageNodeSummary::createdBy)).setter(setter(Builder::createdBy))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdBy").build()).build();
private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("description").getter(getter(LineageNodeSummary::description)).setter(setter(Builder::description))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("description").build()).build();
private static final SdkField DOMAIN_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("domainId").getter(getter(LineageNodeSummary::domainId)).setter(setter(Builder::domainId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("domainId").build()).build();
private static final SdkField EVENT_TIMESTAMP_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("eventTimestamp").getter(getter(LineageNodeSummary::eventTimestamp))
.setter(setter(Builder::eventTimestamp))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("eventTimestamp").build()).build();
private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("id")
.getter(getter(LineageNodeSummary::id)).setter(setter(Builder::id))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("id").build()).build();
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
.getter(getter(LineageNodeSummary::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();
private static final SdkField SOURCE_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("sourceIdentifier").getter(getter(LineageNodeSummary::sourceIdentifier))
.setter(setter(Builder::sourceIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sourceIdentifier").build()).build();
private static final SdkField TYPE_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("typeName").getter(getter(LineageNodeSummary::typeName)).setter(setter(Builder::typeName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("typeName").build()).build();
private static final SdkField TYPE_REVISION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("typeRevision").getter(getter(LineageNodeSummary::typeRevision)).setter(setter(Builder::typeRevision))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("typeRevision").build()).build();
private static final SdkField UPDATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("updatedAt").getter(getter(LineageNodeSummary::updatedAt)).setter(setter(Builder::updatedAt))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updatedAt").build()).build();
private static final SdkField UPDATED_BY_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("updatedBy").getter(getter(LineageNodeSummary::updatedBy)).setter(setter(Builder::updatedBy))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updatedBy").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CREATED_AT_FIELD,
CREATED_BY_FIELD, DESCRIPTION_FIELD, DOMAIN_ID_FIELD, EVENT_TIMESTAMP_FIELD, ID_FIELD, NAME_FIELD,
SOURCE_IDENTIFIER_FIELD, TYPE_NAME_FIELD, TYPE_REVISION_FIELD, UPDATED_AT_FIELD, UPDATED_BY_FIELD));
private static final long serialVersionUID = 1L;
private final Instant createdAt;
private final String createdBy;
private final String description;
private final String domainId;
private final Instant eventTimestamp;
private final String id;
private final String name;
private final String sourceIdentifier;
private final String typeName;
private final String typeRevision;
private final Instant updatedAt;
private final String updatedBy;
private LineageNodeSummary(BuilderImpl builder) {
this.createdAt = builder.createdAt;
this.createdBy = builder.createdBy;
this.description = builder.description;
this.domainId = builder.domainId;
this.eventTimestamp = builder.eventTimestamp;
this.id = builder.id;
this.name = builder.name;
this.sourceIdentifier = builder.sourceIdentifier;
this.typeName = builder.typeName;
this.typeRevision = builder.typeRevision;
this.updatedAt = builder.updatedAt;
this.updatedBy = builder.updatedBy;
}
/**
*
* The timestamp at which the data lineage node was created.
*
*
* @return The timestamp at which the data lineage node was created.
*/
public final Instant createdAt() {
return createdAt;
}
/**
*
* The user who created the data lineage node.
*
*
* @return The user who created the data lineage node.
*/
public final String createdBy() {
return createdBy;
}
/**
*
* The description of the data lineage node.
*
*
* @return The description of the data lineage node.
*/
public final String description() {
return description;
}
/**
*
* The ID of the domain of the data lineage node.
*
*
* @return The ID of the domain of the data lineage node.
*/
public final String domainId() {
return domainId;
}
/**
*
* The event timestamp of the data lineage node.
*
*
* @return The event timestamp of the data lineage node.
*/
public final Instant eventTimestamp() {
return eventTimestamp;
}
/**
*
* The ID of the data lineage node.
*
*
* @return The ID of the data lineage node.
*/
public final String id() {
return id;
}
/**
*
* The name of the data lineage node.
*
*
* @return The name of the data lineage node.
*/
public final String name() {
return name;
}
/**
*
* The alternate ID of the data lineage node.
*
*
* @return The alternate ID of the data lineage node.
*/
public final String sourceIdentifier() {
return sourceIdentifier;
}
/**
*
* The name of the type of the data lineage node.
*
*
* @return The name of the type of the data lineage node.
*/
public final String typeName() {
return typeName;
}
/**
*
* The type of the revision of the data lineage node.
*
*
* @return The type of the revision of the data lineage node.
*/
public final String typeRevision() {
return typeRevision;
}
/**
*
* The timestamp at which the data lineage node was updated.
*
*
* @return The timestamp at which the data lineage node was updated.
*/
public final Instant updatedAt() {
return updatedAt;
}
/**
*
* The user who updated the data lineage node.
*
*
* @return The user who updated the data lineage node.
*/
public final String updatedBy() {
return updatedBy;
}
@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(createdBy());
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(domainId());
hashCode = 31 * hashCode + Objects.hashCode(eventTimestamp());
hashCode = 31 * hashCode + Objects.hashCode(id());
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(sourceIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(typeName());
hashCode = 31 * hashCode + Objects.hashCode(typeRevision());
hashCode = 31 * hashCode + Objects.hashCode(updatedAt());
hashCode = 31 * hashCode + Objects.hashCode(updatedBy());
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 LineageNodeSummary)) {
return false;
}
LineageNodeSummary other = (LineageNodeSummary) obj;
return Objects.equals(createdAt(), other.createdAt()) && Objects.equals(createdBy(), other.createdBy())
&& Objects.equals(description(), other.description()) && Objects.equals(domainId(), other.domainId())
&& Objects.equals(eventTimestamp(), other.eventTimestamp()) && Objects.equals(id(), other.id())
&& Objects.equals(name(), other.name()) && Objects.equals(sourceIdentifier(), other.sourceIdentifier())
&& Objects.equals(typeName(), other.typeName()) && Objects.equals(typeRevision(), other.typeRevision())
&& Objects.equals(updatedAt(), other.updatedAt()) && Objects.equals(updatedBy(), other.updatedBy());
}
/**
* 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("LineageNodeSummary").add("CreatedAt", createdAt()).add("CreatedBy", createdBy())
.add("Description", description()).add("DomainId", domainId()).add("EventTimestamp", eventTimestamp())
.add("Id", id()).add("Name", name()).add("SourceIdentifier", sourceIdentifier()).add("TypeName", typeName())
.add("TypeRevision", typeRevision()).add("UpdatedAt", updatedAt()).add("UpdatedBy", updatedBy()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "createdAt":
return Optional.ofNullable(clazz.cast(createdAt()));
case "createdBy":
return Optional.ofNullable(clazz.cast(createdBy()));
case "description":
return Optional.ofNullable(clazz.cast(description()));
case "domainId":
return Optional.ofNullable(clazz.cast(domainId()));
case "eventTimestamp":
return Optional.ofNullable(clazz.cast(eventTimestamp()));
case "id":
return Optional.ofNullable(clazz.cast(id()));
case "name":
return Optional.ofNullable(clazz.cast(name()));
case "sourceIdentifier":
return Optional.ofNullable(clazz.cast(sourceIdentifier()));
case "typeName":
return Optional.ofNullable(clazz.cast(typeName()));
case "typeRevision":
return Optional.ofNullable(clazz.cast(typeRevision()));
case "updatedAt":
return Optional.ofNullable(clazz.cast(updatedAt()));
case "updatedBy":
return Optional.ofNullable(clazz.cast(updatedBy()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function