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

software.amazon.awssdk.services.fsx.model.SvmEndpoints Maven / Gradle / Ivy

Go to download

The AWS Java SDK for FSx module holds the client classes that are used for communicating with FSx.

There is a newer version: 2.28.4
Show newest version
/*
 * 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 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 getter(Function g) { return obj -> g.apply((SvmEndpoints) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* An endpoint for connecting using the Internet Small Computer Systems Interface (iSCSI) protocol. *

* * @param iscsi * An endpoint for connecting using the Internet Small Computer Systems Interface (iSCSI) protocol. * @return Returns a reference to this object so that method calls can be chained together. */ Builder iscsi(SvmEndpoint iscsi); /** *

* An endpoint for connecting using the Internet Small Computer Systems Interface (iSCSI) protocol. *

* This is a convenience method that creates an instance of the {@link SvmEndpoint.Builder} avoiding the need to * create one manually via {@link SvmEndpoint#builder()}. * *

* When the {@link Consumer} completes, {@link SvmEndpoint.Builder#build()} is called immediately and its result * is passed to {@link #iscsi(SvmEndpoint)}. * * @param iscsi * a consumer that will call methods on {@link SvmEndpoint.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #iscsi(SvmEndpoint) */ default Builder iscsi(Consumer iscsi) { return iscsi(SvmEndpoint.builder().applyMutation(iscsi).build()); } /** *

* An endpoint for managing SVMs using the NetApp ONTAP CLI, NetApp ONTAP API, or NetApp CloudManager. *

* * @param management * An endpoint for managing SVMs using the NetApp ONTAP CLI, NetApp ONTAP API, or NetApp CloudManager. * @return Returns a reference to this object so that method calls can be chained together. */ Builder management(SvmEndpoint management); /** *

* An endpoint for managing SVMs using the NetApp ONTAP CLI, NetApp ONTAP API, or NetApp CloudManager. *

* This is a convenience method that creates an instance of the {@link SvmEndpoint.Builder} avoiding the need to * create one manually via {@link SvmEndpoint#builder()}. * *

* When the {@link Consumer} completes, {@link SvmEndpoint.Builder#build()} is called immediately and its result * is passed to {@link #management(SvmEndpoint)}. * * @param management * a consumer that will call methods on {@link SvmEndpoint.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #management(SvmEndpoint) */ default Builder management(Consumer management) { return management(SvmEndpoint.builder().applyMutation(management).build()); } /** *

* An endpoint for connecting using the Network File System (NFS) protocol. *

* * @param nfs * An endpoint for connecting using the Network File System (NFS) protocol. * @return Returns a reference to this object so that method calls can be chained together. */ Builder nfs(SvmEndpoint nfs); /** *

* An endpoint for connecting using the Network File System (NFS) protocol. *

* This is a convenience method that creates an instance of the {@link SvmEndpoint.Builder} avoiding the need to * create one manually via {@link SvmEndpoint#builder()}. * *

* When the {@link Consumer} completes, {@link SvmEndpoint.Builder#build()} is called immediately and its result * is passed to {@link #nfs(SvmEndpoint)}. * * @param nfs * a consumer that will call methods on {@link SvmEndpoint.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #nfs(SvmEndpoint) */ default Builder nfs(Consumer nfs) { return nfs(SvmEndpoint.builder().applyMutation(nfs).build()); } /** *

* An endpoint for connecting using the Server Message Block (SMB) protocol. *

* * @param smb * An endpoint for connecting using the Server Message Block (SMB) protocol. * @return Returns a reference to this object so that method calls can be chained together. */ Builder smb(SvmEndpoint smb); /** *

* An endpoint for connecting using the Server Message Block (SMB) protocol. *

* This is a convenience method that creates an instance of the {@link SvmEndpoint.Builder} avoiding the need to * create one manually via {@link SvmEndpoint#builder()}. * *

* When the {@link Consumer} completes, {@link SvmEndpoint.Builder#build()} is called immediately and its result * is passed to {@link #smb(SvmEndpoint)}. * * @param smb * a consumer that will call methods on {@link SvmEndpoint.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #smb(SvmEndpoint) */ default Builder smb(Consumer smb) { return smb(SvmEndpoint.builder().applyMutation(smb).build()); } } static final class BuilderImpl implements Builder { private SvmEndpoint iscsi; private SvmEndpoint management; private SvmEndpoint nfs; private SvmEndpoint smb; private BuilderImpl() { } private BuilderImpl(SvmEndpoints model) { iscsi(model.iscsi); management(model.management); nfs(model.nfs); smb(model.smb); } public final SvmEndpoint.Builder getIscsi() { return iscsi != null ? iscsi.toBuilder() : null; } public final void setIscsi(SvmEndpoint.BuilderImpl iscsi) { this.iscsi = iscsi != null ? iscsi.build() : null; } @Override public final Builder iscsi(SvmEndpoint iscsi) { this.iscsi = iscsi; return this; } public final SvmEndpoint.Builder getManagement() { return management != null ? management.toBuilder() : null; } public final void setManagement(SvmEndpoint.BuilderImpl management) { this.management = management != null ? management.build() : null; } @Override public final Builder management(SvmEndpoint management) { this.management = management; return this; } public final SvmEndpoint.Builder getNfs() { return nfs != null ? nfs.toBuilder() : null; } public final void setNfs(SvmEndpoint.BuilderImpl nfs) { this.nfs = nfs != null ? nfs.build() : null; } @Override public final Builder nfs(SvmEndpoint nfs) { this.nfs = nfs; return this; } public final SvmEndpoint.Builder getSmb() { return smb != null ? smb.toBuilder() : null; } public final void setSmb(SvmEndpoint.BuilderImpl smb) { this.smb = smb != null ? smb.build() : null; } @Override public final Builder smb(SvmEndpoint smb) { this.smb = smb; return this; } @Override public SvmEndpoints build() { return new SvmEndpoints(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy