Java tutorial
/** * Bitbucket API * Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework. * * OpenAPI spec version: 2.0 * Contact: support@bitbucket.org * * 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. * * 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. */ package cl.tinet.devops.metrics.gen.bitbucket.model; import java.util.Date; import java.util.Objects; import cl.tinet.devops.metrics.gen.bitbucket.model.Account; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Pullrequest */ @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-07-04T23:42:53.141-04:00") public class Pullrequest extends Object { @JsonProperty("type") private String type = null; /** * Gets or Sets state */ public enum StateEnum { MERGED("MERGED"), SUPERSEDED("SUPERSEDED"), OPEN("OPEN"), DECLINED("DECLINED"); private String value; StateEnum(String value) { this.value = value; } @Override public String toString() { return String.valueOf(value); } } @JsonProperty("state") private StateEnum state = null; @JsonProperty("author") private Account author = null; @JsonProperty("id") private Integer id = null; @JsonProperty("links") private Object links = null; @JsonProperty("title") private String title = null; @JsonProperty("source") private PullrequestParticipant source; @JsonProperty("destination") private PullrequestParticipant destination; @JsonProperty("created_on") private String createdOn; public Pullrequest type(String type) { this.type = type; return this; } /** * Get type * @return type **/ @ApiModelProperty(example = "null", required = true, value = "") public String getType() { return type; } public void setType(String type) { this.type = type; } public Pullrequest state(StateEnum state) { this.state = state; return this; } /** * Get state * @return state **/ @ApiModelProperty(example = "null", value = "") public StateEnum getState() { return state; } public void setState(StateEnum state) { this.state = state; } public Pullrequest author(Account author) { this.author = author; return this; } /** * Get author * @return author **/ @ApiModelProperty(example = "null", value = "") public Account getAuthor() { return author; } public void setAuthor(Account author) { this.author = author; } public Pullrequest id(Integer id) { this.id = id; return this; } /** * Get id * @return id **/ @ApiModelProperty(example = "null", value = "") public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Pullrequest links(Object links) { this.links = links; return this; } /** * Get links * @return links **/ @ApiModelProperty(example = "null", value = "") public Object getLinks() { return links; } public void setLinks(Object links) { this.links = links; } public Pullrequest title(String title) { this.title = title; return this; } /** * Get title * @return title **/ @ApiModelProperty(example = "null", value = "") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public PullrequestParticipant getSource() { return source; } public void setSource(PullrequestParticipant source) { this.source = source; } public Pullrequest source(PullrequestParticipant src) { setSource(src); return this; } public PullrequestParticipant getDestination() { return destination; } public void setDestination(PullrequestParticipant destination) { this.destination = destination; } public Pullrequest destination(PullrequestParticipant dest) { setDestination(dest); return this; } public String getCreatedOn() { return createdOn; } public void setCreatedOn(String createdOn) { this.createdOn = createdOn; } public Pullrequest createdOn(String createdOn) { setCreatedOn(createdOn); return this; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Pullrequest pullrequest = (Pullrequest) o; return Objects.equals(this.type, pullrequest.type) && Objects.equals(this.state, pullrequest.state) && Objects.equals(this.author, pullrequest.author) && Objects.equals(this.id, pullrequest.id) && Objects.equals(this.links, pullrequest.links) && Objects.equals(this.title, pullrequest.title) && super.equals(o); } @Override public int hashCode() { return Objects.hash(type, state, author, id, links, title, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pullrequest {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" author: ").append(toIndentedString(author)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" links: ").append(toIndentedString(links)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" source: ").append(toIndentedString(source)).append("\n"); sb.append(" destination: ").append(toIndentedString(destination)).append("\n"); sb.append(" createdOn: ").append(toIndentedString(createdOn)).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 "); } }