com.dominodatalab.api.model.DominoQuotaWebUpdateQuotaRequest 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.DominoQuotaApiQuotaActionMetadata;
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.Arrays;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* DominoQuotaWebUpdateQuotaRequest
*/
@JsonPropertyOrder({
DominoQuotaWebUpdateQuotaRequest.JSON_PROPERTY_TARGET_ID,
DominoQuotaWebUpdateQuotaRequest.JSON_PROPERTY_QUOTA_LIMIT,
DominoQuotaWebUpdateQuotaRequest.JSON_PROPERTY_ACTION_METADATA
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoQuotaWebUpdateQuotaRequest {
public static final String JSON_PROPERTY_TARGET_ID = "targetId";
private String targetId;
public static final String JSON_PROPERTY_QUOTA_LIMIT = "quotaLimit";
private Long quotaLimit;
public static final String JSON_PROPERTY_ACTION_METADATA = "actionMetadata";
private Map actionMetadata = new HashMap<>();
public DominoQuotaWebUpdateQuotaRequest() {
}
public DominoQuotaWebUpdateQuotaRequest targetId(String targetId) {
this.targetId = targetId;
return this;
}
/**
* Id of user for quota
* @return targetId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TARGET_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTargetId() {
return targetId;
}
@JsonProperty(JSON_PROPERTY_TARGET_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTargetId(String targetId) {
this.targetId = targetId;
}
public DominoQuotaWebUpdateQuotaRequest quotaLimit(Long quotaLimit) {
this.quotaLimit = quotaLimit;
return this;
}
/**
* quota limit
* @return quotaLimit
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_QUOTA_LIMIT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getQuotaLimit() {
return quotaLimit;
}
@JsonProperty(JSON_PROPERTY_QUOTA_LIMIT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setQuotaLimit(Long quotaLimit) {
this.quotaLimit = quotaLimit;
}
public DominoQuotaWebUpdateQuotaRequest actionMetadata(Map actionMetadata) {
this.actionMetadata = actionMetadata;
return this;
}
public DominoQuotaWebUpdateQuotaRequest putActionMetadataItem(String key, DominoQuotaApiQuotaActionMetadata actionMetadataItem) {
if (this.actionMetadata == null) {
this.actionMetadata = new HashMap<>();
}
this.actionMetadata.put(key, actionMetadataItem);
return this;
}
/**
* Get actionMetadata
* @return actionMetadata
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ACTION_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map getActionMetadata() {
return actionMetadata;
}
@JsonProperty(JSON_PROPERTY_ACTION_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setActionMetadata(Map actionMetadata) {
this.actionMetadata = actionMetadata;
}
/**
* Return true if this domino.quota.web.UpdateQuotaRequest object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DominoQuotaWebUpdateQuotaRequest dominoQuotaWebUpdateQuotaRequest = (DominoQuotaWebUpdateQuotaRequest) o;
return Objects.equals(this.targetId, dominoQuotaWebUpdateQuotaRequest.targetId) &&
Objects.equals(this.quotaLimit, dominoQuotaWebUpdateQuotaRequest.quotaLimit) &&
Objects.equals(this.actionMetadata, dominoQuotaWebUpdateQuotaRequest.actionMetadata);
}
@Override
public int hashCode() {
return Objects.hash(targetId, quotaLimit, actionMetadata);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DominoQuotaWebUpdateQuotaRequest {\n");
sb.append(" targetId: ").append(toIndentedString(targetId)).append("\n");
sb.append(" quotaLimit: ").append(toIndentedString(quotaLimit)).append("\n");
sb.append(" actionMetadata: ").append(toIndentedString(actionMetadata)).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 `targetId` to the URL query string
if (getTargetId() != null) {
joiner.add(String.format("%stargetId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTargetId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `quotaLimit` to the URL query string
if (getQuotaLimit() != null) {
joiner.add(String.format("%squotaLimit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getQuotaLimit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `actionMetadata` to the URL query string
if (getActionMetadata() != null) {
for (String _key : getActionMetadata().keySet()) {
if (getActionMetadata().get(_key) != null) {
joiner.add(getActionMetadata().get(_key).toUrlQueryString(String.format("%sactionMetadata%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix))));
}
}
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy