com.aylien.newsapi.models.Media Maven / Gradle / Ivy
/*
* AYLIEN News API
* The AYLIEN News API is the most powerful way of sourcing, searching and syndicating analyzed and enriched news content. It is accessed by sending HTTP requests to our server, which returns information to your client.
*
* The version of the OpenAPI document: 3.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.aylien.newsapi.models;
import java.util.Objects;
import java.util.Arrays;
import com.aylien.newsapi.models.MediaFormat;
import com.aylien.newsapi.models.MediaType;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Media
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-01-09T15:04:35.817Z[Europe/Dublin]")
public class Media {
public static final String SERIALIZED_NAME_CONTENT_LENGTH = "content_length";
@SerializedName(SERIALIZED_NAME_CONTENT_LENGTH)
private Integer contentLength;
public static final String SERIALIZED_NAME_FORMAT = "format";
@SerializedName(SERIALIZED_NAME_FORMAT)
private MediaFormat format;
public static final String SERIALIZED_NAME_HEIGHT = "height";
@SerializedName(SERIALIZED_NAME_HEIGHT)
private Integer height;
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private MediaType type;
public static final String SERIALIZED_NAME_URL = "url";
@SerializedName(SERIALIZED_NAME_URL)
private String url;
public static final String SERIALIZED_NAME_WIDTH = "width";
@SerializedName(SERIALIZED_NAME_WIDTH)
private Integer width;
public Media contentLength(Integer contentLength) {
this.contentLength = contentLength;
return this;
}
/**
* The content length of media
* @return contentLength
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The content length of media")
public Integer getContentLength() {
return contentLength;
}
public void setContentLength(Integer contentLength) {
this.contentLength = contentLength;
}
public Media format(MediaFormat format) {
this.format = format;
return this;
}
/**
* Get format
* @return format
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public MediaFormat getFormat() {
return format;
}
public void setFormat(MediaFormat format) {
this.format = format;
}
public Media height(Integer height) {
this.height = height;
return this;
}
/**
* The height of media
* @return height
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The height of media")
public Integer getHeight() {
return height;
}
public void setHeight(Integer height) {
this.height = height;
}
public Media type(MediaType type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public MediaType getType() {
return type;
}
public void setType(MediaType type) {
this.type = type;
}
public Media url(String url) {
this.url = url;
return this;
}
/**
* A URL which points to the media file
* @return url
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "A URL which points to the media file")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Media width(Integer width) {
this.width = width;
return this;
}
/**
* The width of media
* @return width
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The width of media")
public Integer getWidth() {
return width;
}
public void setWidth(Integer width) {
this.width = width;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Media media = (Media) o;
return Objects.equals(this.contentLength, media.contentLength) &&
Objects.equals(this.format, media.format) &&
Objects.equals(this.height, media.height) &&
Objects.equals(this.type, media.type) &&
Objects.equals(this.url, media.url) &&
Objects.equals(this.width, media.width);
}
@Override
public int hashCode() {
return Objects.hash(contentLength, format, height, type, url, width);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Media {\n");
sb.append(" contentLength: ").append(toIndentedString(contentLength)).append("\n");
sb.append(" format: ").append(toIndentedString(format)).append("\n");
sb.append(" height: ").append(toIndentedString(height)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append(" width: ").append(toIndentedString(width)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy