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

This object provides the latest known metered size, in bytes, of data stored in the file system, in its Value field, and the time at which that size was determined in its Timestamp field. Note that the value does not represent the size of a consistent snapshot of the file system, but it is eventually consistent when there are no writes to the file system. That is, the value will represent the actual size only if the file system is not modified for a period longer than a couple of hours. Otherwise, the value is not necessarily the exact size the file system was at any instant in time.

 
 public class FileSystemSize implements SerializableCloneable {

    
The latest known metered size, in bytes, of data stored in the file system.

Constraints:
Range: 0 -

 
     private Long value;

    
The time at which the size of data, returned in the Value field, was determined. The value is the integer number of seconds since 1970-01-01T00:00:00Z.
 
     private java.util.Date timestamp;

    
The latest known metered size, in bytes, of data stored in the file system.

Constraints:
Range: 0 -

Returns:
The latest known metered size, in bytes, of data stored in the file system.
 
     public Long getValue() {
         return ;
     }
    
    
The latest known metered size, in bytes, of data stored in the file system.

Constraints:
Range: 0 -

Parameters:
value The latest known metered size, in bytes, of data stored in the file system.
 
     public void setValue(Long value) {
         this. = value;
     }
    
    
The latest known metered size, in bytes, of data stored in the file system.

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

Constraints:
Range: 0 -

Parameters:
value The latest known metered size, in bytes, of data stored in the file system.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public FileSystemSize withValue(Long value) {
         this. = value;
         return this;
     }

    
The time at which the size of data, returned in the Value field, was determined. The value is the integer number of seconds since 1970-01-01T00:00:00Z.

Returns:
The time at which the size of data, returned in the Value field, was determined. The value is the integer number of seconds since 1970-01-01T00:00:00Z.
    public java.util.Date getTimestamp() {
        return ;
    }
    
    
The time at which the size of data, returned in the Value field, was determined. The value is the integer number of seconds since 1970-01-01T00:00:00Z.

Parameters:
timestamp The time at which the size of data, returned in the Value field, was determined. The value is the integer number of seconds since 1970-01-01T00:00:00Z.
    public void setTimestamp(java.util.Date timestamp) {
        this. = timestamp;
    }
    
    
The time at which the size of data, returned in the Value field, was determined. The value is the integer number of seconds since 1970-01-01T00:00:00Z.

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

Parameters:
timestamp The time at which the size of data, returned in the Value field, was determined. The value is the integer number of seconds since 1970-01-01T00:00:00Z.
Returns:
A reference to this updated object so that method calls can be chained together.
    public FileSystemSize withTimestamp(java.util.Date timestamp) {
        this. = timestamp;
        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 (getValue() != nullsb.append("Value: " + getValue() + ",");
        if (getTimestamp() != nullsb.append("Timestamp: " + getTimestamp() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); 
        hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof FileSystemSize == falsereturn false;
        FileSystemSize other = (FileSystemSize)obj;
        
        if (other.getValue() == null ^ this.getValue() == nullreturn false;
        if (other.getValue() != null && other.getValue().equals(this.getValue()) == falsereturn false
        if (other.getTimestamp() == null ^ this.getTimestamp() == nullreturn false;
        if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == falsereturn false
        return true;
    }
    
    @Override
    public FileSystemSize clone() {
        try {
            return (FileSystemSizesuper.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