com.paypal.sdk.models.OrdersPatchInput Maven / Gradle / Ivy
/*
* PaypalServerSDKLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package com.paypal.sdk.models;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
import java.util.List;
/**
* This is a model class for OrdersPatchInput type.
*/
public class OrdersPatchInput {
private String id;
private String contentType;
private List body;
/**
* Default constructor.
*/
public OrdersPatchInput() {
contentType = "application/json";
}
/**
* Initialization constructor.
* @param id String value for id.
* @param contentType String value for contentType.
* @param body List of Patch value for body.
*/
public OrdersPatchInput(
String id,
String contentType,
List body) {
this.id = id;
this.contentType = contentType;
this.body = body;
}
/**
* Getter for Id.
* The ID of the order to update.
* @return Returns the String
*/
@JsonGetter("id")
public String getId() {
return id;
}
/**
* Setter for Id.
* The ID of the order to update.
* @param id Value for String
*/
@JsonSetter("id")
public void setId(String id) {
this.id = id;
}
/**
* Getter for ContentType.
* @return Returns the String
*/
@JsonGetter("Content-Type")
public String getContentType() {
return contentType;
}
/**
* Setter for ContentType.
* @param contentType Value for String
*/
@JsonSetter("Content-Type")
private void setContentType(String contentType) {
this.contentType = contentType;
}
/**
* Getter for Body.
* @return Returns the List of Patch
*/
@JsonGetter("body")
@JsonInclude(JsonInclude.Include.NON_NULL)
public List getBody() {
return body;
}
/**
* Setter for Body.
* @param body Value for List of Patch
*/
@JsonSetter("body")
public void setBody(List body) {
this.body = body;
}
/**
* Converts this OrdersPatchInput into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "OrdersPatchInput [" + "id=" + id + ", contentType=" + contentType + ", body=" + body
+ "]";
}
/**
* Builds a new {@link OrdersPatchInput.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link OrdersPatchInput.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder(id, contentType)
.body(getBody());
return builder;
}
/**
* Class to build instances of {@link OrdersPatchInput}.
*/
public static class Builder {
private String id;
private String contentType = "application/json";
private List body;
/**
* Initialization constructor.
*/
public Builder() {
}
/**
* Initialization constructor.
* @param id String value for id.
* @param contentType String value for contentType.
*/
public Builder(String id, String contentType) {
this.id = id;
this.contentType = contentType;
}
/**
* Setter for id.
* @param id String value for id.
* @return Builder
*/
public Builder id(String id) {
this.id = id;
return this;
}
/**
* Setter for contentType.
* @param contentType String value for contentType.
* @return Builder
*/
public Builder contentType(String contentType) {
this.contentType = contentType;
return this;
}
/**
* Setter for body.
* @param body List of Patch value for body.
* @return Builder
*/
public Builder body(List body) {
this.body = body;
return this;
}
/**
* Builds a new {@link OrdersPatchInput} object using the set fields.
* @return {@link OrdersPatchInput}
*/
public OrdersPatchInput build() {
return new OrdersPatchInput(id, contentType, body);
}
}
}