
software.amazon.awssdk.services.datasync.model.DescribeLocationNfsResponse 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.datasync.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;
/**
*
* DescribeLocationNfsResponse
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class DescribeLocationNfsResponse extends DataSyncResponse implements
ToCopyableBuilder {
private static final SdkField LOCATION_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("LocationArn").getter(getter(DescribeLocationNfsResponse::locationArn))
.setter(setter(Builder::locationArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LocationArn").build()).build();
private static final SdkField LOCATION_URI_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("LocationUri").getter(getter(DescribeLocationNfsResponse::locationUri))
.setter(setter(Builder::locationUri))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LocationUri").build()).build();
private static final SdkField ON_PREM_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("OnPremConfig").getter(getter(DescribeLocationNfsResponse::onPremConfig))
.setter(setter(Builder::onPremConfig)).constructor(OnPremConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OnPremConfig").build()).build();
private static final SdkField MOUNT_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("MountOptions")
.getter(getter(DescribeLocationNfsResponse::mountOptions)).setter(setter(Builder::mountOptions))
.constructor(NfsMountOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MountOptions").build()).build();
private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CreationTime").getter(getter(DescribeLocationNfsResponse::creationTime))
.setter(setter(Builder::creationTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(LOCATION_ARN_FIELD,
LOCATION_URI_FIELD, ON_PREM_CONFIG_FIELD, MOUNT_OPTIONS_FIELD, CREATION_TIME_FIELD));
private final String locationArn;
private final String locationUri;
private final OnPremConfig onPremConfig;
private final NfsMountOptions mountOptions;
private final Instant creationTime;
private DescribeLocationNfsResponse(BuilderImpl builder) {
super(builder);
this.locationArn = builder.locationArn;
this.locationUri = builder.locationUri;
this.onPremConfig = builder.onPremConfig;
this.mountOptions = builder.mountOptions;
this.creationTime = builder.creationTime;
}
/**
*
* The Amazon Resource Name (ARN) of the NFS location that was described.
*
*
* @return The Amazon Resource Name (ARN) of the NFS location that was described.
*/
public final String locationArn() {
return locationArn;
}
/**
*
* The URL of the source NFS location that was described.
*
*
* @return The URL of the source NFS location that was described.
*/
public final String locationUri() {
return locationUri;
}
/**
* Returns the value of the OnPremConfig property for this object.
*
* @return The value of the OnPremConfig property for this object.
*/
public final OnPremConfig onPremConfig() {
return onPremConfig;
}
/**
*
* The NFS mount options that DataSync used to mount your NFS share.
*
*
* @return The NFS mount options that DataSync used to mount your NFS share.
*/
public final NfsMountOptions mountOptions() {
return mountOptions;
}
/**
*
* The time that the NFS location was created.
*
*
* @return The time that the NFS location was created.
*/
public final Instant creationTime() {
return creationTime;
}
@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(locationArn());
hashCode = 31 * hashCode + Objects.hashCode(locationUri());
hashCode = 31 * hashCode + Objects.hashCode(onPremConfig());
hashCode = 31 * hashCode + Objects.hashCode(mountOptions());
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
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 DescribeLocationNfsResponse)) {
return false;
}
DescribeLocationNfsResponse other = (DescribeLocationNfsResponse) obj;
return Objects.equals(locationArn(), other.locationArn()) && Objects.equals(locationUri(), other.locationUri())
&& Objects.equals(onPremConfig(), other.onPremConfig()) && Objects.equals(mountOptions(), other.mountOptions())
&& Objects.equals(creationTime(), other.creationTime());
}
/**
* 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("DescribeLocationNfsResponse").add("LocationArn", locationArn())
.add("LocationUri", locationUri()).add("OnPremConfig", onPremConfig()).add("MountOptions", mountOptions())
.add("CreationTime", creationTime()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "LocationArn":
return Optional.ofNullable(clazz.cast(locationArn()));
case "LocationUri":
return Optional.ofNullable(clazz.cast(locationUri()));
case "OnPremConfig":
return Optional.ofNullable(clazz.cast(onPremConfig()));
case "MountOptions":
return Optional.ofNullable(clazz.cast(mountOptions()));
case "CreationTime":
return Optional.ofNullable(clazz.cast(creationTime()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy