/*
 * Azure Blockchain Workbench REST API
 * The Azure Blockchain Workbench REST API is a Workbench extensibility point, which allows developers to create and manage blockchain applications, manage users and organizations within a consortium, integrate blockchain applications into services and platforms, perform transactions on a blockchain, and retrieve transactional and contract data from a blockchain.
 *
 * OpenAPI spec version: v1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package io.swagger.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;

/**
 * StringSegment
 */

public class StringSegment {
  @SerializedName("buffer")
  private String buffer = null;

  @SerializedName("offset")
  private Integer offset = null;

  @SerializedName("length")
  private Integer length = null;

  @SerializedName("value")
  private String value = null;

  @SerializedName("hasValue")
  private Boolean hasValue = null;

   /**
   * Get buffer
   * @return buffer
  **/
  @ApiModelProperty(value = "")
  public String getBuffer() {
    return buffer;
  }

   /**
   * Get offset
   * @return offset
  **/
  @ApiModelProperty(value = "")
  public Integer getOffset() {
    return offset;
  }

   /**
   * Get length
   * @return length
  **/
  @ApiModelProperty(value = "")
  public Integer getLength() {
    return length;
  }

   /**
   * Get value
   * @return value
  **/
  @ApiModelProperty(value = "")
  public String getValue() {
    return value;
  }

   /**
   * Get hasValue
   * @return hasValue
  **/
  @ApiModelProperty(value = "")
  public Boolean isHasValue() {
    return hasValue;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    StringSegment stringSegment = (StringSegment) o;
    return Objects.equals(this.buffer, stringSegment.buffer) &&
        Objects.equals(this.offset, stringSegment.offset) &&
        Objects.equals(this.length, stringSegment.length) &&
        Objects.equals(this.value, stringSegment.value) &&
        Objects.equals(this.hasValue, stringSegment.hasValue);
  }

  @Override
  public int hashCode() {
    return Objects.hash(buffer, offset, length, value, hasValue);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class StringSegment {\n");
    
    sb.append("    buffer: ").append(toIndentedString(buffer)).append("\n");
    sb.append("    offset: ").append(toIndentedString(offset)).append("\n");
    sb.append("    length: ").append(toIndentedString(length)).append("\n");
    sb.append("    value: ").append(toIndentedString(value)).append("\n");
    sb.append("    hasValue: ").append(toIndentedString(hasValue)).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    ");
  }

}

