/*
 * 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.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.InputPartMediaType;

/**
 * InputPart
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class InputPart {
  public static final String SERIALIZED_NAME_HEADERS = "headers";
  @SerializedName(SERIALIZED_NAME_HEADERS)
  private Map<String, List<String>> headers = null;

  public static final String SERIALIZED_NAME_MEDIA_TYPE = "mediaType";
  @SerializedName(SERIALIZED_NAME_MEDIA_TYPE)
  private InputPartMediaType mediaType;

  public static final String SERIALIZED_NAME_BODY_AS_STRING = "bodyAsString";
  @SerializedName(SERIALIZED_NAME_BODY_AS_STRING)
  private String bodyAsString;

  public static final String SERIALIZED_NAME_CONTENT_TYPE_FROM_MESSAGE = "contentTypeFromMessage";
  @SerializedName(SERIALIZED_NAME_CONTENT_TYPE_FROM_MESSAGE)
  private Boolean contentTypeFromMessage;


  public InputPart headers(Map<String, List<String>> headers) {
    
    this.headers = headers;
    return this;
  }

  public InputPart putHeadersItem(String key, List<String> headersItem) {
    if (this.headers == null) {
      this.headers = new HashMap<String, List<String>>();
    }
    this.headers.put(key, headersItem);
    return this;
  }

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

  public Map<String, List<String>> getHeaders() {
    return headers;
  }



  public void setHeaders(Map<String, List<String>> headers) {
    this.headers = headers;
  }


  public InputPart mediaType(InputPartMediaType mediaType) {
    
    this.mediaType = mediaType;
    return this;
  }

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

  public InputPartMediaType getMediaType() {
    return mediaType;
  }



  public void setMediaType(InputPartMediaType mediaType) {
    this.mediaType = mediaType;
  }


  public InputPart bodyAsString(String bodyAsString) {
    
    this.bodyAsString = bodyAsString;
    return this;
  }

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

  public String getBodyAsString() {
    return bodyAsString;
  }



  public void setBodyAsString(String bodyAsString) {
    this.bodyAsString = bodyAsString;
  }


  public InputPart contentTypeFromMessage(Boolean contentTypeFromMessage) {
    
    this.contentTypeFromMessage = contentTypeFromMessage;
    return this;
  }

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

  public Boolean getContentTypeFromMessage() {
    return contentTypeFromMessage;
  }



  public void setContentTypeFromMessage(Boolean contentTypeFromMessage) {
    this.contentTypeFromMessage = contentTypeFromMessage;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    InputPart inputPart = (InputPart) o;
    return Objects.equals(this.headers, inputPart.headers) &&
        Objects.equals(this.mediaType, inputPart.mediaType) &&
        Objects.equals(this.bodyAsString, inputPart.bodyAsString) &&
        Objects.equals(this.contentTypeFromMessage, inputPart.contentTypeFromMessage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(headers, mediaType, bodyAsString, contentTypeFromMessage);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class InputPart {\n");
    sb.append("    headers: ").append(toIndentedString(headers)).append("\n");
    sb.append("    mediaType: ").append(toIndentedString(mediaType)).append("\n");
    sb.append("    bodyAsString: ").append(toIndentedString(bodyAsString)).append("\n");
    sb.append("    contentTypeFromMessage: ").append(toIndentedString(contentTypeFromMessage)).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    ");
  }

}

