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

software.amazon.awssdk.services.directconnect.model.CreateLagResponse Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Direct Connect module holds the client classes that are used for communicating with AWS Direct Connect Service

There is a newer version: 2.30.1
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.directconnect.model;

import java.util.Arrays;
import java.util.Collection;
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 java.util.stream.Collectors;
import java.util.stream.Stream;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Information about a link aggregation group (LAG). *

*/ @Generated("software.amazon.awssdk:codegen") public final class CreateLagResponse extends DirectConnectResponse implements ToCopyableBuilder { private static final SdkField CONNECTIONS_BANDWIDTH_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateLagResponse::connectionsBandwidth)).setter(setter(Builder::connectionsBandwidth)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("connectionsBandwidth").build()) .build(); private static final SdkField NUMBER_OF_CONNECTIONS_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(CreateLagResponse::numberOfConnections)).setter(setter(Builder::numberOfConnections)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("numberOfConnections").build()) .build(); private static final SdkField LAG_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateLagResponse::lagId)).setter(setter(Builder::lagId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lagId").build()).build(); private static final SdkField OWNER_ACCOUNT_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateLagResponse::ownerAccount)).setter(setter(Builder::ownerAccount)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ownerAccount").build()).build(); private static final SdkField LAG_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateLagResponse::lagName)).setter(setter(Builder::lagName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lagName").build()).build(); private static final SdkField LAG_STATE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateLagResponse::lagStateAsString)).setter(setter(Builder::lagState)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lagState").build()).build(); private static final SdkField LOCATION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateLagResponse::location)).setter(setter(Builder::location)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("location").build()).build(); private static final SdkField REGION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateLagResponse::region)).setter(setter(Builder::region)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("region").build()).build(); private static final SdkField MINIMUM_LINKS_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(CreateLagResponse::minimumLinks)).setter(setter(Builder::minimumLinks)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("minimumLinks").build()).build(); private static final SdkField AWS_DEVICE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateLagResponse::awsDevice)).setter(setter(Builder::awsDevice)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("awsDevice").build()).build(); private static final SdkField AWS_DEVICE_V2_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateLagResponse::awsDeviceV2)).setter(setter(Builder::awsDeviceV2)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("awsDeviceV2").build()).build(); private static final SdkField> CONNECTIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(CreateLagResponse::connections)) .setter(setter(Builder::connections)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("connections").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Connection::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField ALLOWS_HOSTED_CONNECTIONS_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(CreateLagResponse::allowsHostedConnections)).setter(setter(Builder::allowsHostedConnections)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("allowsHostedConnections").build()) .build(); private static final SdkField JUMBO_FRAME_CAPABLE_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(CreateLagResponse::jumboFrameCapable)).setter(setter(Builder::jumboFrameCapable)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("jumboFrameCapable").build()).build(); private static final SdkField HAS_LOGICAL_REDUNDANCY_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateLagResponse::hasLogicalRedundancyAsString)).setter(setter(Builder::hasLogicalRedundancy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("hasLogicalRedundancy").build()) .build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(CreateLagResponse::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Tag::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField PROVIDER_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateLagResponse::providerName)).setter(setter(Builder::providerName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("providerName").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CONNECTIONS_BANDWIDTH_FIELD, NUMBER_OF_CONNECTIONS_FIELD, LAG_ID_FIELD, OWNER_ACCOUNT_FIELD, LAG_NAME_FIELD, LAG_STATE_FIELD, LOCATION_FIELD, REGION_FIELD, MINIMUM_LINKS_FIELD, AWS_DEVICE_FIELD, AWS_DEVICE_V2_FIELD, CONNECTIONS_FIELD, ALLOWS_HOSTED_CONNECTIONS_FIELD, JUMBO_FRAME_CAPABLE_FIELD, HAS_LOGICAL_REDUNDANCY_FIELD, TAGS_FIELD, PROVIDER_NAME_FIELD)); private final String connectionsBandwidth; private final Integer numberOfConnections; private final String lagId; private final String ownerAccount; private final String lagName; private final String lagState; private final String location; private final String region; private final Integer minimumLinks; private final String awsDevice; private final String awsDeviceV2; private final List connections; private final Boolean allowsHostedConnections; private final Boolean jumboFrameCapable; private final String hasLogicalRedundancy; private final List tags; private final String providerName; private CreateLagResponse(BuilderImpl builder) { super(builder); this.connectionsBandwidth = builder.connectionsBandwidth; this.numberOfConnections = builder.numberOfConnections; this.lagId = builder.lagId; this.ownerAccount = builder.ownerAccount; this.lagName = builder.lagName; this.lagState = builder.lagState; this.location = builder.location; this.region = builder.region; this.minimumLinks = builder.minimumLinks; this.awsDevice = builder.awsDevice; this.awsDeviceV2 = builder.awsDeviceV2; this.connections = builder.connections; this.allowsHostedConnections = builder.allowsHostedConnections; this.jumboFrameCapable = builder.jumboFrameCapable; this.hasLogicalRedundancy = builder.hasLogicalRedundancy; this.tags = builder.tags; this.providerName = builder.providerName; } /** *

* The individual bandwidth of the physical connections bundled by the LAG. The possible values are 1Gbps and * 10Gbps. *

* * @return The individual bandwidth of the physical connections bundled by the LAG. The possible values are 1Gbps * and 10Gbps. */ public String connectionsBandwidth() { return connectionsBandwidth; } /** *

* The number of physical connections bundled by the LAG, up to a maximum of 10. *

* * @return The number of physical connections bundled by the LAG, up to a maximum of 10. */ public Integer numberOfConnections() { return numberOfConnections; } /** *

* The ID of the LAG. *

* * @return The ID of the LAG. */ public String lagId() { return lagId; } /** *

* The ID of the AWS account that owns the LAG. *

* * @return The ID of the AWS account that owns the LAG. */ public String ownerAccount() { return ownerAccount; } /** *

* The name of the LAG. *

* * @return The name of the LAG. */ public String lagName() { return lagName; } /** *

* The state of the LAG. The following are the possible values: *

*
    *
  • *

    * requested: The initial state of a LAG. The LAG stays in the requested state until the Letter of * Authorization (LOA) is available. *

    *
  • *
  • *

    * pending: The LAG has been approved and is being initialized. *

    *
  • *
  • *

    * available: The network link is established and the LAG is ready for use. *

    *
  • *
  • *

    * down: The network link is down. *

    *
  • *
  • *

    * deleting: The LAG is being deleted. *

    *
  • *
  • *

    * deleted: The LAG is deleted. *

    *
  • *
  • *

    * unknown: The state of the LAG is not available. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, {@link #lagState} will * return {@link LagState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #lagStateAsString}. *

* * @return The state of the LAG. The following are the possible values:

*
    *
  • *

    * requested: The initial state of a LAG. The LAG stays in the requested state until the Letter * of Authorization (LOA) is available. *

    *
  • *
  • *

    * pending: The LAG has been approved and is being initialized. *

    *
  • *
  • *

    * available: The network link is established and the LAG is ready for use. *

    *
  • *
  • *

    * down: The network link is down. *

    *
  • *
  • *

    * deleting: The LAG is being deleted. *

    *
  • *
  • *

    * deleted: The LAG is deleted. *

    *
  • *
  • *

    * unknown: The state of the LAG is not available. *

    *
  • * @see LagState */ public LagState lagState() { return LagState.fromValue(lagState); } /** *

    * The state of the LAG. The following are the possible values: *

    *
      *
    • *

      * requested: The initial state of a LAG. The LAG stays in the requested state until the Letter of * Authorization (LOA) is available. *

      *
    • *
    • *

      * pending: The LAG has been approved and is being initialized. *

      *
    • *
    • *

      * available: The network link is established and the LAG is ready for use. *

      *
    • *
    • *

      * down: The network link is down. *

      *
    • *
    • *

      * deleting: The LAG is being deleted. *

      *
    • *
    • *

      * deleted: The LAG is deleted. *

      *
    • *
    • *

      * unknown: The state of the LAG is not available. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #lagState} will * return {@link LagState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #lagStateAsString}. *

    * * @return The state of the LAG. The following are the possible values:

    *
      *
    • *

      * requested: The initial state of a LAG. The LAG stays in the requested state until the Letter * of Authorization (LOA) is available. *

      *
    • *
    • *

      * pending: The LAG has been approved and is being initialized. *

      *
    • *
    • *

      * available: The network link is established and the LAG is ready for use. *

      *
    • *
    • *

      * down: The network link is down. *

      *
    • *
    • *

      * deleting: The LAG is being deleted. *

      *
    • *
    • *

      * deleted: The LAG is deleted. *

      *
    • *
    • *

      * unknown: The state of the LAG is not available. *

      *
    • * @see LagState */ public String lagStateAsString() { return lagState; } /** *

      * The location of the LAG. *

      * * @return The location of the LAG. */ public String location() { return location; } /** *

      * The AWS Region where the connection is located. *

      * * @return The AWS Region where the connection is located. */ public String region() { return region; } /** *

      * The minimum number of physical connections that must be operational for the LAG itself to be operational. *

      * * @return The minimum number of physical connections that must be operational for the LAG itself to be operational. */ public Integer minimumLinks() { return minimumLinks; } /** *

      * The AWS Direct Connect endpoint that hosts the LAG. *

      * * @return The AWS Direct Connect endpoint that hosts the LAG. */ public String awsDevice() { return awsDevice; } /** *

      * The AWS Direct Connect endpoint that hosts the LAG. *

      * * @return The AWS Direct Connect endpoint that hosts the LAG. */ public String awsDeviceV2() { return awsDeviceV2; } /** * Returns true if the Connections property was specified by the sender (it may be empty), or false if the sender * did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public boolean hasConnections() { return connections != null && !(connections instanceof SdkAutoConstructList); } /** *

      * The connections bundled by the LAG. *

      *

      * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

      *

      * You can use {@link #hasConnections()} to see if a value was sent in this field. *

      * * @return The connections bundled by the LAG. */ public List connections() { return connections; } /** *

      * Indicates whether the LAG can host other connections. *

      * * @return Indicates whether the LAG can host other connections. */ public Boolean allowsHostedConnections() { return allowsHostedConnections; } /** *

      * Indicates whether jumbo frames (9001 MTU) are supported. *

      * * @return Indicates whether jumbo frames (9001 MTU) are supported. */ public Boolean jumboFrameCapable() { return jumboFrameCapable; } /** *

      * Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6). *

      *

      * If the service returns an enum value that is not available in the current SDK version, * {@link #hasLogicalRedundancy} will return {@link HasLogicalRedundancy#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #hasLogicalRedundancyAsString}. *

      * * @return Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6). * @see HasLogicalRedundancy */ public HasLogicalRedundancy hasLogicalRedundancy() { return HasLogicalRedundancy.fromValue(hasLogicalRedundancy); } /** *

      * Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6). *

      *

      * If the service returns an enum value that is not available in the current SDK version, * {@link #hasLogicalRedundancy} will return {@link HasLogicalRedundancy#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #hasLogicalRedundancyAsString}. *

      * * @return Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6). * @see HasLogicalRedundancy */ public String hasLogicalRedundancyAsString() { return hasLogicalRedundancy; } /** * Returns true if the Tags property was specified by the sender (it may be empty), or false if the sender did not * specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

      * The tags associated with the LAG. *

      *

      * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

      *

      * You can use {@link #hasTags()} to see if a value was sent in this field. *

      * * @return The tags associated with the LAG. */ public List tags() { return tags; } /** *

      * The name of the service provider associated with the LAG. *

      * * @return The name of the service provider associated with the LAG. */ public String providerName() { return providerName; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(connectionsBandwidth()); hashCode = 31 * hashCode + Objects.hashCode(numberOfConnections()); hashCode = 31 * hashCode + Objects.hashCode(lagId()); hashCode = 31 * hashCode + Objects.hashCode(ownerAccount()); hashCode = 31 * hashCode + Objects.hashCode(lagName()); hashCode = 31 * hashCode + Objects.hashCode(lagStateAsString()); hashCode = 31 * hashCode + Objects.hashCode(location()); hashCode = 31 * hashCode + Objects.hashCode(region()); hashCode = 31 * hashCode + Objects.hashCode(minimumLinks()); hashCode = 31 * hashCode + Objects.hashCode(awsDevice()); hashCode = 31 * hashCode + Objects.hashCode(awsDeviceV2()); hashCode = 31 * hashCode + Objects.hashCode(connections()); hashCode = 31 * hashCode + Objects.hashCode(allowsHostedConnections()); hashCode = 31 * hashCode + Objects.hashCode(jumboFrameCapable()); hashCode = 31 * hashCode + Objects.hashCode(hasLogicalRedundancyAsString()); hashCode = 31 * hashCode + Objects.hashCode(tags()); hashCode = 31 * hashCode + Objects.hashCode(providerName()); return hashCode; } @Override public boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CreateLagResponse)) { return false; } CreateLagResponse other = (CreateLagResponse) obj; return Objects.equals(connectionsBandwidth(), other.connectionsBandwidth()) && Objects.equals(numberOfConnections(), other.numberOfConnections()) && Objects.equals(lagId(), other.lagId()) && Objects.equals(ownerAccount(), other.ownerAccount()) && Objects.equals(lagName(), other.lagName()) && Objects.equals(lagStateAsString(), other.lagStateAsString()) && Objects.equals(location(), other.location()) && Objects.equals(region(), other.region()) && Objects.equals(minimumLinks(), other.minimumLinks()) && Objects.equals(awsDevice(), other.awsDevice()) && Objects.equals(awsDeviceV2(), other.awsDeviceV2()) && Objects.equals(connections(), other.connections()) && Objects.equals(allowsHostedConnections(), other.allowsHostedConnections()) && Objects.equals(jumboFrameCapable(), other.jumboFrameCapable()) && Objects.equals(hasLogicalRedundancyAsString(), other.hasLogicalRedundancyAsString()) && Objects.equals(tags(), other.tags()) && Objects.equals(providerName(), other.providerName()); } /** * 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 String toString() { return ToString.builder("CreateLagResponse").add("ConnectionsBandwidth", connectionsBandwidth()) .add("NumberOfConnections", numberOfConnections()).add("LagId", lagId()).add("OwnerAccount", ownerAccount()) .add("LagName", lagName()).add("LagState", lagStateAsString()).add("Location", location()) .add("Region", region()).add("MinimumLinks", minimumLinks()).add("AwsDevice", awsDevice()) .add("AwsDeviceV2", awsDeviceV2()).add("Connections", connections()) .add("AllowsHostedConnections", allowsHostedConnections()).add("JumboFrameCapable", jumboFrameCapable()) .add("HasLogicalRedundancy", hasLogicalRedundancyAsString()).add("Tags", tags()) .add("ProviderName", providerName()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "connectionsBandwidth": return Optional.ofNullable(clazz.cast(connectionsBandwidth())); case "numberOfConnections": return Optional.ofNullable(clazz.cast(numberOfConnections())); case "lagId": return Optional.ofNullable(clazz.cast(lagId())); case "ownerAccount": return Optional.ofNullable(clazz.cast(ownerAccount())); case "lagName": return Optional.ofNullable(clazz.cast(lagName())); case "lagState": return Optional.ofNullable(clazz.cast(lagStateAsString())); case "location": return Optional.ofNullable(clazz.cast(location())); case "region": return Optional.ofNullable(clazz.cast(region())); case "minimumLinks": return Optional.ofNullable(clazz.cast(minimumLinks())); case "awsDevice": return Optional.ofNullable(clazz.cast(awsDevice())); case "awsDeviceV2": return Optional.ofNullable(clazz.cast(awsDeviceV2())); case "connections": return Optional.ofNullable(clazz.cast(connections())); case "allowsHostedConnections": return Optional.ofNullable(clazz.cast(allowsHostedConnections())); case "jumboFrameCapable": return Optional.ofNullable(clazz.cast(jumboFrameCapable())); case "hasLogicalRedundancy": return Optional.ofNullable(clazz.cast(hasLogicalRedundancyAsString())); case "tags": return Optional.ofNullable(clazz.cast(tags())); case "providerName": return Optional.ofNullable(clazz.cast(providerName())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateLagResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends DirectConnectResponse.Builder, SdkPojo, CopyableBuilder { /** *

      * The individual bandwidth of the physical connections bundled by the LAG. The possible values are 1Gbps and * 10Gbps. *

      * * @param connectionsBandwidth * The individual bandwidth of the physical connections bundled by the LAG. The possible values are 1Gbps * and 10Gbps. * @return Returns a reference to this object so that method calls can be chained together. */ Builder connectionsBandwidth(String connectionsBandwidth); /** *

      * The number of physical connections bundled by the LAG, up to a maximum of 10. *

      * * @param numberOfConnections * The number of physical connections bundled by the LAG, up to a maximum of 10. * @return Returns a reference to this object so that method calls can be chained together. */ Builder numberOfConnections(Integer numberOfConnections); /** *

      * The ID of the LAG. *

      * * @param lagId * The ID of the LAG. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lagId(String lagId); /** *

      * The ID of the AWS account that owns the LAG. *

      * * @param ownerAccount * The ID of the AWS account that owns the LAG. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ownerAccount(String ownerAccount); /** *

      * The name of the LAG. *

      * * @param lagName * The name of the LAG. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lagName(String lagName); /** *

      * The state of the LAG. The following are the possible values: *

      *
        *
      • *

        * requested: The initial state of a LAG. The LAG stays in the requested state until the Letter of * Authorization (LOA) is available. *

        *
      • *
      • *

        * pending: The LAG has been approved and is being initialized. *

        *
      • *
      • *

        * available: The network link is established and the LAG is ready for use. *

        *
      • *
      • *

        * down: The network link is down. *

        *
      • *
      • *

        * deleting: The LAG is being deleted. *

        *
      • *
      • *

        * deleted: The LAG is deleted. *

        *
      • *
      • *

        * unknown: The state of the LAG is not available. *

        *
      • *
      * * @param lagState * The state of the LAG. The following are the possible values:

      *
        *
      • *

        * requested: The initial state of a LAG. The LAG stays in the requested state until the * Letter of Authorization (LOA) is available. *

        *
      • *
      • *

        * pending: The LAG has been approved and is being initialized. *

        *
      • *
      • *

        * available: The network link is established and the LAG is ready for use. *

        *
      • *
      • *

        * down: The network link is down. *

        *
      • *
      • *

        * deleting: The LAG is being deleted. *

        *
      • *
      • *

        * deleted: The LAG is deleted. *

        *
      • *
      • *

        * unknown: The state of the LAG is not available. *

        *
      • * @see LagState * @return Returns a reference to this object so that method calls can be chained together. * @see LagState */ Builder lagState(String lagState); /** *

        * The state of the LAG. The following are the possible values: *

        *
          *
        • *

          * requested: The initial state of a LAG. The LAG stays in the requested state until the Letter of * Authorization (LOA) is available. *

          *
        • *
        • *

          * pending: The LAG has been approved and is being initialized. *

          *
        • *
        • *

          * available: The network link is established and the LAG is ready for use. *

          *
        • *
        • *

          * down: The network link is down. *

          *
        • *
        • *

          * deleting: The LAG is being deleted. *

          *
        • *
        • *

          * deleted: The LAG is deleted. *

          *
        • *
        • *

          * unknown: The state of the LAG is not available. *

          *
        • *
        * * @param lagState * The state of the LAG. The following are the possible values:

        *
          *
        • *

          * requested: The initial state of a LAG. The LAG stays in the requested state until the * Letter of Authorization (LOA) is available. *

          *
        • *
        • *

          * pending: The LAG has been approved and is being initialized. *

          *
        • *
        • *

          * available: The network link is established and the LAG is ready for use. *

          *
        • *
        • *

          * down: The network link is down. *

          *
        • *
        • *

          * deleting: The LAG is being deleted. *

          *
        • *
        • *

          * deleted: The LAG is deleted. *

          *
        • *
        • *

          * unknown: The state of the LAG is not available. *

          *
        • * @see LagState * @return Returns a reference to this object so that method calls can be chained together. * @see LagState */ Builder lagState(LagState lagState); /** *

          * The location of the LAG. *

          * * @param location * The location of the LAG. * @return Returns a reference to this object so that method calls can be chained together. */ Builder location(String location); /** *

          * The AWS Region where the connection is located. *

          * * @param region * The AWS Region where the connection is located. * @return Returns a reference to this object so that method calls can be chained together. */ Builder region(String region); /** *

          * The minimum number of physical connections that must be operational for the LAG itself to be operational. *

          * * @param minimumLinks * The minimum number of physical connections that must be operational for the LAG itself to be * operational. * @return Returns a reference to this object so that method calls can be chained together. */ Builder minimumLinks(Integer minimumLinks); /** *

          * The AWS Direct Connect endpoint that hosts the LAG. *

          * * @param awsDevice * The AWS Direct Connect endpoint that hosts the LAG. * @return Returns a reference to this object so that method calls can be chained together. */ Builder awsDevice(String awsDevice); /** *

          * The AWS Direct Connect endpoint that hosts the LAG. *

          * * @param awsDeviceV2 * The AWS Direct Connect endpoint that hosts the LAG. * @return Returns a reference to this object so that method calls can be chained together. */ Builder awsDeviceV2(String awsDeviceV2); /** *

          * The connections bundled by the LAG. *

          * * @param connections * The connections bundled by the LAG. * @return Returns a reference to this object so that method calls can be chained together. */ Builder connections(Collection connections); /** *

          * The connections bundled by the LAG. *

          * * @param connections * The connections bundled by the LAG. * @return Returns a reference to this object so that method calls can be chained together. */ Builder connections(Connection... connections); /** *

          * The connections bundled by the LAG. *

          * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to * create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its * result is passed to {@link #connections(List)}. * * @param connections * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #connections(List) */ Builder connections(Consumer... connections); /** *

          * Indicates whether the LAG can host other connections. *

          * * @param allowsHostedConnections * Indicates whether the LAG can host other connections. * @return Returns a reference to this object so that method calls can be chained together. */ Builder allowsHostedConnections(Boolean allowsHostedConnections); /** *

          * Indicates whether jumbo frames (9001 MTU) are supported. *

          * * @param jumboFrameCapable * Indicates whether jumbo frames (9001 MTU) are supported. * @return Returns a reference to this object so that method calls can be chained together. */ Builder jumboFrameCapable(Boolean jumboFrameCapable); /** *

          * Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6). *

          * * @param hasLogicalRedundancy * Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6). * @see HasLogicalRedundancy * @return Returns a reference to this object so that method calls can be chained together. * @see HasLogicalRedundancy */ Builder hasLogicalRedundancy(String hasLogicalRedundancy); /** *

          * Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6). *

          * * @param hasLogicalRedundancy * Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6). * @see HasLogicalRedundancy * @return Returns a reference to this object so that method calls can be chained together. * @see HasLogicalRedundancy */ Builder hasLogicalRedundancy(HasLogicalRedundancy hasLogicalRedundancy); /** *

          * The tags associated with the LAG. *

          * * @param tags * The tags associated with the LAG. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

          * The tags associated with the LAG. *

          * * @param tags * The tags associated with the LAG. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

          * The tags associated with the LAG. *

          * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to create * one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its result * is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(List) */ Builder tags(Consumer... tags); /** *

          * The name of the service provider associated with the LAG. *

          * * @param providerName * The name of the service provider associated with the LAG. * @return Returns a reference to this object so that method calls can be chained together. */ Builder providerName(String providerName); } static final class BuilderImpl extends DirectConnectResponse.BuilderImpl implements Builder { private String connectionsBandwidth; private Integer numberOfConnections; private String lagId; private String ownerAccount; private String lagName; private String lagState; private String location; private String region; private Integer minimumLinks; private String awsDevice; private String awsDeviceV2; private List connections = DefaultSdkAutoConstructList.getInstance(); private Boolean allowsHostedConnections; private Boolean jumboFrameCapable; private String hasLogicalRedundancy; private List tags = DefaultSdkAutoConstructList.getInstance(); private String providerName; private BuilderImpl() { } private BuilderImpl(CreateLagResponse model) { super(model); connectionsBandwidth(model.connectionsBandwidth); numberOfConnections(model.numberOfConnections); lagId(model.lagId); ownerAccount(model.ownerAccount); lagName(model.lagName); lagState(model.lagState); location(model.location); region(model.region); minimumLinks(model.minimumLinks); awsDevice(model.awsDevice); awsDeviceV2(model.awsDeviceV2); connections(model.connections); allowsHostedConnections(model.allowsHostedConnections); jumboFrameCapable(model.jumboFrameCapable); hasLogicalRedundancy(model.hasLogicalRedundancy); tags(model.tags); providerName(model.providerName); } public final String getConnectionsBandwidth() { return connectionsBandwidth; } @Override public final Builder connectionsBandwidth(String connectionsBandwidth) { this.connectionsBandwidth = connectionsBandwidth; return this; } public final void setConnectionsBandwidth(String connectionsBandwidth) { this.connectionsBandwidth = connectionsBandwidth; } public final Integer getNumberOfConnections() { return numberOfConnections; } @Override public final Builder numberOfConnections(Integer numberOfConnections) { this.numberOfConnections = numberOfConnections; return this; } public final void setNumberOfConnections(Integer numberOfConnections) { this.numberOfConnections = numberOfConnections; } public final String getLagId() { return lagId; } @Override public final Builder lagId(String lagId) { this.lagId = lagId; return this; } public final void setLagId(String lagId) { this.lagId = lagId; } public final String getOwnerAccount() { return ownerAccount; } @Override public final Builder ownerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; return this; } public final void setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; } public final String getLagName() { return lagName; } @Override public final Builder lagName(String lagName) { this.lagName = lagName; return this; } public final void setLagName(String lagName) { this.lagName = lagName; } public final String getLagState() { return lagState; } @Override public final Builder lagState(String lagState) { this.lagState = lagState; return this; } @Override public final Builder lagState(LagState lagState) { this.lagState(lagState == null ? null : lagState.toString()); return this; } public final void setLagState(String lagState) { this.lagState = lagState; } public final String getLocation() { return location; } @Override public final Builder location(String location) { this.location = location; return this; } public final void setLocation(String location) { this.location = location; } public final String getRegion() { return region; } @Override public final Builder region(String region) { this.region = region; return this; } public final void setRegion(String region) { this.region = region; } public final Integer getMinimumLinks() { return minimumLinks; } @Override public final Builder minimumLinks(Integer minimumLinks) { this.minimumLinks = minimumLinks; return this; } public final void setMinimumLinks(Integer minimumLinks) { this.minimumLinks = minimumLinks; } public final String getAwsDevice() { return awsDevice; } @Override public final Builder awsDevice(String awsDevice) { this.awsDevice = awsDevice; return this; } public final void setAwsDevice(String awsDevice) { this.awsDevice = awsDevice; } public final String getAwsDeviceV2() { return awsDeviceV2; } @Override public final Builder awsDeviceV2(String awsDeviceV2) { this.awsDeviceV2 = awsDeviceV2; return this; } public final void setAwsDeviceV2(String awsDeviceV2) { this.awsDeviceV2 = awsDeviceV2; } public final Collection getConnections() { return connections != null ? connections.stream().map(Connection::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder connections(Collection connections) { this.connections = ConnectionListCopier.copy(connections); return this; } @Override @SafeVarargs public final Builder connections(Connection... connections) { connections(Arrays.asList(connections)); return this; } @Override @SafeVarargs public final Builder connections(Consumer... connections) { connections(Stream.of(connections).map(c -> Connection.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setConnections(Collection connections) { this.connections = ConnectionListCopier.copyFromBuilder(connections); } public final Boolean getAllowsHostedConnections() { return allowsHostedConnections; } @Override public final Builder allowsHostedConnections(Boolean allowsHostedConnections) { this.allowsHostedConnections = allowsHostedConnections; return this; } public final void setAllowsHostedConnections(Boolean allowsHostedConnections) { this.allowsHostedConnections = allowsHostedConnections; } public final Boolean getJumboFrameCapable() { return jumboFrameCapable; } @Override public final Builder jumboFrameCapable(Boolean jumboFrameCapable) { this.jumboFrameCapable = jumboFrameCapable; return this; } public final void setJumboFrameCapable(Boolean jumboFrameCapable) { this.jumboFrameCapable = jumboFrameCapable; } public final String getHasLogicalRedundancy() { return hasLogicalRedundancy; } @Override public final Builder hasLogicalRedundancy(String hasLogicalRedundancy) { this.hasLogicalRedundancy = hasLogicalRedundancy; return this; } @Override public final Builder hasLogicalRedundancy(HasLogicalRedundancy hasLogicalRedundancy) { this.hasLogicalRedundancy(hasLogicalRedundancy == null ? null : hasLogicalRedundancy.toString()); return this; } public final void setHasLogicalRedundancy(String hasLogicalRedundancy) { this.hasLogicalRedundancy = hasLogicalRedundancy; } public final Collection getTags() { return tags != null ? tags.stream().map(Tag::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } public final String getProviderName() { return providerName; } @Override public final Builder providerName(String providerName) { this.providerName = providerName; return this; } public final void setProviderName(String providerName) { this.providerName = providerName; } @Override public CreateLagResponse build() { return new CreateLagResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy