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.

The newest version!
/*
 * Copyright 2013-2018 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.time.Instant;
import java.util.Objects;
import java.util.Optional;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.core.protocol.ProtocolMarshaller;
import software.amazon.awssdk.core.protocol.StructuredPojo;
import software.amazon.awssdk.services.databasemigration.transform.ReplicationTaskAssessmentResultMarshaller;
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 StructuredPojo, ToCopyableBuilder { 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) { 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()); } @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(); } } @SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { ReplicationTaskAssessmentResultMarshaller.getInstance().marshall(this, protocolMarshaller); } public interface Builder extends 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); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy