software.amazon.awssdk.services.datazone.model.GetLineageNodeRequest 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.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.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
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;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class GetLineageNodeRequest extends DataZoneRequest implements
ToCopyableBuilder {
private static final SdkField DOMAIN_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("domainIdentifier").getter(getter(GetLineageNodeRequest::domainIdentifier))
.setter(setter(Builder::domainIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("domainIdentifier").build()).build();
private static final SdkField EVENT_TIMESTAMP_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("eventTimestamp").getter(getter(GetLineageNodeRequest::eventTimestamp))
.setter(setter(Builder::eventTimestamp))
.traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("timestamp").build()).build();
private static final SdkField IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("identifier").getter(getter(GetLineageNodeRequest::identifier)).setter(setter(Builder::identifier))
.traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("identifier").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DOMAIN_IDENTIFIER_FIELD,
EVENT_TIMESTAMP_FIELD, IDENTIFIER_FIELD));
private final String domainIdentifier;
private final Instant eventTimestamp;
private final String identifier;
private GetLineageNodeRequest(BuilderImpl builder) {
super(builder);
this.domainIdentifier = builder.domainIdentifier;
this.eventTimestamp = builder.eventTimestamp;
this.identifier = builder.identifier;
}
/**
*
* The ID of the domain in which you want to get the data lineage node.
*
*
* @return The ID of the domain in which you want to get the data lineage node.
*/
public final String domainIdentifier() {
return domainIdentifier;
}
/**
*
* The event time stamp for which you want to get the data lineage node.
*
*
* @return The event time stamp for which you want to get the data lineage node.
*/
public final Instant eventTimestamp() {
return eventTimestamp;
}
/**
*
* The ID of the data lineage node that you want to get.
*
*
* Both, a lineage node identifier generated by Amazon DataZone and a sourceIdentifier
of the lineage
* node are supported. If sourceIdentifier
is greater than 1800 characters, you can use lineage node
* identifier generated by Amazon DataZone to get the node details.
*
*
* @return The ID of the data lineage node that you want to get.
*
* Both, a lineage node identifier generated by Amazon DataZone and a sourceIdentifier
of the
* lineage node are supported. If sourceIdentifier
is greater than 1800 characters, you can use
* lineage node identifier generated by Amazon DataZone to get the node details.
*/
public final String identifier() {
return identifier;
}
@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 + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(domainIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(eventTimestamp());
hashCode = 31 * hashCode + Objects.hashCode(identifier());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof GetLineageNodeRequest)) {
return false;
}
GetLineageNodeRequest other = (GetLineageNodeRequest) obj;
return Objects.equals(domainIdentifier(), other.domainIdentifier())
&& Objects.equals(eventTimestamp(), other.eventTimestamp()) && Objects.equals(identifier(), other.identifier());
}
/**
* 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("GetLineageNodeRequest").add("DomainIdentifier", domainIdentifier())
.add("EventTimestamp", eventTimestamp()).add("Identifier", identifier()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "domainIdentifier":
return Optional.ofNullable(clazz.cast(domainIdentifier()));
case "eventTimestamp":
return Optional.ofNullable(clazz.cast(eventTimestamp()));
case "identifier":
return Optional.ofNullable(clazz.cast(identifier()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
*
* Both, a lineage node identifier generated by Amazon DataZone and a sourceIdentifier
of
* the lineage node are supported. If sourceIdentifier
is greater than 1800 characters, you
* can use lineage node identifier generated by Amazon DataZone to get the node details.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder identifier(String identifier);
@Override
Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
@Override
Builder overrideConfiguration(Consumer builderConsumer);
}
static final class BuilderImpl extends DataZoneRequest.BuilderImpl implements Builder {
private String domainIdentifier;
private Instant eventTimestamp;
private String identifier;
private BuilderImpl() {
}
private BuilderImpl(GetLineageNodeRequest model) {
super(model);
domainIdentifier(model.domainIdentifier);
eventTimestamp(model.eventTimestamp);
identifier(model.identifier);
}
public final String getDomainIdentifier() {
return domainIdentifier;
}
public final void setDomainIdentifier(String domainIdentifier) {
this.domainIdentifier = domainIdentifier;
}
@Override
public final Builder domainIdentifier(String domainIdentifier) {
this.domainIdentifier = domainIdentifier;
return this;
}
public final Instant getEventTimestamp() {
return eventTimestamp;
}
public final void setEventTimestamp(Instant eventTimestamp) {
this.eventTimestamp = eventTimestamp;
}
@Override
public final Builder eventTimestamp(Instant eventTimestamp) {
this.eventTimestamp = eventTimestamp;
return this;
}
public final String getIdentifier() {
return identifier;
}
public final void setIdentifier(String identifier) {
this.identifier = identifier;
}
@Override
public final Builder identifier(String identifier) {
this.identifier = identifier;
return this;
}
@Override
public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) {
super.overrideConfiguration(overrideConfiguration);
return this;
}
@Override
public Builder overrideConfiguration(Consumer builderConsumer) {
super.overrideConfiguration(builderConsumer);
return this;
}
@Override
public GetLineageNodeRequest build() {
return new GetLineageNodeRequest(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}