/*
 * Swagger of Opencellsoft Api
 * @#Introduction
 *
 * The version of the OpenAPI document: 7.3.1-SNAPSHOT
 * Contact: contact@opencellsoft.fr
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.OrderLinks;
import org.openapitools.client.model.Resource;

/**
 * ServiceInstance
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class ServiceInstance {
  public static final String SERIALIZED_NAME_SERVICE_TEMPLATE = "serviceTemplate";
  @SerializedName(SERIALIZED_NAME_SERVICE_TEMPLATE)
  private Resource serviceTemplate;

  public static final String SERIALIZED_NAME_QUANTITY = "quantity";
  @SerializedName(SERIALIZED_NAME_QUANTITY)
  private Long quantity;

  public static final String SERIALIZED_NAME_LINKS = "links";
  @SerializedName(SERIALIZED_NAME_LINKS)
  private List<OrderLinks> links = null;

  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private Long id;


  public ServiceInstance serviceTemplate(Resource serviceTemplate) {
    
    this.serviceTemplate = serviceTemplate;
    return this;
  }

   /**
   * Get serviceTemplate
   * @return serviceTemplate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Resource getServiceTemplate() {
    return serviceTemplate;
  }



  public void setServiceTemplate(Resource serviceTemplate) {
    this.serviceTemplate = serviceTemplate;
  }


  public ServiceInstance quantity(Long quantity) {
    
    this.quantity = quantity;
    return this;
  }

   /**
   * Get quantity
   * @return quantity
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Long getQuantity() {
    return quantity;
  }



  public void setQuantity(Long quantity) {
    this.quantity = quantity;
  }


  public ServiceInstance links(List<OrderLinks> links) {
    
    this.links = links;
    return this;
  }

  public ServiceInstance addLinksItem(OrderLinks linksItem) {
    if (this.links == null) {
      this.links = new ArrayList<OrderLinks>();
    }
    this.links.add(linksItem);
    return this;
  }

   /**
   * Get links
   * @return links
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public List<OrderLinks> getLinks() {
    return links;
  }



  public void setLinks(List<OrderLinks> links) {
    this.links = links;
  }


  public ServiceInstance id(Long id) {
    
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Long getId() {
    return id;
  }



  public void setId(Long id) {
    this.id = id;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ServiceInstance serviceInstance = (ServiceInstance) o;
    return Objects.equals(this.serviceTemplate, serviceInstance.serviceTemplate) &&
        Objects.equals(this.quantity, serviceInstance.quantity) &&
        Objects.equals(this.links, serviceInstance.links) &&
        Objects.equals(this.id, serviceInstance.id);
  }

  @Override
  public int hashCode() {
    return Objects.hash(serviceTemplate, quantity, links, id);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ServiceInstance {\n");
    sb.append("    serviceTemplate: ").append(toIndentedString(serviceTemplate)).append("\n");
    sb.append("    quantity: ").append(toIndentedString(quantity)).append("\n");
    sb.append("    links: ").append(toIndentedString(links)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

