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

software.amazon.awssdk.services.fms.model.ThirdPartyFirewallMissingExpectedRouteTableViolation 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.io.Serializable;
import java.util.Arrays;
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.Function;
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.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* The violation details for a third-party firewall that's not associated with an Firewall Manager managed route table. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ThirdPartyFirewallMissingExpectedRouteTableViolation implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField VIOLATION_TARGET_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ViolationTarget").getter(getter(ThirdPartyFirewallMissingExpectedRouteTableViolation::violationTarget)) .setter(setter(Builder::violationTarget)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ViolationTarget").build()).build(); private static final SdkField VPC_FIELD = SdkField. builder(MarshallingType.STRING).memberName("VPC") .getter(getter(ThirdPartyFirewallMissingExpectedRouteTableViolation::vpc)).setter(setter(Builder::vpc)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VPC").build()).build(); private static final SdkField AVAILABILITY_ZONE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AvailabilityZone") .getter(getter(ThirdPartyFirewallMissingExpectedRouteTableViolation::availabilityZone)) .setter(setter(Builder::availabilityZone)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AvailabilityZone").build()).build(); private static final SdkField CURRENT_ROUTE_TABLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CurrentRouteTable") .getter(getter(ThirdPartyFirewallMissingExpectedRouteTableViolation::currentRouteTable)) .setter(setter(Builder::currentRouteTable)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CurrentRouteTable").build()).build(); private static final SdkField EXPECTED_ROUTE_TABLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ExpectedRouteTable") .getter(getter(ThirdPartyFirewallMissingExpectedRouteTableViolation::expectedRouteTable)) .setter(setter(Builder::expectedRouteTable)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExpectedRouteTable").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(VIOLATION_TARGET_FIELD, VPC_FIELD, AVAILABILITY_ZONE_FIELD, CURRENT_ROUTE_TABLE_FIELD, EXPECTED_ROUTE_TABLE_FIELD)); private static final long serialVersionUID = 1L; private final String violationTarget; private final String vpc; private final String availabilityZone; private final String currentRouteTable; private final String expectedRouteTable; private ThirdPartyFirewallMissingExpectedRouteTableViolation(BuilderImpl builder) { this.violationTarget = builder.violationTarget; this.vpc = builder.vpc; this.availabilityZone = builder.availabilityZone; this.currentRouteTable = builder.currentRouteTable; this.expectedRouteTable = builder.expectedRouteTable; } /** *

* The ID of the third-party firewall or VPC resource that's causing the violation. *

* * @return The ID of the third-party firewall or VPC resource that's causing the violation. */ public final String violationTarget() { return violationTarget; } /** *

* The resource ID of the VPC associated with a fireawll subnet that's causing the violation. *

* * @return The resource ID of the VPC associated with a fireawll subnet that's causing the violation. */ public final String vpc() { return vpc; } /** *

* The Availability Zone of the firewall subnet that's causing the violation. *

* * @return The Availability Zone of the firewall subnet that's causing the violation. */ public final String availabilityZone() { return availabilityZone; } /** *

* The resource ID of the current route table that's associated with the subnet, if one is available. *

* * @return The resource ID of the current route table that's associated with the subnet, if one is available. */ public final String currentRouteTable() { return currentRouteTable; } /** *

* The resource ID of the route table that should be associated with the subnet. *

* * @return The resource ID of the route table that should be associated with the subnet. */ public final String expectedRouteTable() { return expectedRouteTable; } @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(violationTarget()); hashCode = 31 * hashCode + Objects.hashCode(vpc()); hashCode = 31 * hashCode + Objects.hashCode(availabilityZone()); hashCode = 31 * hashCode + Objects.hashCode(currentRouteTable()); hashCode = 31 * hashCode + Objects.hashCode(expectedRouteTable()); 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 ThirdPartyFirewallMissingExpectedRouteTableViolation)) { return false; } ThirdPartyFirewallMissingExpectedRouteTableViolation other = (ThirdPartyFirewallMissingExpectedRouteTableViolation) obj; return Objects.equals(violationTarget(), other.violationTarget()) && Objects.equals(vpc(), other.vpc()) && Objects.equals(availabilityZone(), other.availabilityZone()) && Objects.equals(currentRouteTable(), other.currentRouteTable()) && Objects.equals(expectedRouteTable(), other.expectedRouteTable()); } /** * 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("ThirdPartyFirewallMissingExpectedRouteTableViolation").add("ViolationTarget", violationTarget()) .add("VPC", vpc()).add("AvailabilityZone", availabilityZone()).add("CurrentRouteTable", currentRouteTable()) .add("ExpectedRouteTable", expectedRouteTable()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ViolationTarget": return Optional.ofNullable(clazz.cast(violationTarget())); case "VPC": return Optional.ofNullable(clazz.cast(vpc())); case "AvailabilityZone": return Optional.ofNullable(clazz.cast(availabilityZone())); case "CurrentRouteTable": return Optional.ofNullable(clazz.cast(currentRouteTable())); case "ExpectedRouteTable": return Optional.ofNullable(clazz.cast(expectedRouteTable())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ThirdPartyFirewallMissingExpectedRouteTableViolation) 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 third-party firewall or VPC resource that's causing the violation. *

* * @param violationTarget * The ID of the third-party firewall or VPC resource that's causing the violation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder violationTarget(String violationTarget); /** *

* The resource ID of the VPC associated with a fireawll subnet that's causing the violation. *

* * @param vpc * The resource ID of the VPC associated with a fireawll subnet that's causing the violation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpc(String vpc); /** *

* The Availability Zone of the firewall subnet that's causing the violation. *

* * @param availabilityZone * The Availability Zone of the firewall subnet that's causing the violation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder availabilityZone(String availabilityZone); /** *

* The resource ID of the current route table that's associated with the subnet, if one is available. *

* * @param currentRouteTable * The resource ID of the current route table that's associated with the subnet, if one is available. * @return Returns a reference to this object so that method calls can be chained together. */ Builder currentRouteTable(String currentRouteTable); /** *

* The resource ID of the route table that should be associated with the subnet. *

* * @param expectedRouteTable * The resource ID of the route table that should be associated with the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ Builder expectedRouteTable(String expectedRouteTable); } static final class BuilderImpl implements Builder { private String violationTarget; private String vpc; private String availabilityZone; private String currentRouteTable; private String expectedRouteTable; private BuilderImpl() { } private BuilderImpl(ThirdPartyFirewallMissingExpectedRouteTableViolation model) { violationTarget(model.violationTarget); vpc(model.vpc); availabilityZone(model.availabilityZone); currentRouteTable(model.currentRouteTable); expectedRouteTable(model.expectedRouteTable); } public final String getViolationTarget() { return violationTarget; } public final void setViolationTarget(String violationTarget) { this.violationTarget = violationTarget; } @Override public final Builder violationTarget(String violationTarget) { this.violationTarget = violationTarget; return this; } public final String getVpc() { return vpc; } public final void setVpc(String vpc) { this.vpc = vpc; } @Override public final Builder vpc(String vpc) { this.vpc = vpc; return this; } public final String getAvailabilityZone() { return availabilityZone; } public final void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } @Override public final Builder availabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; return this; } public final String getCurrentRouteTable() { return currentRouteTable; } public final void setCurrentRouteTable(String currentRouteTable) { this.currentRouteTable = currentRouteTable; } @Override public final Builder currentRouteTable(String currentRouteTable) { this.currentRouteTable = currentRouteTable; return this; } public final String getExpectedRouteTable() { return expectedRouteTable; } public final void setExpectedRouteTable(String expectedRouteTable) { this.expectedRouteTable = expectedRouteTable; } @Override public final Builder expectedRouteTable(String expectedRouteTable) { this.expectedRouteTable = expectedRouteTable; return this; } @Override public ThirdPartyFirewallMissingExpectedRouteTableViolation build() { return new ThirdPartyFirewallMissingExpectedRouteTableViolation(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy