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

software.amazon.awssdk.services.fms.model.DnsRuleGroupLimitExceededViolation 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 VPC that Firewall Manager was applying a DNS Fireall policy to reached the limit for associated DNS Firewall rule * groups. Firewall Manager tried to associate another rule group with the VPC and failed due to the limit. *

*/ @Generated("software.amazon.awssdk:codegen") public final class DnsRuleGroupLimitExceededViolation implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField VIOLATION_TARGET_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ViolationTarget").getter(getter(DnsRuleGroupLimitExceededViolation::violationTarget)) .setter(setter(Builder::violationTarget)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ViolationTarget").build()).build(); private static final SdkField VIOLATION_TARGET_DESCRIPTION_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("ViolationTargetDescription") .getter(getter(DnsRuleGroupLimitExceededViolation::violationTargetDescription)) .setter(setter(Builder::violationTargetDescription)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ViolationTargetDescription").build()) .build(); private static final SdkField NUMBER_OF_RULE_GROUPS_ALREADY_ASSOCIATED_FIELD = SdkField . builder(MarshallingType.INTEGER) .memberName("NumberOfRuleGroupsAlreadyAssociated") .getter(getter(DnsRuleGroupLimitExceededViolation::numberOfRuleGroupsAlreadyAssociated)) .setter(setter(Builder::numberOfRuleGroupsAlreadyAssociated)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("NumberOfRuleGroupsAlreadyAssociated").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(VIOLATION_TARGET_FIELD, VIOLATION_TARGET_DESCRIPTION_FIELD, NUMBER_OF_RULE_GROUPS_ALREADY_ASSOCIATED_FIELD)); private static final long serialVersionUID = 1L; private final String violationTarget; private final String violationTargetDescription; private final Integer numberOfRuleGroupsAlreadyAssociated; private DnsRuleGroupLimitExceededViolation(BuilderImpl builder) { this.violationTarget = builder.violationTarget; this.violationTargetDescription = builder.violationTargetDescription; this.numberOfRuleGroupsAlreadyAssociated = builder.numberOfRuleGroupsAlreadyAssociated; } /** *

* Information about the VPC ID. *

* * @return Information about the VPC ID. */ public final String violationTarget() { return violationTarget; } /** *

* A description of the violation that specifies the rule group and VPC. *

* * @return A description of the violation that specifies the rule group and VPC. */ public final String violationTargetDescription() { return violationTargetDescription; } /** *

* The number of rule groups currently associated with the VPC. *

* * @return The number of rule groups currently associated with the VPC. */ public final Integer numberOfRuleGroupsAlreadyAssociated() { return numberOfRuleGroupsAlreadyAssociated; } @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(violationTargetDescription()); hashCode = 31 * hashCode + Objects.hashCode(numberOfRuleGroupsAlreadyAssociated()); 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 DnsRuleGroupLimitExceededViolation)) { return false; } DnsRuleGroupLimitExceededViolation other = (DnsRuleGroupLimitExceededViolation) obj; return Objects.equals(violationTarget(), other.violationTarget()) && Objects.equals(violationTargetDescription(), other.violationTargetDescription()) && Objects.equals(numberOfRuleGroupsAlreadyAssociated(), other.numberOfRuleGroupsAlreadyAssociated()); } /** * 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("DnsRuleGroupLimitExceededViolation").add("ViolationTarget", violationTarget()) .add("ViolationTargetDescription", violationTargetDescription()) .add("NumberOfRuleGroupsAlreadyAssociated", numberOfRuleGroupsAlreadyAssociated()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ViolationTarget": return Optional.ofNullable(clazz.cast(violationTarget())); case "ViolationTargetDescription": return Optional.ofNullable(clazz.cast(violationTargetDescription())); case "NumberOfRuleGroupsAlreadyAssociated": return Optional.ofNullable(clazz.cast(numberOfRuleGroupsAlreadyAssociated())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((DnsRuleGroupLimitExceededViolation) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* Information about the VPC ID. *

* * @param violationTarget * Information about the VPC ID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder violationTarget(String violationTarget); /** *

* A description of the violation that specifies the rule group and VPC. *

* * @param violationTargetDescription * A description of the violation that specifies the rule group and VPC. * @return Returns a reference to this object so that method calls can be chained together. */ Builder violationTargetDescription(String violationTargetDescription); /** *

* The number of rule groups currently associated with the VPC. *

* * @param numberOfRuleGroupsAlreadyAssociated * The number of rule groups currently associated with the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ Builder numberOfRuleGroupsAlreadyAssociated(Integer numberOfRuleGroupsAlreadyAssociated); } static final class BuilderImpl implements Builder { private String violationTarget; private String violationTargetDescription; private Integer numberOfRuleGroupsAlreadyAssociated; private BuilderImpl() { } private BuilderImpl(DnsRuleGroupLimitExceededViolation model) { violationTarget(model.violationTarget); violationTargetDescription(model.violationTargetDescription); numberOfRuleGroupsAlreadyAssociated(model.numberOfRuleGroupsAlreadyAssociated); } 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 getViolationTargetDescription() { return violationTargetDescription; } public final void setViolationTargetDescription(String violationTargetDescription) { this.violationTargetDescription = violationTargetDescription; } @Override public final Builder violationTargetDescription(String violationTargetDescription) { this.violationTargetDescription = violationTargetDescription; return this; } public final Integer getNumberOfRuleGroupsAlreadyAssociated() { return numberOfRuleGroupsAlreadyAssociated; } public final void setNumberOfRuleGroupsAlreadyAssociated(Integer numberOfRuleGroupsAlreadyAssociated) { this.numberOfRuleGroupsAlreadyAssociated = numberOfRuleGroupsAlreadyAssociated; } @Override public final Builder numberOfRuleGroupsAlreadyAssociated(Integer numberOfRuleGroupsAlreadyAssociated) { this.numberOfRuleGroupsAlreadyAssociated = numberOfRuleGroupsAlreadyAssociated; return this; } @Override public DnsRuleGroupLimitExceededViolation build() { return new DnsRuleGroupLimitExceededViolation(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy