software.amazon.awssdk.services.fsx.model.SvmEndpoints Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fsx Show documentation
Show all versions of fsx Show documentation
The AWS Java SDK for FSx module holds the client classes that are used for
communicating with FSx.
/*
* 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.fsx.model;
import java.io.Serializable;
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;
/**
*
* An Amazon FSx for NetApp ONTAP storage virtual machine (SVM) has the following endpoints that are used to access data
* or to manage the SVM using the NetApp ONTAP CLI, REST API, or NetApp CloudManager.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class SvmEndpoints implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField ISCSI_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Iscsi").getter(getter(SvmEndpoints::iscsi)).setter(setter(Builder::iscsi))
.constructor(SvmEndpoint::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Iscsi").build()).build();
private static final SdkField MANAGEMENT_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Management").getter(getter(SvmEndpoints::management)).setter(setter(Builder::management))
.constructor(SvmEndpoint::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Management").build()).build();
private static final SdkField NFS_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Nfs").getter(getter(SvmEndpoints::nfs)).setter(setter(Builder::nfs)).constructor(SvmEndpoint::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Nfs").build()).build();
private static final SdkField SMB_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Smb").getter(getter(SvmEndpoints::smb)).setter(setter(Builder::smb)).constructor(SvmEndpoint::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Smb").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ISCSI_FIELD, MANAGEMENT_FIELD,
NFS_FIELD, SMB_FIELD));
private static final long serialVersionUID = 1L;
private final SvmEndpoint iscsi;
private final SvmEndpoint management;
private final SvmEndpoint nfs;
private final SvmEndpoint smb;
private SvmEndpoints(BuilderImpl builder) {
this.iscsi = builder.iscsi;
this.management = builder.management;
this.nfs = builder.nfs;
this.smb = builder.smb;
}
/**
*
* An endpoint for connecting using the Internet Small Computer Systems Interface (iSCSI) protocol.
*
*
* @return An endpoint for connecting using the Internet Small Computer Systems Interface (iSCSI) protocol.
*/
public final SvmEndpoint iscsi() {
return iscsi;
}
/**
*
* An endpoint for managing SVMs using the NetApp ONTAP CLI, NetApp ONTAP API, or NetApp CloudManager.
*
*
* @return An endpoint for managing SVMs using the NetApp ONTAP CLI, NetApp ONTAP API, or NetApp CloudManager.
*/
public final SvmEndpoint management() {
return management;
}
/**
*
* An endpoint for connecting using the Network File System (NFS) protocol.
*
*
* @return An endpoint for connecting using the Network File System (NFS) protocol.
*/
public final SvmEndpoint nfs() {
return nfs;
}
/**
*
* An endpoint for connecting using the Server Message Block (SMB) protocol.
*
*
* @return An endpoint for connecting using the Server Message Block (SMB) protocol.
*/
public final SvmEndpoint smb() {
return smb;
}
@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(iscsi());
hashCode = 31 * hashCode + Objects.hashCode(management());
hashCode = 31 * hashCode + Objects.hashCode(nfs());
hashCode = 31 * hashCode + Objects.hashCode(smb());
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 SvmEndpoints)) {
return false;
}
SvmEndpoints other = (SvmEndpoints) obj;
return Objects.equals(iscsi(), other.iscsi()) && Objects.equals(management(), other.management())
&& Objects.equals(nfs(), other.nfs()) && Objects.equals(smb(), other.smb());
}
/**
* 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("SvmEndpoints").add("Iscsi", iscsi()).add("Management", management()).add("Nfs", nfs())
.add("Smb", smb()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "Iscsi":
return Optional.ofNullable(clazz.cast(iscsi()));
case "Management":
return Optional.ofNullable(clazz.cast(management()));
case "Nfs":
return Optional.ofNullable(clazz.cast(nfs()));
case "Smb":
return Optional.ofNullable(clazz.cast(smb()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function