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

software.amazon.awssdk.services.directconnect.model.Connection 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.io.Serializable;
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 Direct Connect connection. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Connection implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField OWNER_ACCOUNT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ownerAccount").getter(getter(Connection::ownerAccount)).setter(setter(Builder::ownerAccount)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ownerAccount").build()).build(); private static final SdkField CONNECTION_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("connectionId").getter(getter(Connection::connectionId)).setter(setter(Builder::connectionId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("connectionId").build()).build(); private static final SdkField CONNECTION_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("connectionName").getter(getter(Connection::connectionName)).setter(setter(Builder::connectionName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("connectionName").build()).build(); private static final SdkField CONNECTION_STATE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("connectionState").getter(getter(Connection::connectionStateAsString)) .setter(setter(Builder::connectionState)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("connectionState").build()).build(); private static final SdkField REGION_FIELD = SdkField. builder(MarshallingType.STRING).memberName("region") .getter(getter(Connection::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) .memberName("location").getter(getter(Connection::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) .memberName("bandwidth").getter(getter(Connection::bandwidth)).setter(setter(Builder::bandwidth)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("bandwidth").build()).build(); private static final SdkField VLAN_FIELD = SdkField. builder(MarshallingType.INTEGER).memberName("vlan") .getter(getter(Connection::vlan)).setter(setter(Builder::vlan)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("vlan").build()).build(); private static final SdkField PARTNER_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("partnerName").getter(getter(Connection::partnerName)).setter(setter(Builder::partnerName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("partnerName").build()).build(); private static final SdkField LOA_ISSUE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("loaIssueTime").getter(getter(Connection::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).memberName("lagId") .getter(getter(Connection::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) .memberName("awsDevice").getter(getter(Connection::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) .memberName("jumboFrameCapable").getter(getter(Connection::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) .memberName("awsDeviceV2").getter(getter(Connection::awsDeviceV2)).setter(setter(Builder::awsDeviceV2)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("awsDeviceV2").build()).build(); private static final SdkField AWS_LOGICAL_DEVICE_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("awsLogicalDeviceId").getter(getter(Connection::awsLogicalDeviceId)) .setter(setter(Builder::awsLogicalDeviceId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("awsLogicalDeviceId").build()) .build(); private static final SdkField HAS_LOGICAL_REDUNDANCY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("hasLogicalRedundancy").getter(getter(Connection::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) .memberName("tags") .getter(getter(Connection::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) .memberName("providerName").getter(getter(Connection::providerName)).setter(setter(Builder::providerName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("providerName").build()).build(); private static final SdkField MAC_SEC_CAPABLE_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("macSecCapable").getter(getter(Connection::macSecCapable)).setter(setter(Builder::macSecCapable)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("macSecCapable").build()).build(); private static final SdkField PORT_ENCRYPTION_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("portEncryptionStatus").getter(getter(Connection::portEncryptionStatus)) .setter(setter(Builder::portEncryptionStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("portEncryptionStatus").build()) .build(); private static final SdkField ENCRYPTION_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("encryptionMode").getter(getter(Connection::encryptionMode)).setter(setter(Builder::encryptionMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("encryptionMode").build()).build(); private static final SdkField> MAC_SEC_KEYS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("macSecKeys") .getter(getter(Connection::macSecKeys)) .setter(setter(Builder::macSecKeys)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("macSecKeys").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(MacSecKey::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(OWNER_ACCOUNT_FIELD, CONNECTION_ID_FIELD, CONNECTION_NAME_FIELD, CONNECTION_STATE_FIELD, REGION_FIELD, LOCATION_FIELD, BANDWIDTH_FIELD, VLAN_FIELD, PARTNER_NAME_FIELD, LOA_ISSUE_TIME_FIELD, LAG_ID_FIELD, AWS_DEVICE_FIELD, JUMBO_FRAME_CAPABLE_FIELD, AWS_DEVICE_V2_FIELD, AWS_LOGICAL_DEVICE_ID_FIELD, HAS_LOGICAL_REDUNDANCY_FIELD, TAGS_FIELD, PROVIDER_NAME_FIELD, MAC_SEC_CAPABLE_FIELD, PORT_ENCRYPTION_STATUS_FIELD, ENCRYPTION_MODE_FIELD, MAC_SEC_KEYS_FIELD)); private static final long serialVersionUID = 1L; private final String ownerAccount; private final String connectionId; private final String connectionName; private final String connectionState; private final String region; private final String location; private final String bandwidth; private final Integer vlan; private final String partnerName; private final Instant loaIssueTime; private final String lagId; private final String awsDevice; private final Boolean jumboFrameCapable; private final String awsDeviceV2; private final String awsLogicalDeviceId; private final String hasLogicalRedundancy; private final List tags; private final String providerName; private final Boolean macSecCapable; private final String portEncryptionStatus; private final String encryptionMode; private final List macSecKeys; private Connection(BuilderImpl builder) { this.ownerAccount = builder.ownerAccount; this.connectionId = builder.connectionId; this.connectionName = builder.connectionName; this.connectionState = builder.connectionState; this.region = builder.region; this.location = builder.location; this.bandwidth = builder.bandwidth; this.vlan = builder.vlan; this.partnerName = builder.partnerName; this.loaIssueTime = builder.loaIssueTime; this.lagId = builder.lagId; this.awsDevice = builder.awsDevice; this.jumboFrameCapable = builder.jumboFrameCapable; this.awsDeviceV2 = builder.awsDeviceV2; this.awsLogicalDeviceId = builder.awsLogicalDeviceId; this.hasLogicalRedundancy = builder.hasLogicalRedundancy; this.tags = builder.tags; this.providerName = builder.providerName; this.macSecCapable = builder.macSecCapable; this.portEncryptionStatus = builder.portEncryptionStatus; this.encryptionMode = builder.encryptionMode; this.macSecKeys = builder.macSecKeys; } /** *

* The ID of the Amazon Web Services account that owns the connection. *

* * @return The ID of the Amazon Web Services account that owns the connection. */ public final String ownerAccount() { return ownerAccount; } /** *

* The ID of the connection. *

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

* The name of the connection. *

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

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

*
    *
  • *

    * ordering: The initial state of a hosted connection provisioned on an interconnect. The connection * stays in the ordering state until the owner of the hosted connection confirms or declines the connection order. *

    *
  • *
  • *

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

    *
  • *
  • *

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

    *
  • *
  • *

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

    *
  • *
  • *

    * down: The network link is down. *

    *
  • *
  • *

    * deleting: The connection is being deleted. *

    *
  • *
  • *

    * deleted: The connection has been deleted. *

    *
  • *
  • *

    * rejected: A hosted connection in the ordering state enters the rejected * state if it is deleted by the customer. *

    *
  • *
  • *

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

    *
  • *
*

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

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

*
    *
  • *

    * ordering: The initial state of a hosted connection provisioned on an interconnect. The * connection stays in the ordering state until the owner of the hosted connection confirms or declines the * connection order. *

    *
  • *
  • *

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

    *
  • *
  • *

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

    *
  • *
  • *

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

    *
  • *
  • *

    * down: The network link is down. *

    *
  • *
  • *

    * deleting: The connection is being deleted. *

    *
  • *
  • *

    * deleted: The connection has been deleted. *

    *
  • *
  • *

    * rejected: A hosted connection in the ordering state enters the * rejected state if it is deleted by the customer. *

    *
  • *
  • *

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

    *
  • * @see ConnectionState */ public final ConnectionState connectionState() { return ConnectionState.fromValue(connectionState); } /** *

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

    *
      *
    • *

      * ordering: The initial state of a hosted connection provisioned on an interconnect. The connection * stays in the ordering state until the owner of the hosted connection confirms or declines the connection order. *

      *
    • *
    • *

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

      *
    • *
    • *

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

      *
    • *
    • *

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

      *
    • *
    • *

      * down: The network link is down. *

      *
    • *
    • *

      * deleting: The connection is being deleted. *

      *
    • *
    • *

      * deleted: The connection has been deleted. *

      *
    • *
    • *

      * rejected: A hosted connection in the ordering state enters the rejected * state if it is deleted by the customer. *

      *
    • *
    • *

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

      *
    • *
    *

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

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

    *
      *
    • *

      * ordering: The initial state of a hosted connection provisioned on an interconnect. The * connection stays in the ordering state until the owner of the hosted connection confirms or declines the * connection order. *

      *
    • *
    • *

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

      *
    • *
    • *

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

      *
    • *
    • *

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

      *
    • *
    • *

      * down: The network link is down. *

      *
    • *
    • *

      * deleting: The connection is being deleted. *

      *
    • *
    • *

      * deleted: The connection has been deleted. *

      *
    • *
    • *

      * rejected: A hosted connection in the ordering state enters the * rejected state if it is deleted by the customer. *

      *
    • *
    • *

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

      *
    • * @see ConnectionState */ public final String connectionStateAsString() { return connectionState; } /** *

      * The Amazon Web Services Region where the connection is located. *

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

      * The location of the connection. *

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

      * The bandwidth of the connection. *

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

      * The ID of the VLAN. *

      * * @return The ID of the VLAN. */ public final Integer vlan() { return vlan; } /** *

      * The name of the Direct Connect service provider associated with the connection. *

      * * @return The name of the Direct Connect service provider associated with the connection. */ public final String partnerName() { return partnerName; } /** *

      * 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 final Instant loaIssueTime() { return loaIssueTime; } /** *

      * The ID of the LAG. *

      * * @return The ID of the LAG. */ public final 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 final String awsDevice() { return awsDevice; } /** *

      * Indicates whether jumbo frames are supported. *

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

      * The Direct Connect endpoint that terminates the physical connection. *

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

      * The Direct Connect endpoint that terminates the logical connection. This device might be different than the * device that terminates the physical connection. *

      * * @return The Direct Connect endpoint that terminates the logical connection. This device might be different than * the device that terminates the physical connection. */ public final String awsLogicalDeviceId() { return awsLogicalDeviceId; } /** *

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

      * Indicates whether the connection 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 connection supports a secondary BGP peer in the same address family (IPv4/IPv6). * @see HasLogicalRedundancy */ public final String hasLogicalRedundancyAsString() { return hasLogicalRedundancy; } /** * For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

      * The tags associated with the connection. *

      *

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

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTags} method. *

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

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

      * * @return The name of the service provider associated with the connection. */ public final String providerName() { return providerName; } /** *

      * Indicates whether the connection supports MAC Security (MACsec). *

      * * @return Indicates whether the connection supports MAC Security (MACsec). */ public final Boolean macSecCapable() { return macSecCapable; } /** *

      * The MAC Security (MACsec) port link status of the connection. *

      *

      * The valid values are Encryption Up, which means that there is an active Connection Key Name, or * Encryption Down. *

      * * @return The MAC Security (MACsec) port link status of the connection.

      *

      * The valid values are Encryption Up, which means that there is an active Connection Key Name, * or Encryption Down. */ public final String portEncryptionStatus() { return portEncryptionStatus; } /** *

      * The MAC Security (MACsec) connection encryption mode. *

      *

      * The valid values are no_encrypt, should_encrypt, and must_encrypt. *

      * * @return The MAC Security (MACsec) connection encryption mode.

      *

      * The valid values are no_encrypt, should_encrypt, and must_encrypt. */ public final String encryptionMode() { return encryptionMode; } /** * For responses, this returns true if the service returned a value for the MacSecKeys property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasMacSecKeys() { return macSecKeys != null && !(macSecKeys instanceof SdkAutoConstructList); } /** *

      * The MAC Security (MACsec) security keys associated with the connection. *

      *

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

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasMacSecKeys} method. *

      * * @return The MAC Security (MACsec) security keys associated with the connection. */ public final List macSecKeys() { return macSecKeys; } @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(ownerAccount()); hashCode = 31 * hashCode + Objects.hashCode(connectionId()); hashCode = 31 * hashCode + Objects.hashCode(connectionName()); hashCode = 31 * hashCode + Objects.hashCode(connectionStateAsString()); hashCode = 31 * hashCode + Objects.hashCode(region()); hashCode = 31 * hashCode + Objects.hashCode(location()); hashCode = 31 * hashCode + Objects.hashCode(bandwidth()); hashCode = 31 * hashCode + Objects.hashCode(vlan()); hashCode = 31 * hashCode + Objects.hashCode(partnerName()); 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(awsLogicalDeviceId()); hashCode = 31 * hashCode + Objects.hashCode(hasLogicalRedundancyAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(providerName()); hashCode = 31 * hashCode + Objects.hashCode(macSecCapable()); hashCode = 31 * hashCode + Objects.hashCode(portEncryptionStatus()); hashCode = 31 * hashCode + Objects.hashCode(encryptionMode()); hashCode = 31 * hashCode + Objects.hashCode(hasMacSecKeys() ? macSecKeys() : null); 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 Connection)) { return false; } Connection other = (Connection) obj; return Objects.equals(ownerAccount(), other.ownerAccount()) && Objects.equals(connectionId(), other.connectionId()) && Objects.equals(connectionName(), other.connectionName()) && Objects.equals(connectionStateAsString(), other.connectionStateAsString()) && Objects.equals(region(), other.region()) && Objects.equals(location(), other.location()) && Objects.equals(bandwidth(), other.bandwidth()) && Objects.equals(vlan(), other.vlan()) && Objects.equals(partnerName(), other.partnerName()) && 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(awsLogicalDeviceId(), other.awsLogicalDeviceId()) && Objects.equals(hasLogicalRedundancyAsString(), other.hasLogicalRedundancyAsString()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(providerName(), other.providerName()) && Objects.equals(macSecCapable(), other.macSecCapable()) && Objects.equals(portEncryptionStatus(), other.portEncryptionStatus()) && Objects.equals(encryptionMode(), other.encryptionMode()) && hasMacSecKeys() == other.hasMacSecKeys() && Objects.equals(macSecKeys(), other.macSecKeys()); } /** * 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("Connection").add("OwnerAccount", ownerAccount()).add("ConnectionId", connectionId()) .add("ConnectionName", connectionName()).add("ConnectionState", connectionStateAsString()) .add("Region", region()).add("Location", location()).add("Bandwidth", bandwidth()).add("Vlan", vlan()) .add("PartnerName", partnerName()).add("LoaIssueTime", loaIssueTime()).add("LagId", lagId()) .add("AwsDevice", awsDevice()).add("JumboFrameCapable", jumboFrameCapable()).add("AwsDeviceV2", awsDeviceV2()) .add("AwsLogicalDeviceId", awsLogicalDeviceId()).add("HasLogicalRedundancy", hasLogicalRedundancyAsString()) .add("Tags", hasTags() ? tags() : null).add("ProviderName", providerName()).add("MacSecCapable", macSecCapable()) .add("PortEncryptionStatus", portEncryptionStatus()).add("EncryptionMode", encryptionMode()) .add("MacSecKeys", hasMacSecKeys() ? macSecKeys() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ownerAccount": return Optional.ofNullable(clazz.cast(ownerAccount())); case "connectionId": return Optional.ofNullable(clazz.cast(connectionId())); case "connectionName": return Optional.ofNullable(clazz.cast(connectionName())); case "connectionState": return Optional.ofNullable(clazz.cast(connectionStateAsString())); 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 "vlan": return Optional.ofNullable(clazz.cast(vlan())); case "partnerName": return Optional.ofNullable(clazz.cast(partnerName())); 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 "awsLogicalDeviceId": return Optional.ofNullable(clazz.cast(awsLogicalDeviceId())); case "hasLogicalRedundancy": return Optional.ofNullable(clazz.cast(hasLogicalRedundancyAsString())); case "tags": return Optional.ofNullable(clazz.cast(tags())); case "providerName": return Optional.ofNullable(clazz.cast(providerName())); case "macSecCapable": return Optional.ofNullable(clazz.cast(macSecCapable())); case "portEncryptionStatus": return Optional.ofNullable(clazz.cast(portEncryptionStatus())); case "encryptionMode": return Optional.ofNullable(clazz.cast(encryptionMode())); case "macSecKeys": return Optional.ofNullable(clazz.cast(macSecKeys())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Connection) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

      * The ID of the Amazon Web Services account that owns the connection. *

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

      * The ID of the connection. *

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

      * The name of the connection. *

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

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

      *
        *
      • *

        * ordering: The initial state of a hosted connection provisioned on an interconnect. The * connection stays in the ordering state until the owner of the hosted connection confirms or declines the * connection order. *

        *
      • *
      • *

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

        *
      • *
      • *

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

        *
      • *
      • *

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

        *
      • *
      • *

        * down: The network link is down. *

        *
      • *
      • *

        * deleting: The connection is being deleted. *

        *
      • *
      • *

        * deleted: The connection has been deleted. *

        *
      • *
      • *

        * rejected: A hosted connection in the ordering state enters the * rejected state if it is deleted by the customer. *

        *
      • *
      • *

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

        *
      • *
      * * @param connectionState * The state of the connection. The following are the possible values:

      *
        *
      • *

        * ordering: The initial state of a hosted connection provisioned on an interconnect. The * connection stays in the ordering state until the owner of the hosted connection confirms or declines * the connection order. *

        *
      • *
      • *

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

        *
      • *
      • *

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

        *
      • *
      • *

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

        *
      • *
      • *

        * down: The network link is down. *

        *
      • *
      • *

        * deleting: The connection is being deleted. *

        *
      • *
      • *

        * deleted: The connection has been deleted. *

        *
      • *
      • *

        * rejected: A hosted connection in the ordering state enters the * rejected state if it is deleted by the customer. *

        *
      • *
      • *

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

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

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

        *
          *
        • *

          * ordering: The initial state of a hosted connection provisioned on an interconnect. The * connection stays in the ordering state until the owner of the hosted connection confirms or declines the * connection order. *

          *
        • *
        • *

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

          *
        • *
        • *

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

          *
        • *
        • *

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

          *
        • *
        • *

          * down: The network link is down. *

          *
        • *
        • *

          * deleting: The connection is being deleted. *

          *
        • *
        • *

          * deleted: The connection has been deleted. *

          *
        • *
        • *

          * rejected: A hosted connection in the ordering state enters the * rejected state if it is deleted by the customer. *

          *
        • *
        • *

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

          *
        • *
        * * @param connectionState * The state of the connection. The following are the possible values:

        *
          *
        • *

          * ordering: The initial state of a hosted connection provisioned on an interconnect. The * connection stays in the ordering state until the owner of the hosted connection confirms or declines * the connection order. *

          *
        • *
        • *

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

          *
        • *
        • *

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

          *
        • *
        • *

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

          *
        • *
        • *

          * down: The network link is down. *

          *
        • *
        • *

          * deleting: The connection is being deleted. *

          *
        • *
        • *

          * deleted: The connection has been deleted. *

          *
        • *
        • *

          * rejected: A hosted connection in the ordering state enters the * rejected state if it is deleted by the customer. *

          *
        • *
        • *

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

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

          * The Amazon Web Services Region where the connection is located. *

          * * @param region * The Amazon Web Services 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 ID of the VLAN. *

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

          * The name of the Direct Connect service provider associated with the connection. *

          * * @param partnerName * The name of the Direct Connect service provider associated with the connection. * @return Returns a reference to this object so that method calls can be chained together. */ Builder partnerName(String partnerName); /** *

          * 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 are supported. *

          * * @param jumboFrameCapable * Indicates whether jumbo frames 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 that terminates the physical connection. *

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

          * The Direct Connect endpoint that terminates the logical connection. This device might be different than the * device that terminates the physical connection. *

          * * @param awsLogicalDeviceId * The Direct Connect endpoint that terminates the logical connection. This device might be different * than the device that terminates the physical connection. * @return Returns a reference to this object so that method calls can be chained together. */ Builder awsLogicalDeviceId(String awsLogicalDeviceId); /** *

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

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

          * * @param hasLogicalRedundancy * Indicates whether the connection 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 connection. *

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

          * The tags associated with the connection. *

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

          * The tags associated with the connection. *

          * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.directconnect.model.Tag.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.directconnect.model.Tag#builder()}. * *

          * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.directconnect.model.Tag.Builder#build()} is called immediately and its * result is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on * {@link software.amazon.awssdk.services.directconnect.model.Tag.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(java.util.Collection) */ Builder tags(Consumer... tags); /** *

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

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

          * Indicates whether the connection supports MAC Security (MACsec). *

          * * @param macSecCapable * Indicates whether the connection supports MAC Security (MACsec). * @return Returns a reference to this object so that method calls can be chained together. */ Builder macSecCapable(Boolean macSecCapable); /** *

          * The MAC Security (MACsec) port link status of the connection. *

          *

          * The valid values are Encryption Up, which means that there is an active Connection Key Name, or * Encryption Down. *

          * * @param portEncryptionStatus * The MAC Security (MACsec) port link status of the connection.

          *

          * The valid values are Encryption Up, which means that there is an active Connection Key * Name, or Encryption Down. * @return Returns a reference to this object so that method calls can be chained together. */ Builder portEncryptionStatus(String portEncryptionStatus); /** *

          * The MAC Security (MACsec) connection encryption mode. *

          *

          * The valid values are no_encrypt, should_encrypt, and must_encrypt. *

          * * @param encryptionMode * The MAC Security (MACsec) connection encryption mode.

          *

          * The valid values are no_encrypt, should_encrypt, and * must_encrypt. * @return Returns a reference to this object so that method calls can be chained together. */ Builder encryptionMode(String encryptionMode); /** *

          * The MAC Security (MACsec) security keys associated with the connection. *

          * * @param macSecKeys * The MAC Security (MACsec) security keys associated with the connection. * @return Returns a reference to this object so that method calls can be chained together. */ Builder macSecKeys(Collection macSecKeys); /** *

          * The MAC Security (MACsec) security keys associated with the connection. *

          * * @param macSecKeys * The MAC Security (MACsec) security keys associated with the connection. * @return Returns a reference to this object so that method calls can be chained together. */ Builder macSecKeys(MacSecKey... macSecKeys); /** *

          * The MAC Security (MACsec) security keys associated with the connection. *

          * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.directconnect.model.MacSecKey.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.directconnect.model.MacSecKey#builder()}. * *

          * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.directconnect.model.MacSecKey.Builder#build()} is called immediately * and its result is passed to {@link #macSecKeys(List)}. * * @param macSecKeys * a consumer that will call methods on * {@link software.amazon.awssdk.services.directconnect.model.MacSecKey.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #macSecKeys(java.util.Collection) */ Builder macSecKeys(Consumer... macSecKeys); } static final class BuilderImpl implements Builder { private String ownerAccount; private String connectionId; private String connectionName; private String connectionState; private String region; private String location; private String bandwidth; private Integer vlan; private String partnerName; private Instant loaIssueTime; private String lagId; private String awsDevice; private Boolean jumboFrameCapable; private String awsDeviceV2; private String awsLogicalDeviceId; private String hasLogicalRedundancy; private List tags = DefaultSdkAutoConstructList.getInstance(); private String providerName; private Boolean macSecCapable; private String portEncryptionStatus; private String encryptionMode; private List macSecKeys = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(Connection model) { ownerAccount(model.ownerAccount); connectionId(model.connectionId); connectionName(model.connectionName); connectionState(model.connectionState); region(model.region); location(model.location); bandwidth(model.bandwidth); vlan(model.vlan); partnerName(model.partnerName); loaIssueTime(model.loaIssueTime); lagId(model.lagId); awsDevice(model.awsDevice); jumboFrameCapable(model.jumboFrameCapable); awsDeviceV2(model.awsDeviceV2); awsLogicalDeviceId(model.awsLogicalDeviceId); hasLogicalRedundancy(model.hasLogicalRedundancy); tags(model.tags); providerName(model.providerName); macSecCapable(model.macSecCapable); portEncryptionStatus(model.portEncryptionStatus); encryptionMode(model.encryptionMode); macSecKeys(model.macSecKeys); } public final String getOwnerAccount() { return ownerAccount; } public final void setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; } @Override public final Builder ownerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; return this; } public final String getConnectionId() { return connectionId; } public final void setConnectionId(String connectionId) { this.connectionId = connectionId; } @Override public final Builder connectionId(String connectionId) { this.connectionId = connectionId; return this; } public final String getConnectionName() { return connectionName; } public final void setConnectionName(String connectionName) { this.connectionName = connectionName; } @Override public final Builder connectionName(String connectionName) { this.connectionName = connectionName; return this; } public final String getConnectionState() { return connectionState; } public final void setConnectionState(String connectionState) { this.connectionState = connectionState; } @Override public final Builder connectionState(String connectionState) { this.connectionState = connectionState; return this; } @Override public final Builder connectionState(ConnectionState connectionState) { this.connectionState(connectionState == null ? null : connectionState.toString()); return this; } public final String getRegion() { return region; } public final void setRegion(String region) { this.region = region; } @Override public final Builder region(String region) { this.region = region; return this; } public final String getLocation() { return location; } public final void setLocation(String location) { this.location = location; } @Override public final Builder location(String location) { this.location = location; return this; } public final String getBandwidth() { return bandwidth; } public final void setBandwidth(String bandwidth) { this.bandwidth = bandwidth; } @Override public final Builder bandwidth(String bandwidth) { this.bandwidth = bandwidth; return this; } public final Integer getVlan() { return vlan; } public final void setVlan(Integer vlan) { this.vlan = vlan; } @Override public final Builder vlan(Integer vlan) { this.vlan = vlan; return this; } public final String getPartnerName() { return partnerName; } public final void setPartnerName(String partnerName) { this.partnerName = partnerName; } @Override public final Builder partnerName(String partnerName) { this.partnerName = partnerName; return this; } public final Instant getLoaIssueTime() { return loaIssueTime; } public final void setLoaIssueTime(Instant loaIssueTime) { this.loaIssueTime = loaIssueTime; } @Override public final Builder loaIssueTime(Instant loaIssueTime) { this.loaIssueTime = loaIssueTime; return this; } public final String getLagId() { return lagId; } public final void setLagId(String lagId) { this.lagId = lagId; } @Override public final Builder lagId(String lagId) { this.lagId = lagId; return this; } public final String getAwsDevice() { return awsDevice; } public final void setAwsDevice(String awsDevice) { this.awsDevice = awsDevice; } @Override public final Builder awsDevice(String awsDevice) { this.awsDevice = awsDevice; return this; } public final Boolean getJumboFrameCapable() { return jumboFrameCapable; } public final void setJumboFrameCapable(Boolean jumboFrameCapable) { this.jumboFrameCapable = jumboFrameCapable; } @Override public final Builder jumboFrameCapable(Boolean jumboFrameCapable) { this.jumboFrameCapable = jumboFrameCapable; return this; } public final String getAwsDeviceV2() { return awsDeviceV2; } public final void setAwsDeviceV2(String awsDeviceV2) { this.awsDeviceV2 = awsDeviceV2; } @Override public final Builder awsDeviceV2(String awsDeviceV2) { this.awsDeviceV2 = awsDeviceV2; return this; } public final String getAwsLogicalDeviceId() { return awsLogicalDeviceId; } public final void setAwsLogicalDeviceId(String awsLogicalDeviceId) { this.awsLogicalDeviceId = awsLogicalDeviceId; } @Override public final Builder awsLogicalDeviceId(String awsLogicalDeviceId) { this.awsLogicalDeviceId = awsLogicalDeviceId; return this; } public final String getHasLogicalRedundancy() { return hasLogicalRedundancy; } public final void setHasLogicalRedundancy(String hasLogicalRedundancy) { this.hasLogicalRedundancy = 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 List getTags() { List result = TagListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @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 String getProviderName() { return providerName; } public final void setProviderName(String providerName) { this.providerName = providerName; } @Override public final Builder providerName(String providerName) { this.providerName = providerName; return this; } public final Boolean getMacSecCapable() { return macSecCapable; } public final void setMacSecCapable(Boolean macSecCapable) { this.macSecCapable = macSecCapable; } @Override public final Builder macSecCapable(Boolean macSecCapable) { this.macSecCapable = macSecCapable; return this; } public final String getPortEncryptionStatus() { return portEncryptionStatus; } public final void setPortEncryptionStatus(String portEncryptionStatus) { this.portEncryptionStatus = portEncryptionStatus; } @Override public final Builder portEncryptionStatus(String portEncryptionStatus) { this.portEncryptionStatus = portEncryptionStatus; return this; } public final String getEncryptionMode() { return encryptionMode; } public final void setEncryptionMode(String encryptionMode) { this.encryptionMode = encryptionMode; } @Override public final Builder encryptionMode(String encryptionMode) { this.encryptionMode = encryptionMode; return this; } public final List getMacSecKeys() { List result = MacSecKeyListCopier.copyToBuilder(this.macSecKeys); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setMacSecKeys(Collection macSecKeys) { this.macSecKeys = MacSecKeyListCopier.copyFromBuilder(macSecKeys); } @Override public final Builder macSecKeys(Collection macSecKeys) { this.macSecKeys = MacSecKeyListCopier.copy(macSecKeys); return this; } @Override @SafeVarargs public final Builder macSecKeys(MacSecKey... macSecKeys) { macSecKeys(Arrays.asList(macSecKeys)); return this; } @Override @SafeVarargs public final Builder macSecKeys(Consumer... macSecKeys) { macSecKeys(Stream.of(macSecKeys).map(c -> MacSecKey.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } @Override public Connection build() { return new Connection(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy