com.amazonaws.services.directory.model.CreateDirectoryRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-directory 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.directory.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Contains the inputs for the CreateDirectory operation.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateDirectoryRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The fully qualified name for the directory, such as corp.example.com
.
*
*/
private String name;
/**
*
* The NetBIOS name of the directory, such as CORP
.
*
*/
private String shortName;
/**
*
* The password for the directory administrator. The directory creation process creates a directory administrator
* account with the user name Administrator
and this password.
*
*
* If you need to change the password for the administrator account, you can use the ResetUserPassword API
* call.
*
*
* The regex pattern for this string is made up of the following conditions:
*
*
* -
*
* Length (?=^.{8,64}$) – Must be between 8 and 64 characters
*
*
*
*
* AND any 3 of the following password complexity rules required by Active Directory:
*
*
* -
*
* Numbers and upper case and lowercase (?=.*\d)(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and special characters and lower case (?=.*\d)(?=.*[^A-Za-z0-9\s])(?=.*[a-z])
*
*
* -
*
* Special characters and upper case and lower case (?=.*[^A-Za-z0-9\s])(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and upper case and special characters (?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\s])
*
*
*
*
* For additional information about how Active Directory passwords are enforced, see Password must meet complexity requirements on the Microsoft website.
*
*/
private String password;
/**
*
* A description for the directory.
*
*/
private String description;
/**
*
* The size of the directory.
*
*/
private String size;
/**
*
* A DirectoryVpcSettings object that contains additional information for the operation.
*
*/
private DirectoryVpcSettings vpcSettings;
/**
*
* The tags to be assigned to the Simple AD directory.
*
*/
private com.amazonaws.internal.SdkInternalList tags;
/**
*
* The fully qualified name for the directory, such as corp.example.com
.
*
*
* @param name
* The fully qualified name for the directory, such as corp.example.com
.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The fully qualified name for the directory, such as corp.example.com
.
*
*
* @return The fully qualified name for the directory, such as corp.example.com
.
*/
public String getName() {
return this.name;
}
/**
*
* The fully qualified name for the directory, such as corp.example.com
.
*
*
* @param name
* The fully qualified name for the directory, such as corp.example.com
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDirectoryRequest withName(String name) {
setName(name);
return this;
}
/**
*
* The NetBIOS name of the directory, such as CORP
.
*
*
* @param shortName
* The NetBIOS name of the directory, such as CORP
.
*/
public void setShortName(String shortName) {
this.shortName = shortName;
}
/**
*
* The NetBIOS name of the directory, such as CORP
.
*
*
* @return The NetBIOS name of the directory, such as CORP
.
*/
public String getShortName() {
return this.shortName;
}
/**
*
* The NetBIOS name of the directory, such as CORP
.
*
*
* @param shortName
* The NetBIOS name of the directory, such as CORP
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDirectoryRequest withShortName(String shortName) {
setShortName(shortName);
return this;
}
/**
*
* The password for the directory administrator. The directory creation process creates a directory administrator
* account with the user name Administrator
and this password.
*
*
* If you need to change the password for the administrator account, you can use the ResetUserPassword API
* call.
*
*
* The regex pattern for this string is made up of the following conditions:
*
*
* -
*
* Length (?=^.{8,64}$) – Must be between 8 and 64 characters
*
*
*
*
* AND any 3 of the following password complexity rules required by Active Directory:
*
*
* -
*
* Numbers and upper case and lowercase (?=.*\d)(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and special characters and lower case (?=.*\d)(?=.*[^A-Za-z0-9\s])(?=.*[a-z])
*
*
* -
*
* Special characters and upper case and lower case (?=.*[^A-Za-z0-9\s])(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and upper case and special characters (?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\s])
*
*
*
*
* For additional information about how Active Directory passwords are enforced, see Password must meet complexity requirements on the Microsoft website.
*
*
* @param password
* The password for the directory administrator. The directory creation process creates a directory
* administrator account with the user name Administrator
and this password.
*
* If you need to change the password for the administrator account, you can use the ResetUserPassword
* API call.
*
*
* The regex pattern for this string is made up of the following conditions:
*
*
* -
*
* Length (?=^.{8,64}$) – Must be between 8 and 64 characters
*
*
*
*
* AND any 3 of the following password complexity rules required by Active Directory:
*
*
* -
*
* Numbers and upper case and lowercase (?=.*\d)(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and special characters and lower case (?=.*\d)(?=.*[^A-Za-z0-9\s])(?=.*[a-z])
*
*
* -
*
* Special characters and upper case and lower case (?=.*[^A-Za-z0-9\s])(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and upper case and special characters (?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\s])
*
*
*
*
* For additional information about how Active Directory passwords are enforced, see Password must meet complexity requirements on the Microsoft website.
*/
public void setPassword(String password) {
this.password = password;
}
/**
*
* The password for the directory administrator. The directory creation process creates a directory administrator
* account with the user name Administrator
and this password.
*
*
* If you need to change the password for the administrator account, you can use the ResetUserPassword API
* call.
*
*
* The regex pattern for this string is made up of the following conditions:
*
*
* -
*
* Length (?=^.{8,64}$) – Must be between 8 and 64 characters
*
*
*
*
* AND any 3 of the following password complexity rules required by Active Directory:
*
*
* -
*
* Numbers and upper case and lowercase (?=.*\d)(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and special characters and lower case (?=.*\d)(?=.*[^A-Za-z0-9\s])(?=.*[a-z])
*
*
* -
*
* Special characters and upper case and lower case (?=.*[^A-Za-z0-9\s])(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and upper case and special characters (?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\s])
*
*
*
*
* For additional information about how Active Directory passwords are enforced, see Password must meet complexity requirements on the Microsoft website.
*
*
* @return The password for the directory administrator. The directory creation process creates a directory
* administrator account with the user name Administrator
and this password.
*
* If you need to change the password for the administrator account, you can use the
* ResetUserPassword API call.
*
*
* The regex pattern for this string is made up of the following conditions:
*
*
* -
*
* Length (?=^.{8,64}$) – Must be between 8 and 64 characters
*
*
*
*
* AND any 3 of the following password complexity rules required by Active Directory:
*
*
* -
*
* Numbers and upper case and lowercase (?=.*\d)(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and special characters and lower case (?=.*\d)(?=.*[^A-Za-z0-9\s])(?=.*[a-z])
*
*
* -
*
* Special characters and upper case and lower case (?=.*[^A-Za-z0-9\s])(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and upper case and special characters (?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\s])
*
*
*
*
* For additional information about how Active Directory passwords are enforced, see Password must meet complexity requirements on the Microsoft website.
*/
public String getPassword() {
return this.password;
}
/**
*
* The password for the directory administrator. The directory creation process creates a directory administrator
* account with the user name Administrator
and this password.
*
*
* If you need to change the password for the administrator account, you can use the ResetUserPassword API
* call.
*
*
* The regex pattern for this string is made up of the following conditions:
*
*
* -
*
* Length (?=^.{8,64}$) – Must be between 8 and 64 characters
*
*
*
*
* AND any 3 of the following password complexity rules required by Active Directory:
*
*
* -
*
* Numbers and upper case and lowercase (?=.*\d)(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and special characters and lower case (?=.*\d)(?=.*[^A-Za-z0-9\s])(?=.*[a-z])
*
*
* -
*
* Special characters and upper case and lower case (?=.*[^A-Za-z0-9\s])(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and upper case and special characters (?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\s])
*
*
*
*
* For additional information about how Active Directory passwords are enforced, see Password must meet complexity requirements on the Microsoft website.
*
*
* @param password
* The password for the directory administrator. The directory creation process creates a directory
* administrator account with the user name Administrator
and this password.
*
* If you need to change the password for the administrator account, you can use the ResetUserPassword
* API call.
*
*
* The regex pattern for this string is made up of the following conditions:
*
*
* -
*
* Length (?=^.{8,64}$) – Must be between 8 and 64 characters
*
*
*
*
* AND any 3 of the following password complexity rules required by Active Directory:
*
*
* -
*
* Numbers and upper case and lowercase (?=.*\d)(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and special characters and lower case (?=.*\d)(?=.*[^A-Za-z0-9\s])(?=.*[a-z])
*
*
* -
*
* Special characters and upper case and lower case (?=.*[^A-Za-z0-9\s])(?=.*[A-Z])(?=.*[a-z])
*
*
* -
*
* Numbers and upper case and special characters (?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\s])
*
*
*
*
* For additional information about how Active Directory passwords are enforced, see Password must meet complexity requirements on the Microsoft website.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDirectoryRequest withPassword(String password) {
setPassword(password);
return this;
}
/**
*
* A description for the directory.
*
*
* @param description
* A description for the directory.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description for the directory.
*
*
* @return A description for the directory.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description for the directory.
*
*
* @param description
* A description for the directory.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDirectoryRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The size of the directory.
*
*
* @param size
* The size of the directory.
* @see DirectorySize
*/
public void setSize(String size) {
this.size = size;
}
/**
*
* The size of the directory.
*
*
* @return The size of the directory.
* @see DirectorySize
*/
public String getSize() {
return this.size;
}
/**
*
* The size of the directory.
*
*
* @param size
* The size of the directory.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DirectorySize
*/
public CreateDirectoryRequest withSize(String size) {
setSize(size);
return this;
}
/**
*
* The size of the directory.
*
*
* @param size
* The size of the directory.
* @see DirectorySize
*/
public void setSize(DirectorySize size) {
withSize(size);
}
/**
*
* The size of the directory.
*
*
* @param size
* The size of the directory.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DirectorySize
*/
public CreateDirectoryRequest withSize(DirectorySize size) {
this.size = size.toString();
return this;
}
/**
*
* A DirectoryVpcSettings object that contains additional information for the operation.
*
*
* @param vpcSettings
* A DirectoryVpcSettings object that contains additional information for the operation.
*/
public void setVpcSettings(DirectoryVpcSettings vpcSettings) {
this.vpcSettings = vpcSettings;
}
/**
*
* A DirectoryVpcSettings object that contains additional information for the operation.
*
*
* @return A DirectoryVpcSettings object that contains additional information for the operation.
*/
public DirectoryVpcSettings getVpcSettings() {
return this.vpcSettings;
}
/**
*
* A DirectoryVpcSettings object that contains additional information for the operation.
*
*
* @param vpcSettings
* A DirectoryVpcSettings object that contains additional information for the operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDirectoryRequest withVpcSettings(DirectoryVpcSettings vpcSettings) {
setVpcSettings(vpcSettings);
return this;
}
/**
*
* The tags to be assigned to the Simple AD directory.
*
*
* @return The tags to be assigned to the Simple AD directory.
*/
public java.util.List getTags() {
if (tags == null) {
tags = new com.amazonaws.internal.SdkInternalList();
}
return tags;
}
/**
*
* The tags to be assigned to the Simple AD directory.
*
*
* @param tags
* The tags to be assigned to the Simple AD directory.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new com.amazonaws.internal.SdkInternalList(tags);
}
/**
*
* The tags to be assigned to the Simple AD directory.
*
*
* 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 tags to be assigned to the Simple AD directory.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDirectoryRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new com.amazonaws.internal.SdkInternalList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* The tags to be assigned to the Simple AD directory.
*
*
* @param tags
* The tags to be assigned to the Simple AD directory.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDirectoryRequest withTags(java.util.Collection tags) {
setTags(tags);
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 (getShortName() != null)
sb.append("ShortName: ").append(getShortName()).append(",");
if (getPassword() != null)
sb.append("Password: ").append("***Sensitive Data Redacted***").append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getSize() != null)
sb.append("Size: ").append(getSize()).append(",");
if (getVpcSettings() != null)
sb.append("VpcSettings: ").append(getVpcSettings()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateDirectoryRequest == false)
return false;
CreateDirectoryRequest other = (CreateDirectoryRequest) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getShortName() == null ^ this.getShortName() == null)
return false;
if (other.getShortName() != null && other.getShortName().equals(this.getShortName()) == false)
return false;
if (other.getPassword() == null ^ this.getPassword() == null)
return false;
if (other.getPassword() != null && other.getPassword().equals(this.getPassword()) == 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.getSize() == null ^ this.getSize() == null)
return false;
if (other.getSize() != null && other.getSize().equals(this.getSize()) == false)
return false;
if (other.getVpcSettings() == null ^ this.getVpcSettings() == null)
return false;
if (other.getVpcSettings() != null && other.getVpcSettings().equals(this.getVpcSettings()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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 + ((getShortName() == null) ? 0 : getShortName().hashCode());
hashCode = prime * hashCode + ((getPassword() == null) ? 0 : getPassword().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getSize() == null) ? 0 : getSize().hashCode());
hashCode = prime * hashCode + ((getVpcSettings() == null) ? 0 : getVpcSettings().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateDirectoryRequest clone() {
return (CreateDirectoryRequest) super.clone();
}
}