/* * Copyright 2018-2023 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.fms.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 DeletePolicyRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The ID of the policy that you want to delete. You can retrieve this ID from PutPolicy and * ListPolicies. *

*/ private String policyId; /** *

* If True, the request performs cleanup according to the policy type. *

*

* For WAF and Shield Advanced policies, the cleanup does the following: *

* *

* For security group policies, the cleanup does the following for each security group in the policy: *

* *

* After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of * out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that you * associate with the policy. When creating the policy, if you specify that only resources in specific accounts or * with specific tags are in scope of the policy, those accounts and resources are handled by the policy. All others * are out of scope. If you don't specify tags or accounts, all resources are in scope. *

*/ private Boolean deleteAllPolicyResources; /** *

* The ID of the policy that you want to delete. You can retrieve this ID from PutPolicy and * ListPolicies. *

* * @param policyId * The ID of the policy that you want to delete. You can retrieve this ID from PutPolicy and * ListPolicies. */ public void setPolicyId(String policyId) { this.policyId = policyId; } /** *

* The ID of the policy that you want to delete. You can retrieve this ID from PutPolicy and * ListPolicies. *

* * @return The ID of the policy that you want to delete. You can retrieve this ID from PutPolicy and * ListPolicies. */ public String getPolicyId() { return this.policyId; } /** *

* The ID of the policy that you want to delete. You can retrieve this ID from PutPolicy and * ListPolicies. *

* * @param policyId * The ID of the policy that you want to delete. You can retrieve this ID from PutPolicy and * ListPolicies. * @return Returns a reference to this object so that method calls can be chained together. */ public DeletePolicyRequest withPolicyId(String policyId) { setPolicyId(policyId); return this; } /** *

* If True, the request performs cleanup according to the policy type. *

*

* For WAF and Shield Advanced policies, the cleanup does the following: *

* *

* For security group policies, the cleanup does the following for each security group in the policy: *

* *

* After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of * out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that you * associate with the policy. When creating the policy, if you specify that only resources in specific accounts or * with specific tags are in scope of the policy, those accounts and resources are handled by the policy. All others * are out of scope. If you don't specify tags or accounts, all resources are in scope. *

* * @param deleteAllPolicyResources * If True, the request performs cleanup according to the policy type.

*

* For WAF and Shield Advanced policies, the cleanup does the following: *

* *

* For security group policies, the cleanup does the following for each security group in the policy: *

* *

* After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of * out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that * you associate with the policy. When creating the policy, if you specify that only resources in specific * accounts or with specific tags are in scope of the policy, those accounts and resources are handled by the * policy. All others are out of scope. If you don't specify tags or accounts, all resources are in scope. */ public void setDeleteAllPolicyResources(Boolean deleteAllPolicyResources) { this.deleteAllPolicyResources = deleteAllPolicyResources; } /** *

* If True, the request performs cleanup according to the policy type. *

*

* For WAF and Shield Advanced policies, the cleanup does the following: *

* *

* For security group policies, the cleanup does the following for each security group in the policy: *

* *

* After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of * out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that you * associate with the policy. When creating the policy, if you specify that only resources in specific accounts or * with specific tags are in scope of the policy, those accounts and resources are handled by the policy. All others * are out of scope. If you don't specify tags or accounts, all resources are in scope. *

* * @return If True, the request performs cleanup according to the policy type.

*

* For WAF and Shield Advanced policies, the cleanup does the following: *

* *

* For security group policies, the cleanup does the following for each security group in the policy: *

* *

* After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of * out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that * you associate with the policy. When creating the policy, if you specify that only resources in specific * accounts or with specific tags are in scope of the policy, those accounts and resources are handled by * the policy. All others are out of scope. If you don't specify tags or accounts, all resources are in * scope. */ public Boolean getDeleteAllPolicyResources() { return this.deleteAllPolicyResources; } /** *

* If True, the request performs cleanup according to the policy type. *

*

* For WAF and Shield Advanced policies, the cleanup does the following: *

* *

* For security group policies, the cleanup does the following for each security group in the policy: *

* *

* After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of * out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that you * associate with the policy. When creating the policy, if you specify that only resources in specific accounts or * with specific tags are in scope of the policy, those accounts and resources are handled by the policy. All others * are out of scope. If you don't specify tags or accounts, all resources are in scope. *

* * @param deleteAllPolicyResources * If True, the request performs cleanup according to the policy type.

*

* For WAF and Shield Advanced policies, the cleanup does the following: *

* *

* For security group policies, the cleanup does the following for each security group in the policy: *

* *

* After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of * out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that * you associate with the policy. When creating the policy, if you specify that only resources in specific * accounts or with specific tags are in scope of the policy, those accounts and resources are handled by the * policy. All others are out of scope. If you don't specify tags or accounts, all resources are in scope. * @return Returns a reference to this object so that method calls can be chained together. */ public DeletePolicyRequest withDeleteAllPolicyResources(Boolean deleteAllPolicyResources) { setDeleteAllPolicyResources(deleteAllPolicyResources); return this; } /** *

* If True, the request performs cleanup according to the policy type. *

*

* For WAF and Shield Advanced policies, the cleanup does the following: *

* *

* For security group policies, the cleanup does the following for each security group in the policy: *

* *

* After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of * out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that you * associate with the policy. When creating the policy, if you specify that only resources in specific accounts or * with specific tags are in scope of the policy, those accounts and resources are handled by the policy. All others * are out of scope. If you don't specify tags or accounts, all resources are in scope. *

* * @return If True, the request performs cleanup according to the policy type.

*

* For WAF and Shield Advanced policies, the cleanup does the following: *

* *

* For security group policies, the cleanup does the following for each security group in the policy: *

* *

* After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of * out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that * you associate with the policy. When creating the policy, if you specify that only resources in specific * accounts or with specific tags are in scope of the policy, those accounts and resources are handled by * the policy. All others are out of scope. If you don't specify tags or accounts, all resources are in * scope. */ public Boolean isDeleteAllPolicyResources() { return this.deleteAllPolicyResources; } /** * 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 (getPolicyId() != null) sb.append("PolicyId: ").append(getPolicyId()).append(","); if (getDeleteAllPolicyResources() != null) sb.append("DeleteAllPolicyResources: ").append(getDeleteAllPolicyResources()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeletePolicyRequest == false) return false; DeletePolicyRequest other = (DeletePolicyRequest) obj; if (other.getPolicyId() == null ^ this.getPolicyId() == null) return false; if (other.getPolicyId() != null && other.getPolicyId().equals(this.getPolicyId()) == false) return false; if (other.getDeleteAllPolicyResources() == null ^ this.getDeleteAllPolicyResources() == null) return false; if (other.getDeleteAllPolicyResources() != null && other.getDeleteAllPolicyResources().equals(this.getDeleteAllPolicyResources()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPolicyId() == null) ? 0 : getPolicyId().hashCode()); hashCode = prime * hashCode + ((getDeleteAllPolicyResources() == null) ? 0 : getDeleteAllPolicyResources().hashCode()); return hashCode; } @Override public DeletePolicyRequest clone() { return (DeletePolicyRequest) super.clone(); } }