io.proximax.xpx.model.UploadBytesBinaryRequestParameter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xpx-java-sdk Show documentation
Show all versions of xpx-java-sdk Show documentation
Proximax P2P File Storage Java SDK (NIS1 Compatible)
/*
* Copyright 2018 ProximaX Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License 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.
*/
/*
* Proximax P2P Storage REST API
* Proximax P2P Storage REST API
*
* OpenAPI spec version: v0.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.proximax.xpx.model;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.codec.binary.Base64;
import java.util.Objects;
/**
* UploadBytesBinaryRequestParameter.
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-04-25T23:45:59.064-04:00")
public class UploadBytesBinaryRequestParameter {
/** The content type. */
@SerializedName("contentType")
private String contentType = null;
/** The data. */
@SerializedName("data")
private byte[] data = null;
/** The keywords. */
@SerializedName("keywords")
private String keywords = null;
/** The metadata. */
@SerializedName("metadata")
private String metadata = null;
/** The name. */
@SerializedName("name")
private String name = null;
/**
* Content type.
*
* @param contentType the content type
* @return the upload bytes binary request parameter
*/
public UploadBytesBinaryRequestParameter contentType(String contentType) {
this.contentType = contentType;
return this;
}
/**
* Get contentType.
*
* @return contentType
*/
@ApiModelProperty(value = "")
public String getContentType() {
return contentType;
}
/**
* Sets the content type.
*
* @param contentType the new content type
*/
public void setContentType(String contentType) {
this.contentType = contentType;
}
/**
* Data.
*
* @param data the data
* @return the upload bytes binary request parameter
*/
public UploadBytesBinaryRequestParameter data(byte[] data) {
this.data = Base64.encodeBase64(data);
return this;
}
/**
* Get data.
*
* @return data
*/
@ApiModelProperty(value = "")
public byte[] getData() {
return data;
}
/**
* Sets the data.
*
* @param data the new data
*/
public void setData(byte[] data) {
this.data = data;
}
/**
* Keywords.
*
* @param keywords the keywords
* @return the upload bytes binary request parameter
*/
public UploadBytesBinaryRequestParameter keywords(String keywords) {
this.keywords = keywords;
return this;
}
/**
* Get keywords.
*
* @return keywords
*/
@ApiModelProperty(value = "")
public String getKeywords() {
return keywords;
}
/**
* Sets the keywords.
*
* @param keywords the new keywords
*/
public void setKeywords(String keywords) {
this.keywords = keywords;
}
/**
* Metadata.
*
* @param metadata the metadata
* @return the upload bytes binary request parameter
*/
public UploadBytesBinaryRequestParameter metadata(String metadata) {
this.metadata = metadata;
return this;
}
/**
* Get metadata.
*
* @return metadata
*/
@ApiModelProperty(value = "")
public String getMetadata() {
return metadata;
}
/**
* Sets the metadata.
*
* @param metadata the new metadata
*/
public void setMetadata(String metadata) {
this.metadata = metadata;
}
/**
* Name.
*
* @param name the name
* @return the upload bytes binary request parameter
*/
public UploadBytesBinaryRequestParameter name(String name) {
this.name = name;
return this;
}
/**
* Get name.
*
* @return name
*/
@ApiModelProperty(value = "")
public String getName() {
return name;
}
/**
* Sets the name.
*
* @param name the new name
*/
public void setName(String name) {
this.name = name;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UploadBytesBinaryRequestParameter uploadBytesBinaryRequestParameter = (UploadBytesBinaryRequestParameter) o;
return Objects.equals(this.contentType, uploadBytesBinaryRequestParameter.contentType) &&
Objects.equals(this.data, uploadBytesBinaryRequestParameter.data) &&
Objects.equals(this.keywords, uploadBytesBinaryRequestParameter.keywords) &&
Objects.equals(this.metadata, uploadBytesBinaryRequestParameter.metadata) &&
Objects.equals(this.name, uploadBytesBinaryRequestParameter.name);
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return Objects.hash(contentType, data, keywords, metadata, name);
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UploadBytesBinaryRequestParameter {\n");
sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n");
sb.append(" data: ").append(toIndentedString(data)).append("\n");
sb.append(" keywords: ").append(toIndentedString(keywords)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*
* @param o the o
* @return the string
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}