/*
 * lakeFS API
 * lakeFS HTTP API
 *
 * The version of the OpenAPI document: 0.1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package io.lakefs.clients.api.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.lakefs.clients.api.model.StagingLocation;
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;

/**
 * information about uploaded object
 */
@ApiModel(description = "information about uploaded object")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class StagingMetadata {
  public static final String SERIALIZED_NAME_STAGING = "staging";
  @SerializedName(SERIALIZED_NAME_STAGING)
  private StagingLocation staging;

  public static final String SERIALIZED_NAME_CHECKSUM = "checksum";
  @SerializedName(SERIALIZED_NAME_CHECKSUM)
  private String checksum;

  public static final String SERIALIZED_NAME_SIZE_BYTES = "size_bytes";
  @SerializedName(SERIALIZED_NAME_SIZE_BYTES)
  private Long sizeBytes;

  public static final String SERIALIZED_NAME_USER_METADATA = "user_metadata";
  @SerializedName(SERIALIZED_NAME_USER_METADATA)
  private Map<String, String> userMetadata = null;

  public static final String SERIALIZED_NAME_CONTENT_TYPE = "content_type";
  @SerializedName(SERIALIZED_NAME_CONTENT_TYPE)
  private String contentType;


  public StagingMetadata staging(StagingLocation staging) {
    
    this.staging = staging;
    return this;
  }

   /**
   * Get staging
   * @return staging
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")

  public StagingLocation getStaging() {
    return staging;
  }


  public void setStaging(StagingLocation staging) {
    this.staging = staging;
  }


  public StagingMetadata checksum(String checksum) {
    
    this.checksum = checksum;
    return this;
  }

   /**
   * unique identifier of object content on backing store (typically ETag)
   * @return checksum
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "unique identifier of object content on backing store (typically ETag)")

  public String getChecksum() {
    return checksum;
  }


  public void setChecksum(String checksum) {
    this.checksum = checksum;
  }


  public StagingMetadata sizeBytes(Long sizeBytes) {
    
    this.sizeBytes = sizeBytes;
    return this;
  }

   /**
   * Get sizeBytes
   * @return sizeBytes
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")

  public Long getSizeBytes() {
    return sizeBytes;
  }


  public void setSizeBytes(Long sizeBytes) {
    this.sizeBytes = sizeBytes;
  }


  public StagingMetadata userMetadata(Map<String, String> userMetadata) {
    
    this.userMetadata = userMetadata;
    return this;
  }

  public StagingMetadata putUserMetadataItem(String key, String userMetadataItem) {
    if (this.userMetadata == null) {
      this.userMetadata = new HashMap<String, String>();
    }
    this.userMetadata.put(key, userMetadataItem);
    return this;
  }

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

  public Map<String, String> getUserMetadata() {
    return userMetadata;
  }


  public void setUserMetadata(Map<String, String> userMetadata) {
    this.userMetadata = userMetadata;
  }


  public StagingMetadata contentType(String contentType) {
    
    this.contentType = contentType;
    return this;
  }

   /**
   * Object media type
   * @return contentType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Object media type")

  public String getContentType() {
    return contentType;
  }


  public void setContentType(String contentType) {
    this.contentType = contentType;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    StagingMetadata stagingMetadata = (StagingMetadata) o;
    return Objects.equals(this.staging, stagingMetadata.staging) &&
        Objects.equals(this.checksum, stagingMetadata.checksum) &&
        Objects.equals(this.sizeBytes, stagingMetadata.sizeBytes) &&
        Objects.equals(this.userMetadata, stagingMetadata.userMetadata) &&
        Objects.equals(this.contentType, stagingMetadata.contentType);
  }

  @Override
  public int hashCode() {
    return Objects.hash(staging, checksum, sizeBytes, userMetadata, contentType);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class StagingMetadata {\n");
    sb.append("    staging: ").append(toIndentedString(staging)).append("\n");
    sb.append("    checksum: ").append(toIndentedString(checksum)).append("\n");
    sb.append("    sizeBytes: ").append(toIndentedString(sizeBytes)).append("\n");
    sb.append("    userMetadata: ").append(toIndentedString(userMetadata)).append("\n");
    sb.append("    contentType: ").append(toIndentedString(contentType)).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    ");
  }

}

