org.projectodd.openwhisk.model.PackagePut Maven / Gradle / Ivy
/*
* OpenWhisk REST API
* API for OpenWhisk
*
* OpenAPI spec version: 0.1.0
*
*
* 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 org.projectodd.openwhisk.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.projectodd.openwhisk.model.KeyValue;
import org.projectodd.openwhisk.model.PackageBinding;
/**
* A restricted Package view that elides properties that are auto-assigned or derived from the URI (i.e., the namespace and name).
*/
@ApiModel(description = "A restricted Package view that elides properties that are auto-assigned or derived from the URI (i.e., the namespace and name).")
public class PackagePut {
@JsonProperty("version")
private String version = null;
@JsonProperty("publish")
private Boolean publish = null;
@JsonProperty("annotations")
private List annotations = null;
@JsonProperty("parameters")
private List parameters = null;
@JsonProperty("binding")
private PackageBinding binding = null;
public PackagePut version(String version) {
this.version = version;
return this;
}
/**
* Semantic version of the item
* @return version
**/
@ApiModelProperty(value = "Semantic version of the item")
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public PackagePut publish(Boolean publish) {
this.publish = publish;
return this;
}
/**
* Whether to publish the item or not
* @return publish
**/
@ApiModelProperty(value = "Whether to publish the item or not")
public Boolean isPublish() {
return publish;
}
public void setPublish(Boolean publish) {
this.publish = publish;
}
public PackagePut annotations(List annotations) {
this.annotations = annotations;
return this;
}
public PackagePut addAnnotationsItem(KeyValue annotationsItem) {
if (this.annotations == null) {
this.annotations = new ArrayList<>();
}
this.annotations.add(annotationsItem);
return this;
}
/**
* annotations on the item
* @return annotations
**/
@ApiModelProperty(value = "annotations on the item")
public List getAnnotations() {
return annotations;
}
public void setAnnotations(List annotations) {
this.annotations = annotations;
}
public PackagePut parameters(List parameters) {
this.parameters = parameters;
return this;
}
public PackagePut addParametersItem(KeyValue parametersItem) {
if (this.parameters == null) {
this.parameters = new ArrayList<>();
}
this.parameters.add(parametersItem);
return this;
}
/**
* parameter for the package
* @return parameters
**/
@ApiModelProperty(value = "parameter for the package")
public List getParameters() {
return parameters;
}
public void setParameters(List parameters) {
this.parameters = parameters;
}
public PackagePut binding(PackageBinding binding) {
this.binding = binding;
return this;
}
/**
* Get binding
* @return binding
**/
@ApiModelProperty(value = "")
public PackageBinding getBinding() {
return binding;
}
public void setBinding(PackageBinding binding) {
this.binding = binding;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PackagePut packagePut = (PackagePut) o;
return Objects.equals(this.version, packagePut.version) &&
Objects.equals(this.publish, packagePut.publish) &&
Objects.equals(this.annotations, packagePut.annotations) &&
Objects.equals(this.parameters, packagePut.parameters) &&
Objects.equals(this.binding, packagePut.binding);
}
@Override
public int hashCode() {
return Objects.hash(version, publish, annotations, parameters, binding);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PackagePut {\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" publish: ").append(toIndentedString(publish)).append("\n");
sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n");
sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n");
sb.append(" binding: ").append(toIndentedString(binding)).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 ");
}
}