Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 
 
Container for the parameters to the CreateDirectory operation.

Creates a Simple AD directory.

 
 public class CreateDirectoryRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The fully qualified name for the directory, such as corp.example.com.

Constraints:
Pattern: ^([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+$

 
     private String name;

    
The short name of the directory, such as CORP.

Constraints:
Pattern: ^[^\\/:*?\"\<\>|.]+[^\\/:*?\"<>|]*$

 
     private String shortName;

    
The password for the directory administrator. The directory creation process creates a directory administrator account with the username Administrator and this password.

Constraints:
Pattern: (?=^.{8,64}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*

 
     private String password;

    
A textual description for the directory.

Constraints:
Length: 0 - 128
Pattern: ^([a-zA-Z0-9_])[\\a-zA-Z0-9_@#%*+=:?./!\s-]*$

 
     private String description;

    
The size of the directory.

Constraints:
Allowed Values: Small, Large

 
     private String size;

    
A DirectoryVpcSettings object that contains additional information for the operation.
 
     private DirectoryVpcSettings vpcSettings;

    
The fully qualified name for the directory, such as corp.example.com.

Constraints:
Pattern: ^([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+$

Returns:
The fully qualified name for the directory, such as corp.example.com.
 
     public String getName() {
         return ;
     }
    
    
The fully qualified name for the directory, such as corp.example.com.

Constraints:
Pattern: ^([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+$

Parameters:
name The fully qualified name for the directory, such as corp.example.com.
    public void setName(String name) {
        this. = name;
    }
    
    
The fully qualified name for the directory, such as corp.example.com.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Pattern: ^([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+$

Parameters:
name The fully qualified name for the directory, such as corp.example.com.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateDirectoryRequest withName(String name) {
        this. = name;
        return this;
    }

    
The short name of the directory, such as CORP.

Constraints:
Pattern: ^[^\\/:*?\"\<\>|.]+[^\\/:*?\"<>|]*$

Returns:
The short name of the directory, such as CORP.
    public String getShortName() {
        return ;
    }
    
    
The short name of the directory, such as CORP.

Constraints:
Pattern: ^[^\\/:*?\"\<\>|.]+[^\\/:*?\"<>|]*$

Parameters:
shortName The short name of the directory, such as CORP.
    public void setShortName(String shortName) {
        this. = shortName;
    }
    
    
The short name of the directory, such as CORP.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Pattern: ^[^\\/:*?\"\<\>|.]+[^\\/:*?\"<>|]*$

Parameters:
shortName The short name of the directory, such as CORP.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateDirectoryRequest withShortName(String shortName) {
        this. = shortName;
        return this;
    }

    
The password for the directory administrator. The directory creation process creates a directory administrator account with the username Administrator and this password.

Constraints:
Pattern: (?=^.{8,64}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*

Returns:
The password for the directory administrator. The directory creation process creates a directory administrator account with the username Administrator and this password.
    public String getPassword() {
        return ;
    }
    
    
The password for the directory administrator. The directory creation process creates a directory administrator account with the username Administrator and this password.

Constraints:
Pattern: (?=^.{8,64}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*

Parameters:
password The password for the directory administrator. The directory creation process creates a directory administrator account with the username Administrator and this password.
    public void setPassword(String password) {
        this. = password;
    }
    
    
The password for the directory administrator. The directory creation process creates a directory administrator account with the username Administrator and this password.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Pattern: (?=^.{8,64}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*

Parameters:
password The password for the directory administrator. The directory creation process creates a directory administrator account with the username Administrator and this password.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateDirectoryRequest withPassword(String password) {
        this. = password;
        return this;
    }

    
A textual description for the directory.

Constraints:
Length: 0 - 128
Pattern: ^([a-zA-Z0-9_])[\\a-zA-Z0-9_@#%*+=:?./!\s-]*$

Returns:
A textual description for the directory.
    public String getDescription() {
        return ;
    }
    
    
A textual description for the directory.

Constraints:
Length: 0 - 128
Pattern: ^([a-zA-Z0-9_])[\\a-zA-Z0-9_@#%*+=:?./!\s-]*$

Parameters:
description A textual description for the directory.
    public void setDescription(String description) {
        this. = description;
    }
    
    
A textual description for the directory.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 128
Pattern: ^([a-zA-Z0-9_])[\\a-zA-Z0-9_@#%*+=:?./!\s-]*$

Parameters:
description A textual description for the directory.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateDirectoryRequest withDescription(String description) {
        this. = description;
        return this;
    }

    
The size of the directory.

Constraints:
Allowed Values: Small, Large

Returns:
The size of the directory.
See also:
DirectorySize
    public String getSize() {
        return ;
    }
    
    
The size of the directory.

Constraints:
Allowed Values: Small, Large

Parameters:
size The size of the directory.
See also:
DirectorySize
    public void setSize(String size) {
        this. = size;
    }
    
    
The size of the directory.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: Small, Large

Parameters:
size The size of the directory.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DirectorySize
    public CreateDirectoryRequest withSize(String size) {
        this. = size;
        return this;
    }

    
The size of the directory.

Constraints:
Allowed Values: Small, Large

Parameters:
size The size of the directory.
See also:
DirectorySize
    public void setSize(DirectorySize size) {
        this. = size.toString();
    }
    
    
The size of the directory.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: Small, Large

Parameters:
size The size of the directory.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DirectorySize
        this. = size.toString();
        return this;
    }

    
A DirectoryVpcSettings object that contains additional information for the operation.

Returns:
A DirectoryVpcSettings object that contains additional information for the operation.
        return ;
    }
    
    
A DirectoryVpcSettings object that contains additional information for the operation.

Parameters:
vpcSettings A DirectoryVpcSettings object that contains additional information for the operation.
    public void setVpcSettings(DirectoryVpcSettings vpcSettings) {
        this. = vpcSettings;
    }
    
    
A DirectoryVpcSettings object that contains additional information for the operation.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vpcSettings A DirectoryVpcSettings object that contains additional information for the operation.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = vpcSettings;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getName() != nullsb.append("Name: " + getName() + ",");
        if (getShortName() != nullsb.append("ShortName: " + getShortName() + ",");
        if (getPassword() != nullsb.append("Password: " + getPassword() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getSize() != nullsb.append("Size: " + getSize() + ",");
        if (getVpcSettings() != nullsb.append("VpcSettings: " + getVpcSettings() );
        sb.append("}");
        return sb.toString();
    }
    
    @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()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreateDirectoryRequest == falsereturn false;
        CreateDirectoryRequest other = (CreateDirectoryRequest)obj;
        
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getShortName() == null ^ this.getShortName() == nullreturn false;
        if (other.getShortName() != null && other.getShortName().equals(this.getShortName()) == falsereturn false
        if (other.getPassword() == null ^ this.getPassword() == nullreturn false;
        if (other.getPassword() != null && other.getPassword().equals(this.getPassword()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getSize() == null ^ this.getSize() == nullreturn false;
        if (other.getSize() != null && other.getSize().equals(this.getSize()) == falsereturn false
        if (other.getVpcSettings() == null ^ this.getVpcSettings() == nullreturn false;
        if (other.getVpcSettings() != null && other.getVpcSettings().equals(this.getVpcSettings()) == falsereturn false
        return true;
    }
    
    @Override
    public CreateDirectoryRequest clone() {
        
            return (CreateDirectoryRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X