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

software.amazon.awssdk.services.networkmanager.model.VpcOptions Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.29.39
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.networkmanager.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.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;

/**
 * 

* Describes the VPC options. *

*/ @Generated("software.amazon.awssdk:codegen") public final class VpcOptions implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField IPV6_SUPPORT_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("Ipv6Support").getter(getter(VpcOptions::ipv6Support)).setter(setter(Builder::ipv6Support)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Ipv6Support").build()).build(); private static final SdkField APPLIANCE_MODE_SUPPORT_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("ApplianceModeSupport").getter(getter(VpcOptions::applianceModeSupport)) .setter(setter(Builder::applianceModeSupport)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ApplianceModeSupport").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(IPV6_SUPPORT_FIELD, APPLIANCE_MODE_SUPPORT_FIELD)); private static final long serialVersionUID = 1L; private final Boolean ipv6Support; private final Boolean applianceModeSupport; private VpcOptions(BuilderImpl builder) { this.ipv6Support = builder.ipv6Support; this.applianceModeSupport = builder.applianceModeSupport; } /** *

* Indicates whether IPv6 is supported. *

* * @return Indicates whether IPv6 is supported. */ public final Boolean ipv6Support() { return ipv6Support; } /** *

* Indicates whether appliance mode is supported. If enabled, traffic flow between a source and destination use the * same Availability Zone for the VPC attachment for the lifetime of that flow. The default value is * false. *

* * @return Indicates whether appliance mode is supported. If enabled, traffic flow between a source and destination * use the same Availability Zone for the VPC attachment for the lifetime of that flow. The default value is * false. */ public final Boolean applianceModeSupport() { return applianceModeSupport; } @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(ipv6Support()); hashCode = 31 * hashCode + Objects.hashCode(applianceModeSupport()); 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 VpcOptions)) { return false; } VpcOptions other = (VpcOptions) obj; return Objects.equals(ipv6Support(), other.ipv6Support()) && Objects.equals(applianceModeSupport(), other.applianceModeSupport()); } /** * 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("VpcOptions").add("Ipv6Support", ipv6Support()) .add("ApplianceModeSupport", applianceModeSupport()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Ipv6Support": return Optional.ofNullable(clazz.cast(ipv6Support())); case "ApplianceModeSupport": return Optional.ofNullable(clazz.cast(applianceModeSupport())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((VpcOptions) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* Indicates whether IPv6 is supported. *

* * @param ipv6Support * Indicates whether IPv6 is supported. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ipv6Support(Boolean ipv6Support); /** *

* Indicates whether appliance mode is supported. If enabled, traffic flow between a source and destination use * the same Availability Zone for the VPC attachment for the lifetime of that flow. The default value is * false. *

* * @param applianceModeSupport * Indicates whether appliance mode is supported. If enabled, traffic flow between a source and * destination use the same Availability Zone for the VPC attachment for the lifetime of that flow. The * default value is false. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applianceModeSupport(Boolean applianceModeSupport); } static final class BuilderImpl implements Builder { private Boolean ipv6Support; private Boolean applianceModeSupport; private BuilderImpl() { } private BuilderImpl(VpcOptions model) { ipv6Support(model.ipv6Support); applianceModeSupport(model.applianceModeSupport); } public final Boolean getIpv6Support() { return ipv6Support; } public final void setIpv6Support(Boolean ipv6Support) { this.ipv6Support = ipv6Support; } @Override public final Builder ipv6Support(Boolean ipv6Support) { this.ipv6Support = ipv6Support; return this; } public final Boolean getApplianceModeSupport() { return applianceModeSupport; } public final void setApplianceModeSupport(Boolean applianceModeSupport) { this.applianceModeSupport = applianceModeSupport; } @Override public final Builder applianceModeSupport(Boolean applianceModeSupport) { this.applianceModeSupport = applianceModeSupport; return this; } @Override public VpcOptions build() { return new VpcOptions(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy