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;
 

Contains information for the ConnectDirectory operation when an AD Connector directory is being created.

 
 public class DirectoryConnectSettings implements SerializableCloneable {

    
The identifier of the VPC that the AD Connector is created in.

Constraints:
Pattern: ^(vpc-[0-9a-f]{8})$

 
     private String vpcId;

    
A list of subnet identifiers in the VPC that the AD Connector is created in.
 
A list of one or more IP addresses of DNS servers or domain controllers in the on-premises directory.
 
The username of an account in the on-premises directory that is used to connect to the directory. This account must have the following privileges:
  • Read users and groups
  • Create computer objects
  • Join computers to the domain

Constraints:
Length: 1 -
Pattern: [a-zA-Z0-9._-]+

 
     private String customerUserName;

    
The identifier of the VPC that the AD Connector is created in.

Constraints:
Pattern: ^(vpc-[0-9a-f]{8})$

Returns:
The identifier of the VPC that the AD Connector is created in.
 
     public String getVpcId() {
         return ;
     }
    
    
The identifier of the VPC that the AD Connector is created in.

Constraints:
Pattern: ^(vpc-[0-9a-f]{8})$

Parameters:
vpcId The identifier of the VPC that the AD Connector is created in.
 
     public void setVpcId(String vpcId) {
         this. = vpcId;
     }
    
    
The identifier of the VPC that the AD Connector is created in.

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

Constraints:
Pattern: ^(vpc-[0-9a-f]{8})$

Parameters:
vpcId The identifier of the VPC that the AD Connector is created in.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DirectoryConnectSettings withVpcId(String vpcId) {
         this. = vpcId;
         return this;
     }

    
A list of subnet identifiers in the VPC that the AD Connector is created in.

Returns:
A list of subnet identifiers in the VPC that the AD Connector is created in.
    public java.util.List<StringgetSubnetIds() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of subnet identifiers in the VPC that the AD Connector is created in.

Parameters:
subnetIds A list of subnet identifiers in the VPC that the AD Connector is created in.
    public void setSubnetIds(java.util.Collection<StringsubnetIds) {
        if (subnetIds == null) {
            this. = null;
            return;
        }
        subnetIdsCopy.addAll(subnetIds);
        this. = subnetIdsCopy;
    }
    
    
A list of subnet identifiers in the VPC that the AD Connector is created in.

NOTE: This method appends the values to the existing list (if any). Use setSubnetIds(java.util.Collection) or withSubnetIds(java.util.Collection) if you want to override the existing values.

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

Parameters:
subnetIds A list of subnet identifiers in the VPC that the AD Connector is created in.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DirectoryConnectSettings withSubnetIds(String... subnetIds) {
        if (getSubnetIds() == nullsetSubnetIds(new java.util.ArrayList<String>(subnetIds.length));
        for (String value : subnetIds) {
            getSubnetIds().add(value);
        }
        return this;
    }
    
    
A list of subnet identifiers in the VPC that the AD Connector is created in.

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

Parameters:
subnetIds A list of subnet identifiers in the VPC that the AD Connector is created in.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (subnetIds == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringsubnetIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(subnetIds.size());
            subnetIdsCopy.addAll(subnetIds);
            this. = subnetIdsCopy;
        }
        return this;
    }

    
A list of one or more IP addresses of DNS servers or domain controllers in the on-premises directory.

Returns:
A list of one or more IP addresses of DNS servers or domain controllers in the on-premises directory.
    public java.util.List<StringgetCustomerDnsIps() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of one or more IP addresses of DNS servers or domain controllers in the on-premises directory.

Parameters:
customerDnsIps A list of one or more IP addresses of DNS servers or domain controllers in the on-premises directory.
    public void setCustomerDnsIps(java.util.Collection<StringcustomerDnsIps) {
        if (customerDnsIps == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringcustomerDnsIpsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(customerDnsIps.size());
        customerDnsIpsCopy.addAll(customerDnsIps);
        this. = customerDnsIpsCopy;
    }
    
    
A list of one or more IP addresses of DNS servers or domain controllers in the on-premises directory.

NOTE: This method appends the values to the existing list (if any). Use setCustomerDnsIps(java.util.Collection) or withCustomerDnsIps(java.util.Collection) if you want to override the existing values.

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

Parameters:
customerDnsIps A list of one or more IP addresses of DNS servers or domain controllers in the on-premises directory.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DirectoryConnectSettings withCustomerDnsIps(String... customerDnsIps) {
        if (getCustomerDnsIps() == nullsetCustomerDnsIps(new java.util.ArrayList<String>(customerDnsIps.length));
        for (String value : customerDnsIps) {
            getCustomerDnsIps().add(value);
        }
        return this;
    }
    
    
A list of one or more IP addresses of DNS servers or domain controllers in the on-premises directory.

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

Parameters:
customerDnsIps A list of one or more IP addresses of DNS servers or domain controllers in the on-premises directory.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (customerDnsIps == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringcustomerDnsIpsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(customerDnsIps.size());
            customerDnsIpsCopy.addAll(customerDnsIps);
            this. = customerDnsIpsCopy;
        }
        return this;
    }

    
The username of an account in the on-premises directory that is used to connect to the directory. This account must have the following privileges:
  • Read users and groups
  • Create computer objects
  • Join computers to the domain

Constraints:
Length: 1 -
Pattern: [a-zA-Z0-9._-]+

Returns:
The username of an account in the on-premises directory that is used to connect to the directory. This account must have the following privileges:
  • Read users and groups
  • Create computer objects
  • Join computers to the domain
    public String getCustomerUserName() {
        return ;
    }
    
    
The username of an account in the on-premises directory that is used to connect to the directory. This account must have the following privileges:
  • Read users and groups
  • Create computer objects
  • Join computers to the domain

Constraints:
Length: 1 -
Pattern: [a-zA-Z0-9._-]+

Parameters:
customerUserName The username of an account in the on-premises directory that is used to connect to the directory. This account must have the following privileges:
  • Read users and groups
  • Create computer objects
  • Join computers to the domain
    public void setCustomerUserName(String customerUserName) {
        this. = customerUserName;
    }
    
    
The username of an account in the on-premises directory that is used to connect to the directory. This account must have the following privileges:
  • Read users and groups
  • Create computer objects
  • Join computers to the domain

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

Constraints:
Length: 1 -
Pattern: [a-zA-Z0-9._-]+

Parameters:
customerUserName The username of an account in the on-premises directory that is used to connect to the directory. This account must have the following privileges:
  • Read users and groups
  • Create computer objects
  • Join computers to the domain
Returns:
A reference to this updated object so that method calls can be chained together.
    public DirectoryConnectSettings withCustomerUserName(String customerUserName) {
        this. = customerUserName;
        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 (getVpcId() != nullsb.append("VpcId: " + getVpcId() + ",");
        if (getSubnetIds() != nullsb.append("SubnetIds: " + getSubnetIds() + ",");
        if (getCustomerDnsIps() != nullsb.append("CustomerDnsIps: " + getCustomerDnsIps() + ",");
        if (getCustomerUserName() != nullsb.append("CustomerUserName: " + getCustomerUserName() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode()); 
        hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode()); 
        hashCode = prime * hashCode + ((getCustomerDnsIps() == null) ? 0 : getCustomerDnsIps().hashCode()); 
        hashCode = prime * hashCode + ((getCustomerUserName() == null) ? 0 : getCustomerUserName().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DirectoryConnectSettings == falsereturn false;
        DirectoryConnectSettings other = (DirectoryConnectSettings)obj;
        
        if (other.getVpcId() == null ^ this.getVpcId() == nullreturn false;
        if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == falsereturn false
        if (other.getSubnetIds() == null ^ this.getSubnetIds() == nullreturn false;
        if (other.getSubnetIds() != null && other.getSubnetIds().equals(this.getSubnetIds()) == falsereturn false
        if (other.getCustomerDnsIps() == null ^ this.getCustomerDnsIps() == nullreturn false;
        if (other.getCustomerDnsIps() != null && other.getCustomerDnsIps().equals(this.getCustomerDnsIps()) == falsereturn false
        if (other.getCustomerUserName() == null ^ this.getCustomerUserName() == nullreturn false;
        if (other.getCustomerUserName() != null && other.getCustomerUserName().equals(this.getCustomerUserName()) == falsereturn false
        return true;
    }
    
    @Override
    public DirectoryConnectSettings clone() {
        try {
            return (DirectoryConnectSettingssuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X