com.dominodatalab.api.model.DominoProjectManagementApiPmTicket Maven / Gradle / Ivy
/*
* Domino Data Lab API v4
* This API is going to provide access to all the Domino functions available in the user interface. To authenticate your requests, include your API Key (which you can find on your account page) with the header X-Domino-Api-Key.
*
* The version of the OpenAPI document: 4.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.dominodatalab.api.model;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.dominodatalab.api.model.DominoProjectManagementApiPmComment;
import com.dominodatalab.api.model.DominoProjectManagementApiPmId;
import com.dominodatalab.api.model.DominoProjectManagementApiPmTicketMetadata;
import com.dominodatalab.api.model.DominoProjectManagementApiPmTicketStage;
import com.dominodatalab.api.model.DominoProjectManagementApiPmTicketType;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* DominoProjectManagementApiPmTicket
*/
@JsonPropertyOrder({
DominoProjectManagementApiPmTicket.JSON_PROPERTY_ID,
DominoProjectManagementApiPmTicket.JSON_PROPERTY_TICKET_TYPE,
DominoProjectManagementApiPmTicket.JSON_PROPERTY_STAGE,
DominoProjectManagementApiPmTicket.JSON_PROPERTY_TITLE,
DominoProjectManagementApiPmTicket.JSON_PROPERTY_DESCRIPTION,
DominoProjectManagementApiPmTicket.JSON_PROPERTY_COMMENTS,
DominoProjectManagementApiPmTicket.JSON_PROPERTY_TICKET_METADATA,
DominoProjectManagementApiPmTicket.JSON_PROPERTY_UPDATED_AT,
DominoProjectManagementApiPmTicket.JSON_PROPERTY_SUB_TICKETS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoProjectManagementApiPmTicket {
public static final String JSON_PROPERTY_ID = "id";
private DominoProjectManagementApiPmId id;
public static final String JSON_PROPERTY_TICKET_TYPE = "ticketType";
private DominoProjectManagementApiPmTicketType ticketType;
public static final String JSON_PROPERTY_STAGE = "stage";
private DominoProjectManagementApiPmTicketStage stage;
public static final String JSON_PROPERTY_TITLE = "title";
private String title;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_COMMENTS = "comments";
private List comments = new ArrayList<>();
public static final String JSON_PROPERTY_TICKET_METADATA = "ticketMetadata";
private DominoProjectManagementApiPmTicketMetadata ticketMetadata;
public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt";
private Long updatedAt;
public static final String JSON_PROPERTY_SUB_TICKETS = "subTickets";
private List subTickets = new ArrayList<>();
public DominoProjectManagementApiPmTicket() {
}
public DominoProjectManagementApiPmTicket id(DominoProjectManagementApiPmId id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public DominoProjectManagementApiPmId getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setId(DominoProjectManagementApiPmId id) {
this.id = id;
}
public DominoProjectManagementApiPmTicket ticketType(DominoProjectManagementApiPmTicketType ticketType) {
this.ticketType = ticketType;
return this;
}
/**
* Get ticketType
* @return ticketType
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TICKET_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public DominoProjectManagementApiPmTicketType getTicketType() {
return ticketType;
}
@JsonProperty(JSON_PROPERTY_TICKET_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTicketType(DominoProjectManagementApiPmTicketType ticketType) {
this.ticketType = ticketType;
}
public DominoProjectManagementApiPmTicket stage(DominoProjectManagementApiPmTicketStage stage) {
this.stage = stage;
return this;
}
/**
* Get stage
* @return stage
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_STAGE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public DominoProjectManagementApiPmTicketStage getStage() {
return stage;
}
@JsonProperty(JSON_PROPERTY_STAGE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setStage(DominoProjectManagementApiPmTicketStage stage) {
this.stage = stage;
}
public DominoProjectManagementApiPmTicket title(String title) {
this.title = title;
return this;
}
/**
* Get title
* @return title
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTitle() {
return title;
}
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTitle(String title) {
this.title = title;
}
public DominoProjectManagementApiPmTicket description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDescription() {
return description;
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
}
public DominoProjectManagementApiPmTicket comments(List comments) {
this.comments = comments;
return this;
}
public DominoProjectManagementApiPmTicket addCommentsItem(DominoProjectManagementApiPmComment commentsItem) {
if (this.comments == null) {
this.comments = new ArrayList<>();
}
this.comments.add(commentsItem);
return this;
}
/**
* Get comments
* @return comments
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_COMMENTS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getComments() {
return comments;
}
@JsonProperty(JSON_PROPERTY_COMMENTS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setComments(List comments) {
this.comments = comments;
}
public DominoProjectManagementApiPmTicket ticketMetadata(DominoProjectManagementApiPmTicketMetadata ticketMetadata) {
this.ticketMetadata = ticketMetadata;
return this;
}
/**
* Get ticketMetadata
* @return ticketMetadata
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TICKET_METADATA)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public DominoProjectManagementApiPmTicketMetadata getTicketMetadata() {
return ticketMetadata;
}
@JsonProperty(JSON_PROPERTY_TICKET_METADATA)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTicketMetadata(DominoProjectManagementApiPmTicketMetadata ticketMetadata) {
this.ticketMetadata = ticketMetadata;
}
public DominoProjectManagementApiPmTicket updatedAt(Long updatedAt) {
this.updatedAt = updatedAt;
return this;
}
/**
* Get updatedAt
* @return updatedAt
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_UPDATED_AT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Long getUpdatedAt() {
return updatedAt;
}
@JsonProperty(JSON_PROPERTY_UPDATED_AT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setUpdatedAt(Long updatedAt) {
this.updatedAt = updatedAt;
}
public DominoProjectManagementApiPmTicket subTickets(List subTickets) {
this.subTickets = subTickets;
return this;
}
public DominoProjectManagementApiPmTicket addSubTicketsItem(DominoProjectManagementApiPmTicket subTicketsItem) {
if (this.subTickets == null) {
this.subTickets = new ArrayList<>();
}
this.subTickets.add(subTicketsItem);
return this;
}
/**
* Get subTickets
* @return subTickets
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_SUB_TICKETS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getSubTickets() {
return subTickets;
}
@JsonProperty(JSON_PROPERTY_SUB_TICKETS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setSubTickets(List subTickets) {
this.subTickets = subTickets;
}
/**
* Return true if this domino.projectManagement.api.PmTicket object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DominoProjectManagementApiPmTicket dominoProjectManagementApiPmTicket = (DominoProjectManagementApiPmTicket) o;
return Objects.equals(this.id, dominoProjectManagementApiPmTicket.id) &&
Objects.equals(this.ticketType, dominoProjectManagementApiPmTicket.ticketType) &&
Objects.equals(this.stage, dominoProjectManagementApiPmTicket.stage) &&
Objects.equals(this.title, dominoProjectManagementApiPmTicket.title) &&
Objects.equals(this.description, dominoProjectManagementApiPmTicket.description) &&
Objects.equals(this.comments, dominoProjectManagementApiPmTicket.comments) &&
Objects.equals(this.ticketMetadata, dominoProjectManagementApiPmTicket.ticketMetadata) &&
Objects.equals(this.updatedAt, dominoProjectManagementApiPmTicket.updatedAt) &&
Objects.equals(this.subTickets, dominoProjectManagementApiPmTicket.subTickets);
}
@Override
public int hashCode() {
return Objects.hash(id, ticketType, stage, title, description, comments, ticketMetadata, updatedAt, subTickets);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DominoProjectManagementApiPmTicket {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" ticketType: ").append(toIndentedString(ticketType)).append("\n");
sb.append(" stage: ").append(toIndentedString(stage)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" comments: ").append(toIndentedString(comments)).append("\n");
sb.append(" ticketMetadata: ").append(toIndentedString(ticketMetadata)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" subTickets: ").append(toIndentedString(subTickets)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Convert the instance into URL query string.
*
* @return URL query string
*/
public String toUrlQueryString() {
return toUrlQueryString(null);
}
/**
* Convert the instance into URL query string.
*
* @param prefix prefix of the query string
* @return URL query string
*/
public String toUrlQueryString(String prefix) {
String suffix = "";
String containerSuffix = "";
String containerPrefix = "";
if (prefix == null) {
// style=form, explode=true, e.g. /pet?name=cat&type=manx
prefix = "";
} else {
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
prefix = prefix + "[";
suffix = "]";
containerSuffix = "]";
containerPrefix = "[";
}
StringJoiner joiner = new StringJoiner("&");
// add `id` to the URL query string
if (getId() != null) {
joiner.add(getId().toUrlQueryString(prefix + "id" + suffix));
}
// add `ticketType` to the URL query string
if (getTicketType() != null) {
joiner.add(getTicketType().toUrlQueryString(prefix + "ticketType" + suffix));
}
// add `stage` to the URL query string
if (getStage() != null) {
joiner.add(getStage().toUrlQueryString(prefix + "stage" + suffix));
}
// add `title` to the URL query string
if (getTitle() != null) {
joiner.add(String.format("%stitle%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTitle()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `description` to the URL query string
if (getDescription() != null) {
joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `comments` to the URL query string
if (getComments() != null) {
for (int i = 0; i < getComments().size(); i++) {
if (getComments().get(i) != null) {
joiner.add(getComments().get(i).toUrlQueryString(String.format("%scomments%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `ticketMetadata` to the URL query string
if (getTicketMetadata() != null) {
joiner.add(getTicketMetadata().toUrlQueryString(prefix + "ticketMetadata" + suffix));
}
// add `updatedAt` to the URL query string
if (getUpdatedAt() != null) {
joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `subTickets` to the URL query string
if (getSubTickets() != null) {
for (int i = 0; i < getSubTickets().size(); i++) {
if (getSubTickets().get(i) != null) {
joiner.add(getSubTickets().get(i).toUrlQueryString(String.format("%ssubTickets%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy