Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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;
/**
*
* Information about an individual action you can take to remediate a violation.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class RemediationAction implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Description").getter(getter(RemediationAction::description)).setter(setter(Builder::description))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build();
private static final SdkField EC2_CREATE_ROUTE_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("EC2CreateRouteAction")
.getter(getter(RemediationAction::ec2CreateRouteAction)).setter(setter(Builder::ec2CreateRouteAction))
.constructor(EC2CreateRouteAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EC2CreateRouteAction").build())
.build();
private static final SdkField EC2_REPLACE_ROUTE_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("EC2ReplaceRouteAction")
.getter(getter(RemediationAction::ec2ReplaceRouteAction)).setter(setter(Builder::ec2ReplaceRouteAction))
.constructor(EC2ReplaceRouteAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EC2ReplaceRouteAction").build())
.build();
private static final SdkField EC2_DELETE_ROUTE_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("EC2DeleteRouteAction")
.getter(getter(RemediationAction::ec2DeleteRouteAction)).setter(setter(Builder::ec2DeleteRouteAction))
.constructor(EC2DeleteRouteAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EC2DeleteRouteAction").build())
.build();
private static final SdkField EC2_COPY_ROUTE_TABLE_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("EC2CopyRouteTableAction")
.getter(getter(RemediationAction::ec2CopyRouteTableAction)).setter(setter(Builder::ec2CopyRouteTableAction))
.constructor(EC2CopyRouteTableAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EC2CopyRouteTableAction").build())
.build();
private static final SdkField EC2_REPLACE_ROUTE_TABLE_ASSOCIATION_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("EC2ReplaceRouteTableAssociationAction")
.getter(getter(RemediationAction::ec2ReplaceRouteTableAssociationAction))
.setter(setter(Builder::ec2ReplaceRouteTableAssociationAction))
.constructor(EC2ReplaceRouteTableAssociationAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("EC2ReplaceRouteTableAssociationAction").build()).build();
private static final SdkField EC2_ASSOCIATE_ROUTE_TABLE_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("EC2AssociateRouteTableAction")
.getter(getter(RemediationAction::ec2AssociateRouteTableAction))
.setter(setter(Builder::ec2AssociateRouteTableAction))
.constructor(EC2AssociateRouteTableAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EC2AssociateRouteTableAction")
.build()).build();
private static final SdkField EC2_CREATE_ROUTE_TABLE_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("EC2CreateRouteTableAction")
.getter(getter(RemediationAction::ec2CreateRouteTableAction)).setter(setter(Builder::ec2CreateRouteTableAction))
.constructor(EC2CreateRouteTableAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EC2CreateRouteTableAction").build())
.build();
private static final SdkField FMS_POLICY_UPDATE_FIREWALL_CREATION_CONFIG_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("FMSPolicyUpdateFirewallCreationConfigAction")
.getter(getter(RemediationAction::fmsPolicyUpdateFirewallCreationConfigAction))
.setter(setter(Builder::fmsPolicyUpdateFirewallCreationConfigAction))
.constructor(FMSPolicyUpdateFirewallCreationConfigAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("FMSPolicyUpdateFirewallCreationConfigAction").build()).build();
private static final SdkField CREATE_NETWORK_ACL_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CreateNetworkAclAction")
.getter(getter(RemediationAction::createNetworkAclAction)).setter(setter(Builder::createNetworkAclAction))
.constructor(CreateNetworkAclAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreateNetworkAclAction").build())
.build();
private static final SdkField REPLACE_NETWORK_ACL_ASSOCIATION_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("ReplaceNetworkAclAssociationAction")
.getter(getter(RemediationAction::replaceNetworkAclAssociationAction))
.setter(setter(Builder::replaceNetworkAclAssociationAction))
.constructor(ReplaceNetworkAclAssociationAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplaceNetworkAclAssociationAction")
.build()).build();
private static final SdkField CREATE_NETWORK_ACL_ENTRIES_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("CreateNetworkAclEntriesAction")
.getter(getter(RemediationAction::createNetworkAclEntriesAction))
.setter(setter(Builder::createNetworkAclEntriesAction))
.constructor(CreateNetworkAclEntriesAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreateNetworkAclEntriesAction")
.build()).build();
private static final SdkField DELETE_NETWORK_ACL_ENTRIES_ACTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("DeleteNetworkAclEntriesAction")
.getter(getter(RemediationAction::deleteNetworkAclEntriesAction))
.setter(setter(Builder::deleteNetworkAclEntriesAction))
.constructor(DeleteNetworkAclEntriesAction::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DeleteNetworkAclEntriesAction")
.build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DESCRIPTION_FIELD,
EC2_CREATE_ROUTE_ACTION_FIELD, EC2_REPLACE_ROUTE_ACTION_FIELD, EC2_DELETE_ROUTE_ACTION_FIELD,
EC2_COPY_ROUTE_TABLE_ACTION_FIELD, EC2_REPLACE_ROUTE_TABLE_ASSOCIATION_ACTION_FIELD,
EC2_ASSOCIATE_ROUTE_TABLE_ACTION_FIELD, EC2_CREATE_ROUTE_TABLE_ACTION_FIELD,
FMS_POLICY_UPDATE_FIREWALL_CREATION_CONFIG_ACTION_FIELD, CREATE_NETWORK_ACL_ACTION_FIELD,
REPLACE_NETWORK_ACL_ASSOCIATION_ACTION_FIELD, CREATE_NETWORK_ACL_ENTRIES_ACTION_FIELD,
DELETE_NETWORK_ACL_ENTRIES_ACTION_FIELD));
private static final long serialVersionUID = 1L;
private final String description;
private final EC2CreateRouteAction ec2CreateRouteAction;
private final EC2ReplaceRouteAction ec2ReplaceRouteAction;
private final EC2DeleteRouteAction ec2DeleteRouteAction;
private final EC2CopyRouteTableAction ec2CopyRouteTableAction;
private final EC2ReplaceRouteTableAssociationAction ec2ReplaceRouteTableAssociationAction;
private final EC2AssociateRouteTableAction ec2AssociateRouteTableAction;
private final EC2CreateRouteTableAction ec2CreateRouteTableAction;
private final FMSPolicyUpdateFirewallCreationConfigAction fmsPolicyUpdateFirewallCreationConfigAction;
private final CreateNetworkAclAction createNetworkAclAction;
private final ReplaceNetworkAclAssociationAction replaceNetworkAclAssociationAction;
private final CreateNetworkAclEntriesAction createNetworkAclEntriesAction;
private final DeleteNetworkAclEntriesAction deleteNetworkAclEntriesAction;
private RemediationAction(BuilderImpl builder) {
this.description = builder.description;
this.ec2CreateRouteAction = builder.ec2CreateRouteAction;
this.ec2ReplaceRouteAction = builder.ec2ReplaceRouteAction;
this.ec2DeleteRouteAction = builder.ec2DeleteRouteAction;
this.ec2CopyRouteTableAction = builder.ec2CopyRouteTableAction;
this.ec2ReplaceRouteTableAssociationAction = builder.ec2ReplaceRouteTableAssociationAction;
this.ec2AssociateRouteTableAction = builder.ec2AssociateRouteTableAction;
this.ec2CreateRouteTableAction = builder.ec2CreateRouteTableAction;
this.fmsPolicyUpdateFirewallCreationConfigAction = builder.fmsPolicyUpdateFirewallCreationConfigAction;
this.createNetworkAclAction = builder.createNetworkAclAction;
this.replaceNetworkAclAssociationAction = builder.replaceNetworkAclAssociationAction;
this.createNetworkAclEntriesAction = builder.createNetworkAclEntriesAction;
this.deleteNetworkAclEntriesAction = builder.deleteNetworkAclEntriesAction;
}
/**
*
* A description of a remediation action.
*
*
* @return A description of a remediation action.
*/
public final String description() {
return description;
}
/**
*
* Information about the CreateRoute action in the Amazon EC2 API.
*
*
* @return Information about the CreateRoute action in the Amazon EC2 API.
*/
public final EC2CreateRouteAction ec2CreateRouteAction() {
return ec2CreateRouteAction;
}
/**
*
* Information about the ReplaceRoute action in the Amazon EC2 API.
*
*
* @return Information about the ReplaceRoute action in the Amazon EC2 API.
*/
public final EC2ReplaceRouteAction ec2ReplaceRouteAction() {
return ec2ReplaceRouteAction;
}
/**
*
* Information about the DeleteRoute action in the Amazon EC2 API.
*
*
* @return Information about the DeleteRoute action in the Amazon EC2 API.
*/
public final EC2DeleteRouteAction ec2DeleteRouteAction() {
return ec2DeleteRouteAction;
}
/**
*
* Information about the CopyRouteTable action in the Amazon EC2 API.
*
*
* @return Information about the CopyRouteTable action in the Amazon EC2 API.
*/
public final EC2CopyRouteTableAction ec2CopyRouteTableAction() {
return ec2CopyRouteTableAction;
}
/**
*
* Information about the ReplaceRouteTableAssociation action in the Amazon EC2 API.
*
*
* @return Information about the ReplaceRouteTableAssociation action in the Amazon EC2 API.
*/
public final EC2ReplaceRouteTableAssociationAction ec2ReplaceRouteTableAssociationAction() {
return ec2ReplaceRouteTableAssociationAction;
}
/**
*
* Information about the AssociateRouteTable action in the Amazon EC2 API.
*
*
* @return Information about the AssociateRouteTable action in the Amazon EC2 API.
*/
public final EC2AssociateRouteTableAction ec2AssociateRouteTableAction() {
return ec2AssociateRouteTableAction;
}
/**
*
* Information about the CreateRouteTable action in the Amazon EC2 API.
*
*
* @return Information about the CreateRouteTable action in the Amazon EC2 API.
*/
public final EC2CreateRouteTableAction ec2CreateRouteTableAction() {
return ec2CreateRouteTableAction;
}
/**
*
* The remedial action to take when updating a firewall configuration.
*
*
* @return The remedial action to take when updating a firewall configuration.
*/
public final FMSPolicyUpdateFirewallCreationConfigAction fmsPolicyUpdateFirewallCreationConfigAction() {
return fmsPolicyUpdateFirewallCreationConfigAction;
}
/**
*
* Information about the CreateNetworkAcl action in Amazon EC2.
*
*
* @return Information about the CreateNetworkAcl action in Amazon EC2.
*/
public final CreateNetworkAclAction createNetworkAclAction() {
return createNetworkAclAction;
}
/**
*
* Information about the ReplaceNetworkAclAssociation action in Amazon EC2.
*
*
* @return Information about the ReplaceNetworkAclAssociation action in Amazon EC2.
*/
public final ReplaceNetworkAclAssociationAction replaceNetworkAclAssociationAction() {
return replaceNetworkAclAssociationAction;
}
/**
*
* Information about the CreateNetworkAclEntries action in Amazon EC2.
*
*
* @return Information about the CreateNetworkAclEntries action in Amazon EC2.
*/
public final CreateNetworkAclEntriesAction createNetworkAclEntriesAction() {
return createNetworkAclEntriesAction;
}
/**
*
* Information about the DeleteNetworkAclEntries action in Amazon EC2.
*
*
* @return Information about the DeleteNetworkAclEntries action in Amazon EC2.
*/
public final DeleteNetworkAclEntriesAction deleteNetworkAclEntriesAction() {
return deleteNetworkAclEntriesAction;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(ec2CreateRouteAction());
hashCode = 31 * hashCode + Objects.hashCode(ec2ReplaceRouteAction());
hashCode = 31 * hashCode + Objects.hashCode(ec2DeleteRouteAction());
hashCode = 31 * hashCode + Objects.hashCode(ec2CopyRouteTableAction());
hashCode = 31 * hashCode + Objects.hashCode(ec2ReplaceRouteTableAssociationAction());
hashCode = 31 * hashCode + Objects.hashCode(ec2AssociateRouteTableAction());
hashCode = 31 * hashCode + Objects.hashCode(ec2CreateRouteTableAction());
hashCode = 31 * hashCode + Objects.hashCode(fmsPolicyUpdateFirewallCreationConfigAction());
hashCode = 31 * hashCode + Objects.hashCode(createNetworkAclAction());
hashCode = 31 * hashCode + Objects.hashCode(replaceNetworkAclAssociationAction());
hashCode = 31 * hashCode + Objects.hashCode(createNetworkAclEntriesAction());
hashCode = 31 * hashCode + Objects.hashCode(deleteNetworkAclEntriesAction());
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 RemediationAction)) {
return false;
}
RemediationAction other = (RemediationAction) obj;
return Objects.equals(description(), other.description())
&& Objects.equals(ec2CreateRouteAction(), other.ec2CreateRouteAction())
&& Objects.equals(ec2ReplaceRouteAction(), other.ec2ReplaceRouteAction())
&& Objects.equals(ec2DeleteRouteAction(), other.ec2DeleteRouteAction())
&& Objects.equals(ec2CopyRouteTableAction(), other.ec2CopyRouteTableAction())
&& Objects.equals(ec2ReplaceRouteTableAssociationAction(), other.ec2ReplaceRouteTableAssociationAction())
&& Objects.equals(ec2AssociateRouteTableAction(), other.ec2AssociateRouteTableAction())
&& Objects.equals(ec2CreateRouteTableAction(), other.ec2CreateRouteTableAction())
&& Objects.equals(fmsPolicyUpdateFirewallCreationConfigAction(),
other.fmsPolicyUpdateFirewallCreationConfigAction())
&& Objects.equals(createNetworkAclAction(), other.createNetworkAclAction())
&& Objects.equals(replaceNetworkAclAssociationAction(), other.replaceNetworkAclAssociationAction())
&& Objects.equals(createNetworkAclEntriesAction(), other.createNetworkAclEntriesAction())
&& Objects.equals(deleteNetworkAclEntriesAction(), other.deleteNetworkAclEntriesAction());
}
/**
* 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("RemediationAction").add("Description", description())
.add("EC2CreateRouteAction", ec2CreateRouteAction()).add("EC2ReplaceRouteAction", ec2ReplaceRouteAction())
.add("EC2DeleteRouteAction", ec2DeleteRouteAction()).add("EC2CopyRouteTableAction", ec2CopyRouteTableAction())
.add("EC2ReplaceRouteTableAssociationAction", ec2ReplaceRouteTableAssociationAction())
.add("EC2AssociateRouteTableAction", ec2AssociateRouteTableAction())
.add("EC2CreateRouteTableAction", ec2CreateRouteTableAction())
.add("FMSPolicyUpdateFirewallCreationConfigAction", fmsPolicyUpdateFirewallCreationConfigAction())
.add("CreateNetworkAclAction", createNetworkAclAction())
.add("ReplaceNetworkAclAssociationAction", replaceNetworkAclAssociationAction())
.add("CreateNetworkAclEntriesAction", createNetworkAclEntriesAction())
.add("DeleteNetworkAclEntriesAction", deleteNetworkAclEntriesAction()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "Description":
return Optional.ofNullable(clazz.cast(description()));
case "EC2CreateRouteAction":
return Optional.ofNullable(clazz.cast(ec2CreateRouteAction()));
case "EC2ReplaceRouteAction":
return Optional.ofNullable(clazz.cast(ec2ReplaceRouteAction()));
case "EC2DeleteRouteAction":
return Optional.ofNullable(clazz.cast(ec2DeleteRouteAction()));
case "EC2CopyRouteTableAction":
return Optional.ofNullable(clazz.cast(ec2CopyRouteTableAction()));
case "EC2ReplaceRouteTableAssociationAction":
return Optional.ofNullable(clazz.cast(ec2ReplaceRouteTableAssociationAction()));
case "EC2AssociateRouteTableAction":
return Optional.ofNullable(clazz.cast(ec2AssociateRouteTableAction()));
case "EC2CreateRouteTableAction":
return Optional.ofNullable(clazz.cast(ec2CreateRouteTableAction()));
case "FMSPolicyUpdateFirewallCreationConfigAction":
return Optional.ofNullable(clazz.cast(fmsPolicyUpdateFirewallCreationConfigAction()));
case "CreateNetworkAclAction":
return Optional.ofNullable(clazz.cast(createNetworkAclAction()));
case "ReplaceNetworkAclAssociationAction":
return Optional.ofNullable(clazz.cast(replaceNetworkAclAssociationAction()));
case "CreateNetworkAclEntriesAction":
return Optional.ofNullable(clazz.cast(createNetworkAclEntriesAction()));
case "DeleteNetworkAclEntriesAction":
return Optional.ofNullable(clazz.cast(deleteNetworkAclEntriesAction()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function