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

software.amazon.awssdk.services.quicksight.model.DashboardVersionSummary Maven / Gradle / Ivy

/*
 * 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.quicksight.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;

/**
 * 

* Dashboard version summary. *

*/ @Generated("software.amazon.awssdk:codegen") public final class DashboardVersionSummary implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DashboardVersionSummary::arn)).setter(setter(Builder::arn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Arn").build()).build(); private static final SdkField CREATED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(DashboardVersionSummary::createdTime)).setter(setter(Builder::createdTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedTime").build()).build(); private static final SdkField VERSION_NUMBER_FIELD = SdkField. builder(MarshallingType.LONG) .getter(getter(DashboardVersionSummary::versionNumber)).setter(setter(Builder::versionNumber)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VersionNumber").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DashboardVersionSummary::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build(); private static final SdkField SOURCE_ENTITY_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DashboardVersionSummary::sourceEntityArn)).setter(setter(Builder::sourceEntityArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceEntityArn").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DashboardVersionSummary::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD, CREATED_TIME_FIELD, VERSION_NUMBER_FIELD, STATUS_FIELD, SOURCE_ENTITY_ARN_FIELD, DESCRIPTION_FIELD)); private static final long serialVersionUID = 1L; private final String arn; private final Instant createdTime; private final Long versionNumber; private final String status; private final String sourceEntityArn; private final String description; private DashboardVersionSummary(BuilderImpl builder) { this.arn = builder.arn; this.createdTime = builder.createdTime; this.versionNumber = builder.versionNumber; this.status = builder.status; this.sourceEntityArn = builder.sourceEntityArn; this.description = builder.description; } /** *

* The Amazon Resource Name (ARN) of the resource. *

* * @return The Amazon Resource Name (ARN) of the resource. */ public String arn() { return arn; } /** *

* The time that this dashboard version was created. *

* * @return The time that this dashboard version was created. */ public Instant createdTime() { return createdTime; } /** *

* Version number. *

* * @return Version number. */ public Long versionNumber() { return versionNumber; } /** *

* The HTTP status of the request. *

*

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

* * @return The HTTP status of the request. * @see ResourceStatus */ public ResourceStatus status() { return ResourceStatus.fromValue(status); } /** *

* The HTTP status of the request. *

*

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

* * @return The HTTP status of the request. * @see ResourceStatus */ public String statusAsString() { return status; } /** *

* Source entity ARN. *

* * @return Source entity ARN. */ public String sourceEntityArn() { return sourceEntityArn; } /** *

* Description. *

* * @return Description. */ public String description() { return description; } @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(arn()); hashCode = 31 * hashCode + Objects.hashCode(createdTime()); hashCode = 31 * hashCode + Objects.hashCode(versionNumber()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(sourceEntityArn()); hashCode = 31 * hashCode + Objects.hashCode(description()); 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 DashboardVersionSummary)) { return false; } DashboardVersionSummary other = (DashboardVersionSummary) obj; return Objects.equals(arn(), other.arn()) && Objects.equals(createdTime(), other.createdTime()) && Objects.equals(versionNumber(), other.versionNumber()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(sourceEntityArn(), other.sourceEntityArn()) && Objects.equals(description(), other.description()); } /** * 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("DashboardVersionSummary").add("Arn", arn()).add("CreatedTime", createdTime()) .add("VersionNumber", versionNumber()).add("Status", statusAsString()).add("SourceEntityArn", sourceEntityArn()) .add("Description", description()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Arn": return Optional.ofNullable(clazz.cast(arn())); case "CreatedTime": return Optional.ofNullable(clazz.cast(createdTime())); case "VersionNumber": return Optional.ofNullable(clazz.cast(versionNumber())); case "Status": return Optional.ofNullable(clazz.cast(statusAsString())); case "SourceEntityArn": return Optional.ofNullable(clazz.cast(sourceEntityArn())); case "Description": return Optional.ofNullable(clazz.cast(description())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((DashboardVersionSummary) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The Amazon Resource Name (ARN) of the resource. *

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

* The time that this dashboard version was created. *

* * @param createdTime * The time that this dashboard version was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdTime(Instant createdTime); /** *

* Version number. *

* * @param versionNumber * Version number. * @return Returns a reference to this object so that method calls can be chained together. */ Builder versionNumber(Long versionNumber); /** *

* The HTTP status of the request. *

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

* The HTTP status of the request. *

* * @param status * The HTTP status of the request. * @see ResourceStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceStatus */ Builder status(ResourceStatus status); /** *

* Source entity ARN. *

* * @param sourceEntityArn * Source entity ARN. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sourceEntityArn(String sourceEntityArn); /** *

* Description. *

* * @param description * Description. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); } static final class BuilderImpl implements Builder { private String arn; private Instant createdTime; private Long versionNumber; private String status; private String sourceEntityArn; private String description; private BuilderImpl() { } private BuilderImpl(DashboardVersionSummary model) { arn(model.arn); createdTime(model.createdTime); versionNumber(model.versionNumber); status(model.status); sourceEntityArn(model.sourceEntityArn); description(model.description); } public final String getArn() { return arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } public final void setArn(String arn) { this.arn = arn; } public final Instant getCreatedTime() { return createdTime; } @Override public final Builder createdTime(Instant createdTime) { this.createdTime = createdTime; return this; } public final void setCreatedTime(Instant createdTime) { this.createdTime = createdTime; } public final Long getVersionNumber() { return versionNumber; } @Override public final Builder versionNumber(Long versionNumber) { this.versionNumber = versionNumber; return this; } public final void setVersionNumber(Long versionNumber) { this.versionNumber = versionNumber; } public final String getStatus() { return status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(ResourceStatus status) { this.status(status == null ? null : status.toString()); return this; } public final void setStatus(String status) { this.status = status; } public final String getSourceEntityArn() { return sourceEntityArn; } @Override public final Builder sourceEntityArn(String sourceEntityArn) { this.sourceEntityArn = sourceEntityArn; return this; } public final void setSourceEntityArn(String sourceEntityArn) { this.sourceEntityArn = sourceEntityArn; } public final String getDescription() { return description; } @Override public final Builder description(String description) { this.description = description; return this; } public final void setDescription(String description) { this.description = description; } @Override public DashboardVersionSummary build() { return new DashboardVersionSummary(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy