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

com.amazonaws.services.networkfirewall.model.CreateFirewallPolicyRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Network Firewall module holds the client classes that are used for communicating with AWS Network Firewall Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 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 com.amazonaws.services.networkfirewall.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 
 * @see AWS API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateFirewallPolicyRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it. *

*/ private String firewallPolicyName; /** *

* The rule groups and policy actions to use in the firewall policy. *

*/ private FirewallPolicy firewallPolicy; /** *

* A description of the firewall policy. *

*/ private String description; /** *

* The key:value pairs to associate with the resource. *

*/ private java.util.List tags; /** *

* Indicates whether you want Network Firewall to just check the validity of the request, rather than run the * request. *

*

* If set to TRUE, Network Firewall checks whether the request can run successfully, but doesn't * actually make the requested changes. The call returns the value that the request would return if you ran it with * dry run set to FALSE, but doesn't make additions or changes to your resources. This option allows * you to make sure that you have the required permissions to run the request and that your request parameters are * valid. *

*

* If set to FALSE, Network Firewall makes the requested changes to your resources. *

*/ private Boolean dryRun; /** *

* A complex type that contains settings for encryption of your firewall policy resources. *

*/ private EncryptionConfiguration encryptionConfiguration; /** *

* The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it. *

* * @param firewallPolicyName * The descriptive name of the firewall policy. You can't change the name of a firewall policy after you * create it. */ public void setFirewallPolicyName(String firewallPolicyName) { this.firewallPolicyName = firewallPolicyName; } /** *

* The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it. *

* * @return The descriptive name of the firewall policy. You can't change the name of a firewall policy after you * create it. */ public String getFirewallPolicyName() { return this.firewallPolicyName; } /** *

* The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it. *

* * @param firewallPolicyName * The descriptive name of the firewall policy. You can't change the name of a firewall policy after you * create it. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFirewallPolicyRequest withFirewallPolicyName(String firewallPolicyName) { setFirewallPolicyName(firewallPolicyName); return this; } /** *

* The rule groups and policy actions to use in the firewall policy. *

* * @param firewallPolicy * The rule groups and policy actions to use in the firewall policy. */ public void setFirewallPolicy(FirewallPolicy firewallPolicy) { this.firewallPolicy = firewallPolicy; } /** *

* The rule groups and policy actions to use in the firewall policy. *

* * @return The rule groups and policy actions to use in the firewall policy. */ public FirewallPolicy getFirewallPolicy() { return this.firewallPolicy; } /** *

* The rule groups and policy actions to use in the firewall policy. *

* * @param firewallPolicy * The rule groups and policy actions to use in the firewall policy. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFirewallPolicyRequest withFirewallPolicy(FirewallPolicy firewallPolicy) { setFirewallPolicy(firewallPolicy); return this; } /** *

* A description of the firewall policy. *

* * @param description * A description of the firewall policy. */ public void setDescription(String description) { this.description = description; } /** *

* A description of the firewall policy. *

* * @return A description of the firewall policy. */ public String getDescription() { return this.description; } /** *

* A description of the firewall policy. *

* * @param description * A description of the firewall policy. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFirewallPolicyRequest withDescription(String description) { setDescription(description); return this; } /** *

* The key:value pairs to associate with the resource. *

* * @return The key:value pairs to associate with the resource. */ public java.util.List getTags() { return tags; } /** *

* The key:value pairs to associate with the resource. *

* * @param tags * The key:value pairs to associate with the resource. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* The key:value pairs to associate with the resource. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *

* * @param tags * The key:value pairs to associate with the resource. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFirewallPolicyRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* The key:value pairs to associate with the resource. *

* * @param tags * The key:value pairs to associate with the resource. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFirewallPolicyRequest withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

* Indicates whether you want Network Firewall to just check the validity of the request, rather than run the * request. *

*

* If set to TRUE, Network Firewall checks whether the request can run successfully, but doesn't * actually make the requested changes. The call returns the value that the request would return if you ran it with * dry run set to FALSE, but doesn't make additions or changes to your resources. This option allows * you to make sure that you have the required permissions to run the request and that your request parameters are * valid. *

*

* If set to FALSE, Network Firewall makes the requested changes to your resources. *

* * @param dryRun * Indicates whether you want Network Firewall to just check the validity of the request, rather than run the * request.

*

* If set to TRUE, Network Firewall checks whether the request can run successfully, but doesn't * actually make the requested changes. The call returns the value that the request would return if you ran * it with dry run set to FALSE, but doesn't make additions or changes to your resources. This * option allows you to make sure that you have the required permissions to run the request and that your * request parameters are valid. *

*

* If set to FALSE, Network Firewall makes the requested changes to your resources. */ public void setDryRun(Boolean dryRun) { this.dryRun = dryRun; } /** *

* Indicates whether you want Network Firewall to just check the validity of the request, rather than run the * request. *

*

* If set to TRUE, Network Firewall checks whether the request can run successfully, but doesn't * actually make the requested changes. The call returns the value that the request would return if you ran it with * dry run set to FALSE, but doesn't make additions or changes to your resources. This option allows * you to make sure that you have the required permissions to run the request and that your request parameters are * valid. *

*

* If set to FALSE, Network Firewall makes the requested changes to your resources. *

* * @return Indicates whether you want Network Firewall to just check the validity of the request, rather than run * the request.

*

* If set to TRUE, Network Firewall checks whether the request can run successfully, but * doesn't actually make the requested changes. The call returns the value that the request would return if * you ran it with dry run set to FALSE, but doesn't make additions or changes to your * resources. This option allows you to make sure that you have the required permissions to run the request * and that your request parameters are valid. *

*

* If set to FALSE, Network Firewall makes the requested changes to your resources. */ public Boolean getDryRun() { return this.dryRun; } /** *

* Indicates whether you want Network Firewall to just check the validity of the request, rather than run the * request. *

*

* If set to TRUE, Network Firewall checks whether the request can run successfully, but doesn't * actually make the requested changes. The call returns the value that the request would return if you ran it with * dry run set to FALSE, but doesn't make additions or changes to your resources. This option allows * you to make sure that you have the required permissions to run the request and that your request parameters are * valid. *

*

* If set to FALSE, Network Firewall makes the requested changes to your resources. *

* * @param dryRun * Indicates whether you want Network Firewall to just check the validity of the request, rather than run the * request.

*

* If set to TRUE, Network Firewall checks whether the request can run successfully, but doesn't * actually make the requested changes. The call returns the value that the request would return if you ran * it with dry run set to FALSE, but doesn't make additions or changes to your resources. This * option allows you to make sure that you have the required permissions to run the request and that your * request parameters are valid. *

*

* If set to FALSE, Network Firewall makes the requested changes to your resources. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFirewallPolicyRequest withDryRun(Boolean dryRun) { setDryRun(dryRun); return this; } /** *

* Indicates whether you want Network Firewall to just check the validity of the request, rather than run the * request. *

*

* If set to TRUE, Network Firewall checks whether the request can run successfully, but doesn't * actually make the requested changes. The call returns the value that the request would return if you ran it with * dry run set to FALSE, but doesn't make additions or changes to your resources. This option allows * you to make sure that you have the required permissions to run the request and that your request parameters are * valid. *

*

* If set to FALSE, Network Firewall makes the requested changes to your resources. *

* * @return Indicates whether you want Network Firewall to just check the validity of the request, rather than run * the request.

*

* If set to TRUE, Network Firewall checks whether the request can run successfully, but * doesn't actually make the requested changes. The call returns the value that the request would return if * you ran it with dry run set to FALSE, but doesn't make additions or changes to your * resources. This option allows you to make sure that you have the required permissions to run the request * and that your request parameters are valid. *

*

* If set to FALSE, Network Firewall makes the requested changes to your resources. */ public Boolean isDryRun() { return this.dryRun; } /** *

* A complex type that contains settings for encryption of your firewall policy resources. *

* * @param encryptionConfiguration * A complex type that contains settings for encryption of your firewall policy resources. */ public void setEncryptionConfiguration(EncryptionConfiguration encryptionConfiguration) { this.encryptionConfiguration = encryptionConfiguration; } /** *

* A complex type that contains settings for encryption of your firewall policy resources. *

* * @return A complex type that contains settings for encryption of your firewall policy resources. */ public EncryptionConfiguration getEncryptionConfiguration() { return this.encryptionConfiguration; } /** *

* A complex type that contains settings for encryption of your firewall policy resources. *

* * @param encryptionConfiguration * A complex type that contains settings for encryption of your firewall policy resources. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFirewallPolicyRequest withEncryptionConfiguration(EncryptionConfiguration encryptionConfiguration) { setEncryptionConfiguration(encryptionConfiguration); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getFirewallPolicyName() != null) sb.append("FirewallPolicyName: ").append(getFirewallPolicyName()).append(","); if (getFirewallPolicy() != null) sb.append("FirewallPolicy: ").append(getFirewallPolicy()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getDryRun() != null) sb.append("DryRun: ").append(getDryRun()).append(","); if (getEncryptionConfiguration() != null) sb.append("EncryptionConfiguration: ").append(getEncryptionConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateFirewallPolicyRequest == false) return false; CreateFirewallPolicyRequest other = (CreateFirewallPolicyRequest) obj; if (other.getFirewallPolicyName() == null ^ this.getFirewallPolicyName() == null) return false; if (other.getFirewallPolicyName() != null && other.getFirewallPolicyName().equals(this.getFirewallPolicyName()) == false) return false; if (other.getFirewallPolicy() == null ^ this.getFirewallPolicy() == null) return false; if (other.getFirewallPolicy() != null && other.getFirewallPolicy().equals(this.getFirewallPolicy()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getDryRun() == null ^ this.getDryRun() == null) return false; if (other.getDryRun() != null && other.getDryRun().equals(this.getDryRun()) == false) return false; if (other.getEncryptionConfiguration() == null ^ this.getEncryptionConfiguration() == null) return false; if (other.getEncryptionConfiguration() != null && other.getEncryptionConfiguration().equals(this.getEncryptionConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFirewallPolicyName() == null) ? 0 : getFirewallPolicyName().hashCode()); hashCode = prime * hashCode + ((getFirewallPolicy() == null) ? 0 : getFirewallPolicy().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getDryRun() == null) ? 0 : getDryRun().hashCode()); hashCode = prime * hashCode + ((getEncryptionConfiguration() == null) ? 0 : getEncryptionConfiguration().hashCode()); return hashCode; } @Override public CreateFirewallPolicyRequest clone() { return (CreateFirewallPolicyRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy