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 directory limit information for a region.

 
 public class DirectoryLimits implements SerializableCloneable {

    
The maximum number of cloud directories allowed in the region.

Constraints:
Range: 0 -

 
     private Integer cloudOnlyDirectoriesLimit;

    
The current number of cloud directories in the region.

Constraints:
Range: 0 -

 
     private Integer cloudOnlyDirectoriesCurrentCount;

    
Indicates if the cloud directory limit has been reached.
 
     private Boolean cloudOnlyDirectoriesLimitReached;

    
The maximum number of connected directories allowed in the region.

Constraints:
Range: 0 -

 
     private Integer connectedDirectoriesLimit;

    
The current number of connected directories in the region.

Constraints:
Range: 0 -

 
     private Integer connectedDirectoriesCurrentCount;

    
Indicates if the connected directory limit has been reached.
 
     private Boolean connectedDirectoriesLimitReached;

    
The maximum number of cloud directories allowed in the region.

Constraints:
Range: 0 -

Returns:
The maximum number of cloud directories allowed in the region.
 
     public Integer getCloudOnlyDirectoriesLimit() {
         return ;
     }
    
    
The maximum number of cloud directories allowed in the region.

Constraints:
Range: 0 -

Parameters:
cloudOnlyDirectoriesLimit The maximum number of cloud directories allowed in the region.
 
     public void setCloudOnlyDirectoriesLimit(Integer cloudOnlyDirectoriesLimit) {
         this. = cloudOnlyDirectoriesLimit;
     }
    
    
The maximum number of cloud directories allowed in the region.

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

Constraints:
Range: 0 -

Parameters:
cloudOnlyDirectoriesLimit The maximum number of cloud directories allowed in the region.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DirectoryLimits withCloudOnlyDirectoriesLimit(Integer cloudOnlyDirectoriesLimit) {
        this. = cloudOnlyDirectoriesLimit;
        return this;
    }

    
The current number of cloud directories in the region.

Constraints:
Range: 0 -

Returns:
The current number of cloud directories in the region.
        return ;
    }
    
    
The current number of cloud directories in the region.

Constraints:
Range: 0 -

Parameters:
cloudOnlyDirectoriesCurrentCount The current number of cloud directories in the region.
    public void setCloudOnlyDirectoriesCurrentCount(Integer cloudOnlyDirectoriesCurrentCount) {
        this. = cloudOnlyDirectoriesCurrentCount;
    }
    
    
The current number of cloud directories in the region.

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

Constraints:
Range: 0 -

Parameters:
cloudOnlyDirectoriesCurrentCount The current number of cloud directories in the region.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DirectoryLimits withCloudOnlyDirectoriesCurrentCount(Integer cloudOnlyDirectoriesCurrentCount) {
        this. = cloudOnlyDirectoriesCurrentCount;
        return this;
    }

    
Indicates if the cloud directory limit has been reached.

Returns:
Indicates if the cloud directory limit has been reached.
        return ;
    }
    
    
Indicates if the cloud directory limit has been reached.

Parameters:
cloudOnlyDirectoriesLimitReached Indicates if the cloud directory limit has been reached.
    public void setCloudOnlyDirectoriesLimitReached(Boolean cloudOnlyDirectoriesLimitReached) {
        this. = cloudOnlyDirectoriesLimitReached;
    }
    
    
Indicates if the cloud directory limit has been reached.

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

Parameters:
cloudOnlyDirectoriesLimitReached Indicates if the cloud directory limit has been reached.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DirectoryLimits withCloudOnlyDirectoriesLimitReached(Boolean cloudOnlyDirectoriesLimitReached) {
        this. = cloudOnlyDirectoriesLimitReached;
        return this;
    }

    
Indicates if the cloud directory limit has been reached.

Returns:
Indicates if the cloud directory limit has been reached.
        return ;
    }

    
The maximum number of connected directories allowed in the region.

Constraints:
Range: 0 -

Returns:
The maximum number of connected directories allowed in the region.
        return ;
    }
    
    
The maximum number of connected directories allowed in the region.

Constraints:
Range: 0 -

Parameters:
connectedDirectoriesLimit The maximum number of connected directories allowed in the region.
    public void setConnectedDirectoriesLimit(Integer connectedDirectoriesLimit) {
        this. = connectedDirectoriesLimit;
    }
    
    
The maximum number of connected directories allowed in the region.

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

Constraints:
Range: 0 -

Parameters:
connectedDirectoriesLimit The maximum number of connected directories allowed in the region.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DirectoryLimits withConnectedDirectoriesLimit(Integer connectedDirectoriesLimit) {
        this. = connectedDirectoriesLimit;
        return this;
    }

    
The current number of connected directories in the region.

Constraints:
Range: 0 -

Returns:
The current number of connected directories in the region.
        return ;
    }
    
    
The current number of connected directories in the region.

Constraints:
Range: 0 -

Parameters:
connectedDirectoriesCurrentCount The current number of connected directories in the region.
    public void setConnectedDirectoriesCurrentCount(Integer connectedDirectoriesCurrentCount) {
        this. = connectedDirectoriesCurrentCount;
    }
    
    
The current number of connected directories in the region.

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

Constraints:
Range: 0 -

Parameters:
connectedDirectoriesCurrentCount The current number of connected directories in the region.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DirectoryLimits withConnectedDirectoriesCurrentCount(Integer connectedDirectoriesCurrentCount) {
        this. = connectedDirectoriesCurrentCount;
        return this;
    }

    
Indicates if the connected directory limit has been reached.

Returns:
Indicates if the connected directory limit has been reached.
        return ;
    }
    
    
Indicates if the connected directory limit has been reached.

Parameters:
connectedDirectoriesLimitReached Indicates if the connected directory limit has been reached.
    public void setConnectedDirectoriesLimitReached(Boolean connectedDirectoriesLimitReached) {
        this. = connectedDirectoriesLimitReached;
    }
    
    
Indicates if the connected directory limit has been reached.

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

Parameters:
connectedDirectoriesLimitReached Indicates if the connected directory limit has been reached.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DirectoryLimits withConnectedDirectoriesLimitReached(Boolean connectedDirectoriesLimitReached) {
        this. = connectedDirectoriesLimitReached;
        return this;
    }

    
Indicates if the connected directory limit has been reached.

Returns:
Indicates if the connected directory limit has been reached.
        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 (getCloudOnlyDirectoriesLimit() != nullsb.append("CloudOnlyDirectoriesLimit: " + getCloudOnlyDirectoriesLimit() + ",");
        if (getCloudOnlyDirectoriesCurrentCount() != nullsb.append("CloudOnlyDirectoriesCurrentCount: " + getCloudOnlyDirectoriesCurrentCount() + ",");
        if (isCloudOnlyDirectoriesLimitReached() != nullsb.append("CloudOnlyDirectoriesLimitReached: " + isCloudOnlyDirectoriesLimitReached() + ",");
        if (getConnectedDirectoriesLimit() != nullsb.append("ConnectedDirectoriesLimit: " + getConnectedDirectoriesLimit() + ",");
        if (getConnectedDirectoriesCurrentCount() != nullsb.append("ConnectedDirectoriesCurrentCount: " + getConnectedDirectoriesCurrentCount() + ",");
        if (isConnectedDirectoriesLimitReached() != nullsb.append("ConnectedDirectoriesLimitReached: " + isConnectedDirectoriesLimitReached() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCloudOnlyDirectoriesLimit() == null) ? 0 : getCloudOnlyDirectoriesLimit().hashCode()); 
        hashCode = prime * hashCode + ((getCloudOnlyDirectoriesCurrentCount() == null) ? 0 : getCloudOnlyDirectoriesCurrentCount().hashCode()); 
        hashCode = prime * hashCode + ((isCloudOnlyDirectoriesLimitReached() == null) ? 0 : isCloudOnlyDirectoriesLimitReached().hashCode()); 
        hashCode = prime * hashCode + ((getConnectedDirectoriesLimit() == null) ? 0 : getConnectedDirectoriesLimit().hashCode()); 
        hashCode = prime * hashCode + ((getConnectedDirectoriesCurrentCount() == null) ? 0 : getConnectedDirectoriesCurrentCount().hashCode()); 
        hashCode = prime * hashCode + ((isConnectedDirectoriesLimitReached() == null) ? 0 : isConnectedDirectoriesLimitReached().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DirectoryLimits == falsereturn false;
        DirectoryLimits other = (DirectoryLimits)obj;
        
        if (other.getCloudOnlyDirectoriesLimit() == null ^ this.getCloudOnlyDirectoriesLimit() == nullreturn false;
        if (other.getCloudOnlyDirectoriesLimit() != null && other.getCloudOnlyDirectoriesLimit().equals(this.getCloudOnlyDirectoriesLimit()) == falsereturn false
        if (other.getCloudOnlyDirectoriesCurrentCount() == null ^ this.getCloudOnlyDirectoriesCurrentCount() == nullreturn false;
        if (other.getCloudOnlyDirectoriesCurrentCount() != null && other.getCloudOnlyDirectoriesCurrentCount().equals(this.getCloudOnlyDirectoriesCurrentCount()) == falsereturn false
        if (other.isCloudOnlyDirectoriesLimitReached() == null ^ this.isCloudOnlyDirectoriesLimitReached() == nullreturn false;
        if (other.isCloudOnlyDirectoriesLimitReached() != null && other.isCloudOnlyDirectoriesLimitReached().equals(this.isCloudOnlyDirectoriesLimitReached()) == falsereturn false
        if (other.getConnectedDirectoriesLimit() == null ^ this.getConnectedDirectoriesLimit() == nullreturn false;
        if (other.getConnectedDirectoriesLimit() != null && other.getConnectedDirectoriesLimit().equals(this.getConnectedDirectoriesLimit()) == falsereturn false
        if (other.getConnectedDirectoriesCurrentCount() == null ^ this.getConnectedDirectoriesCurrentCount() == nullreturn false;
        if (other.getConnectedDirectoriesCurrentCount() != null && other.getConnectedDirectoriesCurrentCount().equals(this.getConnectedDirectoriesCurrentCount()) == falsereturn false
        if (other.isConnectedDirectoriesLimitReached() == null ^ this.isConnectedDirectoriesLimitReached() == nullreturn false;
        if (other.isConnectedDirectoriesLimitReached() != null && other.isConnectedDirectoriesLimitReached().equals(this.isConnectedDirectoriesLimitReached()) == falsereturn false
        return true;
    }
    
    @Override
    public DirectoryLimits clone() {
        try {
            return (DirectoryLimitssuper.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