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

com.amazonaws.services.opensearchserverless.model.UpdateSecurityPolicyRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for OpenSearch Service Serverless module holds the client classes that are used for communicating with OpenSearch Service Serverless 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.opensearchserverless.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 UpdateSecurityPolicyRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* Unique, case-sensitive identifier to ensure idempotency of the request. *

*/ private String clientToken; /** *

* A description of the policy. Typically used to store information about the permissions defined in the policy. *

*/ private String description; /** *

* The name of the policy. *

*/ private String name; /** *

* The JSON policy document to use as the content for the new policy. *

*/ private String policy; /** *

* The version of the policy being updated. *

*/ private String policyVersion; /** *

* The type of access policy. *

*/ private String type; /** *

* Unique, case-sensitive identifier to ensure idempotency of the request. *

* * @param clientToken * Unique, case-sensitive identifier to ensure idempotency of the request. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* Unique, case-sensitive identifier to ensure idempotency of the request. *

* * @return Unique, case-sensitive identifier to ensure idempotency of the request. */ public String getClientToken() { return this.clientToken; } /** *

* Unique, case-sensitive identifier to ensure idempotency of the request. *

* * @param clientToken * Unique, case-sensitive identifier to ensure idempotency of the request. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityPolicyRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* A description of the policy. Typically used to store information about the permissions defined in the policy. *

* * @param description * A description of the policy. Typically used to store information about the permissions defined in the * policy. */ public void setDescription(String description) { this.description = description; } /** *

* A description of the policy. Typically used to store information about the permissions defined in the policy. *

* * @return A description of the policy. Typically used to store information about the permissions defined in the * policy. */ public String getDescription() { return this.description; } /** *

* A description of the policy. Typically used to store information about the permissions defined in the policy. *

* * @param description * A description of the policy. Typically used to store information about the permissions defined in the * policy. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityPolicyRequest withDescription(String description) { setDescription(description); return this; } /** *

* The name of the policy. *

* * @param name * The name of the policy. */ public void setName(String name) { this.name = name; } /** *

* The name of the policy. *

* * @return The name of the policy. */ public String getName() { return this.name; } /** *

* The name of the policy. *

* * @param name * The name of the policy. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityPolicyRequest withName(String name) { setName(name); return this; } /** *

* The JSON policy document to use as the content for the new policy. *

* * @param policy * The JSON policy document to use as the content for the new policy. */ public void setPolicy(String policy) { this.policy = policy; } /** *

* The JSON policy document to use as the content for the new policy. *

* * @return The JSON policy document to use as the content for the new policy. */ public String getPolicy() { return this.policy; } /** *

* The JSON policy document to use as the content for the new policy. *

* * @param policy * The JSON policy document to use as the content for the new policy. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityPolicyRequest withPolicy(String policy) { setPolicy(policy); return this; } /** *

* The version of the policy being updated. *

* * @param policyVersion * The version of the policy being updated. */ public void setPolicyVersion(String policyVersion) { this.policyVersion = policyVersion; } /** *

* The version of the policy being updated. *

* * @return The version of the policy being updated. */ public String getPolicyVersion() { return this.policyVersion; } /** *

* The version of the policy being updated. *

* * @param policyVersion * The version of the policy being updated. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityPolicyRequest withPolicyVersion(String policyVersion) { setPolicyVersion(policyVersion); return this; } /** *

* The type of access policy. *

* * @param type * The type of access policy. * @see SecurityPolicyType */ public void setType(String type) { this.type = type; } /** *

* The type of access policy. *

* * @return The type of access policy. * @see SecurityPolicyType */ public String getType() { return this.type; } /** *

* The type of access policy. *

* * @param type * The type of access policy. * @return Returns a reference to this object so that method calls can be chained together. * @see SecurityPolicyType */ public UpdateSecurityPolicyRequest withType(String type) { setType(type); return this; } /** *

* The type of access policy. *

* * @param type * The type of access policy. * @return Returns a reference to this object so that method calls can be chained together. * @see SecurityPolicyType */ public UpdateSecurityPolicyRequest withType(SecurityPolicyType type) { this.type = type.toString(); 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 (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getPolicy() != null) sb.append("Policy: ").append(getPolicy()).append(","); if (getPolicyVersion() != null) sb.append("PolicyVersion: ").append(getPolicyVersion()).append(","); if (getType() != null) sb.append("Type: ").append(getType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateSecurityPolicyRequest == false) return false; UpdateSecurityPolicyRequest other = (UpdateSecurityPolicyRequest) obj; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == 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.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getPolicy() == null ^ this.getPolicy() == null) return false; if (other.getPolicy() != null && other.getPolicy().equals(this.getPolicy()) == false) return false; if (other.getPolicyVersion() == null ^ this.getPolicyVersion() == null) return false; if (other.getPolicyVersion() != null && other.getPolicyVersion().equals(this.getPolicyVersion()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getPolicy() == null) ? 0 : getPolicy().hashCode()); hashCode = prime * hashCode + ((getPolicyVersion() == null) ? 0 : getPolicyVersion().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); return hashCode; } @Override public UpdateSecurityPolicyRequest clone() { return (UpdateSecurityPolicyRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy