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

 
 public class SnapshotLimits implements SerializableCloneable {

    
The maximum number of manual snapshots allowed.

Constraints:
Range: 0 -

 
     private Integer manualSnapshotsLimit;

    
The current number of manual snapshots of the directory.

Constraints:
Range: 0 -

 
     private Integer manualSnapshotsCurrentCount;

    
Indicates if the manual snapshot limit has been reached.
 
     private Boolean manualSnapshotsLimitReached;

    
The maximum number of manual snapshots allowed.

Constraints:
Range: 0 -

Returns:
The maximum number of manual snapshots allowed.
 
     public Integer getManualSnapshotsLimit() {
         return ;
     }
    
    
The maximum number of manual snapshots allowed.

Constraints:
Range: 0 -

Parameters:
manualSnapshotsLimit The maximum number of manual snapshots allowed.
 
     public void setManualSnapshotsLimit(Integer manualSnapshotsLimit) {
         this. = manualSnapshotsLimit;
     }
    
    
The maximum number of manual snapshots allowed.

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

Constraints:
Range: 0 -

Parameters:
manualSnapshotsLimit The maximum number of manual snapshots allowed.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SnapshotLimits withManualSnapshotsLimit(Integer manualSnapshotsLimit) {
         this. = manualSnapshotsLimit;
         return this;
     }

    
The current number of manual snapshots of the directory.

Constraints:
Range: 0 -

Returns:
The current number of manual snapshots of the directory.
 
         return ;
     }
    
    
The current number of manual snapshots of the directory.

Constraints:
Range: 0 -

Parameters:
manualSnapshotsCurrentCount The current number of manual snapshots of the directory.
    public void setManualSnapshotsCurrentCount(Integer manualSnapshotsCurrentCount) {
        this. = manualSnapshotsCurrentCount;
    }
    
    
The current number of manual snapshots of the directory.

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

Constraints:
Range: 0 -

Parameters:
manualSnapshotsCurrentCount The current number of manual snapshots of the directory.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SnapshotLimits withManualSnapshotsCurrentCount(Integer manualSnapshotsCurrentCount) {
        this. = manualSnapshotsCurrentCount;
        return this;
    }

    
Indicates if the manual snapshot limit has been reached.

Returns:
Indicates if the manual snapshot limit has been reached.
        return ;
    }
    
    
Indicates if the manual snapshot limit has been reached.

Parameters:
manualSnapshotsLimitReached Indicates if the manual snapshot limit has been reached.
    public void setManualSnapshotsLimitReached(Boolean manualSnapshotsLimitReached) {
        this. = manualSnapshotsLimitReached;
    }
    
    
Indicates if the manual snapshot limit has been reached.

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

Parameters:
manualSnapshotsLimitReached Indicates if the manual snapshot limit has been reached.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SnapshotLimits withManualSnapshotsLimitReached(Boolean manualSnapshotsLimitReached) {
        this. = manualSnapshotsLimitReached;
        return this;
    }

    
Indicates if the manual snapshot limit has been reached.

Returns:
Indicates if the manual snapshot 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 (getManualSnapshotsLimit() != nullsb.append("ManualSnapshotsLimit: " + getManualSnapshotsLimit() + ",");
        if (getManualSnapshotsCurrentCount() != nullsb.append("ManualSnapshotsCurrentCount: " + getManualSnapshotsCurrentCount() + ",");
        if (isManualSnapshotsLimitReached() != nullsb.append("ManualSnapshotsLimitReached: " + isManualSnapshotsLimitReached() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getManualSnapshotsLimit() == null) ? 0 : getManualSnapshotsLimit().hashCode()); 
        hashCode = prime * hashCode + ((getManualSnapshotsCurrentCount() == null) ? 0 : getManualSnapshotsCurrentCount().hashCode()); 
        hashCode = prime * hashCode + ((isManualSnapshotsLimitReached() == null) ? 0 : isManualSnapshotsLimitReached().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof SnapshotLimits == falsereturn false;
        SnapshotLimits other = (SnapshotLimits)obj;
        
        if (other.getManualSnapshotsLimit() == null ^ this.getManualSnapshotsLimit() == nullreturn false;
        if (other.getManualSnapshotsLimit() != null && other.getManualSnapshotsLimit().equals(this.getManualSnapshotsLimit()) == falsereturn false
        if (other.getManualSnapshotsCurrentCount() == null ^ this.getManualSnapshotsCurrentCount() == nullreturn false;
        if (other.getManualSnapshotsCurrentCount() != null && other.getManualSnapshotsCurrentCount().equals(this.getManualSnapshotsCurrentCount()) == falsereturn false
        if (other.isManualSnapshotsLimitReached() == null ^ this.isManualSnapshotsLimitReached() == nullreturn false;
        if (other.isManualSnapshotsLimitReached() != null && other.isManualSnapshotsLimitReached().equals(this.isManualSnapshotsLimitReached()) == falsereturn false
        return true;
    }
    
    @Override
    public SnapshotLimits clone() {
        try {
            return (SnapshotLimitssuper.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