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.workspaces.model;
 

Contains default WorkSpace creation information.

 
 public class DefaultWorkspaceCreationProperties implements SerializableCloneable {

    
Specifies if the directory is enabled for Amazon WorkDocs.
 
     private Boolean enableWorkDocs;

    
A public IP address will be attached to all WorkSpaces that are created or rebuilt.
 
     private Boolean enableInternetAccess;

    
The organizational unit (OU) in the directory that the WorkSpace machine accounts are placed in.
 
     private String defaultOu;

    
The identifier of any custom security groups that are applied to the WorkSpaces when they are created.

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

 
     private String customSecurityGroupId;

    
The WorkSpace user is an administrator on the WorkSpace.
 
     private Boolean userEnabledAsLocalAdministrator;

    
Specifies if the directory is enabled for Amazon WorkDocs.

Returns:
Specifies if the directory is enabled for Amazon WorkDocs.
 
     public Boolean isEnableWorkDocs() {
         return ;
     }
    
    
Specifies if the directory is enabled for Amazon WorkDocs.

Parameters:
enableWorkDocs Specifies if the directory is enabled for Amazon WorkDocs.
 
     public void setEnableWorkDocs(Boolean enableWorkDocs) {
         this. = enableWorkDocs;
     }
    
    
Specifies if the directory is enabled for Amazon WorkDocs.

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

Parameters:
enableWorkDocs Specifies if the directory is enabled for Amazon WorkDocs.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DefaultWorkspaceCreationProperties withEnableWorkDocs(Boolean enableWorkDocs) {
         this. = enableWorkDocs;
         return this;
     }

    
Specifies if the directory is enabled for Amazon WorkDocs.

Returns:
Specifies if the directory is enabled for Amazon WorkDocs.
 
     public Boolean getEnableWorkDocs() {
         return ;
     }

    
A public IP address will be attached to all WorkSpaces that are created or rebuilt.

Returns:
A public IP address will be attached to all WorkSpaces that are created or rebuilt.
    public Boolean isEnableInternetAccess() {
        return ;
    }
    
    
A public IP address will be attached to all WorkSpaces that are created or rebuilt.

Parameters:
enableInternetAccess A public IP address will be attached to all WorkSpaces that are created or rebuilt.
    public void setEnableInternetAccess(Boolean enableInternetAccess) {
        this. = enableInternetAccess;
    }
    
    
A public IP address will be attached to all WorkSpaces that are created or rebuilt.

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

Parameters:
enableInternetAccess A public IP address will be attached to all WorkSpaces that are created or rebuilt.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = enableInternetAccess;
        return this;
    }

    
A public IP address will be attached to all WorkSpaces that are created or rebuilt.

Returns:
A public IP address will be attached to all WorkSpaces that are created or rebuilt.
    public Boolean getEnableInternetAccess() {
        return ;
    }

    
The organizational unit (OU) in the directory that the WorkSpace machine accounts are placed in.

Returns:
The organizational unit (OU) in the directory that the WorkSpace machine accounts are placed in.
    public String getDefaultOu() {
        return ;
    }
    
    
The organizational unit (OU) in the directory that the WorkSpace machine accounts are placed in.

Parameters:
defaultOu The organizational unit (OU) in the directory that the WorkSpace machine accounts are placed in.
    public void setDefaultOu(String defaultOu) {
        this. = defaultOu;
    }
    
    
The organizational unit (OU) in the directory that the WorkSpace machine accounts are placed in.

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

Parameters:
defaultOu The organizational unit (OU) in the directory that the WorkSpace machine accounts are placed in.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = defaultOu;
        return this;
    }

    
The identifier of any custom security groups that are applied to the WorkSpaces when they are created.

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

Returns:
The identifier of any custom security groups that are applied to the WorkSpaces when they are created.
    public String getCustomSecurityGroupId() {
        return ;
    }
    
    
The identifier of any custom security groups that are applied to the WorkSpaces when they are created.

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

Parameters:
customSecurityGroupId The identifier of any custom security groups that are applied to the WorkSpaces when they are created.
    public void setCustomSecurityGroupId(String customSecurityGroupId) {
        this. = customSecurityGroupId;
    }
    
    
The identifier of any custom security groups that are applied to the WorkSpaces when they are created.

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

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

Parameters:
customSecurityGroupId The identifier of any custom security groups that are applied to the WorkSpaces when they are created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DefaultWorkspaceCreationProperties withCustomSecurityGroupId(String customSecurityGroupId) {
        this. = customSecurityGroupId;
        return this;
    }

    
The WorkSpace user is an administrator on the WorkSpace.

Returns:
The WorkSpace user is an administrator on the WorkSpace.
        return ;
    }
    
    
The WorkSpace user is an administrator on the WorkSpace.

Parameters:
userEnabledAsLocalAdministrator The WorkSpace user is an administrator on the WorkSpace.
    public void setUserEnabledAsLocalAdministrator(Boolean userEnabledAsLocalAdministrator) {
        this. = userEnabledAsLocalAdministrator;
    }
    
    
The WorkSpace user is an administrator on the WorkSpace.

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

Parameters:
userEnabledAsLocalAdministrator The WorkSpace user is an administrator on the WorkSpace.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DefaultWorkspaceCreationProperties withUserEnabledAsLocalAdministrator(Boolean userEnabledAsLocalAdministrator) {
        this. = userEnabledAsLocalAdministrator;
        return this;
    }

    
The WorkSpace user is an administrator on the WorkSpace.

Returns:
The WorkSpace user is an administrator on the WorkSpace.
        return ;
    }

    
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 (isEnableWorkDocs() != nullsb.append("EnableWorkDocs: " + isEnableWorkDocs() + ",");
        if (isEnableInternetAccess() != nullsb.append("EnableInternetAccess: " + isEnableInternetAccess() + ",");
        if (getDefaultOu() != nullsb.append("DefaultOu: " + getDefaultOu() + ",");
        if (getCustomSecurityGroupId() != nullsb.append("CustomSecurityGroupId: " + getCustomSecurityGroupId() + ",");
        if (isUserEnabledAsLocalAdministrator() != nullsb.append("UserEnabledAsLocalAdministrator: " + isUserEnabledAsLocalAdministrator() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((isEnableWorkDocs() == null) ? 0 : isEnableWorkDocs().hashCode()); 
        hashCode = prime * hashCode + ((isEnableInternetAccess() == null) ? 0 : isEnableInternetAccess().hashCode()); 
        hashCode = prime * hashCode + ((getDefaultOu() == null) ? 0 : getDefaultOu().hashCode()); 
        hashCode = prime * hashCode + ((getCustomSecurityGroupId() == null) ? 0 : getCustomSecurityGroupId().hashCode()); 
        hashCode = prime * hashCode + ((isUserEnabledAsLocalAdministrator() == null) ? 0 : isUserEnabledAsLocalAdministrator().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DefaultWorkspaceCreationProperties == falsereturn false;
        
        if (other.isEnableWorkDocs() == null ^ this.isEnableWorkDocs() == nullreturn false;
        if (other.isEnableWorkDocs() != null && other.isEnableWorkDocs().equals(this.isEnableWorkDocs()) == falsereturn false
        if (other.isEnableInternetAccess() == null ^ this.isEnableInternetAccess() == nullreturn false;
        if (other.isEnableInternetAccess() != null && other.isEnableInternetAccess().equals(this.isEnableInternetAccess()) == falsereturn false
        if (other.getDefaultOu() == null ^ this.getDefaultOu() == nullreturn false;
        if (other.getDefaultOu() != null && other.getDefaultOu().equals(this.getDefaultOu()) == falsereturn false
        if (other.getCustomSecurityGroupId() == null ^ this.getCustomSecurityGroupId() == nullreturn false;
        if (other.getCustomSecurityGroupId() != null && other.getCustomSecurityGroupId().equals(this.getCustomSecurityGroupId()) == falsereturn false
        if (other.isUserEnabledAsLocalAdministrator() == null ^ this.isUserEnabledAsLocalAdministrator() == nullreturn false;
        if (other.isUserEnabledAsLocalAdministrator() != null && other.isUserEnabledAsLocalAdministrator().equals(this.isUserEnabledAsLocalAdministrator()) == falsereturn false
        return true;
    }
    
    @Override
        try {
            return (DefaultWorkspaceCreationPropertiessuper.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