cl.tinet.devops.metrics.gen.bitbucket.model.Commitstatus.java Source code

Java tutorial

Introduction

Here is the source code for cl.tinet.devops.metrics.gen.bitbucket.model.Commitstatus.java

Source

/**
 * 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.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.joda.time.DateTime;

/**
 * Commitstatus
 */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-07-04T23:42:53.141-04:00")
public class Commitstatus extends Object {
    @JsonProperty("type")
    private String type = null;

    @JsonProperty("uuid")
    private String uuid = null;

    @JsonProperty("links")
    private Object links = null;

    @JsonProperty("url")
    private String url = null;

    @JsonProperty("description")
    private String description = null;

    @JsonProperty("created_on")
    private DateTime createdOn = null;

    /**
     * Provides some indication of the status of this commit
     */
    public enum StateEnum {
        SUCCESSFUL("SUCCESSFUL"),

        FAILED("FAILED"),

        INPROGRESS("INPROGRESS");

        private String value;

        StateEnum(String value) {
            this.value = value;
        }

        @Override
        public String toString() {
            return String.valueOf(value);
        }
    }

    @JsonProperty("state")
    private StateEnum state = null;

    @JsonProperty("key")
    private String key = null;

    @JsonProperty("updated_on")
    private DateTime updatedOn = null;

    @JsonProperty("name")
    private String name = null;

    public Commitstatus 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 Commitstatus uuid(String uuid) {
        this.uuid = uuid;
        return this;
    }

    /**
    * The commit status' id.
    * @return uuid
    **/
    @ApiModelProperty(example = "null", value = "The commit status' id.")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Commitstatus 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 Commitstatus url(String url) {
        this.url = url;
        return this;
    }

    /**
    * A URL linking back to the vendor or build system, for providing more information about whatever process produced this status
    * @return url
    **/
    @ApiModelProperty(example = "null", value = "A URL linking back to the vendor or build system, for providing more information about whatever process produced this status")
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Commitstatus description(String description) {
        this.description = description;
        return this;
    }

    /**
    * A description of the build (e.g. \"Unit tests in Bamboo\")
    * @return description
    **/
    @ApiModelProperty(example = "null", value = "A description of the build (e.g. \"Unit tests in Bamboo\")")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Commitstatus createdOn(DateTime createdOn) {
        this.createdOn = createdOn;
        return this;
    }

    /**
    * Get createdOn
    * @return createdOn
    **/
    @ApiModelProperty(example = "null", value = "")
    public DateTime getCreatedOn() {
        return createdOn;
    }

    public void setCreatedOn(DateTime createdOn) {
        this.createdOn = createdOn;
    }

    public Commitstatus state(StateEnum state) {
        this.state = state;
        return this;
    }

    /**
    * Provides some indication of the status of this commit
    * @return state
    **/
    @ApiModelProperty(example = "null", value = "Provides some indication of the status of this commit")
    public StateEnum getState() {
        return state;
    }

    public void setState(StateEnum state) {
        this.state = state;
    }

    public Commitstatus key(String key) {
        this.key = key;
        return this;
    }

    /**
    * An identifier for the status that's unique to         its type (current \"build\" is the only supported type) and the vendor,         e.g. BB-DEPLOY
    * @return key
    **/
    @ApiModelProperty(example = "null", value = "An identifier for the status that's unique to         its type (current \"build\" is the only supported type) and the vendor,         e.g. BB-DEPLOY")
    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Commitstatus updatedOn(DateTime updatedOn) {
        this.updatedOn = updatedOn;
        return this;
    }

    /**
    * Get updatedOn
    * @return updatedOn
    **/
    @ApiModelProperty(example = "null", value = "")
    public DateTime getUpdatedOn() {
        return updatedOn;
    }

    public void setUpdatedOn(DateTime updatedOn) {
        this.updatedOn = updatedOn;
    }

    public Commitstatus name(String name) {
        this.name = name;
        return this;
    }

    /**
    * An identifier for the build itself, e.g. BB-DEPLOY-1
    * @return name
    **/
    @ApiModelProperty(example = "null", value = "An identifier for the build itself, e.g. BB-DEPLOY-1")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Commitstatus commitstatus = (Commitstatus) o;
        return Objects.equals(this.type, commitstatus.type) && Objects.equals(this.uuid, commitstatus.uuid)
                && Objects.equals(this.links, commitstatus.links) && Objects.equals(this.url, commitstatus.url)
                && Objects.equals(this.description, commitstatus.description)
                && Objects.equals(this.createdOn, commitstatus.createdOn)
                && Objects.equals(this.state, commitstatus.state) && Objects.equals(this.key, commitstatus.key)
                && Objects.equals(this.updatedOn, commitstatus.updatedOn)
                && Objects.equals(this.name, commitstatus.name) && super.equals(o);
    }

    @Override
    public int hashCode() {
        return Objects.hash(type, uuid, links, url, description, createdOn, state, key, updatedOn, name,
                super.hashCode());
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class Commitstatus {\n");
        sb.append("    ").append(toIndentedString(super.toString())).append("\n");
        sb.append("    type: ").append(toIndentedString(type)).append("\n");
        sb.append("    uuid: ").append(toIndentedString(uuid)).append("\n");
        sb.append("    links: ").append(toIndentedString(links)).append("\n");
        sb.append("    url: ").append(toIndentedString(url)).append("\n");
        sb.append("    description: ").append(toIndentedString(description)).append("\n");
        sb.append("    createdOn: ").append(toIndentedString(createdOn)).append("\n");
        sb.append("    state: ").append(toIndentedString(state)).append("\n");
        sb.append("    key: ").append(toIndentedString(key)).append("\n");
        sb.append("    updatedOn: ").append(toIndentedString(updatedOn)).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).
     */
    private String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }
}