All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dominodatalab.pub.model.ModelApiVersionLogLine Maven / Gradle / Ivy

Go to download

Domino Data Lab API Client to connect to Domino web services using Java HTTP Client.

There is a newer version: 6.0.1.0
Show newest version
/*
 * Domino Public API
 * Domino Public API Endpoints
 *
 * The version of the OpenAPI document: 0.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.pub.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.pub.model.ModelApiVersionLogTag;
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;


import com.dominodatalab.pub.invoker.ApiClient;
/**
 * ModelApiVersionLogLine
 */
@JsonPropertyOrder({
  ModelApiVersionLogLine.JSON_PROPERTY_LOG,
  ModelApiVersionLogLine.JSON_PROPERTY_STREAM_TYPE,
  ModelApiVersionLogLine.JSON_PROPERTY_TAGS,
  ModelApiVersionLogLine.JSON_PROPERTY_TIME_NANO,
  ModelApiVersionLogLine.JSON_PROPERTY_TIMESTAMP
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-04T16:37:28.765500600-04:00[America/New_York]", comments = "Generator version: 7.8.0")
public class ModelApiVersionLogLine {
  public static final String JSON_PROPERTY_LOG = "log";
  private String log;

  public static final String JSON_PROPERTY_STREAM_TYPE = "streamType";
  private String streamType;

  public static final String JSON_PROPERTY_TAGS = "tags";
  private List tags = new ArrayList<>();

  public static final String JSON_PROPERTY_TIME_NANO = "timeNano";
  private Integer timeNano;

  public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
  private Integer timestamp;

  public ModelApiVersionLogLine() { 
  }

  public ModelApiVersionLogLine log(String log) {
    this.log = log;
    return this;
  }

  /**
   * The content of the log line.
   * @return log
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_LOG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getLog() {
    return log;
  }


  @JsonProperty(JSON_PROPERTY_LOG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLog(String log) {
    this.log = log;
  }


  public ModelApiVersionLogLine streamType(String streamType) {
    this.streamType = streamType;
    return this;
  }

  /**
   * The type of stream the log line is sourced from.
   * @return streamType
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_STREAM_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getStreamType() {
    return streamType;
  }


  @JsonProperty(JSON_PROPERTY_STREAM_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStreamType(String streamType) {
    this.streamType = streamType;
  }


  public ModelApiVersionLogLine tags(List tags) {
    this.tags = tags;
    return this;
  }

  public ModelApiVersionLogLine addTagsItem(ModelApiVersionLogTag tagsItem) {
    if (this.tags == null) {
      this.tags = new ArrayList<>();
    }
    this.tags.add(tagsItem);
    return this;
  }

  /**
   * The tags of the log line.
   * @return tags
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TAGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getTags() {
    return tags;
  }


  @JsonProperty(JSON_PROPERTY_TAGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTags(List tags) {
    this.tags = tags;
  }


  public ModelApiVersionLogLine timeNano(Integer timeNano) {
    this.timeNano = timeNano;
    return this;
  }

  /**
   * The time in nanoseconds of the log line.
   * @return timeNano
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TIME_NANO)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Integer getTimeNano() {
    return timeNano;
  }


  @JsonProperty(JSON_PROPERTY_TIME_NANO)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTimeNano(Integer timeNano) {
    this.timeNano = timeNano;
  }


  public ModelApiVersionLogLine timestamp(Integer timestamp) {
    this.timestamp = timestamp;
    return this;
  }

  /**
   * The timestamp of the log line.
   * @return timestamp
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TIMESTAMP)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Integer getTimestamp() {
    return timestamp;
  }


  @JsonProperty(JSON_PROPERTY_TIMESTAMP)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTimestamp(Integer timestamp) {
    this.timestamp = timestamp;
  }


  /**
   * Return true if this ModelApiVersionLogLine object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ModelApiVersionLogLine modelApiVersionLogLine = (ModelApiVersionLogLine) o;
    return Objects.equals(this.log, modelApiVersionLogLine.log) &&
        Objects.equals(this.streamType, modelApiVersionLogLine.streamType) &&
        Objects.equals(this.tags, modelApiVersionLogLine.tags) &&
        Objects.equals(this.timeNano, modelApiVersionLogLine.timeNano) &&
        Objects.equals(this.timestamp, modelApiVersionLogLine.timestamp);
  }

  @Override
  public int hashCode() {
    return Objects.hash(log, streamType, tags, timeNano, timestamp);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ModelApiVersionLogLine {\n");
    sb.append("    log: ").append(toIndentedString(log)).append("\n");
    sb.append("    streamType: ").append(toIndentedString(streamType)).append("\n");
    sb.append("    tags: ").append(toIndentedString(tags)).append("\n");
    sb.append("    timeNano: ").append(toIndentedString(timeNano)).append("\n");
    sb.append("    timestamp: ").append(toIndentedString(timestamp)).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 `log` to the URL query string
    if (getLog() != null) {
      joiner.add(String.format("%slog%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getLog()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `streamType` to the URL query string
    if (getStreamType() != null) {
      joiner.add(String.format("%sstreamType%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getStreamType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `tags` to the URL query string
    if (getTags() != null) {
      for (int i = 0; i < getTags().size(); i++) {
        if (getTags().get(i) != null) {
          joiner.add(getTags().get(i).toUrlQueryString(String.format("%stags%s%s", prefix, suffix,
          "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
        }
      }
    }

    // add `timeNano` to the URL query string
    if (getTimeNano() != null) {
      joiner.add(String.format("%stimeNano%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getTimeNano()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `timestamp` to the URL query string
    if (getTimestamp() != null) {
      joiner.add(String.format("%stimestamp%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getTimestamp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy