software.amazon.awssdk.services.m2.model.DataSetSummary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of m2 Show documentation
Show all versions of m2 Show documentation
The AWS Java SDK for M2 module holds the client classes that are used for
communicating with M2.
/*
* 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.m2.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;
/**
*
* A subset of the possible data set attributes.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class DataSetSummary implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("creationTime").getter(getter(DataSetSummary::creationTime)).setter(setter(Builder::creationTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("creationTime").build()).build();
private static final SdkField DATA_SET_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("dataSetName").getter(getter(DataSetSummary::dataSetName)).setter(setter(Builder::dataSetName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dataSetName").build()).build();
private static final SdkField DATA_SET_ORG_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("dataSetOrg").getter(getter(DataSetSummary::dataSetOrg)).setter(setter(Builder::dataSetOrg))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dataSetOrg").build()).build();
private static final SdkField FORMAT_FIELD = SdkField. builder(MarshallingType.STRING).memberName("format")
.getter(getter(DataSetSummary::format)).setter(setter(Builder::format))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("format").build()).build();
private static final SdkField LAST_REFERENCED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("lastReferencedTime").getter(getter(DataSetSummary::lastReferencedTime))
.setter(setter(Builder::lastReferencedTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lastReferencedTime").build())
.build();
private static final SdkField LAST_UPDATED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("lastUpdatedTime").getter(getter(DataSetSummary::lastUpdatedTime))
.setter(setter(Builder::lastUpdatedTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lastUpdatedTime").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CREATION_TIME_FIELD,
DATA_SET_NAME_FIELD, DATA_SET_ORG_FIELD, FORMAT_FIELD, LAST_REFERENCED_TIME_FIELD, LAST_UPDATED_TIME_FIELD));
private static final long serialVersionUID = 1L;
private final Instant creationTime;
private final String dataSetName;
private final String dataSetOrg;
private final String format;
private final Instant lastReferencedTime;
private final Instant lastUpdatedTime;
private DataSetSummary(BuilderImpl builder) {
this.creationTime = builder.creationTime;
this.dataSetName = builder.dataSetName;
this.dataSetOrg = builder.dataSetOrg;
this.format = builder.format;
this.lastReferencedTime = builder.lastReferencedTime;
this.lastUpdatedTime = builder.lastUpdatedTime;
}
/**
*
* The timestamp when the data set was created.
*
*
* @return The timestamp when the data set was created.
*/
public final Instant creationTime() {
return creationTime;
}
/**
*
* The name of the data set.
*
*
* @return The name of the data set.
*/
public final String dataSetName() {
return dataSetName;
}
/**
*
* The type of data set. The only supported value is VSAM.
*
*
* @return The type of data set. The only supported value is VSAM.
*/
public final String dataSetOrg() {
return dataSetOrg;
}
/**
*
* The format of the data set.
*
*
* @return The format of the data set.
*/
public final String format() {
return format;
}
/**
*
* The last time the data set was referenced.
*
*
* @return The last time the data set was referenced.
*/
public final Instant lastReferencedTime() {
return lastReferencedTime;
}
/**
*
* The last time the data set was updated.
*
*
* @return The last time the data set was updated.
*/
public final Instant lastUpdatedTime() {
return lastUpdatedTime;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(dataSetName());
hashCode = 31 * hashCode + Objects.hashCode(dataSetOrg());
hashCode = 31 * hashCode + Objects.hashCode(format());
hashCode = 31 * hashCode + Objects.hashCode(lastReferencedTime());
hashCode = 31 * hashCode + Objects.hashCode(lastUpdatedTime());
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 DataSetSummary)) {
return false;
}
DataSetSummary other = (DataSetSummary) obj;
return Objects.equals(creationTime(), other.creationTime()) && Objects.equals(dataSetName(), other.dataSetName())
&& Objects.equals(dataSetOrg(), other.dataSetOrg()) && Objects.equals(format(), other.format())
&& Objects.equals(lastReferencedTime(), other.lastReferencedTime())
&& Objects.equals(lastUpdatedTime(), other.lastUpdatedTime());
}
/**
* 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("DataSetSummary").add("CreationTime", creationTime()).add("DataSetName", dataSetName())
.add("DataSetOrg", dataSetOrg()).add("Format", format()).add("LastReferencedTime", lastReferencedTime())
.add("LastUpdatedTime", lastUpdatedTime()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "creationTime":
return Optional.ofNullable(clazz.cast(creationTime()));
case "dataSetName":
return Optional.ofNullable(clazz.cast(dataSetName()));
case "dataSetOrg":
return Optional.ofNullable(clazz.cast(dataSetOrg()));
case "format":
return Optional.ofNullable(clazz.cast(format()));
case "lastReferencedTime":
return Optional.ofNullable(clazz.cast(lastReferencedTime()));
case "lastUpdatedTime":
return Optional.ofNullable(clazz.cast(lastUpdatedTime()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy