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

software.amazon.awssdk.services.databasemigration.model.ExportMetadataModelAssessmentResponse 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.29.15
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.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.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 ExportMetadataModelAssessmentResponse extends DatabaseMigrationResponse implements
        ToCopyableBuilder {
    private static final SdkField PDF_REPORT_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("PdfReport")
            .getter(getter(ExportMetadataModelAssessmentResponse::pdfReport)).setter(setter(Builder::pdfReport))
            .constructor(ExportMetadataModelAssessmentResultEntry::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PdfReport").build()).build();

    private static final SdkField CSV_REPORT_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("CsvReport")
            .getter(getter(ExportMetadataModelAssessmentResponse::csvReport)).setter(setter(Builder::csvReport))
            .constructor(ExportMetadataModelAssessmentResultEntry::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CsvReport").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(PDF_REPORT_FIELD,
            CSV_REPORT_FIELD));

    private final ExportMetadataModelAssessmentResultEntry pdfReport;

    private final ExportMetadataModelAssessmentResultEntry csvReport;

    private ExportMetadataModelAssessmentResponse(BuilderImpl builder) {
        super(builder);
        this.pdfReport = builder.pdfReport;
        this.csvReport = builder.csvReport;
    }

    /**
     * 

* The Amazon S3 details for an assessment exported in PDF format. *

* * @return The Amazon S3 details for an assessment exported in PDF format. */ public final ExportMetadataModelAssessmentResultEntry pdfReport() { return pdfReport; } /** *

* The Amazon S3 details for an assessment exported in CSV format. *

* * @return The Amazon S3 details for an assessment exported in CSV format. */ public final ExportMetadataModelAssessmentResultEntry csvReport() { return csvReport; } @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(pdfReport()); hashCode = 31 * hashCode + Objects.hashCode(csvReport()); 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 ExportMetadataModelAssessmentResponse)) { return false; } ExportMetadataModelAssessmentResponse other = (ExportMetadataModelAssessmentResponse) obj; return Objects.equals(pdfReport(), other.pdfReport()) && Objects.equals(csvReport(), other.csvReport()); } /** * 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("ExportMetadataModelAssessmentResponse").add("PdfReport", pdfReport()) .add("CsvReport", csvReport()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "PdfReport": return Optional.ofNullable(clazz.cast(pdfReport())); case "CsvReport": return Optional.ofNullable(clazz.cast(csvReport())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ExportMetadataModelAssessmentResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends DatabaseMigrationResponse.Builder, SdkPojo, CopyableBuilder { /** *

* The Amazon S3 details for an assessment exported in PDF format. *

* * @param pdfReport * The Amazon S3 details for an assessment exported in PDF format. * @return Returns a reference to this object so that method calls can be chained together. */ Builder pdfReport(ExportMetadataModelAssessmentResultEntry pdfReport); /** *

* The Amazon S3 details for an assessment exported in PDF format. *

* This is a convenience method that creates an instance of the * {@link ExportMetadataModelAssessmentResultEntry.Builder} avoiding the need to create one manually via * {@link ExportMetadataModelAssessmentResultEntry#builder()}. * *

* When the {@link Consumer} completes, {@link ExportMetadataModelAssessmentResultEntry.Builder#build()} is * called immediately and its result is passed to {@link #pdfReport(ExportMetadataModelAssessmentResultEntry)}. * * @param pdfReport * a consumer that will call methods on {@link ExportMetadataModelAssessmentResultEntry.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #pdfReport(ExportMetadataModelAssessmentResultEntry) */ default Builder pdfReport(Consumer pdfReport) { return pdfReport(ExportMetadataModelAssessmentResultEntry.builder().applyMutation(pdfReport).build()); } /** *

* The Amazon S3 details for an assessment exported in CSV format. *

* * @param csvReport * The Amazon S3 details for an assessment exported in CSV format. * @return Returns a reference to this object so that method calls can be chained together. */ Builder csvReport(ExportMetadataModelAssessmentResultEntry csvReport); /** *

* The Amazon S3 details for an assessment exported in CSV format. *

* This is a convenience method that creates an instance of the * {@link ExportMetadataModelAssessmentResultEntry.Builder} avoiding the need to create one manually via * {@link ExportMetadataModelAssessmentResultEntry#builder()}. * *

* When the {@link Consumer} completes, {@link ExportMetadataModelAssessmentResultEntry.Builder#build()} is * called immediately and its result is passed to {@link #csvReport(ExportMetadataModelAssessmentResultEntry)}. * * @param csvReport * a consumer that will call methods on {@link ExportMetadataModelAssessmentResultEntry.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #csvReport(ExportMetadataModelAssessmentResultEntry) */ default Builder csvReport(Consumer csvReport) { return csvReport(ExportMetadataModelAssessmentResultEntry.builder().applyMutation(csvReport).build()); } } static final class BuilderImpl extends DatabaseMigrationResponse.BuilderImpl implements Builder { private ExportMetadataModelAssessmentResultEntry pdfReport; private ExportMetadataModelAssessmentResultEntry csvReport; private BuilderImpl() { } private BuilderImpl(ExportMetadataModelAssessmentResponse model) { super(model); pdfReport(model.pdfReport); csvReport(model.csvReport); } public final ExportMetadataModelAssessmentResultEntry.Builder getPdfReport() { return pdfReport != null ? pdfReport.toBuilder() : null; } public final void setPdfReport(ExportMetadataModelAssessmentResultEntry.BuilderImpl pdfReport) { this.pdfReport = pdfReport != null ? pdfReport.build() : null; } @Override public final Builder pdfReport(ExportMetadataModelAssessmentResultEntry pdfReport) { this.pdfReport = pdfReport; return this; } public final ExportMetadataModelAssessmentResultEntry.Builder getCsvReport() { return csvReport != null ? csvReport.toBuilder() : null; } public final void setCsvReport(ExportMetadataModelAssessmentResultEntry.BuilderImpl csvReport) { this.csvReport = csvReport != null ? csvReport.build() : null; } @Override public final Builder csvReport(ExportMetadataModelAssessmentResultEntry csvReport) { this.csvReport = csvReport; return this; } @Override public ExportMetadataModelAssessmentResponse build() { return new ExportMetadataModelAssessmentResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy