software.amazon.awssdk.services.m2.model.GetDataSetDetailsResponse 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.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.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 GetDataSetDetailsResponse extends M2Response implements
ToCopyableBuilder {
private static final SdkField BLOCKSIZE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("blocksize").getter(getter(GetDataSetDetailsResponse::blocksize)).setter(setter(Builder::blocksize))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("blocksize").build()).build();
private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("creationTime").getter(getter(GetDataSetDetailsResponse::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(GetDataSetDetailsResponse::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.SDK_POJO).memberName("dataSetOrg")
.getter(getter(GetDataSetDetailsResponse::dataSetOrg)).setter(setter(Builder::dataSetOrg))
.constructor(DatasetDetailOrgAttributes::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dataSetOrg").build()).build();
private static final SdkField LAST_REFERENCED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("lastReferencedTime").getter(getter(GetDataSetDetailsResponse::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(GetDataSetDetailsResponse::lastUpdatedTime))
.setter(setter(Builder::lastUpdatedTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lastUpdatedTime").build()).build();
private static final SdkField LOCATION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("location").getter(getter(GetDataSetDetailsResponse::location)).setter(setter(Builder::location))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("location").build()).build();
private static final SdkField RECORD_LENGTH_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("recordLength").getter(getter(GetDataSetDetailsResponse::recordLength))
.setter(setter(Builder::recordLength))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("recordLength").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BLOCKSIZE_FIELD,
CREATION_TIME_FIELD, DATA_SET_NAME_FIELD, DATA_SET_ORG_FIELD, LAST_REFERENCED_TIME_FIELD, LAST_UPDATED_TIME_FIELD,
LOCATION_FIELD, RECORD_LENGTH_FIELD));
private final Integer blocksize;
private final Instant creationTime;
private final String dataSetName;
private final DatasetDetailOrgAttributes dataSetOrg;
private final Instant lastReferencedTime;
private final Instant lastUpdatedTime;
private final String location;
private final Integer recordLength;
private GetDataSetDetailsResponse(BuilderImpl builder) {
super(builder);
this.blocksize = builder.blocksize;
this.creationTime = builder.creationTime;
this.dataSetName = builder.dataSetName;
this.dataSetOrg = builder.dataSetOrg;
this.lastReferencedTime = builder.lastReferencedTime;
this.lastUpdatedTime = builder.lastUpdatedTime;
this.location = builder.location;
this.recordLength = builder.recordLength;
}
/**
*
* The size of the block on disk.
*
*
* @return The size of the block on disk.
*/
public final Integer blocksize() {
return blocksize;
}
/**
*
* 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. Possible values include VSAM, IS, PS, GDG, PO, PS, or unknown.
*
*
* @return The type of data set. Possible values include VSAM, IS, PS, GDG, PO, PS, or unknown.
*/
public final DatasetDetailOrgAttributes dataSetOrg() {
return dataSetOrg;
}
/**
*
* 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;
}
/**
*
* The locaion where the data set is stored.
*
*
* @return The locaion where the data set is stored.
*/
public final String location() {
return location;
}
/**
*
* The length of records in the data set.
*
*
* @return The length of records in the data set.
*/
public final Integer recordLength() {
return recordLength;
}
@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 + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(blocksize());
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(dataSetName());
hashCode = 31 * hashCode + Objects.hashCode(dataSetOrg());
hashCode = 31 * hashCode + Objects.hashCode(lastReferencedTime());
hashCode = 31 * hashCode + Objects.hashCode(lastUpdatedTime());
hashCode = 31 * hashCode + Objects.hashCode(location());
hashCode = 31 * hashCode + Objects.hashCode(recordLength());
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 GetDataSetDetailsResponse)) {
return false;
}
GetDataSetDetailsResponse other = (GetDataSetDetailsResponse) obj;
return Objects.equals(blocksize(), other.blocksize()) && Objects.equals(creationTime(), other.creationTime())
&& Objects.equals(dataSetName(), other.dataSetName()) && Objects.equals(dataSetOrg(), other.dataSetOrg())
&& Objects.equals(lastReferencedTime(), other.lastReferencedTime())
&& Objects.equals(lastUpdatedTime(), other.lastUpdatedTime()) && Objects.equals(location(), other.location())
&& Objects.equals(recordLength(), other.recordLength());
}
/**
* 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("GetDataSetDetailsResponse").add("Blocksize", blocksize()).add("CreationTime", creationTime())
.add("DataSetName", dataSetName()).add("DataSetOrg", dataSetOrg())
.add("LastReferencedTime", lastReferencedTime()).add("LastUpdatedTime", lastUpdatedTime())
.add("Location", location()).add("RecordLength", recordLength()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "blocksize":
return Optional.ofNullable(clazz.cast(blocksize()));
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 "lastReferencedTime":
return Optional.ofNullable(clazz.cast(lastReferencedTime()));
case "lastUpdatedTime":
return Optional.ofNullable(clazz.cast(lastUpdatedTime()));
case "location":
return Optional.ofNullable(clazz.cast(location()));
case "recordLength":
return Optional.ofNullable(clazz.cast(recordLength()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy