com.dominodatalab.api.model.DominoProjectManagementApiDominoGoalToPmSubTicketMetadata 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.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;
/**
* DominoProjectManagementApiDominoGoalToPmSubTicketMetadata
*/
@JsonPropertyOrder({
DominoProjectManagementApiDominoGoalToPmSubTicketMetadata.JSON_PROPERTY_MAP_TYPE,
DominoProjectManagementApiDominoGoalToPmSubTicketMetadata.JSON_PROPERTY_DOMINO_PROJECT_ID,
DominoProjectManagementApiDominoGoalToPmSubTicketMetadata.JSON_PROPERTY_UPDATED_AT,
DominoProjectManagementApiDominoGoalToPmSubTicketMetadata.JSON_PROPERTY_TICKET_METADATA,
DominoProjectManagementApiDominoGoalToPmSubTicketMetadata.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 DominoProjectManagementApiDominoGoalToPmSubTicketMetadata {
/**
* 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_DOMINO_PROJECT_ID = "dominoProjectId";
private String dominoProjectId;
public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt";
private Long updatedAt;
public static final String JSON_PROPERTY_TICKET_METADATA = "ticketMetadata";
private DominoProjectManagementApiPmTicketMetadata ticketMetadata;
public static final String JSON_PROPERTY_TICKET_STAGES = "ticketStages";
private List ticketStages = new ArrayList<>();
public DominoProjectManagementApiDominoGoalToPmSubTicketMetadata() {
}
public DominoProjectManagementApiDominoGoalToPmSubTicketMetadata 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 DominoProjectManagementApiDominoGoalToPmSubTicketMetadata dominoProjectId(String dominoProjectId) {
this.dominoProjectId = dominoProjectId;
return this;
}
/**
* Get dominoProjectId
* @return dominoProjectId
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DOMINO_PROJECT_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getDominoProjectId() {
return dominoProjectId;
}
@JsonProperty(JSON_PROPERTY_DOMINO_PROJECT_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDominoProjectId(String dominoProjectId) {
this.dominoProjectId = dominoProjectId;
}
public DominoProjectManagementApiDominoGoalToPmSubTicketMetadata 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 DominoProjectManagementApiDominoGoalToPmSubTicketMetadata 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 DominoProjectManagementApiDominoGoalToPmSubTicketMetadata ticketStages(List ticketStages) {
this.ticketStages = ticketStages;
return this;
}
public DominoProjectManagementApiDominoGoalToPmSubTicketMetadata 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.DominoGoalToPmSubTicketMetadata object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DominoProjectManagementApiDominoGoalToPmSubTicketMetadata dominoProjectManagementApiDominoGoalToPmSubTicketMetadata = (DominoProjectManagementApiDominoGoalToPmSubTicketMetadata) o;
return Objects.equals(this.mapType, dominoProjectManagementApiDominoGoalToPmSubTicketMetadata.mapType) &&
Objects.equals(this.dominoProjectId, dominoProjectManagementApiDominoGoalToPmSubTicketMetadata.dominoProjectId) &&
Objects.equals(this.updatedAt, dominoProjectManagementApiDominoGoalToPmSubTicketMetadata.updatedAt) &&
Objects.equals(this.ticketMetadata, dominoProjectManagementApiDominoGoalToPmSubTicketMetadata.ticketMetadata) &&
Objects.equals(this.ticketStages, dominoProjectManagementApiDominoGoalToPmSubTicketMetadata.ticketStages);
}
@Override
public int hashCode() {
return Objects.hash(mapType, dominoProjectId, updatedAt, ticketMetadata, ticketStages);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DominoProjectManagementApiDominoGoalToPmSubTicketMetadata {\n");
sb.append(" mapType: ").append(toIndentedString(mapType)).append("\n");
sb.append(" dominoProjectId: ").append(toIndentedString(dominoProjectId)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" ticketMetadata: ").append(toIndentedString(ticketMetadata)).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 `dominoProjectId` to the URL query string
if (getDominoProjectId() != null) {
joiner.add(String.format("%sdominoProjectId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDominoProjectId()), 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 `ticketMetadata` to the URL query string
if (getTicketMetadata() != null) {
joiner.add(getTicketMetadata().toUrlQueryString(prefix + "ticketMetadata" + suffix));
}
// 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