software.amazon.awssdk.services.databasemigration.model.ReplicationTaskAssessmentResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databasemigration Show documentation
Show all versions of databasemigration Show documentation
The AWS Java SDK for AWS Database Migration Service module holds the client classes that are used for
communicating with AWS Database Migration Service.
/*
* 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.databasemigration.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 task assessment report in JSON format.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class ReplicationTaskAssessmentResult implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField REPLICATION_TASK_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ReplicationTaskAssessmentResult::replicationTaskIdentifier))
.setter(setter(Builder::replicationTaskIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicationTaskIdentifier").build())
.build();
private static final SdkField REPLICATION_TASK_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ReplicationTaskAssessmentResult::replicationTaskArn)).setter(setter(Builder::replicationTaskArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicationTaskArn").build())
.build();
private static final SdkField REPLICATION_TASK_LAST_ASSESSMENT_DATE_FIELD = SdkField
. builder(MarshallingType.INSTANT)
.getter(getter(ReplicationTaskAssessmentResult::replicationTaskLastAssessmentDate))
.setter(setter(Builder::replicationTaskLastAssessmentDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicationTaskLastAssessmentDate")
.build()).build();
private static final SdkField ASSESSMENT_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ReplicationTaskAssessmentResult::assessmentStatus)).setter(setter(Builder::assessmentStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AssessmentStatus").build()).build();
private static final SdkField ASSESSMENT_RESULTS_FILE_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ReplicationTaskAssessmentResult::assessmentResultsFile))
.setter(setter(Builder::assessmentResultsFile))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AssessmentResultsFile").build())
.build();
private static final SdkField ASSESSMENT_RESULTS_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ReplicationTaskAssessmentResult::assessmentResults)).setter(setter(Builder::assessmentResults))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AssessmentResults").build()).build();
private static final SdkField S3_OBJECT_URL_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(ReplicationTaskAssessmentResult::s3ObjectUrl)).setter(setter(Builder::s3ObjectUrl))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("S3ObjectUrl").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(
REPLICATION_TASK_IDENTIFIER_FIELD, REPLICATION_TASK_ARN_FIELD, REPLICATION_TASK_LAST_ASSESSMENT_DATE_FIELD,
ASSESSMENT_STATUS_FIELD, ASSESSMENT_RESULTS_FILE_FIELD, ASSESSMENT_RESULTS_FIELD, S3_OBJECT_URL_FIELD));
private static final long serialVersionUID = 1L;
private final String replicationTaskIdentifier;
private final String replicationTaskArn;
private final Instant replicationTaskLastAssessmentDate;
private final String assessmentStatus;
private final String assessmentResultsFile;
private final String assessmentResults;
private final String s3ObjectUrl;
private ReplicationTaskAssessmentResult(BuilderImpl builder) {
this.replicationTaskIdentifier = builder.replicationTaskIdentifier;
this.replicationTaskArn = builder.replicationTaskArn;
this.replicationTaskLastAssessmentDate = builder.replicationTaskLastAssessmentDate;
this.assessmentStatus = builder.assessmentStatus;
this.assessmentResultsFile = builder.assessmentResultsFile;
this.assessmentResults = builder.assessmentResults;
this.s3ObjectUrl = builder.s3ObjectUrl;
}
/**
*
* The replication task identifier of the task on which the task assessment was run.
*
*
* @return The replication task identifier of the task on which the task assessment was run.
*/
public String replicationTaskIdentifier() {
return replicationTaskIdentifier;
}
/**
*
* The Amazon Resource Name (ARN) of the replication task.
*
*
* @return The Amazon Resource Name (ARN) of the replication task.
*/
public String replicationTaskArn() {
return replicationTaskArn;
}
/**
*
* The date the task assessment was completed.
*
*
* @return The date the task assessment was completed.
*/
public Instant replicationTaskLastAssessmentDate() {
return replicationTaskLastAssessmentDate;
}
/**
*
* The status of the task assessment.
*
*
* @return The status of the task assessment.
*/
public String assessmentStatus() {
return assessmentStatus;
}
/**
*
* The file containing the results of the task assessment.
*
*
* @return The file containing the results of the task assessment.
*/
public String assessmentResultsFile() {
return assessmentResultsFile;
}
/**
*
* The task assessment results in JSON format.
*
*
* @return The task assessment results in JSON format.
*/
public String assessmentResults() {
return assessmentResults;
}
/**
*
* The URL of the S3 object containing the task assessment results.
*
*
* @return The URL of the S3 object containing the task assessment results.
*/
public String s3ObjectUrl() {
return s3ObjectUrl;
}
@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 int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(replicationTaskIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(replicationTaskArn());
hashCode = 31 * hashCode + Objects.hashCode(replicationTaskLastAssessmentDate());
hashCode = 31 * hashCode + Objects.hashCode(assessmentStatus());
hashCode = 31 * hashCode + Objects.hashCode(assessmentResultsFile());
hashCode = 31 * hashCode + Objects.hashCode(assessmentResults());
hashCode = 31 * hashCode + Objects.hashCode(s3ObjectUrl());
return hashCode;
}
@Override
public boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof ReplicationTaskAssessmentResult)) {
return false;
}
ReplicationTaskAssessmentResult other = (ReplicationTaskAssessmentResult) obj;
return Objects.equals(replicationTaskIdentifier(), other.replicationTaskIdentifier())
&& Objects.equals(replicationTaskArn(), other.replicationTaskArn())
&& Objects.equals(replicationTaskLastAssessmentDate(), other.replicationTaskLastAssessmentDate())
&& Objects.equals(assessmentStatus(), other.assessmentStatus())
&& Objects.equals(assessmentResultsFile(), other.assessmentResultsFile())
&& Objects.equals(assessmentResults(), other.assessmentResults())
&& Objects.equals(s3ObjectUrl(), other.s3ObjectUrl());
}
/**
* 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 String toString() {
return ToString.builder("ReplicationTaskAssessmentResult").add("ReplicationTaskIdentifier", replicationTaskIdentifier())
.add("ReplicationTaskArn", replicationTaskArn())
.add("ReplicationTaskLastAssessmentDate", replicationTaskLastAssessmentDate())
.add("AssessmentStatus", assessmentStatus()).add("AssessmentResultsFile", assessmentResultsFile())
.add("AssessmentResults", assessmentResults()).add("S3ObjectUrl", s3ObjectUrl()).build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "ReplicationTaskIdentifier":
return Optional.ofNullable(clazz.cast(replicationTaskIdentifier()));
case "ReplicationTaskArn":
return Optional.ofNullable(clazz.cast(replicationTaskArn()));
case "ReplicationTaskLastAssessmentDate":
return Optional.ofNullable(clazz.cast(replicationTaskLastAssessmentDate()));
case "AssessmentStatus":
return Optional.ofNullable(clazz.cast(assessmentStatus()));
case "AssessmentResultsFile":
return Optional.ofNullable(clazz.cast(assessmentResultsFile()));
case "AssessmentResults":
return Optional.ofNullable(clazz.cast(assessmentResults()));
case "S3ObjectUrl":
return Optional.ofNullable(clazz.cast(s3ObjectUrl()));
default:
return Optional.empty();
}
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy