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

The detected properties of the input file. Elastic Transcoder identifies these values from the input file.

 
 public class DetectedProperties implements SerializableCloneable {

    
The detected width of the input file, in pixels.
 
     private Integer width;

    
The detected height of the input file, in pixels.
 
     private Integer height;

    
The detected frame rate of the input file, in frames per second.

Constraints:
Pattern: ^\d{1,5}(\.\d{0,5})?$

 
     private String frameRate;

    
The detected file size of the input file, in bytes.
 
     private Long fileSize;

    
The detected duration of the input file, in milliseconds.
 
     private Long durationMillis;

    
The detected width of the input file, in pixels.

Returns:
The detected width of the input file, in pixels.
 
     public Integer getWidth() {
         return ;
     }
    
    
The detected width of the input file, in pixels.

Parameters:
width The detected width of the input file, in pixels.
 
     public void setWidth(Integer width) {
         this. = width;
     }
    
    
The detected width of the input file, in pixels.

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

Parameters:
width The detected width of the input file, in pixels.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DetectedProperties withWidth(Integer width) {
         this. = width;
         return this;
     }

    
The detected height of the input file, in pixels.

Returns:
The detected height of the input file, in pixels.
 
     public Integer getHeight() {
         return ;
     }
    
    
The detected height of the input file, in pixels.

Parameters:
height The detected height of the input file, in pixels.
    public void setHeight(Integer height) {
        this. = height;
    }
    
    
The detected height of the input file, in pixels.

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

Parameters:
height The detected height of the input file, in pixels.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DetectedProperties withHeight(Integer height) {
        this. = height;
        return this;
    }

    
The detected frame rate of the input file, in frames per second.

Constraints:
Pattern: ^\d{1,5}(\.\d{0,5})?$

Returns:
The detected frame rate of the input file, in frames per second.
    public String getFrameRate() {
        return ;
    }
    
    
The detected frame rate of the input file, in frames per second.

Constraints:
Pattern: ^\d{1,5}(\.\d{0,5})?$

Parameters:
frameRate The detected frame rate of the input file, in frames per second.
    public void setFrameRate(String frameRate) {
        this. = frameRate;
    }
    
    
The detected frame rate of the input file, in frames per second.

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

Constraints:
Pattern: ^\d{1,5}(\.\d{0,5})?$

Parameters:
frameRate The detected frame rate of the input file, in frames per second.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DetectedProperties withFrameRate(String frameRate) {
        this. = frameRate;
        return this;
    }

    
The detected file size of the input file, in bytes.

Returns:
The detected file size of the input file, in bytes.
    public Long getFileSize() {
        return ;
    }
    
    
The detected file size of the input file, in bytes.

Parameters:
fileSize The detected file size of the input file, in bytes.
    public void setFileSize(Long fileSize) {
        this. = fileSize;
    }
    
    
The detected file size of the input file, in bytes.

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

Parameters:
fileSize The detected file size of the input file, in bytes.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DetectedProperties withFileSize(Long fileSize) {
        this. = fileSize;
        return this;
    }

    
The detected duration of the input file, in milliseconds.

Returns:
The detected duration of the input file, in milliseconds.
    public Long getDurationMillis() {
        return ;
    }
    
    
The detected duration of the input file, in milliseconds.

Parameters:
durationMillis The detected duration of the input file, in milliseconds.
    public void setDurationMillis(Long durationMillis) {
        this. = durationMillis;
    }
    
    
The detected duration of the input file, in milliseconds.

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

Parameters:
durationMillis The detected duration of the input file, in milliseconds.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DetectedProperties withDurationMillis(Long durationMillis) {
        this. = durationMillis;
        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 (getWidth() != nullsb.append("Width: " + getWidth() + ",");
        if (getHeight() != nullsb.append("Height: " + getHeight() + ",");
        if (getFrameRate() != nullsb.append("FrameRate: " + getFrameRate() + ",");
        if (getFileSize() != nullsb.append("FileSize: " + getFileSize() + ",");
        if (getDurationMillis() != nullsb.append("DurationMillis: " + getDurationMillis() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getWidth() == null) ? 0 : getWidth().hashCode()); 
        hashCode = prime * hashCode + ((getHeight() == null) ? 0 : getHeight().hashCode()); 
        hashCode = prime * hashCode + ((getFrameRate() == null) ? 0 : getFrameRate().hashCode()); 
        hashCode = prime * hashCode + ((getFileSize() == null) ? 0 : getFileSize().hashCode()); 
        hashCode = prime * hashCode + ((getDurationMillis() == null) ? 0 : getDurationMillis().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DetectedProperties == falsereturn false;
        DetectedProperties other = (DetectedProperties)obj;
        
        if (other.getWidth() == null ^ this.getWidth() == nullreturn false;
        if (other.getWidth() != null && other.getWidth().equals(this.getWidth()) == falsereturn false
        if (other.getHeight() == null ^ this.getHeight() == nullreturn false;
        if (other.getHeight() != null && other.getHeight().equals(this.getHeight()) == falsereturn false
        if (other.getFrameRate() == null ^ this.getFrameRate() == nullreturn false;
        if (other.getFrameRate() != null && other.getFrameRate().equals(this.getFrameRate()) == falsereturn false
        if (other.getFileSize() == null ^ this.getFileSize() == nullreturn false;
        if (other.getFileSize() != null && other.getFileSize().equals(this.getFileSize()) == falsereturn false
        if (other.getDurationMillis() == null ^ this.getDurationMillis() == nullreturn false;
        if (other.getDurationMillis() != null && other.getDurationMillis().equals(this.getDurationMillis()) == falsereturn false
        return true;
    }
    
    @Override
    public DetectedProperties clone() {
        try {
            return (DetectedPropertiessuper.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