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

com.ziqni.admin.sdk.model.Result Maven / Gradle / Ivy

There is a newer version: 1.0.21
Show newest version
/*
 * ZIQNI Admin API
 * Ziqni Application Services are used to manage and configure spaces.
 *
 * The version of the OpenAPI document: 3.0.1
 * Contact: [email protected]
 *
 * 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.ziqni.admin.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
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 com.ziqni.admin.sdk.model.Relation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
 * Result
 */
@JsonPropertyOrder({
  Result.JSON_PROPERTY_ID,
  Result.JSON_PROPERTY_EXTERNAL_REFERENCE,
  Result.JSON_PROPERTY_RESULT,
  Result.JSON_PROPERTY_RELATIONS
})
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Result {
  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_EXTERNAL_REFERENCE = "externalReference";
  private String externalReference;

  public static final String JSON_PROPERTY_RESULT = "result";
  private String result;

  public static final String JSON_PROPERTY_RELATIONS = "relations";
  private List relations = null;


  public Result id(String id) {
    this.id = id;
    return this;
  }

   /**
   * A unique system identifier of an updated record
   * @return id
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "sc1samQmVr61KgaPQq7x", required = true, value = "A unique system identifier of an updated record")
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getId() {
    return id;
  }


  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setId(String id) {
    this.id = id;
  }


  public Result externalReference(String externalReference) {
    this.externalReference = externalReference;
    return this;
  }

   /**
   * A reference id from external system
   * @return externalReference
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "fruits", value = "A reference id from external system")
  @JsonProperty(JSON_PROPERTY_EXTERNAL_REFERENCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getExternalReference() {
    return externalReference;
  }


  @JsonProperty(JSON_PROPERTY_EXTERNAL_REFERENCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setExternalReference(String externalReference) {
    this.externalReference = externalReference;
  }


  public Result result(String result) {
    this.result = result;
    return this;
  }

   /**
   * The response of an action Possible values:   * created: Will be returned for a POST action to create entity   * updated: Will be returned for a PUT action to update entity   * deleted: Will be returned for a DELETE action on an entity 
   * @return result
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "created", required = true, value = "The response of an action Possible values:   * created: Will be returned for a POST action to create entity   * updated: Will be returned for a PUT action to update entity   * deleted: Will be returned for a DELETE action on an entity ")
  @JsonProperty(JSON_PROPERTY_RESULT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getResult() {
    return result;
  }


  @JsonProperty(JSON_PROPERTY_RESULT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setResult(String result) {
    this.result = result;
  }


  public Result relations(List relations) {
    this.relations = relations;
    return this;
  }

  public Result addRelationsItem(Relation relationsItem) {
    if (this.relations == null) {
      this.relations = new ArrayList<>();
    }
    this.relations.add(relationsItem);
    return this;
  }

   /**
   * Get relations
   * @return relations
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_RELATIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List getRelations() {
    return relations;
  }


  @JsonProperty(JSON_PROPERTY_RELATIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRelations(List relations) {
    this.relations = relations;
  }


  /**
   * Return true if this Result object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Result result = (Result) o;
    return Objects.equals(this.id, result.id) &&
        Objects.equals(this.externalReference, result.externalReference) &&
        Objects.equals(this.result, result.result) &&
        Objects.equals(this.relations, result.relations);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, externalReference, result, relations);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Result {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    externalReference: ").append(toIndentedString(externalReference)).append("\n");
    sb.append("    result: ").append(toIndentedString(result)).append("\n");
    sb.append("    relations: ").append(toIndentedString(relations)).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    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy