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

com.blazebit.query.connector.kandji.model.GetLibraryItemStatuses200Response Maven / Gradle / Ivy

The newest version!
/*
 * Kandji API
 * # Welcome to the Kandji API Documentation  You can find your API URL in Settings > Access. The API URL will follow the below formats.  - US - `https://SubDomain.api.kandji.io` - EU - `https://SubDomain.api.eu.kandji.io`  For information on how to obtain an API token, please refer to the following support article.  [https://support.kandji.io/api](https://support.kandji.io/api)  #### Rate Limit  The Kandji API currently has an API rate limit of 10,000 requests per hour per customer.  #### Request Methods  HTTP request methods supported by the Kandji API.  | Method | Definition | | --- | --- | | GET | The `GET` method requests a representation of the specified resource. | | POST | The `POST` method submits an entity to the specified resource. | | PATCH | The `PATCH` method applies partial modifications to a resource. | | DELETE | The `DELETE` method deletes the specified resource. |  #### Response codes  Not all response codes apply to every endpoint.  | Code | Response | | --- | --- | | 200 | OK | | 201 | Created | | 204 | No content | |  | Typical response when sending the DELETE method. | | 400 | Bad Request | |  | \"Command already running\" - The command may already be running in a _Pending_ state waiting on the device. | |  | \"Command is not allowed for current device\" - The command may not be compatible with the target device. | |  | \"JSON parse error - Expecting ',' delimiter: line 3 column 2 (char 65)\" | | 401 | Unauthorized | |  | This error can occur if the token is incorrect, was revoked, or the token has expired. | | 403 | Forbidden | |  | The request was understood but cannot be authorized. | | 404 | Not found | |  | Unable to locate the resource in the Kandji tenant. | | 415 | Unsupported Media Type | |  | The request contains a media type which the server or resource does not support. | | 500 | Internal server error | | 503 | Service unavailable | |  | This error can occur if a file upload is still being processed via the custom apps API. |  #### Data structure  The API returns all structured responses in JSON schema format.  #### Examples  Code examples using the API can be found in the Kandji support [GitHub](https://github.com/kandji-inc/support/tree/main/api-tools).
 *
 * The version of the OpenAPI document: 1.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.blazebit.query.connector.kandji.model;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.blazebit.query.connector.kandji.model.GetLibraryItemStatuses200ResponseResultsInner;
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.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.blazebit.query.connector.kandji.invoker.JSON;


/**
 * GetLibraryItemStatuses200Response
 */
@JsonPropertyOrder({
  GetLibraryItemStatuses200Response.JSON_PROPERTY_COUNT,
  GetLibraryItemStatuses200Response.JSON_PROPERTY_NEXT,
  GetLibraryItemStatuses200Response.JSON_PROPERTY_PREVIOUS,
  GetLibraryItemStatuses200Response.JSON_PROPERTY_RESULTS
})
@JsonTypeName("getLibraryItemStatuses_200_response")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-04-30T07:19:31.168100307Z[Etc/UTC]", comments = "Generator version: 7.10.0")
public class GetLibraryItemStatuses200Response {
  public static final String JSON_PROPERTY_COUNT = "count";
  @jakarta.annotation.Nullable
  private BigDecimal count;

  public static final String JSON_PROPERTY_NEXT = "next";
  private JsonNullable next = JsonNullable.of(null);

  public static final String JSON_PROPERTY_PREVIOUS = "previous";
  private JsonNullable previous = JsonNullable.of(null);

  public static final String JSON_PROPERTY_RESULTS = "results";
  @jakarta.annotation.Nullable
  private List results = new ArrayList<>();

  public GetLibraryItemStatuses200Response() { 
  }

  public GetLibraryItemStatuses200Response count(@jakarta.annotation.Nullable BigDecimal count) {
    this.count = count;
    return this;
  }

  /**
   * Get count
   * @return count
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public BigDecimal getCount() {
    return count;
  }


  @JsonProperty(JSON_PROPERTY_COUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCount(@jakarta.annotation.Nullable BigDecimal count) {
    this.count = count;
  }


  public GetLibraryItemStatuses200Response next(@jakarta.annotation.Nullable Object next) {
    this.next = JsonNullable.of(next);
    return this;
  }

  /**
   * Get next
   * @return next
   */
  @jakarta.annotation.Nullable
  @JsonIgnore

  public Object getNext() {
        return next.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_NEXT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getNext_JsonNullable() {
    return next;
  }
  
  @JsonProperty(JSON_PROPERTY_NEXT)
  public void setNext_JsonNullable(JsonNullable next) {
    this.next = next;
  }

  public void setNext(@jakarta.annotation.Nullable Object next) {
    this.next = JsonNullable.of(next);
  }


  public GetLibraryItemStatuses200Response previous(@jakarta.annotation.Nullable Object previous) {
    this.previous = JsonNullable.of(previous);
    return this;
  }

  /**
   * Get previous
   * @return previous
   */
  @jakarta.annotation.Nullable
  @JsonIgnore

  public Object getPrevious() {
        return previous.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_PREVIOUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getPrevious_JsonNullable() {
    return previous;
  }
  
  @JsonProperty(JSON_PROPERTY_PREVIOUS)
  public void setPrevious_JsonNullable(JsonNullable previous) {
    this.previous = previous;
  }

  public void setPrevious(@jakarta.annotation.Nullable Object previous) {
    this.previous = JsonNullable.of(previous);
  }


  public GetLibraryItemStatuses200Response results(@jakarta.annotation.Nullable List results) {
    this.results = results;
    return this;
  }

  public GetLibraryItemStatuses200Response addResultsItem(GetLibraryItemStatuses200ResponseResultsInner resultsItem) {
    if (this.results == null) {
      this.results = new ArrayList<>();
    }
    this.results.add(resultsItem);
    return this;
  }

  /**
   * Get results
   * @return results
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_RESULTS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List getResults() {
    return results;
  }


  @JsonProperty(JSON_PROPERTY_RESULTS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setResults(@jakarta.annotation.Nullable List results) {
    this.results = results;
  }


  /**
   * Return true if this getLibraryItemStatuses_200_response object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GetLibraryItemStatuses200Response getLibraryItemStatuses200Response = (GetLibraryItemStatuses200Response) o;
    return Objects.equals(this.count, getLibraryItemStatuses200Response.count) &&
        equalsNullable(this.next, getLibraryItemStatuses200Response.next) &&
        equalsNullable(this.previous, getLibraryItemStatuses200Response.previous) &&
        Objects.equals(this.results, getLibraryItemStatuses200Response.results);
  }

  private static  boolean equalsNullable(JsonNullable a, JsonNullable b) {
    return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
  }

  @Override
  public int hashCode() {
    return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results);
  }

  private static  int hashCodeNullable(JsonNullable a) {
    if (a == null) {
      return 1;
    }
    return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GetLibraryItemStatuses200Response {\n");
    sb.append("    count: ").append(toIndentedString(count)).append("\n");
    sb.append("    next: ").append(toIndentedString(next)).append("\n");
    sb.append("    previous: ").append(toIndentedString(previous)).append("\n");
    sb.append("    results: ").append(toIndentedString(results)).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    ");
  }

}