com.amazonaws.services.workmail.model.CreateOrganizationRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-workmail Show documentation
/*
* 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 CreateOrganizationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The AWS Directory Service directory ID.
*
*/
private String directoryId;
/**
*
* The organization alias.
*
*/
private String alias;
/**
*
* The idempotency token associated with the request.
*
*/
private String clientToken;
/**
*
* The email domains to associate with the organization.
*
*/
private java.util.List domains;
/**
*
* The Amazon Resource Name (ARN) of a customer managed key from AWS KMS.
*
*/
private String kmsKeyArn;
/**
*
* When true
, allows organization interoperability between WorkMail and Microsoft Exchange. If
* true
, you must include a AD Connector directory ID in the request.
*
*/
private Boolean enableInteroperability;
/**
*
* The AWS Directory Service directory ID.
*
*
* @param directoryId
* The AWS Directory Service directory ID.
*/
public void setDirectoryId(String directoryId) {
this.directoryId = directoryId;
}
/**
*
* The AWS Directory Service directory ID.
*
*
* @return The AWS Directory Service directory ID.
*/
public String getDirectoryId() {
return this.directoryId;
}
/**
*
* The AWS Directory Service directory ID.
*
*
* @param directoryId
* The AWS Directory Service directory ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateOrganizationRequest withDirectoryId(String directoryId) {
setDirectoryId(directoryId);
return this;
}
/**
*
* The organization alias.
*
*
* @param alias
* The organization alias.
*/
public void setAlias(String alias) {
this.alias = alias;
}
/**
*
* The organization alias.
*
*
* @return The organization alias.
*/
public String getAlias() {
return this.alias;
}
/**
*
* The organization alias.
*
*
* @param alias
* The organization alias.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateOrganizationRequest withAlias(String alias) {
setAlias(alias);
return this;
}
/**
*
* The idempotency token associated with the request.
*
*
* @param clientToken
* The idempotency token associated with the request.
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
*
* The idempotency token associated with the request.
*
*
* @return The idempotency token associated with the request.
*/
public String getClientToken() {
return this.clientToken;
}
/**
*
* The idempotency token associated with the request.
*
*
* @param clientToken
* The idempotency token associated with the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateOrganizationRequest withClientToken(String clientToken) {
setClientToken(clientToken);
return this;
}
/**
*
* The email domains to associate with the organization.
*
*
* @return The email domains to associate with the organization.
*/
public java.util.List getDomains() {
return domains;
}
/**
*
* The email domains to associate with the organization.
*
*
* @param domains
* The email domains to associate with the organization.
*/
public void setDomains(java.util.Collection domains) {
if (domains == null) {
this.domains = null;
return;
}
this.domains = new java.util.ArrayList(domains);
}
/**
*
* The email domains to associate with the organization.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDomains(java.util.Collection)} or {@link #withDomains(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param domains
* The email domains to associate with the organization.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateOrganizationRequest withDomains(Domain... domains) {
if (this.domains == null) {
setDomains(new java.util.ArrayList(domains.length));
}
for (Domain ele : domains) {
this.domains.add(ele);
}
return this;
}
/**
*
* The email domains to associate with the organization.
*
*
* @param domains
* The email domains to associate with the organization.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateOrganizationRequest withDomains(java.util.Collection domains) {
setDomains(domains);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of a customer managed key from AWS KMS.
*
*
* @param kmsKeyArn
* The Amazon Resource Name (ARN) of a customer managed key from AWS KMS.
*/
public void setKmsKeyArn(String kmsKeyArn) {
this.kmsKeyArn = kmsKeyArn;
}
/**
*
* The Amazon Resource Name (ARN) of a customer managed key from AWS KMS.
*
*
* @return The Amazon Resource Name (ARN) of a customer managed key from AWS KMS.
*/
public String getKmsKeyArn() {
return this.kmsKeyArn;
}
/**
*
* The Amazon Resource Name (ARN) of a customer managed key from AWS KMS.
*
*
* @param kmsKeyArn
* The Amazon Resource Name (ARN) of a customer managed key from AWS KMS.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateOrganizationRequest withKmsKeyArn(String kmsKeyArn) {
setKmsKeyArn(kmsKeyArn);
return this;
}
/**
*
* When true
, allows organization interoperability between WorkMail and Microsoft Exchange. If
* true
, you must include a AD Connector directory ID in the request.
*
*
* @param enableInteroperability
* When true
, allows organization interoperability between WorkMail and Microsoft Exchange. If
* true
, you must include a AD Connector directory ID in the request.
*/
public void setEnableInteroperability(Boolean enableInteroperability) {
this.enableInteroperability = enableInteroperability;
}
/**
*
* When true
, allows organization interoperability between WorkMail and Microsoft Exchange. If
* true
, you must include a AD Connector directory ID in the request.
*
*
* @return When true
, allows organization interoperability between WorkMail and Microsoft Exchange. If
* true
, you must include a AD Connector directory ID in the request.
*/
public Boolean getEnableInteroperability() {
return this.enableInteroperability;
}
/**
*
* When true
, allows organization interoperability between WorkMail and Microsoft Exchange. If
* true
, you must include a AD Connector directory ID in the request.
*
*
* @param enableInteroperability
* When true
, allows organization interoperability between WorkMail and Microsoft Exchange. If
* true
, you must include a AD Connector directory ID in the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateOrganizationRequest withEnableInteroperability(Boolean enableInteroperability) {
setEnableInteroperability(enableInteroperability);
return this;
}
/**
*
* When true
, allows organization interoperability between WorkMail and Microsoft Exchange. If
* true
, you must include a AD Connector directory ID in the request.
*
*
* @return When true
, allows organization interoperability between WorkMail and Microsoft Exchange. If
* true
, you must include a AD Connector directory ID in the request.
*/
public Boolean isEnableInteroperability() {
return this.enableInteroperability;
}
/**
* 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 (getDirectoryId() != null)
sb.append("DirectoryId: ").append(getDirectoryId()).append(",");
if (getAlias() != null)
sb.append("Alias: ").append(getAlias()).append(",");
if (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken()).append(",");
if (getDomains() != null)
sb.append("Domains: ").append(getDomains()).append(",");
if (getKmsKeyArn() != null)
sb.append("KmsKeyArn: ").append(getKmsKeyArn()).append(",");
if (getEnableInteroperability() != null)
sb.append("EnableInteroperability: ").append(getEnableInteroperability());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateOrganizationRequest == false)
return false;
CreateOrganizationRequest other = (CreateOrganizationRequest) obj;
if (other.getDirectoryId() == null ^ this.getDirectoryId() == null)
return false;
if (other.getDirectoryId() != null && other.getDirectoryId().equals(this.getDirectoryId()) == false)
return false;
if (other.getAlias() == null ^ this.getAlias() == null)
return false;
if (other.getAlias() != null && other.getAlias().equals(this.getAlias()) == false)
return false;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
if (other.getDomains() == null ^ this.getDomains() == null)
return false;
if (other.getDomains() != null && other.getDomains().equals(this.getDomains()) == false)
return false;
if (other.getKmsKeyArn() == null ^ this.getKmsKeyArn() == null)
return false;
if (other.getKmsKeyArn() != null && other.getKmsKeyArn().equals(this.getKmsKeyArn()) == false)
return false;
if (other.getEnableInteroperability() == null ^ this.getEnableInteroperability() == null)
return false;
if (other.getEnableInteroperability() != null && other.getEnableInteroperability().equals(this.getEnableInteroperability()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDirectoryId() == null) ? 0 : getDirectoryId().hashCode());
hashCode = prime * hashCode + ((getAlias() == null) ? 0 : getAlias().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getDomains() == null) ? 0 : getDomains().hashCode());
hashCode = prime * hashCode + ((getKmsKeyArn() == null) ? 0 : getKmsKeyArn().hashCode());
hashCode = prime * hashCode + ((getEnableInteroperability() == null) ? 0 : getEnableInteroperability().hashCode());
return hashCode;
}
@Override
public CreateOrganizationRequest clone() {
return (CreateOrganizationRequest) super.clone();
}
}