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

software.amazon.awssdk.services.fms.model.ResourceViolation 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.Consumer;
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;

/**
 * 

* Violation detail based on resource type. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ResourceViolation implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField AWS_VPC_SECURITY_GROUP_VIOLATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("AwsVPCSecurityGroupViolation") .getter(getter(ResourceViolation::awsVPCSecurityGroupViolation)) .setter(setter(Builder::awsVPCSecurityGroupViolation)) .constructor(AwsVPCSecurityGroupViolation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AwsVPCSecurityGroupViolation") .build()).build(); private static final SdkField AWS_EC2_NETWORK_INTERFACE_VIOLATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("AwsEc2NetworkInterfaceViolation") .getter(getter(ResourceViolation::awsEc2NetworkInterfaceViolation)) .setter(setter(Builder::awsEc2NetworkInterfaceViolation)) .constructor(AwsEc2NetworkInterfaceViolation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AwsEc2NetworkInterfaceViolation") .build()).build(); private static final SdkField AWS_EC2_INSTANCE_VIOLATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("AwsEc2InstanceViolation") .getter(getter(ResourceViolation::awsEc2InstanceViolation)).setter(setter(Builder::awsEc2InstanceViolation)) .constructor(AwsEc2InstanceViolation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AwsEc2InstanceViolation").build()) .build(); private static final SdkField NETWORK_FIREWALL_MISSING_FIREWALL_VIOLATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("NetworkFirewallMissingFirewallViolation") .getter(getter(ResourceViolation::networkFirewallMissingFirewallViolation)) .setter(setter(Builder::networkFirewallMissingFirewallViolation)) .constructor(NetworkFirewallMissingFirewallViolation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("NetworkFirewallMissingFirewallViolation").build()).build(); private static final SdkField NETWORK_FIREWALL_MISSING_SUBNET_VIOLATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("NetworkFirewallMissingSubnetViolation") .getter(getter(ResourceViolation::networkFirewallMissingSubnetViolation)) .setter(setter(Builder::networkFirewallMissingSubnetViolation)) .constructor(NetworkFirewallMissingSubnetViolation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("NetworkFirewallMissingSubnetViolation").build()).build(); private static final SdkField NETWORK_FIREWALL_MISSING_EXPECTED_RT_VIOLATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("NetworkFirewallMissingExpectedRTViolation") .getter(getter(ResourceViolation::networkFirewallMissingExpectedRTViolation)) .setter(setter(Builder::networkFirewallMissingExpectedRTViolation)) .constructor(NetworkFirewallMissingExpectedRTViolation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("NetworkFirewallMissingExpectedRTViolation").build()).build(); private static final SdkField NETWORK_FIREWALL_POLICY_MODIFIED_VIOLATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("NetworkFirewallPolicyModifiedViolation") .getter(getter(ResourceViolation::networkFirewallPolicyModifiedViolation)) .setter(setter(Builder::networkFirewallPolicyModifiedViolation)) .constructor(NetworkFirewallPolicyModifiedViolation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("NetworkFirewallPolicyModifiedViolation").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList( AWS_VPC_SECURITY_GROUP_VIOLATION_FIELD, AWS_EC2_NETWORK_INTERFACE_VIOLATION_FIELD, AWS_EC2_INSTANCE_VIOLATION_FIELD, NETWORK_FIREWALL_MISSING_FIREWALL_VIOLATION_FIELD, NETWORK_FIREWALL_MISSING_SUBNET_VIOLATION_FIELD, NETWORK_FIREWALL_MISSING_EXPECTED_RT_VIOLATION_FIELD, NETWORK_FIREWALL_POLICY_MODIFIED_VIOLATION_FIELD)); private static final long serialVersionUID = 1L; private final AwsVPCSecurityGroupViolation awsVPCSecurityGroupViolation; private final AwsEc2NetworkInterfaceViolation awsEc2NetworkInterfaceViolation; private final AwsEc2InstanceViolation awsEc2InstanceViolation; private final NetworkFirewallMissingFirewallViolation networkFirewallMissingFirewallViolation; private final NetworkFirewallMissingSubnetViolation networkFirewallMissingSubnetViolation; private final NetworkFirewallMissingExpectedRTViolation networkFirewallMissingExpectedRTViolation; private final NetworkFirewallPolicyModifiedViolation networkFirewallPolicyModifiedViolation; private ResourceViolation(BuilderImpl builder) { this.awsVPCSecurityGroupViolation = builder.awsVPCSecurityGroupViolation; this.awsEc2NetworkInterfaceViolation = builder.awsEc2NetworkInterfaceViolation; this.awsEc2InstanceViolation = builder.awsEc2InstanceViolation; this.networkFirewallMissingFirewallViolation = builder.networkFirewallMissingFirewallViolation; this.networkFirewallMissingSubnetViolation = builder.networkFirewallMissingSubnetViolation; this.networkFirewallMissingExpectedRTViolation = builder.networkFirewallMissingExpectedRTViolation; this.networkFirewallPolicyModifiedViolation = builder.networkFirewallPolicyModifiedViolation; } /** *

* Violation details for security groups. *

* * @return Violation details for security groups. */ public AwsVPCSecurityGroupViolation awsVPCSecurityGroupViolation() { return awsVPCSecurityGroupViolation; } /** *

* Violation details for network interface. *

* * @return Violation details for network interface. */ public AwsEc2NetworkInterfaceViolation awsEc2NetworkInterfaceViolation() { return awsEc2NetworkInterfaceViolation; } /** *

* Violation details for an EC2 instance. *

* * @return Violation details for an EC2 instance. */ public AwsEc2InstanceViolation awsEc2InstanceViolation() { return awsEc2InstanceViolation; } /** *

* Violation detail for an Network Firewall policy that indicates that a subnet has no Firewall Manager managed * firewall in its VPC. *

* * @return Violation detail for an Network Firewall policy that indicates that a subnet has no Firewall Manager * managed firewall in its VPC. */ public NetworkFirewallMissingFirewallViolation networkFirewallMissingFirewallViolation() { return networkFirewallMissingFirewallViolation; } /** *

* Violation detail for an Network Firewall policy that indicates that an Availability Zone is missing the expected * Firewall Manager managed subnet. *

* * @return Violation detail for an Network Firewall policy that indicates that an Availability Zone is missing the * expected Firewall Manager managed subnet. */ public NetworkFirewallMissingSubnetViolation networkFirewallMissingSubnetViolation() { return networkFirewallMissingSubnetViolation; } /** *

* Violation detail for an Network Firewall policy that indicates that a subnet is not associated with the expected * Firewall Manager managed route table. *

* * @return Violation detail for an Network Firewall policy that indicates that a subnet is not associated with the * expected Firewall Manager managed route table. */ public NetworkFirewallMissingExpectedRTViolation networkFirewallMissingExpectedRTViolation() { return networkFirewallMissingExpectedRTViolation; } /** *

* Violation detail for an Network Firewall policy that indicates that a firewall policy in an individual account * has been modified in a way that makes it noncompliant. For example, the individual account owner might have * deleted a rule group, changed the priority of a stateless rule group, or changed a policy default action. *

* * @return Violation detail for an Network Firewall policy that indicates that a firewall policy in an individual * account has been modified in a way that makes it noncompliant. For example, the individual account owner * might have deleted a rule group, changed the priority of a stateless rule group, or changed a policy * default action. */ public NetworkFirewallPolicyModifiedViolation networkFirewallPolicyModifiedViolation() { return networkFirewallPolicyModifiedViolation; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(awsVPCSecurityGroupViolation()); hashCode = 31 * hashCode + Objects.hashCode(awsEc2NetworkInterfaceViolation()); hashCode = 31 * hashCode + Objects.hashCode(awsEc2InstanceViolation()); hashCode = 31 * hashCode + Objects.hashCode(networkFirewallMissingFirewallViolation()); hashCode = 31 * hashCode + Objects.hashCode(networkFirewallMissingSubnetViolation()); hashCode = 31 * hashCode + Objects.hashCode(networkFirewallMissingExpectedRTViolation()); hashCode = 31 * hashCode + Objects.hashCode(networkFirewallPolicyModifiedViolation()); return hashCode; } @Override public boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ResourceViolation)) { return false; } ResourceViolation other = (ResourceViolation) obj; return Objects.equals(awsVPCSecurityGroupViolation(), other.awsVPCSecurityGroupViolation()) && Objects.equals(awsEc2NetworkInterfaceViolation(), other.awsEc2NetworkInterfaceViolation()) && Objects.equals(awsEc2InstanceViolation(), other.awsEc2InstanceViolation()) && Objects.equals(networkFirewallMissingFirewallViolation(), other.networkFirewallMissingFirewallViolation()) && Objects.equals(networkFirewallMissingSubnetViolation(), other.networkFirewallMissingSubnetViolation()) && Objects.equals(networkFirewallMissingExpectedRTViolation(), other.networkFirewallMissingExpectedRTViolation()) && Objects.equals(networkFirewallPolicyModifiedViolation(), other.networkFirewallPolicyModifiedViolation()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("ResourceViolation").add("AwsVPCSecurityGroupViolation", awsVPCSecurityGroupViolation()) .add("AwsEc2NetworkInterfaceViolation", awsEc2NetworkInterfaceViolation()) .add("AwsEc2InstanceViolation", awsEc2InstanceViolation()) .add("NetworkFirewallMissingFirewallViolation", networkFirewallMissingFirewallViolation()) .add("NetworkFirewallMissingSubnetViolation", networkFirewallMissingSubnetViolation()) .add("NetworkFirewallMissingExpectedRTViolation", networkFirewallMissingExpectedRTViolation()) .add("NetworkFirewallPolicyModifiedViolation", networkFirewallPolicyModifiedViolation()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "AwsVPCSecurityGroupViolation": return Optional.ofNullable(clazz.cast(awsVPCSecurityGroupViolation())); case "AwsEc2NetworkInterfaceViolation": return Optional.ofNullable(clazz.cast(awsEc2NetworkInterfaceViolation())); case "AwsEc2InstanceViolation": return Optional.ofNullable(clazz.cast(awsEc2InstanceViolation())); case "NetworkFirewallMissingFirewallViolation": return Optional.ofNullable(clazz.cast(networkFirewallMissingFirewallViolation())); case "NetworkFirewallMissingSubnetViolation": return Optional.ofNullable(clazz.cast(networkFirewallMissingSubnetViolation())); case "NetworkFirewallMissingExpectedRTViolation": return Optional.ofNullable(clazz.cast(networkFirewallMissingExpectedRTViolation())); case "NetworkFirewallPolicyModifiedViolation": return Optional.ofNullable(clazz.cast(networkFirewallPolicyModifiedViolation())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ResourceViolation) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* Violation details for security groups. *

* * @param awsVPCSecurityGroupViolation * Violation details for security groups. * @return Returns a reference to this object so that method calls can be chained together. */ Builder awsVPCSecurityGroupViolation(AwsVPCSecurityGroupViolation awsVPCSecurityGroupViolation); /** *

* Violation details for security groups. *

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

* Violation details for network interface. *

* * @param awsEc2NetworkInterfaceViolation * Violation details for network interface. * @return Returns a reference to this object so that method calls can be chained together. */ Builder awsEc2NetworkInterfaceViolation(AwsEc2NetworkInterfaceViolation awsEc2NetworkInterfaceViolation); /** *

* Violation details for network interface. *

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

* Violation details for an EC2 instance. *

* * @param awsEc2InstanceViolation * Violation details for an EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder awsEc2InstanceViolation(AwsEc2InstanceViolation awsEc2InstanceViolation); /** *

* Violation details for an EC2 instance. *

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

* Violation detail for an Network Firewall policy that indicates that a subnet has no Firewall Manager managed * firewall in its VPC. *

* * @param networkFirewallMissingFirewallViolation * Violation detail for an Network Firewall policy that indicates that a subnet has no Firewall Manager * managed firewall in its VPC. * @return Returns a reference to this object so that method calls can be chained together. */ Builder networkFirewallMissingFirewallViolation( NetworkFirewallMissingFirewallViolation networkFirewallMissingFirewallViolation); /** *

* Violation detail for an Network Firewall policy that indicates that a subnet has no Firewall Manager managed * firewall in its VPC. *

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

* Violation detail for an Network Firewall policy that indicates that an Availability Zone is missing the * expected Firewall Manager managed subnet. *

* * @param networkFirewallMissingSubnetViolation * Violation detail for an Network Firewall policy that indicates that an Availability Zone is missing * the expected Firewall Manager managed subnet. * @return Returns a reference to this object so that method calls can be chained together. */ Builder networkFirewallMissingSubnetViolation(NetworkFirewallMissingSubnetViolation networkFirewallMissingSubnetViolation); /** *

* Violation detail for an Network Firewall policy that indicates that an Availability Zone is missing the * expected Firewall Manager managed subnet. *

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

* Violation detail for an Network Firewall policy that indicates that a subnet is not associated with the * expected Firewall Manager managed route table. *

* * @param networkFirewallMissingExpectedRTViolation * Violation detail for an Network Firewall policy that indicates that a subnet is not associated with * the expected Firewall Manager managed route table. * @return Returns a reference to this object so that method calls can be chained together. */ Builder networkFirewallMissingExpectedRTViolation( NetworkFirewallMissingExpectedRTViolation networkFirewallMissingExpectedRTViolation); /** *

* Violation detail for an Network Firewall policy that indicates that a subnet is not associated with the * expected Firewall Manager managed route table. *

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

* Violation detail for an Network Firewall policy that indicates that a firewall policy in an individual * account has been modified in a way that makes it noncompliant. For example, the individual account owner * might have deleted a rule group, changed the priority of a stateless rule group, or changed a policy default * action. *

* * @param networkFirewallPolicyModifiedViolation * Violation detail for an Network Firewall policy that indicates that a firewall policy in an individual * account has been modified in a way that makes it noncompliant. For example, the individual account * owner might have deleted a rule group, changed the priority of a stateless rule group, or changed a * policy default action. * @return Returns a reference to this object so that method calls can be chained together. */ Builder networkFirewallPolicyModifiedViolation( NetworkFirewallPolicyModifiedViolation networkFirewallPolicyModifiedViolation); /** *

* Violation detail for an Network Firewall policy that indicates that a firewall policy in an individual * account has been modified in a way that makes it noncompliant. For example, the individual account owner * might have deleted a rule group, changed the priority of a stateless rule group, or changed a policy default * action. *

* This is a convenience that creates an instance of the {@link NetworkFirewallPolicyModifiedViolation.Builder} * avoiding the need to create one manually via {@link NetworkFirewallPolicyModifiedViolation#builder()}. * * When the {@link Consumer} completes, {@link NetworkFirewallPolicyModifiedViolation.Builder#build()} is called * immediately and its result is passed to * {@link #networkFirewallPolicyModifiedViolation(NetworkFirewallPolicyModifiedViolation)}. * * @param networkFirewallPolicyModifiedViolation * a consumer that will call methods on {@link NetworkFirewallPolicyModifiedViolation.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #networkFirewallPolicyModifiedViolation(NetworkFirewallPolicyModifiedViolation) */ default Builder networkFirewallPolicyModifiedViolation( Consumer networkFirewallPolicyModifiedViolation) { return networkFirewallPolicyModifiedViolation(NetworkFirewallPolicyModifiedViolation.builder() .applyMutation(networkFirewallPolicyModifiedViolation).build()); } } static final class BuilderImpl implements Builder { private AwsVPCSecurityGroupViolation awsVPCSecurityGroupViolation; private AwsEc2NetworkInterfaceViolation awsEc2NetworkInterfaceViolation; private AwsEc2InstanceViolation awsEc2InstanceViolation; private NetworkFirewallMissingFirewallViolation networkFirewallMissingFirewallViolation; private NetworkFirewallMissingSubnetViolation networkFirewallMissingSubnetViolation; private NetworkFirewallMissingExpectedRTViolation networkFirewallMissingExpectedRTViolation; private NetworkFirewallPolicyModifiedViolation networkFirewallPolicyModifiedViolation; private BuilderImpl() { } private BuilderImpl(ResourceViolation model) { awsVPCSecurityGroupViolation(model.awsVPCSecurityGroupViolation); awsEc2NetworkInterfaceViolation(model.awsEc2NetworkInterfaceViolation); awsEc2InstanceViolation(model.awsEc2InstanceViolation); networkFirewallMissingFirewallViolation(model.networkFirewallMissingFirewallViolation); networkFirewallMissingSubnetViolation(model.networkFirewallMissingSubnetViolation); networkFirewallMissingExpectedRTViolation(model.networkFirewallMissingExpectedRTViolation); networkFirewallPolicyModifiedViolation(model.networkFirewallPolicyModifiedViolation); } public final AwsVPCSecurityGroupViolation.Builder getAwsVPCSecurityGroupViolation() { return awsVPCSecurityGroupViolation != null ? awsVPCSecurityGroupViolation.toBuilder() : null; } @Override public final Builder awsVPCSecurityGroupViolation(AwsVPCSecurityGroupViolation awsVPCSecurityGroupViolation) { this.awsVPCSecurityGroupViolation = awsVPCSecurityGroupViolation; return this; } public final void setAwsVPCSecurityGroupViolation(AwsVPCSecurityGroupViolation.BuilderImpl awsVPCSecurityGroupViolation) { this.awsVPCSecurityGroupViolation = awsVPCSecurityGroupViolation != null ? awsVPCSecurityGroupViolation.build() : null; } public final AwsEc2NetworkInterfaceViolation.Builder getAwsEc2NetworkInterfaceViolation() { return awsEc2NetworkInterfaceViolation != null ? awsEc2NetworkInterfaceViolation.toBuilder() : null; } @Override public final Builder awsEc2NetworkInterfaceViolation(AwsEc2NetworkInterfaceViolation awsEc2NetworkInterfaceViolation) { this.awsEc2NetworkInterfaceViolation = awsEc2NetworkInterfaceViolation; return this; } public final void setAwsEc2NetworkInterfaceViolation( AwsEc2NetworkInterfaceViolation.BuilderImpl awsEc2NetworkInterfaceViolation) { this.awsEc2NetworkInterfaceViolation = awsEc2NetworkInterfaceViolation != null ? awsEc2NetworkInterfaceViolation .build() : null; } public final AwsEc2InstanceViolation.Builder getAwsEc2InstanceViolation() { return awsEc2InstanceViolation != null ? awsEc2InstanceViolation.toBuilder() : null; } @Override public final Builder awsEc2InstanceViolation(AwsEc2InstanceViolation awsEc2InstanceViolation) { this.awsEc2InstanceViolation = awsEc2InstanceViolation; return this; } public final void setAwsEc2InstanceViolation(AwsEc2InstanceViolation.BuilderImpl awsEc2InstanceViolation) { this.awsEc2InstanceViolation = awsEc2InstanceViolation != null ? awsEc2InstanceViolation.build() : null; } public final NetworkFirewallMissingFirewallViolation.Builder getNetworkFirewallMissingFirewallViolation() { return networkFirewallMissingFirewallViolation != null ? networkFirewallMissingFirewallViolation.toBuilder() : null; } @Override public final Builder networkFirewallMissingFirewallViolation( NetworkFirewallMissingFirewallViolation networkFirewallMissingFirewallViolation) { this.networkFirewallMissingFirewallViolation = networkFirewallMissingFirewallViolation; return this; } public final void setNetworkFirewallMissingFirewallViolation( NetworkFirewallMissingFirewallViolation.BuilderImpl networkFirewallMissingFirewallViolation) { this.networkFirewallMissingFirewallViolation = networkFirewallMissingFirewallViolation != null ? networkFirewallMissingFirewallViolation .build() : null; } public final NetworkFirewallMissingSubnetViolation.Builder getNetworkFirewallMissingSubnetViolation() { return networkFirewallMissingSubnetViolation != null ? networkFirewallMissingSubnetViolation.toBuilder() : null; } @Override public final Builder networkFirewallMissingSubnetViolation( NetworkFirewallMissingSubnetViolation networkFirewallMissingSubnetViolation) { this.networkFirewallMissingSubnetViolation = networkFirewallMissingSubnetViolation; return this; } public final void setNetworkFirewallMissingSubnetViolation( NetworkFirewallMissingSubnetViolation.BuilderImpl networkFirewallMissingSubnetViolation) { this.networkFirewallMissingSubnetViolation = networkFirewallMissingSubnetViolation != null ? networkFirewallMissingSubnetViolation .build() : null; } public final NetworkFirewallMissingExpectedRTViolation.Builder getNetworkFirewallMissingExpectedRTViolation() { return networkFirewallMissingExpectedRTViolation != null ? networkFirewallMissingExpectedRTViolation.toBuilder() : null; } @Override public final Builder networkFirewallMissingExpectedRTViolation( NetworkFirewallMissingExpectedRTViolation networkFirewallMissingExpectedRTViolation) { this.networkFirewallMissingExpectedRTViolation = networkFirewallMissingExpectedRTViolation; return this; } public final void setNetworkFirewallMissingExpectedRTViolation( NetworkFirewallMissingExpectedRTViolation.BuilderImpl networkFirewallMissingExpectedRTViolation) { this.networkFirewallMissingExpectedRTViolation = networkFirewallMissingExpectedRTViolation != null ? networkFirewallMissingExpectedRTViolation .build() : null; } public final NetworkFirewallPolicyModifiedViolation.Builder getNetworkFirewallPolicyModifiedViolation() { return networkFirewallPolicyModifiedViolation != null ? networkFirewallPolicyModifiedViolation.toBuilder() : null; } @Override public final Builder networkFirewallPolicyModifiedViolation( NetworkFirewallPolicyModifiedViolation networkFirewallPolicyModifiedViolation) { this.networkFirewallPolicyModifiedViolation = networkFirewallPolicyModifiedViolation; return this; } public final void setNetworkFirewallPolicyModifiedViolation( NetworkFirewallPolicyModifiedViolation.BuilderImpl networkFirewallPolicyModifiedViolation) { this.networkFirewallPolicyModifiedViolation = networkFirewallPolicyModifiedViolation != null ? networkFirewallPolicyModifiedViolation .build() : null; } @Override public ResourceViolation build() { return new ResourceViolation(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy