com.dominodatalab.api.model.DominoProjectManagementApiDominoProjectToPmTicketMetadata 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.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;
/**
* DominoProjectManagementApiDominoProjectToPmTicketMetadata
*/
@JsonPropertyOrder({
DominoProjectManagementApiDominoProjectToPmTicketMetadata.JSON_PROPERTY_MAP_TYPE,
DominoProjectManagementApiDominoProjectToPmTicketMetadata.JSON_PROPERTY_TICKET_METADATA,
DominoProjectManagementApiDominoProjectToPmTicketMetadata.JSON_PROPERTY_DESCRIPTION,
DominoProjectManagementApiDominoProjectToPmTicketMetadata.JSON_PROPERTY_TITLE,
DominoProjectManagementApiDominoProjectToPmTicketMetadata.JSON_PROPERTY_UPDATED_AT,
DominoProjectManagementApiDominoProjectToPmTicketMetadata.JSON_PROPERTY_TICKET_TYPES,
DominoProjectManagementApiDominoProjectToPmTicketMetadata.JSON_PROPERTY_TICKET_STAGES
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoProjectManagementApiDominoProjectToPmTicketMetadata {
/**
* Gets or Sets mapType
*/
public enum MapTypeEnum {
DOMINOPROJECT("DominoProject"),
DOMINOGOAL("DominoGoal"),
DOMINOSTAGE("DominoStage"),
DOMINOCOMMENT("DominoComment");
private String value;
MapTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static MapTypeEnum fromValue(String value) {
for (MapTypeEnum b : MapTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_MAP_TYPE = "mapType";
private MapTypeEnum mapType;
public static final String JSON_PROPERTY_TICKET_METADATA = "ticketMetadata";
private DominoProjectManagementApiPmTicketMetadata ticketMetadata;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_TITLE = "title";
private String title;
public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt";
private Long updatedAt;
public static final String JSON_PROPERTY_TICKET_TYPES = "ticketTypes";
private List ticketTypes = new ArrayList<>();
public static final String JSON_PROPERTY_TICKET_STAGES = "ticketStages";
private List ticketStages = new ArrayList<>();
public DominoProjectManagementApiDominoProjectToPmTicketMetadata() {
}
public DominoProjectManagementApiDominoProjectToPmTicketMetadata mapType(MapTypeEnum mapType) {
this.mapType = mapType;
return this;
}
/**
* Get mapType
* @return mapType
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_MAP_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public MapTypeEnum getMapType() {
return mapType;
}
@JsonProperty(JSON_PROPERTY_MAP_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setMapType(MapTypeEnum mapType) {
this.mapType = mapType;
}
public DominoProjectManagementApiDominoProjectToPmTicketMetadata 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 DominoProjectManagementApiDominoProjectToPmTicketMetadata description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getDescription() {
return description;
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDescription(String description) {
this.description = description;
}
public DominoProjectManagementApiDominoProjectToPmTicketMetadata 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 DominoProjectManagementApiDominoProjectToPmTicketMetadata 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 DominoProjectManagementApiDominoProjectToPmTicketMetadata ticketTypes(List ticketTypes) {
this.ticketTypes = ticketTypes;
return this;
}
public DominoProjectManagementApiDominoProjectToPmTicketMetadata addTicketTypesItem(DominoProjectManagementApiPmTicketType ticketTypesItem) {
if (this.ticketTypes == null) {
this.ticketTypes = new ArrayList<>();
}
this.ticketTypes.add(ticketTypesItem);
return this;
}
/**
* Get ticketTypes
* @return ticketTypes
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TICKET_TYPES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getTicketTypes() {
return ticketTypes;
}
@JsonProperty(JSON_PROPERTY_TICKET_TYPES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTicketTypes(List ticketTypes) {
this.ticketTypes = ticketTypes;
}
public DominoProjectManagementApiDominoProjectToPmTicketMetadata ticketStages(List ticketStages) {
this.ticketStages = ticketStages;
return this;
}
public DominoProjectManagementApiDominoProjectToPmTicketMetadata addTicketStagesItem(DominoProjectManagementApiPmTicketStage ticketStagesItem) {
if (this.ticketStages == null) {
this.ticketStages = new ArrayList<>();
}
this.ticketStages.add(ticketStagesItem);
return this;
}
/**
* Get ticketStages
* @return ticketStages
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TICKET_STAGES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getTicketStages() {
return ticketStages;
}
@JsonProperty(JSON_PROPERTY_TICKET_STAGES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTicketStages(List ticketStages) {
this.ticketStages = ticketStages;
}
/**
* Return true if this domino.projectManagement.api.DominoProjectToPmTicketMetadata object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DominoProjectManagementApiDominoProjectToPmTicketMetadata dominoProjectManagementApiDominoProjectToPmTicketMetadata = (DominoProjectManagementApiDominoProjectToPmTicketMetadata) o;
return Objects.equals(this.mapType, dominoProjectManagementApiDominoProjectToPmTicketMetadata.mapType) &&
Objects.equals(this.ticketMetadata, dominoProjectManagementApiDominoProjectToPmTicketMetadata.ticketMetadata) &&
Objects.equals(this.description, dominoProjectManagementApiDominoProjectToPmTicketMetadata.description) &&
Objects.equals(this.title, dominoProjectManagementApiDominoProjectToPmTicketMetadata.title) &&
Objects.equals(this.updatedAt, dominoProjectManagementApiDominoProjectToPmTicketMetadata.updatedAt) &&
Objects.equals(this.ticketTypes, dominoProjectManagementApiDominoProjectToPmTicketMetadata.ticketTypes) &&
Objects.equals(this.ticketStages, dominoProjectManagementApiDominoProjectToPmTicketMetadata.ticketStages);
}
@Override
public int hashCode() {
return Objects.hash(mapType, ticketMetadata, description, title, updatedAt, ticketTypes, ticketStages);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DominoProjectManagementApiDominoProjectToPmTicketMetadata {\n");
sb.append(" mapType: ").append(toIndentedString(mapType)).append("\n");
sb.append(" ticketMetadata: ").append(toIndentedString(ticketMetadata)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" ticketTypes: ").append(toIndentedString(ticketTypes)).append("\n");
sb.append(" ticketStages: ").append(toIndentedString(ticketStages)).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 `mapType` to the URL query string
if (getMapType() != null) {
joiner.add(String.format("%smapType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMapType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `ticketMetadata` to the URL query string
if (getTicketMetadata() != null) {
joiner.add(getTicketMetadata().toUrlQueryString(prefix + "ticketMetadata" + suffix));
}
// 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 `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 `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 `ticketTypes` to the URL query string
if (getTicketTypes() != null) {
for (int i = 0; i < getTicketTypes().size(); i++) {
if (getTicketTypes().get(i) != null) {
joiner.add(getTicketTypes().get(i).toUrlQueryString(String.format("%sticketTypes%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `ticketStages` to the URL query string
if (getTicketStages() != null) {
for (int i = 0; i < getTicketStages().size(); i++) {
if (getTicketStages().get(i) != null) {
joiner.add(getTicketStages().get(i).toUrlQueryString(String.format("%sticketStages%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy