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

software.amazon.awssdk.services.fms.model.NetworkFirewallInvalidRouteConfigurationViolation Maven / Gradle / Ivy

Go to download

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

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

import java.beans.Transient;
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;

/**
 * 

* Violation detail for the improperly configured subnet route. It's possible there is a missing route table route, or a * configuration that causes traffic to cross an Availability Zone boundary. *

*/ @Generated("software.amazon.awssdk:codegen") public final class NetworkFirewallInvalidRouteConfigurationViolation implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField> AFFECTED_SUBNETS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("AffectedSubnets") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::affectedSubnets)) .setter(setter(Builder::affectedSubnets)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AffectedSubnets").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField ROUTE_TABLE_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("RouteTableId").getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::routeTableId)) .setter(setter(Builder::routeTableId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RouteTableId").build()).build(); private static final SdkField IS_ROUTE_TABLE_USED_IN_DIFFERENT_AZ_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("IsRouteTableUsedInDifferentAZ") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::isRouteTableUsedInDifferentAZ)) .setter(setter(Builder::isRouteTableUsedInDifferentAZ)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IsRouteTableUsedInDifferentAZ") .build()).build(); private static final SdkField VIOLATING_ROUTE_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("ViolatingRoute").getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::violatingRoute)) .setter(setter(Builder::violatingRoute)).constructor(Route::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ViolatingRoute").build()).build(); private static final SdkField CURRENT_FIREWALL_SUBNET_ROUTE_TABLE_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("CurrentFirewallSubnetRouteTable") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::currentFirewallSubnetRouteTable)) .setter(setter(Builder::currentFirewallSubnetRouteTable)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CurrentFirewallSubnetRouteTable") .build()).build(); private static final SdkField EXPECTED_FIREWALL_ENDPOINT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ExpectedFirewallEndpoint") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::expectedFirewallEndpoint)) .setter(setter(Builder::expectedFirewallEndpoint)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExpectedFirewallEndpoint").build()) .build(); private static final SdkField ACTUAL_FIREWALL_ENDPOINT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ActualFirewallEndpoint") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::actualFirewallEndpoint)) .setter(setter(Builder::actualFirewallEndpoint)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ActualFirewallEndpoint").build()) .build(); private static final SdkField EXPECTED_FIREWALL_SUBNET_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ExpectedFirewallSubnetId") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::expectedFirewallSubnetId)) .setter(setter(Builder::expectedFirewallSubnetId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExpectedFirewallSubnetId").build()) .build(); private static final SdkField ACTUAL_FIREWALL_SUBNET_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ActualFirewallSubnetId") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::actualFirewallSubnetId)) .setter(setter(Builder::actualFirewallSubnetId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ActualFirewallSubnetId").build()) .build(); private static final SdkField> EXPECTED_FIREWALL_SUBNET_ROUTES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ExpectedFirewallSubnetRoutes") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::expectedFirewallSubnetRoutes)) .setter(setter(Builder::expectedFirewallSubnetRoutes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExpectedFirewallSubnetRoutes") .build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ExpectedRoute::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> ACTUAL_FIREWALL_SUBNET_ROUTES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ActualFirewallSubnetRoutes") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::actualFirewallSubnetRoutes)) .setter(setter(Builder::actualFirewallSubnetRoutes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ActualFirewallSubnetRoutes").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Route::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField INTERNET_GATEWAY_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("InternetGatewayId").getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::internetGatewayId)) .setter(setter(Builder::internetGatewayId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InternetGatewayId").build()).build(); private static final SdkField CURRENT_INTERNET_GATEWAY_ROUTE_TABLE_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("CurrentInternetGatewayRouteTable") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::currentInternetGatewayRouteTable)) .setter(setter(Builder::currentInternetGatewayRouteTable)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CurrentInternetGatewayRouteTable") .build()).build(); private static final SdkField> EXPECTED_INTERNET_GATEWAY_ROUTES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ExpectedInternetGatewayRoutes") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::expectedInternetGatewayRoutes)) .setter(setter(Builder::expectedInternetGatewayRoutes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExpectedInternetGatewayRoutes") .build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ExpectedRoute::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> ACTUAL_INTERNET_GATEWAY_ROUTES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ActualInternetGatewayRoutes") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::actualInternetGatewayRoutes)) .setter(setter(Builder::actualInternetGatewayRoutes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ActualInternetGatewayRoutes") .build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Route::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField VPC_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("VpcId") .getter(getter(NetworkFirewallInvalidRouteConfigurationViolation::vpcId)).setter(setter(Builder::vpcId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcId").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AFFECTED_SUBNETS_FIELD, ROUTE_TABLE_ID_FIELD, IS_ROUTE_TABLE_USED_IN_DIFFERENT_AZ_FIELD, VIOLATING_ROUTE_FIELD, CURRENT_FIREWALL_SUBNET_ROUTE_TABLE_FIELD, EXPECTED_FIREWALL_ENDPOINT_FIELD, ACTUAL_FIREWALL_ENDPOINT_FIELD, EXPECTED_FIREWALL_SUBNET_ID_FIELD, ACTUAL_FIREWALL_SUBNET_ID_FIELD, EXPECTED_FIREWALL_SUBNET_ROUTES_FIELD, ACTUAL_FIREWALL_SUBNET_ROUTES_FIELD, INTERNET_GATEWAY_ID_FIELD, CURRENT_INTERNET_GATEWAY_ROUTE_TABLE_FIELD, EXPECTED_INTERNET_GATEWAY_ROUTES_FIELD, ACTUAL_INTERNET_GATEWAY_ROUTES_FIELD, VPC_ID_FIELD)); private static final long serialVersionUID = 1L; private final List affectedSubnets; private final String routeTableId; private final Boolean isRouteTableUsedInDifferentAZ; private final Route violatingRoute; private final String currentFirewallSubnetRouteTable; private final String expectedFirewallEndpoint; private final String actualFirewallEndpoint; private final String expectedFirewallSubnetId; private final String actualFirewallSubnetId; private final List expectedFirewallSubnetRoutes; private final List actualFirewallSubnetRoutes; private final String internetGatewayId; private final String currentInternetGatewayRouteTable; private final List expectedInternetGatewayRoutes; private final List actualInternetGatewayRoutes; private final String vpcId; private NetworkFirewallInvalidRouteConfigurationViolation(BuilderImpl builder) { this.affectedSubnets = builder.affectedSubnets; this.routeTableId = builder.routeTableId; this.isRouteTableUsedInDifferentAZ = builder.isRouteTableUsedInDifferentAZ; this.violatingRoute = builder.violatingRoute; this.currentFirewallSubnetRouteTable = builder.currentFirewallSubnetRouteTable; this.expectedFirewallEndpoint = builder.expectedFirewallEndpoint; this.actualFirewallEndpoint = builder.actualFirewallEndpoint; this.expectedFirewallSubnetId = builder.expectedFirewallSubnetId; this.actualFirewallSubnetId = builder.actualFirewallSubnetId; this.expectedFirewallSubnetRoutes = builder.expectedFirewallSubnetRoutes; this.actualFirewallSubnetRoutes = builder.actualFirewallSubnetRoutes; this.internetGatewayId = builder.internetGatewayId; this.currentInternetGatewayRouteTable = builder.currentInternetGatewayRouteTable; this.expectedInternetGatewayRoutes = builder.expectedInternetGatewayRoutes; this.actualInternetGatewayRoutes = builder.actualInternetGatewayRoutes; this.vpcId = builder.vpcId; } /** * For responses, this returns true if the service returned a value for the AffectedSubnets 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 hasAffectedSubnets() { return affectedSubnets != null && !(affectedSubnets instanceof SdkAutoConstructList); } /** *

* The subnets that are affected. *

*

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

* * @return The subnets that are affected. */ public final List affectedSubnets() { return affectedSubnets; } /** *

* The route table ID. *

* * @return The route table ID. */ public final String routeTableId() { return routeTableId; } /** *

* Information about whether the route table is used in another Availability Zone. *

* * @return Information about whether the route table is used in another Availability Zone. */ public final Boolean isRouteTableUsedInDifferentAZ() { return isRouteTableUsedInDifferentAZ; } /** *

* The route that's in violation. *

* * @return The route that's in violation. */ public final Route violatingRoute() { return violatingRoute; } /** *

* The subnet route table for the current firewall. *

* * @return The subnet route table for the current firewall. */ public final String currentFirewallSubnetRouteTable() { return currentFirewallSubnetRouteTable; } /** *

* The firewall endpoint that's expected. *

* * @return The firewall endpoint that's expected. */ public final String expectedFirewallEndpoint() { return expectedFirewallEndpoint; } /** *

* The actual firewall endpoint. *

* * @return The actual firewall endpoint. */ public final String actualFirewallEndpoint() { return actualFirewallEndpoint; } /** *

* The expected subnet ID for the firewall. *

* * @return The expected subnet ID for the firewall. */ public final String expectedFirewallSubnetId() { return expectedFirewallSubnetId; } /** *

* The actual subnet ID for the firewall. *

* * @return The actual subnet ID for the firewall. */ public final String actualFirewallSubnetId() { return actualFirewallSubnetId; } /** * For responses, this returns true if the service returned a value for the ExpectedFirewallSubnetRoutes 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 hasExpectedFirewallSubnetRoutes() { return expectedFirewallSubnetRoutes != null && !(expectedFirewallSubnetRoutes instanceof SdkAutoConstructList); } /** *

* The firewall subnet routes that are expected. *

*

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

* * @return The firewall subnet routes that are expected. */ public final List expectedFirewallSubnetRoutes() { return expectedFirewallSubnetRoutes; } /** * For responses, this returns true if the service returned a value for the ActualFirewallSubnetRoutes 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 hasActualFirewallSubnetRoutes() { return actualFirewallSubnetRoutes != null && !(actualFirewallSubnetRoutes instanceof SdkAutoConstructList); } /** *

* The actual firewall subnet routes that are expected. *

*

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

* * @return The actual firewall subnet routes that are expected. */ public final List actualFirewallSubnetRoutes() { return actualFirewallSubnetRoutes; } /** *

* The internet gateway ID. *

* * @return The internet gateway ID. */ public final String internetGatewayId() { return internetGatewayId; } /** *

* The route table for the current internet gateway. *

* * @return The route table for the current internet gateway. */ public final String currentInternetGatewayRouteTable() { return currentInternetGatewayRouteTable; } /** * For responses, this returns true if the service returned a value for the ExpectedInternetGatewayRoutes 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 hasExpectedInternetGatewayRoutes() { return expectedInternetGatewayRoutes != null && !(expectedInternetGatewayRoutes instanceof SdkAutoConstructList); } /** *

* The expected routes for the internet gateway. *

*

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

* * @return The expected routes for the internet gateway. */ public final List expectedInternetGatewayRoutes() { return expectedInternetGatewayRoutes; } /** * For responses, this returns true if the service returned a value for the ActualInternetGatewayRoutes 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 hasActualInternetGatewayRoutes() { return actualInternetGatewayRoutes != null && !(actualInternetGatewayRoutes instanceof SdkAutoConstructList); } /** *

* The actual internet gateway routes. *

*

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

* * @return The actual internet gateway routes. */ public final List actualInternetGatewayRoutes() { return actualInternetGatewayRoutes; } /** *

* Information about the VPC ID. *

* * @return Information about the VPC ID. */ public final String vpcId() { return vpcId; } @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(hasAffectedSubnets() ? affectedSubnets() : null); hashCode = 31 * hashCode + Objects.hashCode(routeTableId()); hashCode = 31 * hashCode + Objects.hashCode(isRouteTableUsedInDifferentAZ()); hashCode = 31 * hashCode + Objects.hashCode(violatingRoute()); hashCode = 31 * hashCode + Objects.hashCode(currentFirewallSubnetRouteTable()); hashCode = 31 * hashCode + Objects.hashCode(expectedFirewallEndpoint()); hashCode = 31 * hashCode + Objects.hashCode(actualFirewallEndpoint()); hashCode = 31 * hashCode + Objects.hashCode(expectedFirewallSubnetId()); hashCode = 31 * hashCode + Objects.hashCode(actualFirewallSubnetId()); hashCode = 31 * hashCode + Objects.hashCode(hasExpectedFirewallSubnetRoutes() ? expectedFirewallSubnetRoutes() : null); hashCode = 31 * hashCode + Objects.hashCode(hasActualFirewallSubnetRoutes() ? actualFirewallSubnetRoutes() : null); hashCode = 31 * hashCode + Objects.hashCode(internetGatewayId()); hashCode = 31 * hashCode + Objects.hashCode(currentInternetGatewayRouteTable()); hashCode = 31 * hashCode + Objects.hashCode(hasExpectedInternetGatewayRoutes() ? expectedInternetGatewayRoutes() : null); hashCode = 31 * hashCode + Objects.hashCode(hasActualInternetGatewayRoutes() ? actualInternetGatewayRoutes() : null); hashCode = 31 * hashCode + Objects.hashCode(vpcId()); 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 NetworkFirewallInvalidRouteConfigurationViolation)) { return false; } NetworkFirewallInvalidRouteConfigurationViolation other = (NetworkFirewallInvalidRouteConfigurationViolation) obj; return hasAffectedSubnets() == other.hasAffectedSubnets() && Objects.equals(affectedSubnets(), other.affectedSubnets()) && Objects.equals(routeTableId(), other.routeTableId()) && Objects.equals(isRouteTableUsedInDifferentAZ(), other.isRouteTableUsedInDifferentAZ()) && Objects.equals(violatingRoute(), other.violatingRoute()) && Objects.equals(currentFirewallSubnetRouteTable(), other.currentFirewallSubnetRouteTable()) && Objects.equals(expectedFirewallEndpoint(), other.expectedFirewallEndpoint()) && Objects.equals(actualFirewallEndpoint(), other.actualFirewallEndpoint()) && Objects.equals(expectedFirewallSubnetId(), other.expectedFirewallSubnetId()) && Objects.equals(actualFirewallSubnetId(), other.actualFirewallSubnetId()) && hasExpectedFirewallSubnetRoutes() == other.hasExpectedFirewallSubnetRoutes() && Objects.equals(expectedFirewallSubnetRoutes(), other.expectedFirewallSubnetRoutes()) && hasActualFirewallSubnetRoutes() == other.hasActualFirewallSubnetRoutes() && Objects.equals(actualFirewallSubnetRoutes(), other.actualFirewallSubnetRoutes()) && Objects.equals(internetGatewayId(), other.internetGatewayId()) && Objects.equals(currentInternetGatewayRouteTable(), other.currentInternetGatewayRouteTable()) && hasExpectedInternetGatewayRoutes() == other.hasExpectedInternetGatewayRoutes() && Objects.equals(expectedInternetGatewayRoutes(), other.expectedInternetGatewayRoutes()) && hasActualInternetGatewayRoutes() == other.hasActualInternetGatewayRoutes() && Objects.equals(actualInternetGatewayRoutes(), other.actualInternetGatewayRoutes()) && Objects.equals(vpcId(), other.vpcId()); } /** * 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("NetworkFirewallInvalidRouteConfigurationViolation") .add("AffectedSubnets", hasAffectedSubnets() ? affectedSubnets() : null) .add("RouteTableId", routeTableId()) .add("IsRouteTableUsedInDifferentAZ", isRouteTableUsedInDifferentAZ()) .add("ViolatingRoute", violatingRoute()) .add("CurrentFirewallSubnetRouteTable", currentFirewallSubnetRouteTable()) .add("ExpectedFirewallEndpoint", expectedFirewallEndpoint()) .add("ActualFirewallEndpoint", actualFirewallEndpoint()) .add("ExpectedFirewallSubnetId", expectedFirewallSubnetId()) .add("ActualFirewallSubnetId", actualFirewallSubnetId()) .add("ExpectedFirewallSubnetRoutes", hasExpectedFirewallSubnetRoutes() ? expectedFirewallSubnetRoutes() : null) .add("ActualFirewallSubnetRoutes", hasActualFirewallSubnetRoutes() ? actualFirewallSubnetRoutes() : null) .add("InternetGatewayId", internetGatewayId()) .add("CurrentInternetGatewayRouteTable", currentInternetGatewayRouteTable()) .add("ExpectedInternetGatewayRoutes", hasExpectedInternetGatewayRoutes() ? expectedInternetGatewayRoutes() : null) .add("ActualInternetGatewayRoutes", hasActualInternetGatewayRoutes() ? actualInternetGatewayRoutes() : null) .add("VpcId", vpcId()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "AffectedSubnets": return Optional.ofNullable(clazz.cast(affectedSubnets())); case "RouteTableId": return Optional.ofNullable(clazz.cast(routeTableId())); case "IsRouteTableUsedInDifferentAZ": return Optional.ofNullable(clazz.cast(isRouteTableUsedInDifferentAZ())); case "ViolatingRoute": return Optional.ofNullable(clazz.cast(violatingRoute())); case "CurrentFirewallSubnetRouteTable": return Optional.ofNullable(clazz.cast(currentFirewallSubnetRouteTable())); case "ExpectedFirewallEndpoint": return Optional.ofNullable(clazz.cast(expectedFirewallEndpoint())); case "ActualFirewallEndpoint": return Optional.ofNullable(clazz.cast(actualFirewallEndpoint())); case "ExpectedFirewallSubnetId": return Optional.ofNullable(clazz.cast(expectedFirewallSubnetId())); case "ActualFirewallSubnetId": return Optional.ofNullable(clazz.cast(actualFirewallSubnetId())); case "ExpectedFirewallSubnetRoutes": return Optional.ofNullable(clazz.cast(expectedFirewallSubnetRoutes())); case "ActualFirewallSubnetRoutes": return Optional.ofNullable(clazz.cast(actualFirewallSubnetRoutes())); case "InternetGatewayId": return Optional.ofNullable(clazz.cast(internetGatewayId())); case "CurrentInternetGatewayRouteTable": return Optional.ofNullable(clazz.cast(currentInternetGatewayRouteTable())); case "ExpectedInternetGatewayRoutes": return Optional.ofNullable(clazz.cast(expectedInternetGatewayRoutes())); case "ActualInternetGatewayRoutes": return Optional.ofNullable(clazz.cast(actualInternetGatewayRoutes())); case "VpcId": return Optional.ofNullable(clazz.cast(vpcId())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((NetworkFirewallInvalidRouteConfigurationViolation) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The subnets that are affected. *

* * @param affectedSubnets * The subnets that are affected. * @return Returns a reference to this object so that method calls can be chained together. */ Builder affectedSubnets(Collection affectedSubnets); /** *

* The subnets that are affected. *

* * @param affectedSubnets * The subnets that are affected. * @return Returns a reference to this object so that method calls can be chained together. */ Builder affectedSubnets(String... affectedSubnets); /** *

* The route table ID. *

* * @param routeTableId * The route table ID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder routeTableId(String routeTableId); /** *

* Information about whether the route table is used in another Availability Zone. *

* * @param isRouteTableUsedInDifferentAZ * Information about whether the route table is used in another Availability Zone. * @return Returns a reference to this object so that method calls can be chained together. */ Builder isRouteTableUsedInDifferentAZ(Boolean isRouteTableUsedInDifferentAZ); /** *

* The route that's in violation. *

* * @param violatingRoute * The route that's in violation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder violatingRoute(Route violatingRoute); /** *

* The route that's in violation. *

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

* The subnet route table for the current firewall. *

* * @param currentFirewallSubnetRouteTable * The subnet route table for the current firewall. * @return Returns a reference to this object so that method calls can be chained together. */ Builder currentFirewallSubnetRouteTable(String currentFirewallSubnetRouteTable); /** *

* The firewall endpoint that's expected. *

* * @param expectedFirewallEndpoint * The firewall endpoint that's expected. * @return Returns a reference to this object so that method calls can be chained together. */ Builder expectedFirewallEndpoint(String expectedFirewallEndpoint); /** *

* The actual firewall endpoint. *

* * @param actualFirewallEndpoint * The actual firewall endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ Builder actualFirewallEndpoint(String actualFirewallEndpoint); /** *

* The expected subnet ID for the firewall. *

* * @param expectedFirewallSubnetId * The expected subnet ID for the firewall. * @return Returns a reference to this object so that method calls can be chained together. */ Builder expectedFirewallSubnetId(String expectedFirewallSubnetId); /** *

* The actual subnet ID for the firewall. *

* * @param actualFirewallSubnetId * The actual subnet ID for the firewall. * @return Returns a reference to this object so that method calls can be chained together. */ Builder actualFirewallSubnetId(String actualFirewallSubnetId); /** *

* The firewall subnet routes that are expected. *

* * @param expectedFirewallSubnetRoutes * The firewall subnet routes that are expected. * @return Returns a reference to this object so that method calls can be chained together. */ Builder expectedFirewallSubnetRoutes(Collection expectedFirewallSubnetRoutes); /** *

* The firewall subnet routes that are expected. *

* * @param expectedFirewallSubnetRoutes * The firewall subnet routes that are expected. * @return Returns a reference to this object so that method calls can be chained together. */ Builder expectedFirewallSubnetRoutes(ExpectedRoute... expectedFirewallSubnetRoutes); /** *

* The firewall subnet routes that are expected. *

* 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 #expectedFirewallSubnetRoutes(List)}. * * @param expectedFirewallSubnetRoutes * 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 #expectedFirewallSubnetRoutes(List) */ Builder expectedFirewallSubnetRoutes(Consumer... expectedFirewallSubnetRoutes); /** *

* The actual firewall subnet routes that are expected. *

* * @param actualFirewallSubnetRoutes * The actual firewall subnet routes that are expected. * @return Returns a reference to this object so that method calls can be chained together. */ Builder actualFirewallSubnetRoutes(Collection actualFirewallSubnetRoutes); /** *

* The actual firewall subnet routes that are expected. *

* * @param actualFirewallSubnetRoutes * The actual firewall subnet routes that are expected. * @return Returns a reference to this object so that method calls can be chained together. */ Builder actualFirewallSubnetRoutes(Route... actualFirewallSubnetRoutes); /** *

* The actual firewall subnet routes that are expected. *

* 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 #actualFirewallSubnetRoutes(List)}. * * @param actualFirewallSubnetRoutes * 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 #actualFirewallSubnetRoutes(List) */ Builder actualFirewallSubnetRoutes(Consumer... actualFirewallSubnetRoutes); /** *

* The internet gateway ID. *

* * @param internetGatewayId * The internet gateway ID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder internetGatewayId(String internetGatewayId); /** *

* The route table for the current internet gateway. *

* * @param currentInternetGatewayRouteTable * The route table for the current internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ Builder currentInternetGatewayRouteTable(String currentInternetGatewayRouteTable); /** *

* The expected routes for the internet gateway. *

* * @param expectedInternetGatewayRoutes * The expected routes for the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ Builder expectedInternetGatewayRoutes(Collection expectedInternetGatewayRoutes); /** *

* The expected routes for the internet gateway. *

* * @param expectedInternetGatewayRoutes * The expected routes for the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ Builder expectedInternetGatewayRoutes(ExpectedRoute... expectedInternetGatewayRoutes); /** *

* The expected routes for the internet gateway. *

* 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 #expectedInternetGatewayRoutes(List)}. * * @param expectedInternetGatewayRoutes * 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 #expectedInternetGatewayRoutes(List) */ Builder expectedInternetGatewayRoutes(Consumer... expectedInternetGatewayRoutes); /** *

* The actual internet gateway routes. *

* * @param actualInternetGatewayRoutes * The actual internet gateway routes. * @return Returns a reference to this object so that method calls can be chained together. */ Builder actualInternetGatewayRoutes(Collection actualInternetGatewayRoutes); /** *

* The actual internet gateway routes. *

* * @param actualInternetGatewayRoutes * The actual internet gateway routes. * @return Returns a reference to this object so that method calls can be chained together. */ Builder actualInternetGatewayRoutes(Route... actualInternetGatewayRoutes); /** *

* The actual internet gateway routes. *

* 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 #actualInternetGatewayRoutes(List)}. * * @param actualInternetGatewayRoutes * 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 #actualInternetGatewayRoutes(List) */ Builder actualInternetGatewayRoutes(Consumer... actualInternetGatewayRoutes); /** *

* Information about the VPC ID. *

* * @param vpcId * Information about the VPC ID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcId(String vpcId); } static final class BuilderImpl implements Builder { private List affectedSubnets = DefaultSdkAutoConstructList.getInstance(); private String routeTableId; private Boolean isRouteTableUsedInDifferentAZ; private Route violatingRoute; private String currentFirewallSubnetRouteTable; private String expectedFirewallEndpoint; private String actualFirewallEndpoint; private String expectedFirewallSubnetId; private String actualFirewallSubnetId; private List expectedFirewallSubnetRoutes = DefaultSdkAutoConstructList.getInstance(); private List actualFirewallSubnetRoutes = DefaultSdkAutoConstructList.getInstance(); private String internetGatewayId; private String currentInternetGatewayRouteTable; private List expectedInternetGatewayRoutes = DefaultSdkAutoConstructList.getInstance(); private List actualInternetGatewayRoutes = DefaultSdkAutoConstructList.getInstance(); private String vpcId; private BuilderImpl() { } private BuilderImpl(NetworkFirewallInvalidRouteConfigurationViolation model) { affectedSubnets(model.affectedSubnets); routeTableId(model.routeTableId); isRouteTableUsedInDifferentAZ(model.isRouteTableUsedInDifferentAZ); violatingRoute(model.violatingRoute); currentFirewallSubnetRouteTable(model.currentFirewallSubnetRouteTable); expectedFirewallEndpoint(model.expectedFirewallEndpoint); actualFirewallEndpoint(model.actualFirewallEndpoint); expectedFirewallSubnetId(model.expectedFirewallSubnetId); actualFirewallSubnetId(model.actualFirewallSubnetId); expectedFirewallSubnetRoutes(model.expectedFirewallSubnetRoutes); actualFirewallSubnetRoutes(model.actualFirewallSubnetRoutes); internetGatewayId(model.internetGatewayId); currentInternetGatewayRouteTable(model.currentInternetGatewayRouteTable); expectedInternetGatewayRoutes(model.expectedInternetGatewayRoutes); actualInternetGatewayRoutes(model.actualInternetGatewayRoutes); vpcId(model.vpcId); } public final Collection getAffectedSubnets() { if (affectedSubnets instanceof SdkAutoConstructList) { return null; } return affectedSubnets; } public final void setAffectedSubnets(Collection affectedSubnets) { this.affectedSubnets = ResourceIdListCopier.copy(affectedSubnets); } @Override @Transient public final Builder affectedSubnets(Collection affectedSubnets) { this.affectedSubnets = ResourceIdListCopier.copy(affectedSubnets); return this; } @Override @Transient @SafeVarargs public final Builder affectedSubnets(String... affectedSubnets) { affectedSubnets(Arrays.asList(affectedSubnets)); return this; } public final String getRouteTableId() { return routeTableId; } public final void setRouteTableId(String routeTableId) { this.routeTableId = routeTableId; } @Override @Transient public final Builder routeTableId(String routeTableId) { this.routeTableId = routeTableId; return this; } public final Boolean getIsRouteTableUsedInDifferentAZ() { return isRouteTableUsedInDifferentAZ; } public final void setIsRouteTableUsedInDifferentAZ(Boolean isRouteTableUsedInDifferentAZ) { this.isRouteTableUsedInDifferentAZ = isRouteTableUsedInDifferentAZ; } @Override @Transient public final Builder isRouteTableUsedInDifferentAZ(Boolean isRouteTableUsedInDifferentAZ) { this.isRouteTableUsedInDifferentAZ = isRouteTableUsedInDifferentAZ; return this; } public final Route.Builder getViolatingRoute() { return violatingRoute != null ? violatingRoute.toBuilder() : null; } public final void setViolatingRoute(Route.BuilderImpl violatingRoute) { this.violatingRoute = violatingRoute != null ? violatingRoute.build() : null; } @Override @Transient public final Builder violatingRoute(Route violatingRoute) { this.violatingRoute = violatingRoute; return this; } public final String getCurrentFirewallSubnetRouteTable() { return currentFirewallSubnetRouteTable; } public final void setCurrentFirewallSubnetRouteTable(String currentFirewallSubnetRouteTable) { this.currentFirewallSubnetRouteTable = currentFirewallSubnetRouteTable; } @Override @Transient public final Builder currentFirewallSubnetRouteTable(String currentFirewallSubnetRouteTable) { this.currentFirewallSubnetRouteTable = currentFirewallSubnetRouteTable; return this; } public final String getExpectedFirewallEndpoint() { return expectedFirewallEndpoint; } public final void setExpectedFirewallEndpoint(String expectedFirewallEndpoint) { this.expectedFirewallEndpoint = expectedFirewallEndpoint; } @Override @Transient public final Builder expectedFirewallEndpoint(String expectedFirewallEndpoint) { this.expectedFirewallEndpoint = expectedFirewallEndpoint; return this; } public final String getActualFirewallEndpoint() { return actualFirewallEndpoint; } public final void setActualFirewallEndpoint(String actualFirewallEndpoint) { this.actualFirewallEndpoint = actualFirewallEndpoint; } @Override @Transient public final Builder actualFirewallEndpoint(String actualFirewallEndpoint) { this.actualFirewallEndpoint = actualFirewallEndpoint; return this; } public final String getExpectedFirewallSubnetId() { return expectedFirewallSubnetId; } public final void setExpectedFirewallSubnetId(String expectedFirewallSubnetId) { this.expectedFirewallSubnetId = expectedFirewallSubnetId; } @Override @Transient public final Builder expectedFirewallSubnetId(String expectedFirewallSubnetId) { this.expectedFirewallSubnetId = expectedFirewallSubnetId; return this; } public final String getActualFirewallSubnetId() { return actualFirewallSubnetId; } public final void setActualFirewallSubnetId(String actualFirewallSubnetId) { this.actualFirewallSubnetId = actualFirewallSubnetId; } @Override @Transient public final Builder actualFirewallSubnetId(String actualFirewallSubnetId) { this.actualFirewallSubnetId = actualFirewallSubnetId; return this; } public final List getExpectedFirewallSubnetRoutes() { List result = ExpectedRoutesCopier.copyToBuilder(this.expectedFirewallSubnetRoutes); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setExpectedFirewallSubnetRoutes(Collection expectedFirewallSubnetRoutes) { this.expectedFirewallSubnetRoutes = ExpectedRoutesCopier.copyFromBuilder(expectedFirewallSubnetRoutes); } @Override @Transient public final Builder expectedFirewallSubnetRoutes(Collection expectedFirewallSubnetRoutes) { this.expectedFirewallSubnetRoutes = ExpectedRoutesCopier.copy(expectedFirewallSubnetRoutes); return this; } @Override @Transient @SafeVarargs public final Builder expectedFirewallSubnetRoutes(ExpectedRoute... expectedFirewallSubnetRoutes) { expectedFirewallSubnetRoutes(Arrays.asList(expectedFirewallSubnetRoutes)); return this; } @Override @Transient @SafeVarargs public final Builder expectedFirewallSubnetRoutes(Consumer... expectedFirewallSubnetRoutes) { expectedFirewallSubnetRoutes(Stream.of(expectedFirewallSubnetRoutes) .map(c -> ExpectedRoute.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final List getActualFirewallSubnetRoutes() { List result = RoutesCopier.copyToBuilder(this.actualFirewallSubnetRoutes); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setActualFirewallSubnetRoutes(Collection actualFirewallSubnetRoutes) { this.actualFirewallSubnetRoutes = RoutesCopier.copyFromBuilder(actualFirewallSubnetRoutes); } @Override @Transient public final Builder actualFirewallSubnetRoutes(Collection actualFirewallSubnetRoutes) { this.actualFirewallSubnetRoutes = RoutesCopier.copy(actualFirewallSubnetRoutes); return this; } @Override @Transient @SafeVarargs public final Builder actualFirewallSubnetRoutes(Route... actualFirewallSubnetRoutes) { actualFirewallSubnetRoutes(Arrays.asList(actualFirewallSubnetRoutes)); return this; } @Override @Transient @SafeVarargs public final Builder actualFirewallSubnetRoutes(Consumer... actualFirewallSubnetRoutes) { actualFirewallSubnetRoutes(Stream.of(actualFirewallSubnetRoutes).map(c -> Route.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final String getInternetGatewayId() { return internetGatewayId; } public final void setInternetGatewayId(String internetGatewayId) { this.internetGatewayId = internetGatewayId; } @Override @Transient public final Builder internetGatewayId(String internetGatewayId) { this.internetGatewayId = internetGatewayId; return this; } public final String getCurrentInternetGatewayRouteTable() { return currentInternetGatewayRouteTable; } public final void setCurrentInternetGatewayRouteTable(String currentInternetGatewayRouteTable) { this.currentInternetGatewayRouteTable = currentInternetGatewayRouteTable; } @Override @Transient public final Builder currentInternetGatewayRouteTable(String currentInternetGatewayRouteTable) { this.currentInternetGatewayRouteTable = currentInternetGatewayRouteTable; return this; } public final List getExpectedInternetGatewayRoutes() { List result = ExpectedRoutesCopier.copyToBuilder(this.expectedInternetGatewayRoutes); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setExpectedInternetGatewayRoutes(Collection expectedInternetGatewayRoutes) { this.expectedInternetGatewayRoutes = ExpectedRoutesCopier.copyFromBuilder(expectedInternetGatewayRoutes); } @Override @Transient public final Builder expectedInternetGatewayRoutes(Collection expectedInternetGatewayRoutes) { this.expectedInternetGatewayRoutes = ExpectedRoutesCopier.copy(expectedInternetGatewayRoutes); return this; } @Override @Transient @SafeVarargs public final Builder expectedInternetGatewayRoutes(ExpectedRoute... expectedInternetGatewayRoutes) { expectedInternetGatewayRoutes(Arrays.asList(expectedInternetGatewayRoutes)); return this; } @Override @Transient @SafeVarargs public final Builder expectedInternetGatewayRoutes(Consumer... expectedInternetGatewayRoutes) { expectedInternetGatewayRoutes(Stream.of(expectedInternetGatewayRoutes) .map(c -> ExpectedRoute.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final List getActualInternetGatewayRoutes() { List result = RoutesCopier.copyToBuilder(this.actualInternetGatewayRoutes); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setActualInternetGatewayRoutes(Collection actualInternetGatewayRoutes) { this.actualInternetGatewayRoutes = RoutesCopier.copyFromBuilder(actualInternetGatewayRoutes); } @Override @Transient public final Builder actualInternetGatewayRoutes(Collection actualInternetGatewayRoutes) { this.actualInternetGatewayRoutes = RoutesCopier.copy(actualInternetGatewayRoutes); return this; } @Override @Transient @SafeVarargs public final Builder actualInternetGatewayRoutes(Route... actualInternetGatewayRoutes) { actualInternetGatewayRoutes(Arrays.asList(actualInternetGatewayRoutes)); return this; } @Override @Transient @SafeVarargs public final Builder actualInternetGatewayRoutes(Consumer... actualInternetGatewayRoutes) { actualInternetGatewayRoutes(Stream.of(actualInternetGatewayRoutes).map(c -> Route.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final String getVpcId() { return vpcId; } public final void setVpcId(String vpcId) { this.vpcId = vpcId; } @Override @Transient public final Builder vpcId(String vpcId) { this.vpcId = vpcId; return this; } @Override public NetworkFirewallInvalidRouteConfigurationViolation build() { return new NetworkFirewallInvalidRouteConfigurationViolation(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy