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

software.amazon.awssdk.services.securityhub.model.AwsEc2NetworkInterfaceDetails Maven / Gradle / Ivy

/*
 * 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.securityhub.model;

import java.io.Serializable;
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;

/**
 * 

* Details about the network interface *

*/ @Generated("software.amazon.awssdk:codegen") public final class AwsEc2NetworkInterfaceDetails implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ATTACHMENT_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("Attachment") .getter(getter(AwsEc2NetworkInterfaceDetails::attachment)).setter(setter(Builder::attachment)) .constructor(AwsEc2NetworkInterfaceAttachment::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Attachment").build()).build(); private static final SdkField NETWORK_INTERFACE_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("NetworkInterfaceId").getter(getter(AwsEc2NetworkInterfaceDetails::networkInterfaceId)) .setter(setter(Builder::networkInterfaceId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NetworkInterfaceId").build()) .build(); private static final SdkField> SECURITY_GROUPS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("SecurityGroups") .getter(getter(AwsEc2NetworkInterfaceDetails::securityGroups)) .setter(setter(Builder::securityGroups)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecurityGroups").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(AwsEc2NetworkInterfaceSecurityGroup::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField SOURCE_DEST_CHECK_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("SourceDestCheck").getter(getter(AwsEc2NetworkInterfaceDetails::sourceDestCheck)) .setter(setter(Builder::sourceDestCheck)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceDestCheck").build()).build(); private static final SdkField> IP_V6_ADDRESSES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("IpV6Addresses") .getter(getter(AwsEc2NetworkInterfaceDetails::ipV6Addresses)) .setter(setter(Builder::ipV6Addresses)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IpV6Addresses").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(AwsEc2NetworkInterfaceIpV6AddressDetail::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> PRIVATE_IP_ADDRESSES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("PrivateIpAddresses") .getter(getter(AwsEc2NetworkInterfaceDetails::privateIpAddresses)) .setter(setter(Builder::privateIpAddresses)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PrivateIpAddresses").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(AwsEc2NetworkInterfacePrivateIpAddressDetail::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField PUBLIC_DNS_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("PublicDnsName").getter(getter(AwsEc2NetworkInterfaceDetails::publicDnsName)) .setter(setter(Builder::publicDnsName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PublicDnsName").build()).build(); private static final SdkField PUBLIC_IP_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("PublicIp").getter(getter(AwsEc2NetworkInterfaceDetails::publicIp)).setter(setter(Builder::publicIp)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PublicIp").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ATTACHMENT_FIELD, NETWORK_INTERFACE_ID_FIELD, SECURITY_GROUPS_FIELD, SOURCE_DEST_CHECK_FIELD, IP_V6_ADDRESSES_FIELD, PRIVATE_IP_ADDRESSES_FIELD, PUBLIC_DNS_NAME_FIELD, PUBLIC_IP_FIELD)); private static final long serialVersionUID = 1L; private final AwsEc2NetworkInterfaceAttachment attachment; private final String networkInterfaceId; private final List securityGroups; private final Boolean sourceDestCheck; private final List ipV6Addresses; private final List privateIpAddresses; private final String publicDnsName; private final String publicIp; private AwsEc2NetworkInterfaceDetails(BuilderImpl builder) { this.attachment = builder.attachment; this.networkInterfaceId = builder.networkInterfaceId; this.securityGroups = builder.securityGroups; this.sourceDestCheck = builder.sourceDestCheck; this.ipV6Addresses = builder.ipV6Addresses; this.privateIpAddresses = builder.privateIpAddresses; this.publicDnsName = builder.publicDnsName; this.publicIp = builder.publicIp; } /** *

* The network interface attachment. *

* * @return The network interface attachment. */ public final AwsEc2NetworkInterfaceAttachment attachment() { return attachment; } /** *

* The ID of the network interface. *

* * @return The ID of the network interface. */ public final String networkInterfaceId() { return networkInterfaceId; } /** * For responses, this returns true if the service returned a value for the SecurityGroups 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 hasSecurityGroups() { return securityGroups != null && !(securityGroups instanceof SdkAutoConstructList); } /** *

* Security groups for the network interface. *

*

* 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 #hasSecurityGroups} method. *

* * @return Security groups for the network interface. */ public final List securityGroups() { return securityGroups; } /** *

* Indicates whether traffic to or from the instance is validated. *

* * @return Indicates whether traffic to or from the instance is validated. */ public final Boolean sourceDestCheck() { return sourceDestCheck; } /** * For responses, this returns true if the service returned a value for the IpV6Addresses 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 hasIpV6Addresses() { return ipV6Addresses != null && !(ipV6Addresses instanceof SdkAutoConstructList); } /** *

* The IPv6 addresses associated with the network interface. *

*

* 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 #hasIpV6Addresses} method. *

* * @return The IPv6 addresses associated with the network interface. */ public final List ipV6Addresses() { return ipV6Addresses; } /** * For responses, this returns true if the service returned a value for the PrivateIpAddresses 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 hasPrivateIpAddresses() { return privateIpAddresses != null && !(privateIpAddresses instanceof SdkAutoConstructList); } /** *

* The private IPv4 addresses associated with the network interface. *

*

* 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 #hasPrivateIpAddresses} method. *

* * @return The private IPv4 addresses associated with the network interface. */ public final List privateIpAddresses() { return privateIpAddresses; } /** *

* The public DNS name of the network interface. *

* * @return The public DNS name of the network interface. */ public final String publicDnsName() { return publicDnsName; } /** *

* The address of the Elastic IP address bound to the network interface. *

* * @return The address of the Elastic IP address bound to the network interface. */ public final String publicIp() { return publicIp; } @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(attachment()); hashCode = 31 * hashCode + Objects.hashCode(networkInterfaceId()); hashCode = 31 * hashCode + Objects.hashCode(hasSecurityGroups() ? securityGroups() : null); hashCode = 31 * hashCode + Objects.hashCode(sourceDestCheck()); hashCode = 31 * hashCode + Objects.hashCode(hasIpV6Addresses() ? ipV6Addresses() : null); hashCode = 31 * hashCode + Objects.hashCode(hasPrivateIpAddresses() ? privateIpAddresses() : null); hashCode = 31 * hashCode + Objects.hashCode(publicDnsName()); hashCode = 31 * hashCode + Objects.hashCode(publicIp()); 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 AwsEc2NetworkInterfaceDetails)) { return false; } AwsEc2NetworkInterfaceDetails other = (AwsEc2NetworkInterfaceDetails) obj; return Objects.equals(attachment(), other.attachment()) && Objects.equals(networkInterfaceId(), other.networkInterfaceId()) && hasSecurityGroups() == other.hasSecurityGroups() && Objects.equals(securityGroups(), other.securityGroups()) && Objects.equals(sourceDestCheck(), other.sourceDestCheck()) && hasIpV6Addresses() == other.hasIpV6Addresses() && Objects.equals(ipV6Addresses(), other.ipV6Addresses()) && hasPrivateIpAddresses() == other.hasPrivateIpAddresses() && Objects.equals(privateIpAddresses(), other.privateIpAddresses()) && Objects.equals(publicDnsName(), other.publicDnsName()) && Objects.equals(publicIp(), other.publicIp()); } /** * 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("AwsEc2NetworkInterfaceDetails").add("Attachment", attachment()) .add("NetworkInterfaceId", networkInterfaceId()) .add("SecurityGroups", hasSecurityGroups() ? securityGroups() : null).add("SourceDestCheck", sourceDestCheck()) .add("IpV6Addresses", hasIpV6Addresses() ? ipV6Addresses() : null) .add("PrivateIpAddresses", hasPrivateIpAddresses() ? privateIpAddresses() : null) .add("PublicDnsName", publicDnsName()).add("PublicIp", publicIp()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Attachment": return Optional.ofNullable(clazz.cast(attachment())); case "NetworkInterfaceId": return Optional.ofNullable(clazz.cast(networkInterfaceId())); case "SecurityGroups": return Optional.ofNullable(clazz.cast(securityGroups())); case "SourceDestCheck": return Optional.ofNullable(clazz.cast(sourceDestCheck())); case "IpV6Addresses": return Optional.ofNullable(clazz.cast(ipV6Addresses())); case "PrivateIpAddresses": return Optional.ofNullable(clazz.cast(privateIpAddresses())); case "PublicDnsName": return Optional.ofNullable(clazz.cast(publicDnsName())); case "PublicIp": return Optional.ofNullable(clazz.cast(publicIp())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((AwsEc2NetworkInterfaceDetails) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The network interface attachment. *

* * @param attachment * The network interface attachment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder attachment(AwsEc2NetworkInterfaceAttachment attachment); /** *

* The network interface attachment. *

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

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

* The ID of the network interface. *

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

* Security groups for the network interface. *

* * @param securityGroups * Security groups for the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ Builder securityGroups(Collection securityGroups); /** *

* Security groups for the network interface. *

* * @param securityGroups * Security groups for the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ Builder securityGroups(AwsEc2NetworkInterfaceSecurityGroup... securityGroups); /** *

* Security groups for the network interface. *

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

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

* Indicates whether traffic to or from the instance is validated. *

* * @param sourceDestCheck * Indicates whether traffic to or from the instance is validated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sourceDestCheck(Boolean sourceDestCheck); /** *

* The IPv6 addresses associated with the network interface. *

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

* The IPv6 addresses associated with the network interface. *

* * @param ipV6Addresses * The IPv6 addresses associated with the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ipV6Addresses(AwsEc2NetworkInterfaceIpV6AddressDetail... ipV6Addresses); /** *

* The IPv6 addresses associated with the network interface. *

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

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

* The private IPv4 addresses associated with the network interface. *

* * @param privateIpAddresses * The private IPv4 addresses associated with the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ Builder privateIpAddresses(Collection privateIpAddresses); /** *

* The private IPv4 addresses associated with the network interface. *

* * @param privateIpAddresses * The private IPv4 addresses associated with the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ Builder privateIpAddresses(AwsEc2NetworkInterfacePrivateIpAddressDetail... privateIpAddresses); /** *

* The private IPv4 addresses associated with the network interface. *

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

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

* The public DNS name of the network interface. *

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

* The address of the Elastic IP address bound to the network interface. *

* * @param publicIp * The address of the Elastic IP address bound to the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ Builder publicIp(String publicIp); } static final class BuilderImpl implements Builder { private AwsEc2NetworkInterfaceAttachment attachment; private String networkInterfaceId; private List securityGroups = DefaultSdkAutoConstructList.getInstance(); private Boolean sourceDestCheck; private List ipV6Addresses = DefaultSdkAutoConstructList.getInstance(); private List privateIpAddresses = DefaultSdkAutoConstructList.getInstance(); private String publicDnsName; private String publicIp; private BuilderImpl() { } private BuilderImpl(AwsEc2NetworkInterfaceDetails model) { attachment(model.attachment); networkInterfaceId(model.networkInterfaceId); securityGroups(model.securityGroups); sourceDestCheck(model.sourceDestCheck); ipV6Addresses(model.ipV6Addresses); privateIpAddresses(model.privateIpAddresses); publicDnsName(model.publicDnsName); publicIp(model.publicIp); } public final AwsEc2NetworkInterfaceAttachment.Builder getAttachment() { return attachment != null ? attachment.toBuilder() : null; } public final void setAttachment(AwsEc2NetworkInterfaceAttachment.BuilderImpl attachment) { this.attachment = attachment != null ? attachment.build() : null; } @Override public final Builder attachment(AwsEc2NetworkInterfaceAttachment attachment) { this.attachment = attachment; return this; } public final String getNetworkInterfaceId() { return networkInterfaceId; } public final void setNetworkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; } @Override public final Builder networkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; return this; } public final List getSecurityGroups() { List result = AwsEc2NetworkInterfaceSecurityGroupListCopier .copyToBuilder(this.securityGroups); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setSecurityGroups(Collection securityGroups) { this.securityGroups = AwsEc2NetworkInterfaceSecurityGroupListCopier.copyFromBuilder(securityGroups); } @Override public final Builder securityGroups(Collection securityGroups) { this.securityGroups = AwsEc2NetworkInterfaceSecurityGroupListCopier.copy(securityGroups); return this; } @Override @SafeVarargs public final Builder securityGroups(AwsEc2NetworkInterfaceSecurityGroup... securityGroups) { securityGroups(Arrays.asList(securityGroups)); return this; } @Override @SafeVarargs public final Builder securityGroups(Consumer... securityGroups) { securityGroups(Stream.of(securityGroups) .map(c -> AwsEc2NetworkInterfaceSecurityGroup.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final Boolean getSourceDestCheck() { return sourceDestCheck; } public final void setSourceDestCheck(Boolean sourceDestCheck) { this.sourceDestCheck = sourceDestCheck; } @Override public final Builder sourceDestCheck(Boolean sourceDestCheck) { this.sourceDestCheck = sourceDestCheck; return this; } public final List getIpV6Addresses() { List result = AwsEc2NetworkInterfaceIpV6AddressListCopier .copyToBuilder(this.ipV6Addresses); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setIpV6Addresses(Collection ipV6Addresses) { this.ipV6Addresses = AwsEc2NetworkInterfaceIpV6AddressListCopier.copyFromBuilder(ipV6Addresses); } @Override public final Builder ipV6Addresses(Collection ipV6Addresses) { this.ipV6Addresses = AwsEc2NetworkInterfaceIpV6AddressListCopier.copy(ipV6Addresses); return this; } @Override @SafeVarargs public final Builder ipV6Addresses(AwsEc2NetworkInterfaceIpV6AddressDetail... ipV6Addresses) { ipV6Addresses(Arrays.asList(ipV6Addresses)); return this; } @Override @SafeVarargs public final Builder ipV6Addresses(Consumer... ipV6Addresses) { ipV6Addresses(Stream.of(ipV6Addresses) .map(c -> AwsEc2NetworkInterfaceIpV6AddressDetail.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final List getPrivateIpAddresses() { List result = AwsEc2NetworkInterfacePrivateIpAddressListCopier .copyToBuilder(this.privateIpAddresses); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setPrivateIpAddresses( Collection privateIpAddresses) { this.privateIpAddresses = AwsEc2NetworkInterfacePrivateIpAddressListCopier.copyFromBuilder(privateIpAddresses); } @Override public final Builder privateIpAddresses(Collection privateIpAddresses) { this.privateIpAddresses = AwsEc2NetworkInterfacePrivateIpAddressListCopier.copy(privateIpAddresses); return this; } @Override @SafeVarargs public final Builder privateIpAddresses(AwsEc2NetworkInterfacePrivateIpAddressDetail... privateIpAddresses) { privateIpAddresses(Arrays.asList(privateIpAddresses)); return this; } @Override @SafeVarargs public final Builder privateIpAddresses( Consumer... privateIpAddresses) { privateIpAddresses(Stream.of(privateIpAddresses) .map(c -> AwsEc2NetworkInterfacePrivateIpAddressDetail.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final String getPublicDnsName() { return publicDnsName; } public final void setPublicDnsName(String publicDnsName) { this.publicDnsName = publicDnsName; } @Override public final Builder publicDnsName(String publicDnsName) { this.publicDnsName = publicDnsName; return this; } public final String getPublicIp() { return publicIp; } public final void setPublicIp(String publicIp) { this.publicIp = publicIp; } @Override public final Builder publicIp(String publicIp) { this.publicIp = publicIp; return this; } @Override public AwsEc2NetworkInterfaceDetails build() { return new AwsEc2NetworkInterfaceDetails(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy