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

software.amazon.awssdk.services.applicationdiscovery.model.ExportInfo Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.28.6
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.applicationdiscovery.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;

/**
 * 

* Information regarding the export status of discovered data. The value is an array of objects. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ExportInfo implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField EXPORT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("exportId").getter(getter(ExportInfo::exportId)).setter(setter(Builder::exportId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("exportId").build()).build(); private static final SdkField EXPORT_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("exportStatus").getter(getter(ExportInfo::exportStatusAsString)).setter(setter(Builder::exportStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("exportStatus").build()).build(); private static final SdkField STATUS_MESSAGE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("statusMessage").getter(getter(ExportInfo::statusMessage)).setter(setter(Builder::statusMessage)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("statusMessage").build()).build(); private static final SdkField CONFIGURATIONS_DOWNLOAD_URL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("configurationsDownloadUrl").getter(getter(ExportInfo::configurationsDownloadUrl)) .setter(setter(Builder::configurationsDownloadUrl)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("configurationsDownloadUrl").build()) .build(); private static final SdkField EXPORT_REQUEST_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("exportRequestTime").getter(getter(ExportInfo::exportRequestTime)) .setter(setter(Builder::exportRequestTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("exportRequestTime").build()).build(); private static final SdkField IS_TRUNCATED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("isTruncated").getter(getter(ExportInfo::isTruncated)).setter(setter(Builder::isTruncated)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("isTruncated").build()).build(); private static final SdkField REQUESTED_START_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("requestedStartTime").getter(getter(ExportInfo::requestedStartTime)) .setter(setter(Builder::requestedStartTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("requestedStartTime").build()) .build(); private static final SdkField REQUESTED_END_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("requestedEndTime").getter(getter(ExportInfo::requestedEndTime)) .setter(setter(Builder::requestedEndTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("requestedEndTime").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(EXPORT_ID_FIELD, EXPORT_STATUS_FIELD, STATUS_MESSAGE_FIELD, CONFIGURATIONS_DOWNLOAD_URL_FIELD, EXPORT_REQUEST_TIME_FIELD, IS_TRUNCATED_FIELD, REQUESTED_START_TIME_FIELD, REQUESTED_END_TIME_FIELD)); private static final long serialVersionUID = 1L; private final String exportId; private final String exportStatus; private final String statusMessage; private final String configurationsDownloadUrl; private final Instant exportRequestTime; private final Boolean isTruncated; private final Instant requestedStartTime; private final Instant requestedEndTime; private ExportInfo(BuilderImpl builder) { this.exportId = builder.exportId; this.exportStatus = builder.exportStatus; this.statusMessage = builder.statusMessage; this.configurationsDownloadUrl = builder.configurationsDownloadUrl; this.exportRequestTime = builder.exportRequestTime; this.isTruncated = builder.isTruncated; this.requestedStartTime = builder.requestedStartTime; this.requestedEndTime = builder.requestedEndTime; } /** *

* A unique identifier used to query an export. *

* * @return A unique identifier used to query an export. */ public final String exportId() { return exportId; } /** *

* The status of the data export job. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #exportStatus} will * return {@link ExportStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #exportStatusAsString}. *

* * @return The status of the data export job. * @see ExportStatus */ public final ExportStatus exportStatus() { return ExportStatus.fromValue(exportStatus); } /** *

* The status of the data export job. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #exportStatus} will * return {@link ExportStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #exportStatusAsString}. *

* * @return The status of the data export job. * @see ExportStatus */ public final String exportStatusAsString() { return exportStatus; } /** *

* A status message provided for API callers. *

* * @return A status message provided for API callers. */ public final String statusMessage() { return statusMessage; } /** *

* A URL for an Amazon S3 bucket where you can review the exported data. The URL is displayed only if the export * succeeded. *

* * @return A URL for an Amazon S3 bucket where you can review the exported data. The URL is displayed only if the * export succeeded. */ public final String configurationsDownloadUrl() { return configurationsDownloadUrl; } /** *

* The time that the data export was initiated. *

* * @return The time that the data export was initiated. */ public final Instant exportRequestTime() { return exportRequestTime; } /** *

* If true, the export of agent information exceeded the size limit for a single export and the exported data is * incomplete for the requested time range. To address this, select a smaller time range for the export by using * startDate and endDate. *

* * @return If true, the export of agent information exceeded the size limit for a single export and the exported * data is incomplete for the requested time range. To address this, select a smaller time range for the * export by using startDate and endDate. */ public final Boolean isTruncated() { return isTruncated; } /** *

* The value of startTime parameter in the StartExportTask request. If no * startTime was requested, this result does not appear in ExportInfo. *

* * @return The value of startTime parameter in the StartExportTask request. If no * startTime was requested, this result does not appear in ExportInfo. */ public final Instant requestedStartTime() { return requestedStartTime; } /** *

* The endTime used in the StartExportTask request. If no endTime was * requested, this result does not appear in ExportInfo. *

* * @return The endTime used in the StartExportTask request. If no endTime was * requested, this result does not appear in ExportInfo. */ public final Instant requestedEndTime() { return requestedEndTime; } @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 + Objects.hashCode(exportId()); hashCode = 31 * hashCode + Objects.hashCode(exportStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(statusMessage()); hashCode = 31 * hashCode + Objects.hashCode(configurationsDownloadUrl()); hashCode = 31 * hashCode + Objects.hashCode(exportRequestTime()); hashCode = 31 * hashCode + Objects.hashCode(isTruncated()); hashCode = 31 * hashCode + Objects.hashCode(requestedStartTime()); hashCode = 31 * hashCode + Objects.hashCode(requestedEndTime()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ExportInfo)) { return false; } ExportInfo other = (ExportInfo) obj; return Objects.equals(exportId(), other.exportId()) && Objects.equals(exportStatusAsString(), other.exportStatusAsString()) && Objects.equals(statusMessage(), other.statusMessage()) && Objects.equals(configurationsDownloadUrl(), other.configurationsDownloadUrl()) && Objects.equals(exportRequestTime(), other.exportRequestTime()) && Objects.equals(isTruncated(), other.isTruncated()) && Objects.equals(requestedStartTime(), other.requestedStartTime()) && Objects.equals(requestedEndTime(), other.requestedEndTime()); } /** * 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("ExportInfo").add("ExportId", exportId()).add("ExportStatus", exportStatusAsString()) .add("StatusMessage", statusMessage()).add("ConfigurationsDownloadUrl", configurationsDownloadUrl()) .add("ExportRequestTime", exportRequestTime()).add("IsTruncated", isTruncated()) .add("RequestedStartTime", requestedStartTime()).add("RequestedEndTime", requestedEndTime()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "exportId": return Optional.ofNullable(clazz.cast(exportId())); case "exportStatus": return Optional.ofNullable(clazz.cast(exportStatusAsString())); case "statusMessage": return Optional.ofNullable(clazz.cast(statusMessage())); case "configurationsDownloadUrl": return Optional.ofNullable(clazz.cast(configurationsDownloadUrl())); case "exportRequestTime": return Optional.ofNullable(clazz.cast(exportRequestTime())); case "isTruncated": return Optional.ofNullable(clazz.cast(isTruncated())); case "requestedStartTime": return Optional.ofNullable(clazz.cast(requestedStartTime())); case "requestedEndTime": return Optional.ofNullable(clazz.cast(requestedEndTime())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ExportInfo) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* A unique identifier used to query an export. *

* * @param exportId * A unique identifier used to query an export. * @return Returns a reference to this object so that method calls can be chained together. */ Builder exportId(String exportId); /** *

* The status of the data export job. *

* * @param exportStatus * The status of the data export job. * @see ExportStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ExportStatus */ Builder exportStatus(String exportStatus); /** *

* The status of the data export job. *

* * @param exportStatus * The status of the data export job. * @see ExportStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ExportStatus */ Builder exportStatus(ExportStatus exportStatus); /** *

* A status message provided for API callers. *

* * @param statusMessage * A status message provided for API callers. * @return Returns a reference to this object so that method calls can be chained together. */ Builder statusMessage(String statusMessage); /** *

* A URL for an Amazon S3 bucket where you can review the exported data. The URL is displayed only if the export * succeeded. *

* * @param configurationsDownloadUrl * A URL for an Amazon S3 bucket where you can review the exported data. The URL is displayed only if the * export succeeded. * @return Returns a reference to this object so that method calls can be chained together. */ Builder configurationsDownloadUrl(String configurationsDownloadUrl); /** *

* The time that the data export was initiated. *

* * @param exportRequestTime * The time that the data export was initiated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder exportRequestTime(Instant exportRequestTime); /** *

* If true, the export of agent information exceeded the size limit for a single export and the exported data is * incomplete for the requested time range. To address this, select a smaller time range for the export by using * startDate and endDate. *

* * @param isTruncated * If true, the export of agent information exceeded the size limit for a single export and the exported * data is incomplete for the requested time range. To address this, select a smaller time range for the * export by using startDate and endDate. * @return Returns a reference to this object so that method calls can be chained together. */ Builder isTruncated(Boolean isTruncated); /** *

* The value of startTime parameter in the StartExportTask request. If no * startTime was requested, this result does not appear in ExportInfo. *

* * @param requestedStartTime * The value of startTime parameter in the StartExportTask request. If no * startTime was requested, this result does not appear in ExportInfo. * @return Returns a reference to this object so that method calls can be chained together. */ Builder requestedStartTime(Instant requestedStartTime); /** *

* The endTime used in the StartExportTask request. If no endTime was * requested, this result does not appear in ExportInfo. *

* * @param requestedEndTime * The endTime used in the StartExportTask request. If no endTime * was requested, this result does not appear in ExportInfo. * @return Returns a reference to this object so that method calls can be chained together. */ Builder requestedEndTime(Instant requestedEndTime); } static final class BuilderImpl implements Builder { private String exportId; private String exportStatus; private String statusMessage; private String configurationsDownloadUrl; private Instant exportRequestTime; private Boolean isTruncated; private Instant requestedStartTime; private Instant requestedEndTime; private BuilderImpl() { } private BuilderImpl(ExportInfo model) { exportId(model.exportId); exportStatus(model.exportStatus); statusMessage(model.statusMessage); configurationsDownloadUrl(model.configurationsDownloadUrl); exportRequestTime(model.exportRequestTime); isTruncated(model.isTruncated); requestedStartTime(model.requestedStartTime); requestedEndTime(model.requestedEndTime); } public final String getExportId() { return exportId; } public final void setExportId(String exportId) { this.exportId = exportId; } @Override public final Builder exportId(String exportId) { this.exportId = exportId; return this; } public final String getExportStatus() { return exportStatus; } public final void setExportStatus(String exportStatus) { this.exportStatus = exportStatus; } @Override public final Builder exportStatus(String exportStatus) { this.exportStatus = exportStatus; return this; } @Override public final Builder exportStatus(ExportStatus exportStatus) { this.exportStatus(exportStatus == null ? null : exportStatus.toString()); return this; } public final String getStatusMessage() { return statusMessage; } public final void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } @Override public final Builder statusMessage(String statusMessage) { this.statusMessage = statusMessage; return this; } public final String getConfigurationsDownloadUrl() { return configurationsDownloadUrl; } public final void setConfigurationsDownloadUrl(String configurationsDownloadUrl) { this.configurationsDownloadUrl = configurationsDownloadUrl; } @Override public final Builder configurationsDownloadUrl(String configurationsDownloadUrl) { this.configurationsDownloadUrl = configurationsDownloadUrl; return this; } public final Instant getExportRequestTime() { return exportRequestTime; } public final void setExportRequestTime(Instant exportRequestTime) { this.exportRequestTime = exportRequestTime; } @Override public final Builder exportRequestTime(Instant exportRequestTime) { this.exportRequestTime = exportRequestTime; return this; } public final Boolean getIsTruncated() { return isTruncated; } public final void setIsTruncated(Boolean isTruncated) { this.isTruncated = isTruncated; } @Override public final Builder isTruncated(Boolean isTruncated) { this.isTruncated = isTruncated; return this; } public final Instant getRequestedStartTime() { return requestedStartTime; } public final void setRequestedStartTime(Instant requestedStartTime) { this.requestedStartTime = requestedStartTime; } @Override public final Builder requestedStartTime(Instant requestedStartTime) { this.requestedStartTime = requestedStartTime; return this; } public final Instant getRequestedEndTime() { return requestedEndTime; } public final void setRequestedEndTime(Instant requestedEndTime) { this.requestedEndTime = requestedEndTime; } @Override public final Builder requestedEndTime(Instant requestedEndTime) { this.requestedEndTime = requestedEndTime; return this; } @Override public ExportInfo build() { return new ExportInfo(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy