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

software.amazon.awssdk.services.databasemigration.model.ReplicationTaskAssessmentResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Database Migration Service module holds the client classes that are used for communicating with AWS Database Migration Service.

There is a newer version: 2.30.1
Show newest version
/*
 * 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 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 getter(Function g) { return obj -> g.apply((ReplicationTaskAssessmentResult) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The replication task identifier of the task on which the task assessment was run. *

* * @param replicationTaskIdentifier * The replication task identifier of the task on which the task assessment was run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder replicationTaskIdentifier(String replicationTaskIdentifier); /** *

* The Amazon Resource Name (ARN) of the replication task. *

* * @param replicationTaskArn * The Amazon Resource Name (ARN) of the replication task. * @return Returns a reference to this object so that method calls can be chained together. */ Builder replicationTaskArn(String replicationTaskArn); /** *

* The date the task assessment was completed. *

* * @param replicationTaskLastAssessmentDate * The date the task assessment was completed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder replicationTaskLastAssessmentDate(Instant replicationTaskLastAssessmentDate); /** *

* The status of the task assessment. *

* * @param assessmentStatus * The status of the task assessment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder assessmentStatus(String assessmentStatus); /** *

* The file containing the results of the task assessment. *

* * @param assessmentResultsFile * The file containing the results of the task assessment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder assessmentResultsFile(String assessmentResultsFile); /** *

* The task assessment results in JSON format. *

* * @param assessmentResults * The task assessment results in JSON format. * @return Returns a reference to this object so that method calls can be chained together. */ Builder assessmentResults(String assessmentResults); /** *

* The URL of the S3 object containing the task assessment results. *

* * @param s3ObjectUrl * The URL of the S3 object containing the task assessment results. * @return Returns a reference to this object so that method calls can be chained together. */ Builder s3ObjectUrl(String s3ObjectUrl); } static final class BuilderImpl implements Builder { private String replicationTaskIdentifier; private String replicationTaskArn; private Instant replicationTaskLastAssessmentDate; private String assessmentStatus; private String assessmentResultsFile; private String assessmentResults; private String s3ObjectUrl; private BuilderImpl() { } private BuilderImpl(ReplicationTaskAssessmentResult model) { replicationTaskIdentifier(model.replicationTaskIdentifier); replicationTaskArn(model.replicationTaskArn); replicationTaskLastAssessmentDate(model.replicationTaskLastAssessmentDate); assessmentStatus(model.assessmentStatus); assessmentResultsFile(model.assessmentResultsFile); assessmentResults(model.assessmentResults); s3ObjectUrl(model.s3ObjectUrl); } public final String getReplicationTaskIdentifier() { return replicationTaskIdentifier; } @Override public final Builder replicationTaskIdentifier(String replicationTaskIdentifier) { this.replicationTaskIdentifier = replicationTaskIdentifier; return this; } public final void setReplicationTaskIdentifier(String replicationTaskIdentifier) { this.replicationTaskIdentifier = replicationTaskIdentifier; } public final String getReplicationTaskArn() { return replicationTaskArn; } @Override public final Builder replicationTaskArn(String replicationTaskArn) { this.replicationTaskArn = replicationTaskArn; return this; } public final void setReplicationTaskArn(String replicationTaskArn) { this.replicationTaskArn = replicationTaskArn; } public final Instant getReplicationTaskLastAssessmentDate() { return replicationTaskLastAssessmentDate; } @Override public final Builder replicationTaskLastAssessmentDate(Instant replicationTaskLastAssessmentDate) { this.replicationTaskLastAssessmentDate = replicationTaskLastAssessmentDate; return this; } public final void setReplicationTaskLastAssessmentDate(Instant replicationTaskLastAssessmentDate) { this.replicationTaskLastAssessmentDate = replicationTaskLastAssessmentDate; } public final String getAssessmentStatus() { return assessmentStatus; } @Override public final Builder assessmentStatus(String assessmentStatus) { this.assessmentStatus = assessmentStatus; return this; } public final void setAssessmentStatus(String assessmentStatus) { this.assessmentStatus = assessmentStatus; } public final String getAssessmentResultsFile() { return assessmentResultsFile; } @Override public final Builder assessmentResultsFile(String assessmentResultsFile) { this.assessmentResultsFile = assessmentResultsFile; return this; } public final void setAssessmentResultsFile(String assessmentResultsFile) { this.assessmentResultsFile = assessmentResultsFile; } public final String getAssessmentResults() { return assessmentResults; } @Override public final Builder assessmentResults(String assessmentResults) { this.assessmentResults = assessmentResults; return this; } public final void setAssessmentResults(String assessmentResults) { this.assessmentResults = assessmentResults; } public final String getS3ObjectUrl() { return s3ObjectUrl; } @Override public final Builder s3ObjectUrl(String s3ObjectUrl) { this.s3ObjectUrl = s3ObjectUrl; return this; } public final void setS3ObjectUrl(String s3ObjectUrl) { this.s3ObjectUrl = s3ObjectUrl; } @Override public ReplicationTaskAssessmentResult build() { return new ReplicationTaskAssessmentResult(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy