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

com.clinia.model.common.V1SymbolPropertyDefinition Maven / Gradle / Ivy

// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/clinia/api-clients-generation. DO NOT EDIT.

package com.clinia.model.common;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** V1SymbolPropertyDefinition */
@JsonDeserialize(as = V1SymbolPropertyDefinition.class)
public class V1SymbolPropertyDefinition implements V1PropertyDefinition {

  @JsonProperty("type")
  private V1DataType type = V1DataType.SYMBOL;

  @JsonProperty("rules")
  private List rules;

  public V1SymbolPropertyDefinition setType(V1DataType type) {
    this.type = type;
    return this;
  }

  /** Get type */
  @javax.annotation.Nonnull
  public V1DataType getType() {
    return type;
  }

  public V1SymbolPropertyDefinition setRules(List rules) {
    this.rules = rules;
    return this;
  }

  public V1SymbolPropertyDefinition addRules(V1PropertyRule rulesItem) {
    if (this.rules == null) {
      this.rules = new ArrayList<>();
    }
    this.rules.add(rulesItem);
    return this;
  }

  /** Get rules */
  @javax.annotation.Nullable
  public List getRules() {
    return rules;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1SymbolPropertyDefinition v1SymbolPropertyDefinition = (V1SymbolPropertyDefinition) o;
    return Objects.equals(this.type, v1SymbolPropertyDefinition.type) && Objects.equals(this.rules, v1SymbolPropertyDefinition.rules);
  }

  @Override
  public int hashCode() {
    return Objects.hash(type, rules);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1SymbolPropertyDefinition {\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    rules: ").append(toIndentedString(rules)).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