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 ConnectDirectory operation.

Creates an AD Connector to connect an on-premises directory.

 
 public class ConnectDirectoryRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The fully-qualified name of the on-premises directory, such as corp.example.com.

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

 
     private String name;

    
The NetBIOS name of the on-premises directory, such as CORP.

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

 
     private String shortName;

    
The password for the on-premises user account.

Constraints:
Length: 1 - 128

 
     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 DirectoryConnectSettings object that contains additional information for the operation.
 
     private DirectoryConnectSettings connectSettings;

    
The fully-qualified name of the on-premises directory, such as corp.example.com.

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

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

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

Parameters:
name The fully-qualified name of the on-premises directory, such as corp.example.com.
    public void setName(String name) {
        this. = name;
    }
    
    
The fully-qualified name of the on-premises 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 of the on-premises directory, such as corp.example.com.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ConnectDirectoryRequest withName(String name) {
        this. = name;
        return this;
    }

    
The NetBIOS name of the on-premises directory, such as CORP.

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

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

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

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

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

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

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

    
The password for the on-premises user account.

Constraints:
Length: 1 - 128

Returns:
The password for the on-premises user account.
    public String getPassword() {
        return ;
    }
    
    
The password for the on-premises user account.

Constraints:
Length: 1 - 128

Parameters:
password The password for the on-premises user account.
    public void setPassword(String password) {
        this. = password;
    }
    
    
The password for the on-premises user account.

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

Constraints:
Length: 1 - 128

Parameters:
password The password for the on-premises user account.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ConnectDirectoryRequest 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 ConnectDirectoryRequest 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 ConnectDirectoryRequest 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 DirectoryConnectSettings object that contains additional information for the operation.

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

Parameters:
connectSettings A DirectoryConnectSettings object that contains additional information for the operation.
    public void setConnectSettings(DirectoryConnectSettings connectSettings) {
        this. = connectSettings;
    }
    
    
A DirectoryConnectSettings object that contains additional information for the operation.

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

Parameters:
connectSettings A DirectoryConnectSettings object that contains additional information for the operation.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = connectSettings;
        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 (getConnectSettings() != nullsb.append("ConnectSettings: " + getConnectSettings() );
        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 + ((getConnectSettings() == null) ? 0 : getConnectSettings().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ConnectDirectoryRequest == falsereturn false;
        ConnectDirectoryRequest other = (ConnectDirectoryRequest)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.getConnectSettings() == null ^ this.getConnectSettings() == nullreturn false;
        if (other.getConnectSettings() != null && other.getConnectSettings().equals(this.getConnectSettings()) == falsereturn false
        return true;
    }
    
    @Override
    public ConnectDirectoryRequest clone() {
        
            return (ConnectDirectoryRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X