Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.finspacedata.model.GetChangesetResponse Maven / Gradle / Ivy
Go to download
The AWS Java SDK for Finspace Data module holds the client classes that are used for
communicating with Finspace Data.
/*
* 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.finspacedata.model;
import java.util.Arrays;
import java.util.Collections;
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.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.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
* The response from a describe changeset operation
*/
@Generated("software.amazon.awssdk:codegen")
public final class GetChangesetResponse extends FinspaceDataResponse implements
ToCopyableBuilder {
private static final SdkField CHANGESET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("changesetId").getter(getter(GetChangesetResponse::changesetId)).setter(setter(Builder::changesetId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("changesetId").build()).build();
private static final SdkField CHANGESET_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("changesetArn").getter(getter(GetChangesetResponse::changesetArn)).setter(setter(Builder::changesetArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("changesetArn").build()).build();
private static final SdkField DATASET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("datasetId").getter(getter(GetChangesetResponse::datasetId)).setter(setter(Builder::datasetId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("datasetId").build()).build();
private static final SdkField CHANGE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("changeType").getter(getter(GetChangesetResponse::changeTypeAsString))
.setter(setter(Builder::changeType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("changeType").build()).build();
private static final SdkField> SOURCE_PARAMS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("sourceParams")
.getter(getter(GetChangesetResponse::sourceParams))
.setter(setter(Builder::sourceParams))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sourceParams").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField> FORMAT_PARAMS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("formatParams")
.getter(getter(GetChangesetResponse::formatParams))
.setter(setter(Builder::formatParams))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("formatParams").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField CREATE_TIME_FIELD = SdkField. builder(MarshallingType.LONG)
.memberName("createTime").getter(getter(GetChangesetResponse::createTime)).setter(setter(Builder::createTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createTime").build()).build();
private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status")
.getter(getter(GetChangesetResponse::statusAsString)).setter(setter(Builder::status))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build();
private static final SdkField ERROR_INFO_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("errorInfo")
.getter(getter(GetChangesetResponse::errorInfo)).setter(setter(Builder::errorInfo))
.constructor(ChangesetErrorInfo::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("errorInfo").build()).build();
private static final SdkField ACTIVE_UNTIL_TIMESTAMP_FIELD = SdkField. builder(MarshallingType.LONG)
.memberName("activeUntilTimestamp").getter(getter(GetChangesetResponse::activeUntilTimestamp))
.setter(setter(Builder::activeUntilTimestamp))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("activeUntilTimestamp").build())
.build();
private static final SdkField ACTIVE_FROM_TIMESTAMP_FIELD = SdkField. builder(MarshallingType.LONG)
.memberName("activeFromTimestamp").getter(getter(GetChangesetResponse::activeFromTimestamp))
.setter(setter(Builder::activeFromTimestamp))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("activeFromTimestamp").build())
.build();
private static final SdkField UPDATES_CHANGESET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("updatesChangesetId").getter(getter(GetChangesetResponse::updatesChangesetId))
.setter(setter(Builder::updatesChangesetId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updatesChangesetId").build())
.build();
private static final SdkField UPDATED_BY_CHANGESET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("updatedByChangesetId").getter(getter(GetChangesetResponse::updatedByChangesetId))
.setter(setter(Builder::updatedByChangesetId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updatedByChangesetId").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CHANGESET_ID_FIELD,
CHANGESET_ARN_FIELD, DATASET_ID_FIELD, CHANGE_TYPE_FIELD, SOURCE_PARAMS_FIELD, FORMAT_PARAMS_FIELD,
CREATE_TIME_FIELD, STATUS_FIELD, ERROR_INFO_FIELD, ACTIVE_UNTIL_TIMESTAMP_FIELD, ACTIVE_FROM_TIMESTAMP_FIELD,
UPDATES_CHANGESET_ID_FIELD, UPDATED_BY_CHANGESET_ID_FIELD));
private final String changesetId;
private final String changesetArn;
private final String datasetId;
private final String changeType;
private final Map sourceParams;
private final Map formatParams;
private final Long createTime;
private final String status;
private final ChangesetErrorInfo errorInfo;
private final Long activeUntilTimestamp;
private final Long activeFromTimestamp;
private final String updatesChangesetId;
private final String updatedByChangesetId;
private GetChangesetResponse(BuilderImpl builder) {
super(builder);
this.changesetId = builder.changesetId;
this.changesetArn = builder.changesetArn;
this.datasetId = builder.datasetId;
this.changeType = builder.changeType;
this.sourceParams = builder.sourceParams;
this.formatParams = builder.formatParams;
this.createTime = builder.createTime;
this.status = builder.status;
this.errorInfo = builder.errorInfo;
this.activeUntilTimestamp = builder.activeUntilTimestamp;
this.activeFromTimestamp = builder.activeFromTimestamp;
this.updatesChangesetId = builder.updatesChangesetId;
this.updatedByChangesetId = builder.updatedByChangesetId;
}
/**
*
* The unique identifier for a Changeset.
*
*
* @return The unique identifier for a Changeset.
*/
public final String changesetId() {
return changesetId;
}
/**
*
* The ARN identifier of the Changeset.
*
*
* @return The ARN identifier of the Changeset.
*/
public final String changesetArn() {
return changesetArn;
}
/**
*
* The unique identifier for the FinSpace Dataset where the Changeset is created.
*
*
* @return The unique identifier for the FinSpace Dataset where the Changeset is created.
*/
public final String datasetId() {
return datasetId;
}
/**
*
* Type that indicates how a Changeset is applied to a Dataset.
*
*
*
*
* REPLACE
– Changeset is considered as a replacement to all prior loaded Changesets.
*
*
*
*
* APPEND
– Changeset is considered as an addition to the end of all prior loaded Changesets.
*
*
*
*
* MODIFY
– Changeset is considered as a replacement to a specific prior ingested Changeset.
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #changeType} will
* return {@link ChangeType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #changeTypeAsString}.
*
*
* @return Type that indicates how a Changeset is applied to a Dataset.
*
*
*
* REPLACE
– Changeset is considered as a replacement to all prior loaded Changesets.
*
*
*
*
* APPEND
– Changeset is considered as an addition to the end of all prior loaded Changesets.
*
*
*
*
* MODIFY
– Changeset is considered as a replacement to a specific prior ingested Changeset.
*
*
* @see ChangeType
*/
public final ChangeType changeType() {
return ChangeType.fromValue(changeType);
}
/**
*
* Type that indicates how a Changeset is applied to a Dataset.
*
*
*
*
* REPLACE
– Changeset is considered as a replacement to all prior loaded Changesets.
*
*
*
*
* APPEND
– Changeset is considered as an addition to the end of all prior loaded Changesets.
*
*
*
*
* MODIFY
– Changeset is considered as a replacement to a specific prior ingested Changeset.
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #changeType} will
* return {@link ChangeType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #changeTypeAsString}.
*
*
* @return Type that indicates how a Changeset is applied to a Dataset.
*
*
*
* REPLACE
– Changeset is considered as a replacement to all prior loaded Changesets.
*
*
*
*
* APPEND
– Changeset is considered as an addition to the end of all prior loaded Changesets.
*
*
*
*
* MODIFY
– Changeset is considered as a replacement to a specific prior ingested Changeset.
*
*
* @see ChangeType
*/
public final String changeTypeAsString() {
return changeType;
}
/**
* For responses, this returns true if the service returned a value for the SourceParams property. This DOES NOT
* check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasSourceParams() {
return sourceParams != null && !(sourceParams instanceof SdkAutoConstructMap);
}
/**
*
* Options that define the location of the data being ingested.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasSourceParams} method.
*
*
* @return Options that define the location of the data being ingested.
*/
public final Map sourceParams() {
return sourceParams;
}
/**
* For responses, this returns true if the service returned a value for the FormatParams property. This DOES NOT
* check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasFormatParams() {
return formatParams != null && !(formatParams instanceof SdkAutoConstructMap);
}
/**
*
* Structure of the source file(s).
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasFormatParams} method.
*
*
* @return Structure of the source file(s).
*/
public final Map formatParams() {
return formatParams;
}
/**
*
* The timestamp at which the Changeset was created in FinSpace. The value is determined as epoch time in
* milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
*
*
* @return The timestamp at which the Changeset was created in FinSpace. The value is determined as epoch time in
* milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as
* 1635768000000.
*/
public final Long createTime() {
return createTime;
}
/**
*
* The status of Changeset creation operation.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link IngestionStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #statusAsString}.
*
*
* @return The status of Changeset creation operation.
* @see IngestionStatus
*/
public final IngestionStatus status() {
return IngestionStatus.fromValue(status);
}
/**
*
* The status of Changeset creation operation.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link IngestionStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #statusAsString}.
*
*
* @return The status of Changeset creation operation.
* @see IngestionStatus
*/
public final String statusAsString() {
return status;
}
/**
*
* The structure with error messages.
*
*
* @return The structure with error messages.
*/
public final ChangesetErrorInfo errorInfo() {
return errorInfo;
}
/**
*
* Time until which the Changeset is active. The value is determined as epoch time in milliseconds. For example, the
* value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
*
*
* @return Time until which the Changeset is active. The value is determined as epoch time in milliseconds. For
* example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
*/
public final Long activeUntilTimestamp() {
return activeUntilTimestamp;
}
/**
*
* Beginning time from which the Changeset is active. The value is determined as epoch time in milliseconds. For
* example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
*
*
* @return Beginning time from which the Changeset is active. The value is determined as epoch time in milliseconds.
* For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
*/
public final Long activeFromTimestamp() {
return activeFromTimestamp;
}
/**
*
* The unique identifier of the Changeset that is being updated.
*
*
* @return The unique identifier of the Changeset that is being updated.
*/
public final String updatesChangesetId() {
return updatesChangesetId;
}
/**
*
* The unique identifier of the updated Changeset.
*
*
* @return The unique identifier of the updated Changeset.
*/
public final String updatedByChangesetId() {
return updatedByChangesetId;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(changesetId());
hashCode = 31 * hashCode + Objects.hashCode(changesetArn());
hashCode = 31 * hashCode + Objects.hashCode(datasetId());
hashCode = 31 * hashCode + Objects.hashCode(changeTypeAsString());
hashCode = 31 * hashCode + Objects.hashCode(hasSourceParams() ? sourceParams() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasFormatParams() ? formatParams() : null);
hashCode = 31 * hashCode + Objects.hashCode(createTime());
hashCode = 31 * hashCode + Objects.hashCode(statusAsString());
hashCode = 31 * hashCode + Objects.hashCode(errorInfo());
hashCode = 31 * hashCode + Objects.hashCode(activeUntilTimestamp());
hashCode = 31 * hashCode + Objects.hashCode(activeFromTimestamp());
hashCode = 31 * hashCode + Objects.hashCode(updatesChangesetId());
hashCode = 31 * hashCode + Objects.hashCode(updatedByChangesetId());
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 GetChangesetResponse)) {
return false;
}
GetChangesetResponse other = (GetChangesetResponse) obj;
return Objects.equals(changesetId(), other.changesetId()) && Objects.equals(changesetArn(), other.changesetArn())
&& Objects.equals(datasetId(), other.datasetId())
&& Objects.equals(changeTypeAsString(), other.changeTypeAsString())
&& hasSourceParams() == other.hasSourceParams() && Objects.equals(sourceParams(), other.sourceParams())
&& hasFormatParams() == other.hasFormatParams() && Objects.equals(formatParams(), other.formatParams())
&& Objects.equals(createTime(), other.createTime()) && Objects.equals(statusAsString(), other.statusAsString())
&& Objects.equals(errorInfo(), other.errorInfo())
&& Objects.equals(activeUntilTimestamp(), other.activeUntilTimestamp())
&& Objects.equals(activeFromTimestamp(), other.activeFromTimestamp())
&& Objects.equals(updatesChangesetId(), other.updatesChangesetId())
&& Objects.equals(updatedByChangesetId(), other.updatedByChangesetId());
}
/**
* 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("GetChangesetResponse").add("ChangesetId", changesetId()).add("ChangesetArn", changesetArn())
.add("DatasetId", datasetId()).add("ChangeType", changeTypeAsString())
.add("SourceParams", hasSourceParams() ? sourceParams() : null)
.add("FormatParams", hasFormatParams() ? formatParams() : null).add("CreateTime", createTime())
.add("Status", statusAsString()).add("ErrorInfo", errorInfo())
.add("ActiveUntilTimestamp", activeUntilTimestamp()).add("ActiveFromTimestamp", activeFromTimestamp())
.add("UpdatesChangesetId", updatesChangesetId()).add("UpdatedByChangesetId", updatedByChangesetId()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "changesetId":
return Optional.ofNullable(clazz.cast(changesetId()));
case "changesetArn":
return Optional.ofNullable(clazz.cast(changesetArn()));
case "datasetId":
return Optional.ofNullable(clazz.cast(datasetId()));
case "changeType":
return Optional.ofNullable(clazz.cast(changeTypeAsString()));
case "sourceParams":
return Optional.ofNullable(clazz.cast(sourceParams()));
case "formatParams":
return Optional.ofNullable(clazz.cast(formatParams()));
case "createTime":
return Optional.ofNullable(clazz.cast(createTime()));
case "status":
return Optional.ofNullable(clazz.cast(statusAsString()));
case "errorInfo":
return Optional.ofNullable(clazz.cast(errorInfo()));
case "activeUntilTimestamp":
return Optional.ofNullable(clazz.cast(activeUntilTimestamp()));
case "activeFromTimestamp":
return Optional.ofNullable(clazz.cast(activeFromTimestamp()));
case "updatesChangesetId":
return Optional.ofNullable(clazz.cast(updatesChangesetId()));
case "updatedByChangesetId":
return Optional.ofNullable(clazz.cast(updatedByChangesetId()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((GetChangesetResponse) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends FinspaceDataResponse.Builder, SdkPojo, CopyableBuilder {
/**
*
* The unique identifier for a Changeset.
*
*
* @param changesetId
* The unique identifier for a Changeset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder changesetId(String changesetId);
/**
*
* The ARN identifier of the Changeset.
*
*
* @param changesetArn
* The ARN identifier of the Changeset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder changesetArn(String changesetArn);
/**
*
* The unique identifier for the FinSpace Dataset where the Changeset is created.
*
*
* @param datasetId
* The unique identifier for the FinSpace Dataset where the Changeset is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder datasetId(String datasetId);
/**
*
* Type that indicates how a Changeset is applied to a Dataset.
*
*
*
*
* REPLACE
– Changeset is considered as a replacement to all prior loaded Changesets.
*
*
*
*
* APPEND
– Changeset is considered as an addition to the end of all prior loaded Changesets.
*
*
*
*
* MODIFY
– Changeset is considered as a replacement to a specific prior ingested Changeset.
*
*
*
*
* @param changeType
* Type that indicates how a Changeset is applied to a Dataset.
*
*
*
* REPLACE
– Changeset is considered as a replacement to all prior loaded Changesets.
*
*
*
*
* APPEND
– Changeset is considered as an addition to the end of all prior loaded
* Changesets.
*
*
*
*
* MODIFY
– Changeset is considered as a replacement to a specific prior ingested Changeset.
*
*
* @see ChangeType
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChangeType
*/
Builder changeType(String changeType);
/**
*
* Type that indicates how a Changeset is applied to a Dataset.
*
*
*
*
* REPLACE
– Changeset is considered as a replacement to all prior loaded Changesets.
*
*
*
*
* APPEND
– Changeset is considered as an addition to the end of all prior loaded Changesets.
*
*
*
*
* MODIFY
– Changeset is considered as a replacement to a specific prior ingested Changeset.
*
*
*
*
* @param changeType
* Type that indicates how a Changeset is applied to a Dataset.
*
*
*
* REPLACE
– Changeset is considered as a replacement to all prior loaded Changesets.
*
*
*
*
* APPEND
– Changeset is considered as an addition to the end of all prior loaded
* Changesets.
*
*
*
*
* MODIFY
– Changeset is considered as a replacement to a specific prior ingested Changeset.
*
*
* @see ChangeType
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChangeType
*/
Builder changeType(ChangeType changeType);
/**
*
* Options that define the location of the data being ingested.
*
*
* @param sourceParams
* Options that define the location of the data being ingested.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder sourceParams(Map sourceParams);
/**
*
* Structure of the source file(s).
*
*
* @param formatParams
* Structure of the source file(s).
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder formatParams(Map formatParams);
/**
*
* The timestamp at which the Changeset was created in FinSpace. The value is determined as epoch time in
* milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as
* 1635768000000.
*
*
* @param createTime
* The timestamp at which the Changeset was created in FinSpace. The value is determined as epoch time in
* milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as
* 1635768000000.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder createTime(Long createTime);
/**
*
* The status of Changeset creation operation.
*
*
* @param status
* The status of Changeset creation operation.
* @see IngestionStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see IngestionStatus
*/
Builder status(String status);
/**
*
* The status of Changeset creation operation.
*
*
* @param status
* The status of Changeset creation operation.
* @see IngestionStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see IngestionStatus
*/
Builder status(IngestionStatus status);
/**
*
* The structure with error messages.
*
*
* @param errorInfo
* The structure with error messages.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder errorInfo(ChangesetErrorInfo errorInfo);
/**
*
* The structure with error messages.
*
* This is a convenience method that creates an instance of the {@link ChangesetErrorInfo.Builder} avoiding the
* need to create one manually via {@link ChangesetErrorInfo#builder()}.
*
*
* When the {@link Consumer} completes, {@link ChangesetErrorInfo.Builder#build()} is called immediately and its
* result is passed to {@link #errorInfo(ChangesetErrorInfo)}.
*
* @param errorInfo
* a consumer that will call methods on {@link ChangesetErrorInfo.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #errorInfo(ChangesetErrorInfo)
*/
default Builder errorInfo(Consumer errorInfo) {
return errorInfo(ChangesetErrorInfo.builder().applyMutation(errorInfo).build());
}
/**
*
* Time until which the Changeset is active. The value is determined as epoch time in milliseconds. For example,
* the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
*
*
* @param activeUntilTimestamp
* Time until which the Changeset is active. The value is determined as epoch time in milliseconds. For
* example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder activeUntilTimestamp(Long activeUntilTimestamp);
/**
*
* Beginning time from which the Changeset is active. The value is determined as epoch time in milliseconds. For
* example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
*
*
* @param activeFromTimestamp
* Beginning time from which the Changeset is active. The value is determined as epoch time in
* milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as
* 1635768000000.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder activeFromTimestamp(Long activeFromTimestamp);
/**
*
* The unique identifier of the Changeset that is being updated.
*
*
* @param updatesChangesetId
* The unique identifier of the Changeset that is being updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder updatesChangesetId(String updatesChangesetId);
/**
*
* The unique identifier of the updated Changeset.
*
*
* @param updatedByChangesetId
* The unique identifier of the updated Changeset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder updatedByChangesetId(String updatedByChangesetId);
}
static final class BuilderImpl extends FinspaceDataResponse.BuilderImpl implements Builder {
private String changesetId;
private String changesetArn;
private String datasetId;
private String changeType;
private Map sourceParams = DefaultSdkAutoConstructMap.getInstance();
private Map formatParams = DefaultSdkAutoConstructMap.getInstance();
private Long createTime;
private String status;
private ChangesetErrorInfo errorInfo;
private Long activeUntilTimestamp;
private Long activeFromTimestamp;
private String updatesChangesetId;
private String updatedByChangesetId;
private BuilderImpl() {
}
private BuilderImpl(GetChangesetResponse model) {
super(model);
changesetId(model.changesetId);
changesetArn(model.changesetArn);
datasetId(model.datasetId);
changeType(model.changeType);
sourceParams(model.sourceParams);
formatParams(model.formatParams);
createTime(model.createTime);
status(model.status);
errorInfo(model.errorInfo);
activeUntilTimestamp(model.activeUntilTimestamp);
activeFromTimestamp(model.activeFromTimestamp);
updatesChangesetId(model.updatesChangesetId);
updatedByChangesetId(model.updatedByChangesetId);
}
public final String getChangesetId() {
return changesetId;
}
public final void setChangesetId(String changesetId) {
this.changesetId = changesetId;
}
@Override
public final Builder changesetId(String changesetId) {
this.changesetId = changesetId;
return this;
}
public final String getChangesetArn() {
return changesetArn;
}
public final void setChangesetArn(String changesetArn) {
this.changesetArn = changesetArn;
}
@Override
public final Builder changesetArn(String changesetArn) {
this.changesetArn = changesetArn;
return this;
}
public final String getDatasetId() {
return datasetId;
}
public final void setDatasetId(String datasetId) {
this.datasetId = datasetId;
}
@Override
public final Builder datasetId(String datasetId) {
this.datasetId = datasetId;
return this;
}
public final String getChangeType() {
return changeType;
}
public final void setChangeType(String changeType) {
this.changeType = changeType;
}
@Override
public final Builder changeType(String changeType) {
this.changeType = changeType;
return this;
}
@Override
public final Builder changeType(ChangeType changeType) {
this.changeType(changeType == null ? null : changeType.toString());
return this;
}
public final Map getSourceParams() {
if (sourceParams instanceof SdkAutoConstructMap) {
return null;
}
return sourceParams;
}
public final void setSourceParams(Map sourceParams) {
this.sourceParams = SourceParamsCopier.copy(sourceParams);
}
@Override
public final Builder sourceParams(Map sourceParams) {
this.sourceParams = SourceParamsCopier.copy(sourceParams);
return this;
}
public final Map getFormatParams() {
if (formatParams instanceof SdkAutoConstructMap) {
return null;
}
return formatParams;
}
public final void setFormatParams(Map formatParams) {
this.formatParams = FormatParamsCopier.copy(formatParams);
}
@Override
public final Builder formatParams(Map formatParams) {
this.formatParams = FormatParamsCopier.copy(formatParams);
return this;
}
public final Long getCreateTime() {
return createTime;
}
public final void setCreateTime(Long createTime) {
this.createTime = createTime;
}
@Override
public final Builder createTime(Long createTime) {
this.createTime = createTime;
return this;
}
public final String getStatus() {
return status;
}
public final void setStatus(String status) {
this.status = status;
}
@Override
public final Builder status(String status) {
this.status = status;
return this;
}
@Override
public final Builder status(IngestionStatus status) {
this.status(status == null ? null : status.toString());
return this;
}
public final ChangesetErrorInfo.Builder getErrorInfo() {
return errorInfo != null ? errorInfo.toBuilder() : null;
}
public final void setErrorInfo(ChangesetErrorInfo.BuilderImpl errorInfo) {
this.errorInfo = errorInfo != null ? errorInfo.build() : null;
}
@Override
public final Builder errorInfo(ChangesetErrorInfo errorInfo) {
this.errorInfo = errorInfo;
return this;
}
public final Long getActiveUntilTimestamp() {
return activeUntilTimestamp;
}
public final void setActiveUntilTimestamp(Long activeUntilTimestamp) {
this.activeUntilTimestamp = activeUntilTimestamp;
}
@Override
public final Builder activeUntilTimestamp(Long activeUntilTimestamp) {
this.activeUntilTimestamp = activeUntilTimestamp;
return this;
}
public final Long getActiveFromTimestamp() {
return activeFromTimestamp;
}
public final void setActiveFromTimestamp(Long activeFromTimestamp) {
this.activeFromTimestamp = activeFromTimestamp;
}
@Override
public final Builder activeFromTimestamp(Long activeFromTimestamp) {
this.activeFromTimestamp = activeFromTimestamp;
return this;
}
public final String getUpdatesChangesetId() {
return updatesChangesetId;
}
public final void setUpdatesChangesetId(String updatesChangesetId) {
this.updatesChangesetId = updatesChangesetId;
}
@Override
public final Builder updatesChangesetId(String updatesChangesetId) {
this.updatesChangesetId = updatesChangesetId;
return this;
}
public final String getUpdatedByChangesetId() {
return updatedByChangesetId;
}
public final void setUpdatedByChangesetId(String updatedByChangesetId) {
this.updatedByChangesetId = updatedByChangesetId;
}
@Override
public final Builder updatedByChangesetId(String updatedByChangesetId) {
this.updatedByChangesetId = updatedByChangesetId;
return this;
}
@Override
public GetChangesetResponse build() {
return new GetChangesetResponse(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}