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

com.amazonaws.services.workmail.model.PutAccessControlRuleRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
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.workmail.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 PutAccessControlRuleRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The rule name. *

*/ private String name; /** *

* The rule effect. *

*/ private String effect; /** *

* The rule description. *

*/ private String description; /** *

* IPv4 CIDR ranges to include in the rule. *

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

* IPv4 CIDR ranges to exclude from the rule. *

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

* Access protocol actions to include in the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, * and WebMail. *

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

* Access protocol actions to exclude from the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, * and WebMail. *

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

* User IDs to include in the rule. *

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

* User IDs to exclude from the rule. *

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

* The identifier of the organization. *

*/ private String organizationId; /** *

* Impersonation role IDs to include in the rule. *

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

* Impersonation role IDs to exclude from the rule. *

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

* The rule name. *

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

* The rule name. *

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

* The rule name. *

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

* The rule effect. *

* * @param effect * The rule effect. * @see AccessControlRuleEffect */ public void setEffect(String effect) { this.effect = effect; } /** *

* The rule effect. *

* * @return The rule effect. * @see AccessControlRuleEffect */ public String getEffect() { return this.effect; } /** *

* The rule effect. *

* * @param effect * The rule effect. * @return Returns a reference to this object so that method calls can be chained together. * @see AccessControlRuleEffect */ public PutAccessControlRuleRequest withEffect(String effect) { setEffect(effect); return this; } /** *

* The rule effect. *

* * @param effect * The rule effect. * @return Returns a reference to this object so that method calls can be chained together. * @see AccessControlRuleEffect */ public PutAccessControlRuleRequest withEffect(AccessControlRuleEffect effect) { this.effect = effect.toString(); return this; } /** *

* The rule description. *

* * @param description * The rule description. */ public void setDescription(String description) { this.description = description; } /** *

* The rule description. *

* * @return The rule description. */ public String getDescription() { return this.description; } /** *

* The rule description. *

* * @param description * The rule description. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withDescription(String description) { setDescription(description); return this; } /** *

* IPv4 CIDR ranges to include in the rule. *

* * @return IPv4 CIDR ranges to include in the rule. */ public java.util.List getIpRanges() { return ipRanges; } /** *

* IPv4 CIDR ranges to include in the rule. *

* * @param ipRanges * IPv4 CIDR ranges to include in the rule. */ public void setIpRanges(java.util.Collection ipRanges) { if (ipRanges == null) { this.ipRanges = null; return; } this.ipRanges = new java.util.ArrayList(ipRanges); } /** *

* IPv4 CIDR ranges to include in the rule. *

*

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

* * @param ipRanges * IPv4 CIDR ranges to include in the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withIpRanges(String... ipRanges) { if (this.ipRanges == null) { setIpRanges(new java.util.ArrayList(ipRanges.length)); } for (String ele : ipRanges) { this.ipRanges.add(ele); } return this; } /** *

* IPv4 CIDR ranges to include in the rule. *

* * @param ipRanges * IPv4 CIDR ranges to include in the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withIpRanges(java.util.Collection ipRanges) { setIpRanges(ipRanges); return this; } /** *

* IPv4 CIDR ranges to exclude from the rule. *

* * @return IPv4 CIDR ranges to exclude from the rule. */ public java.util.List getNotIpRanges() { return notIpRanges; } /** *

* IPv4 CIDR ranges to exclude from the rule. *

* * @param notIpRanges * IPv4 CIDR ranges to exclude from the rule. */ public void setNotIpRanges(java.util.Collection notIpRanges) { if (notIpRanges == null) { this.notIpRanges = null; return; } this.notIpRanges = new java.util.ArrayList(notIpRanges); } /** *

* IPv4 CIDR ranges to exclude from the rule. *

*

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

* * @param notIpRanges * IPv4 CIDR ranges to exclude from the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withNotIpRanges(String... notIpRanges) { if (this.notIpRanges == null) { setNotIpRanges(new java.util.ArrayList(notIpRanges.length)); } for (String ele : notIpRanges) { this.notIpRanges.add(ele); } return this; } /** *

* IPv4 CIDR ranges to exclude from the rule. *

* * @param notIpRanges * IPv4 CIDR ranges to exclude from the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withNotIpRanges(java.util.Collection notIpRanges) { setNotIpRanges(notIpRanges); return this; } /** *

* Access protocol actions to include in the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, * and WebMail. *

* * @return Access protocol actions to include in the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, * WindowsOutlook, and WebMail. */ public java.util.List getActions() { return actions; } /** *

* Access protocol actions to include in the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, * and WebMail. *

* * @param actions * Access protocol actions to include in the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, * WindowsOutlook, and WebMail. */ public void setActions(java.util.Collection actions) { if (actions == null) { this.actions = null; return; } this.actions = new java.util.ArrayList(actions); } /** *

* Access protocol actions to include in the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, * and WebMail. *

*

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

* * @param actions * Access protocol actions to include in the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, * WindowsOutlook, and WebMail. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withActions(String... actions) { if (this.actions == null) { setActions(new java.util.ArrayList(actions.length)); } for (String ele : actions) { this.actions.add(ele); } return this; } /** *

* Access protocol actions to include in the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, * and WebMail. *

* * @param actions * Access protocol actions to include in the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, * WindowsOutlook, and WebMail. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withActions(java.util.Collection actions) { setActions(actions); return this; } /** *

* Access protocol actions to exclude from the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, * and WebMail. *

* * @return Access protocol actions to exclude from the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, * WindowsOutlook, and WebMail. */ public java.util.List getNotActions() { return notActions; } /** *

* Access protocol actions to exclude from the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, * and WebMail. *

* * @param notActions * Access protocol actions to exclude from the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, * WindowsOutlook, and WebMail. */ public void setNotActions(java.util.Collection notActions) { if (notActions == null) { this.notActions = null; return; } this.notActions = new java.util.ArrayList(notActions); } /** *

* Access protocol actions to exclude from the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, * and WebMail. *

*

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

* * @param notActions * Access protocol actions to exclude from the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, * WindowsOutlook, and WebMail. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withNotActions(String... notActions) { if (this.notActions == null) { setNotActions(new java.util.ArrayList(notActions.length)); } for (String ele : notActions) { this.notActions.add(ele); } return this; } /** *

* Access protocol actions to exclude from the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, * and WebMail. *

* * @param notActions * Access protocol actions to exclude from the rule. Valid values include ActiveSync, * AutoDiscover, EWS, IMAP, SMTP, * WindowsOutlook, and WebMail. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withNotActions(java.util.Collection notActions) { setNotActions(notActions); return this; } /** *

* User IDs to include in the rule. *

* * @return User IDs to include in the rule. */ public java.util.List getUserIds() { return userIds; } /** *

* User IDs to include in the rule. *

* * @param userIds * User IDs to include in the rule. */ public void setUserIds(java.util.Collection userIds) { if (userIds == null) { this.userIds = null; return; } this.userIds = new java.util.ArrayList(userIds); } /** *

* User IDs to include in the rule. *

*

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

* * @param userIds * User IDs to include in the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withUserIds(String... userIds) { if (this.userIds == null) { setUserIds(new java.util.ArrayList(userIds.length)); } for (String ele : userIds) { this.userIds.add(ele); } return this; } /** *

* User IDs to include in the rule. *

* * @param userIds * User IDs to include in the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withUserIds(java.util.Collection userIds) { setUserIds(userIds); return this; } /** *

* User IDs to exclude from the rule. *

* * @return User IDs to exclude from the rule. */ public java.util.List getNotUserIds() { return notUserIds; } /** *

* User IDs to exclude from the rule. *

* * @param notUserIds * User IDs to exclude from the rule. */ public void setNotUserIds(java.util.Collection notUserIds) { if (notUserIds == null) { this.notUserIds = null; return; } this.notUserIds = new java.util.ArrayList(notUserIds); } /** *

* User IDs to exclude from the rule. *

*

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

* * @param notUserIds * User IDs to exclude from the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withNotUserIds(String... notUserIds) { if (this.notUserIds == null) { setNotUserIds(new java.util.ArrayList(notUserIds.length)); } for (String ele : notUserIds) { this.notUserIds.add(ele); } return this; } /** *

* User IDs to exclude from the rule. *

* * @param notUserIds * User IDs to exclude from the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withNotUserIds(java.util.Collection notUserIds) { setNotUserIds(notUserIds); return this; } /** *

* The identifier of the organization. *

* * @param organizationId * The identifier of the organization. */ public void setOrganizationId(String organizationId) { this.organizationId = organizationId; } /** *

* The identifier of the organization. *

* * @return The identifier of the organization. */ public String getOrganizationId() { return this.organizationId; } /** *

* The identifier of the organization. *

* * @param organizationId * The identifier of the organization. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withOrganizationId(String organizationId) { setOrganizationId(organizationId); return this; } /** *

* Impersonation role IDs to include in the rule. *

* * @return Impersonation role IDs to include in the rule. */ public java.util.List getImpersonationRoleIds() { return impersonationRoleIds; } /** *

* Impersonation role IDs to include in the rule. *

* * @param impersonationRoleIds * Impersonation role IDs to include in the rule. */ public void setImpersonationRoleIds(java.util.Collection impersonationRoleIds) { if (impersonationRoleIds == null) { this.impersonationRoleIds = null; return; } this.impersonationRoleIds = new java.util.ArrayList(impersonationRoleIds); } /** *

* Impersonation role IDs to include in the rule. *

*

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

* * @param impersonationRoleIds * Impersonation role IDs to include in the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withImpersonationRoleIds(String... impersonationRoleIds) { if (this.impersonationRoleIds == null) { setImpersonationRoleIds(new java.util.ArrayList(impersonationRoleIds.length)); } for (String ele : impersonationRoleIds) { this.impersonationRoleIds.add(ele); } return this; } /** *

* Impersonation role IDs to include in the rule. *

* * @param impersonationRoleIds * Impersonation role IDs to include in the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withImpersonationRoleIds(java.util.Collection impersonationRoleIds) { setImpersonationRoleIds(impersonationRoleIds); return this; } /** *

* Impersonation role IDs to exclude from the rule. *

* * @return Impersonation role IDs to exclude from the rule. */ public java.util.List getNotImpersonationRoleIds() { return notImpersonationRoleIds; } /** *

* Impersonation role IDs to exclude from the rule. *

* * @param notImpersonationRoleIds * Impersonation role IDs to exclude from the rule. */ public void setNotImpersonationRoleIds(java.util.Collection notImpersonationRoleIds) { if (notImpersonationRoleIds == null) { this.notImpersonationRoleIds = null; return; } this.notImpersonationRoleIds = new java.util.ArrayList(notImpersonationRoleIds); } /** *

* Impersonation role IDs to exclude from the rule. *

*

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

* * @param notImpersonationRoleIds * Impersonation role IDs to exclude from the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withNotImpersonationRoleIds(String... notImpersonationRoleIds) { if (this.notImpersonationRoleIds == null) { setNotImpersonationRoleIds(new java.util.ArrayList(notImpersonationRoleIds.length)); } for (String ele : notImpersonationRoleIds) { this.notImpersonationRoleIds.add(ele); } return this; } /** *

* Impersonation role IDs to exclude from the rule. *

* * @param notImpersonationRoleIds * Impersonation role IDs to exclude from the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAccessControlRuleRequest withNotImpersonationRoleIds(java.util.Collection notImpersonationRoleIds) { setNotImpersonationRoleIds(notImpersonationRoleIds); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getEffect() != null) sb.append("Effect: ").append(getEffect()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getIpRanges() != null) sb.append("IpRanges: ").append(getIpRanges()).append(","); if (getNotIpRanges() != null) sb.append("NotIpRanges: ").append(getNotIpRanges()).append(","); if (getActions() != null) sb.append("Actions: ").append(getActions()).append(","); if (getNotActions() != null) sb.append("NotActions: ").append(getNotActions()).append(","); if (getUserIds() != null) sb.append("UserIds: ").append(getUserIds()).append(","); if (getNotUserIds() != null) sb.append("NotUserIds: ").append(getNotUserIds()).append(","); if (getOrganizationId() != null) sb.append("OrganizationId: ").append(getOrganizationId()).append(","); if (getImpersonationRoleIds() != null) sb.append("ImpersonationRoleIds: ").append(getImpersonationRoleIds()).append(","); if (getNotImpersonationRoleIds() != null) sb.append("NotImpersonationRoleIds: ").append(getNotImpersonationRoleIds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutAccessControlRuleRequest == false) return false; PutAccessControlRuleRequest other = (PutAccessControlRuleRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getEffect() == null ^ this.getEffect() == null) return false; if (other.getEffect() != null && other.getEffect().equals(this.getEffect()) == 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.getIpRanges() == null ^ this.getIpRanges() == null) return false; if (other.getIpRanges() != null && other.getIpRanges().equals(this.getIpRanges()) == false) return false; if (other.getNotIpRanges() == null ^ this.getNotIpRanges() == null) return false; if (other.getNotIpRanges() != null && other.getNotIpRanges().equals(this.getNotIpRanges()) == false) return false; if (other.getActions() == null ^ this.getActions() == null) return false; if (other.getActions() != null && other.getActions().equals(this.getActions()) == false) return false; if (other.getNotActions() == null ^ this.getNotActions() == null) return false; if (other.getNotActions() != null && other.getNotActions().equals(this.getNotActions()) == false) return false; if (other.getUserIds() == null ^ this.getUserIds() == null) return false; if (other.getUserIds() != null && other.getUserIds().equals(this.getUserIds()) == false) return false; if (other.getNotUserIds() == null ^ this.getNotUserIds() == null) return false; if (other.getNotUserIds() != null && other.getNotUserIds().equals(this.getNotUserIds()) == false) return false; if (other.getOrganizationId() == null ^ this.getOrganizationId() == null) return false; if (other.getOrganizationId() != null && other.getOrganizationId().equals(this.getOrganizationId()) == false) return false; if (other.getImpersonationRoleIds() == null ^ this.getImpersonationRoleIds() == null) return false; if (other.getImpersonationRoleIds() != null && other.getImpersonationRoleIds().equals(this.getImpersonationRoleIds()) == false) return false; if (other.getNotImpersonationRoleIds() == null ^ this.getNotImpersonationRoleIds() == null) return false; if (other.getNotImpersonationRoleIds() != null && other.getNotImpersonationRoleIds().equals(this.getNotImpersonationRoleIds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getEffect() == null) ? 0 : getEffect().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getIpRanges() == null) ? 0 : getIpRanges().hashCode()); hashCode = prime * hashCode + ((getNotIpRanges() == null) ? 0 : getNotIpRanges().hashCode()); hashCode = prime * hashCode + ((getActions() == null) ? 0 : getActions().hashCode()); hashCode = prime * hashCode + ((getNotActions() == null) ? 0 : getNotActions().hashCode()); hashCode = prime * hashCode + ((getUserIds() == null) ? 0 : getUserIds().hashCode()); hashCode = prime * hashCode + ((getNotUserIds() == null) ? 0 : getNotUserIds().hashCode()); hashCode = prime * hashCode + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode()); hashCode = prime * hashCode + ((getImpersonationRoleIds() == null) ? 0 : getImpersonationRoleIds().hashCode()); hashCode = prime * hashCode + ((getNotImpersonationRoleIds() == null) ? 0 : getNotImpersonationRoleIds().hashCode()); return hashCode; } @Override public PutAccessControlRuleRequest clone() { return (PutAccessControlRuleRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy