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

software.amazon.awssdk.services.directconnect.model.CreateInterconnectResponse 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.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.directconnect.model;

import java.time.Instant;
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 an interconnect. *

*/ @Generated("software.amazon.awssdk:codegen") public final class CreateInterconnectResponse extends DirectConnectResponse implements ToCopyableBuilder { private static final SdkField INTERCONNECT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateInterconnectResponse::interconnectId)).setter(setter(Builder::interconnectId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("interconnectId").build()).build(); private static final SdkField INTERCONNECT_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateInterconnectResponse::interconnectName)).setter(setter(Builder::interconnectName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("interconnectName").build()).build(); private static final SdkField INTERCONNECT_STATE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateInterconnectResponse::interconnectStateAsString)).setter(setter(Builder::interconnectState)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("interconnectState").build()).build(); private static final SdkField REGION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateInterconnectResponse::region)).setter(setter(Builder::region)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("region").build()).build(); private static final SdkField LOCATION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateInterconnectResponse::location)).setter(setter(Builder::location)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("location").build()).build(); private static final SdkField BANDWIDTH_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateInterconnectResponse::bandwidth)).setter(setter(Builder::bandwidth)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("bandwidth").build()).build(); private static final SdkField LOA_ISSUE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(CreateInterconnectResponse::loaIssueTime)).setter(setter(Builder::loaIssueTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("loaIssueTime").build()).build(); private static final SdkField LAG_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateInterconnectResponse::lagId)).setter(setter(Builder::lagId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lagId").build()).build(); private static final SdkField AWS_DEVICE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateInterconnectResponse::awsDevice)).setter(setter(Builder::awsDevice)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("awsDevice").build()).build(); private static final SdkField JUMBO_FRAME_CAPABLE_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(CreateInterconnectResponse::jumboFrameCapable)).setter(setter(Builder::jumboFrameCapable)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("jumboFrameCapable").build()).build(); private static final SdkField AWS_DEVICE_V2_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateInterconnectResponse::awsDeviceV2)).setter(setter(Builder::awsDeviceV2)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("awsDeviceV2").build()).build(); private static final SdkField HAS_LOGICAL_REDUNDANCY_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(CreateInterconnectResponse::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(CreateInterconnectResponse::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(CreateInterconnectResponse::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(INTERCONNECT_ID_FIELD, INTERCONNECT_NAME_FIELD, INTERCONNECT_STATE_FIELD, REGION_FIELD, LOCATION_FIELD, BANDWIDTH_FIELD, LOA_ISSUE_TIME_FIELD, LAG_ID_FIELD, AWS_DEVICE_FIELD, JUMBO_FRAME_CAPABLE_FIELD, AWS_DEVICE_V2_FIELD, HAS_LOGICAL_REDUNDANCY_FIELD, TAGS_FIELD, PROVIDER_NAME_FIELD)); private final String interconnectId; private final String interconnectName; private final String interconnectState; private final String region; private final String location; private final String bandwidth; private final Instant loaIssueTime; private final String lagId; private final String awsDevice; private final Boolean jumboFrameCapable; private final String awsDeviceV2; private final String hasLogicalRedundancy; private final List tags; private final String providerName; private CreateInterconnectResponse(BuilderImpl builder) { super(builder); this.interconnectId = builder.interconnectId; this.interconnectName = builder.interconnectName; this.interconnectState = builder.interconnectState; this.region = builder.region; this.location = builder.location; this.bandwidth = builder.bandwidth; this.loaIssueTime = builder.loaIssueTime; this.lagId = builder.lagId; this.awsDevice = builder.awsDevice; this.jumboFrameCapable = builder.jumboFrameCapable; this.awsDeviceV2 = builder.awsDeviceV2; this.hasLogicalRedundancy = builder.hasLogicalRedundancy; this.tags = builder.tags; this.providerName = builder.providerName; } /** *

* The ID of the interconnect. *

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

* The name of the interconnect. *

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

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

*
    *
  • *

    * requested: The initial state of an interconnect. The interconnect stays in the requested state until * the Letter of Authorization (LOA) is sent to the customer. *

    *
  • *
  • *

    * pending: The interconnect is approved, and is being initialized. *

    *
  • *
  • *

    * available: The network link is up, and the interconnect is ready for use. *

    *
  • *
  • *

    * down: The network link is down. *

    *
  • *
  • *

    * deleting: The interconnect is being deleted. *

    *
  • *
  • *

    * deleted: The interconnect is deleted. *

    *
  • *
  • *

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

    *
  • *
*

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

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

*
    *
  • *

    * requested: The initial state of an interconnect. The interconnect stays in the requested * state until the Letter of Authorization (LOA) is sent to the customer. *

    *
  • *
  • *

    * pending: The interconnect is approved, and is being initialized. *

    *
  • *
  • *

    * available: The network link is up, and the interconnect is ready for use. *

    *
  • *
  • *

    * down: The network link is down. *

    *
  • *
  • *

    * deleting: The interconnect is being deleted. *

    *
  • *
  • *

    * deleted: The interconnect is deleted. *

    *
  • *
  • *

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

    *
  • * @see InterconnectState */ public InterconnectState interconnectState() { return InterconnectState.fromValue(interconnectState); } /** *

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

    *
      *
    • *

      * requested: The initial state of an interconnect. The interconnect stays in the requested state until * the Letter of Authorization (LOA) is sent to the customer. *

      *
    • *
    • *

      * pending: The interconnect is approved, and is being initialized. *

      *
    • *
    • *

      * available: The network link is up, and the interconnect is ready for use. *

      *
    • *
    • *

      * down: The network link is down. *

      *
    • *
    • *

      * deleting: The interconnect is being deleted. *

      *
    • *
    • *

      * deleted: The interconnect is deleted. *

      *
    • *
    • *

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

      *
    • *
    *

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

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

    *
      *
    • *

      * requested: The initial state of an interconnect. The interconnect stays in the requested * state until the Letter of Authorization (LOA) is sent to the customer. *

      *
    • *
    • *

      * pending: The interconnect is approved, and is being initialized. *

      *
    • *
    • *

      * available: The network link is up, and the interconnect is ready for use. *

      *
    • *
    • *

      * down: The network link is down. *

      *
    • *
    • *

      * deleting: The interconnect is being deleted. *

      *
    • *
    • *

      * deleted: The interconnect is deleted. *

      *
    • *
    • *

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

      *
    • * @see InterconnectState */ public String interconnectStateAsString() { return interconnectState; } /** *

      * The AWS Region where the connection is located. *

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

      * The location of the connection. *

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

      * The bandwidth of the connection. *

      * * @return The bandwidth of the connection. */ public String bandwidth() { return bandwidth; } /** *

      * The time of the most recent call to DescribeLoa for this connection. *

      * * @return The time of the most recent call to DescribeLoa for this connection. */ public Instant loaIssueTime() { return loaIssueTime; } /** *

      * The ID of the LAG. *

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

      * The Direct Connect endpoint on which the physical connection terminates. *

      * * @return The Direct Connect endpoint on which the physical connection terminates. */ public String awsDevice() { return awsDevice; } /** *

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

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

      * The Direct Connect endpoint on which the physical connection terminates. *

      * * @return The Direct Connect endpoint on which the physical connection terminates. */ public String awsDeviceV2() { return awsDeviceV2; } /** *

      * Indicates whether the interconnect supports a secondary BGP 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 interconnect supports a secondary BGP in the same address family (IPv4/IPv6). * @see HasLogicalRedundancy */ public HasLogicalRedundancy hasLogicalRedundancy() { return HasLogicalRedundancy.fromValue(hasLogicalRedundancy); } /** *

      * Indicates whether the interconnect supports a secondary BGP 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 interconnect supports a secondary BGP 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 interconnect. *

      *

      * 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 interconnect. */ public List tags() { return tags; } /** *

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

      * * @return The name of the service provider associated with the interconnect. */ 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(interconnectId()); hashCode = 31 * hashCode + Objects.hashCode(interconnectName()); hashCode = 31 * hashCode + Objects.hashCode(interconnectStateAsString()); hashCode = 31 * hashCode + Objects.hashCode(region()); hashCode = 31 * hashCode + Objects.hashCode(location()); hashCode = 31 * hashCode + Objects.hashCode(bandwidth()); hashCode = 31 * hashCode + Objects.hashCode(loaIssueTime()); hashCode = 31 * hashCode + Objects.hashCode(lagId()); hashCode = 31 * hashCode + Objects.hashCode(awsDevice()); hashCode = 31 * hashCode + Objects.hashCode(jumboFrameCapable()); hashCode = 31 * hashCode + Objects.hashCode(awsDeviceV2()); 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 CreateInterconnectResponse)) { return false; } CreateInterconnectResponse other = (CreateInterconnectResponse) obj; return Objects.equals(interconnectId(), other.interconnectId()) && Objects.equals(interconnectName(), other.interconnectName()) && Objects.equals(interconnectStateAsString(), other.interconnectStateAsString()) && Objects.equals(region(), other.region()) && Objects.equals(location(), other.location()) && Objects.equals(bandwidth(), other.bandwidth()) && Objects.equals(loaIssueTime(), other.loaIssueTime()) && Objects.equals(lagId(), other.lagId()) && Objects.equals(awsDevice(), other.awsDevice()) && Objects.equals(jumboFrameCapable(), other.jumboFrameCapable()) && Objects.equals(awsDeviceV2(), other.awsDeviceV2()) && 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("CreateInterconnectResponse").add("InterconnectId", interconnectId()) .add("InterconnectName", interconnectName()).add("InterconnectState", interconnectStateAsString()) .add("Region", region()).add("Location", location()).add("Bandwidth", bandwidth()) .add("LoaIssueTime", loaIssueTime()).add("LagId", lagId()).add("AwsDevice", awsDevice()) .add("JumboFrameCapable", jumboFrameCapable()).add("AwsDeviceV2", awsDeviceV2()) .add("HasLogicalRedundancy", hasLogicalRedundancyAsString()).add("Tags", tags()) .add("ProviderName", providerName()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "interconnectId": return Optional.ofNullable(clazz.cast(interconnectId())); case "interconnectName": return Optional.ofNullable(clazz.cast(interconnectName())); case "interconnectState": return Optional.ofNullable(clazz.cast(interconnectStateAsString())); case "region": return Optional.ofNullable(clazz.cast(region())); case "location": return Optional.ofNullable(clazz.cast(location())); case "bandwidth": return Optional.ofNullable(clazz.cast(bandwidth())); case "loaIssueTime": return Optional.ofNullable(clazz.cast(loaIssueTime())); case "lagId": return Optional.ofNullable(clazz.cast(lagId())); case "awsDevice": return Optional.ofNullable(clazz.cast(awsDevice())); case "jumboFrameCapable": return Optional.ofNullable(clazz.cast(jumboFrameCapable())); case "awsDeviceV2": return Optional.ofNullable(clazz.cast(awsDeviceV2())); 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((CreateInterconnectResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends DirectConnectResponse.Builder, SdkPojo, CopyableBuilder { /** *

      * The ID of the interconnect. *

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

      * The name of the interconnect. *

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

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

      *
        *
      • *

        * requested: The initial state of an interconnect. The interconnect stays in the requested state * until the Letter of Authorization (LOA) is sent to the customer. *

        *
      • *
      • *

        * pending: The interconnect is approved, and is being initialized. *

        *
      • *
      • *

        * available: The network link is up, and the interconnect is ready for use. *

        *
      • *
      • *

        * down: The network link is down. *

        *
      • *
      • *

        * deleting: The interconnect is being deleted. *

        *
      • *
      • *

        * deleted: The interconnect is deleted. *

        *
      • *
      • *

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

        *
      • *
      * * @param interconnectState * The state of the interconnect. The following are the possible values:

      *
        *
      • *

        * requested: The initial state of an interconnect. The interconnect stays in the requested * state until the Letter of Authorization (LOA) is sent to the customer. *

        *
      • *
      • *

        * pending: The interconnect is approved, and is being initialized. *

        *
      • *
      • *

        * available: The network link is up, and the interconnect is ready for use. *

        *
      • *
      • *

        * down: The network link is down. *

        *
      • *
      • *

        * deleting: The interconnect is being deleted. *

        *
      • *
      • *

        * deleted: The interconnect is deleted. *

        *
      • *
      • *

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

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

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

        *
          *
        • *

          * requested: The initial state of an interconnect. The interconnect stays in the requested state * until the Letter of Authorization (LOA) is sent to the customer. *

          *
        • *
        • *

          * pending: The interconnect is approved, and is being initialized. *

          *
        • *
        • *

          * available: The network link is up, and the interconnect is ready for use. *

          *
        • *
        • *

          * down: The network link is down. *

          *
        • *
        • *

          * deleting: The interconnect is being deleted. *

          *
        • *
        • *

          * deleted: The interconnect is deleted. *

          *
        • *
        • *

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

          *
        • *
        * * @param interconnectState * The state of the interconnect. The following are the possible values:

        *
          *
        • *

          * requested: The initial state of an interconnect. The interconnect stays in the requested * state until the Letter of Authorization (LOA) is sent to the customer. *

          *
        • *
        • *

          * pending: The interconnect is approved, and is being initialized. *

          *
        • *
        • *

          * available: The network link is up, and the interconnect is ready for use. *

          *
        • *
        • *

          * down: The network link is down. *

          *
        • *
        • *

          * deleting: The interconnect is being deleted. *

          *
        • *
        • *

          * deleted: The interconnect is deleted. *

          *
        • *
        • *

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

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

          * 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 location of the connection. *

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

          * The bandwidth of the connection. *

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

          * The time of the most recent call to DescribeLoa for this connection. *

          * * @param loaIssueTime * The time of the most recent call to DescribeLoa for this connection. * @return Returns a reference to this object so that method calls can be chained together. */ Builder loaIssueTime(Instant loaIssueTime); /** *

          * 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 Direct Connect endpoint on which the physical connection terminates. *

          * * @param awsDevice * The Direct Connect endpoint on which the physical connection terminates. * @return Returns a reference to this object so that method calls can be chained together. */ Builder awsDevice(String awsDevice); /** *

          * 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); /** *

          * The Direct Connect endpoint on which the physical connection terminates. *

          * * @param awsDeviceV2 * The Direct Connect endpoint on which the physical connection terminates. * @return Returns a reference to this object so that method calls can be chained together. */ Builder awsDeviceV2(String awsDeviceV2); /** *

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

          * * @param hasLogicalRedundancy * Indicates whether the interconnect supports a secondary BGP 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 interconnect supports a secondary BGP in the same address family (IPv4/IPv6). *

          * * @param hasLogicalRedundancy * Indicates whether the interconnect supports a secondary BGP 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 interconnect. *

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

          * The tags associated with the interconnect. *

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

          * The tags associated with the interconnect. *

          * 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 interconnect. *

          * * @param providerName * The name of the service provider associated with the interconnect. * @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 interconnectId; private String interconnectName; private String interconnectState; private String region; private String location; private String bandwidth; private Instant loaIssueTime; private String lagId; private String awsDevice; private Boolean jumboFrameCapable; private String awsDeviceV2; private String hasLogicalRedundancy; private List tags = DefaultSdkAutoConstructList.getInstance(); private String providerName; private BuilderImpl() { } private BuilderImpl(CreateInterconnectResponse model) { super(model); interconnectId(model.interconnectId); interconnectName(model.interconnectName); interconnectState(model.interconnectState); region(model.region); location(model.location); bandwidth(model.bandwidth); loaIssueTime(model.loaIssueTime); lagId(model.lagId); awsDevice(model.awsDevice); jumboFrameCapable(model.jumboFrameCapable); awsDeviceV2(model.awsDeviceV2); hasLogicalRedundancy(model.hasLogicalRedundancy); tags(model.tags); providerName(model.providerName); } public final String getInterconnectId() { return interconnectId; } @Override public final Builder interconnectId(String interconnectId) { this.interconnectId = interconnectId; return this; } public final void setInterconnectId(String interconnectId) { this.interconnectId = interconnectId; } public final String getInterconnectName() { return interconnectName; } @Override public final Builder interconnectName(String interconnectName) { this.interconnectName = interconnectName; return this; } public final void setInterconnectName(String interconnectName) { this.interconnectName = interconnectName; } public final String getInterconnectState() { return interconnectState; } @Override public final Builder interconnectState(String interconnectState) { this.interconnectState = interconnectState; return this; } @Override public final Builder interconnectState(InterconnectState interconnectState) { this.interconnectState(interconnectState == null ? null : interconnectState.toString()); return this; } public final void setInterconnectState(String interconnectState) { this.interconnectState = interconnectState; } 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 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 getBandwidth() { return bandwidth; } @Override public final Builder bandwidth(String bandwidth) { this.bandwidth = bandwidth; return this; } public final void setBandwidth(String bandwidth) { this.bandwidth = bandwidth; } public final Instant getLoaIssueTime() { return loaIssueTime; } @Override public final Builder loaIssueTime(Instant loaIssueTime) { this.loaIssueTime = loaIssueTime; return this; } public final void setLoaIssueTime(Instant loaIssueTime) { this.loaIssueTime = loaIssueTime; } 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 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 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 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 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 CreateInterconnectResponse build() { return new CreateInterconnectResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy