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

com.klarna.rest.api.checkout.model.CheckoutShippingAttributes Maven / Gradle / Ivy

The newest version!
/*
 * 
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 1.0.0
 * 
 *
 * 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 com.klarna.rest.api.checkout.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.klarna.rest.api.checkout.model.CheckoutDimensions;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;

/**
 * CheckoutShippingAttributes
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-04-02T15:03:42.622Z")
public class CheckoutShippingAttributes {
  @JsonProperty("weight")
  private Long weight = null;

  @JsonProperty("dimensions")
  private CheckoutDimensions dimensions = null;

  @JsonProperty("tags")
  private List tags = null;

  public CheckoutShippingAttributes weight(Long weight) {
    this.weight = weight;
    return this;
  }

   /**
   * The product's weight as used in the merchant's webshop. Non-negative. Measured in grams.
   * @return weight
  **/
  @ApiModelProperty(example = "1000", value = "The product's weight as used in the merchant's webshop. Non-negative. Measured in grams.")
  public Long getWeight() {
    return weight;
  }

  public void setWeight(Long weight) {
    this.weight = weight;
  }

  public CheckoutShippingAttributes dimensions(CheckoutDimensions dimensions) {
    this.dimensions = dimensions;
    return this;
  }

   /**
   * The product's dimensions: height, width and length. Of type Long.
   * @return dimensions
  **/
  @ApiModelProperty(value = "The product's dimensions: height, width and length. Of type Long.")
  public CheckoutDimensions getDimensions() {
    return dimensions;
  }

  public void setDimensions(CheckoutDimensions dimensions) {
    this.dimensions = dimensions;
  }

  public CheckoutShippingAttributes tags(List tags) {
    this.tags = tags;
    return this;
  }

  public CheckoutShippingAttributes addTagsItem(String tagsItem) {
    if (this.tags == null) {
      this.tags = new ArrayList();
    }
    this.tags.add(tagsItem);
    return this;
  }

   /**
   * The product's extra features
   * @return tags
  **/
  @ApiModelProperty(example = "\"[\\\"dangerous_goods\\\", \\\"bulky\\\"]\"", value = "The product's extra features")
  public List getTags() {
    return tags;
  }

  public void setTags(List tags) {
    this.tags = tags;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CheckoutShippingAttributes shippingAttributes = (CheckoutShippingAttributes) o;
    return Objects.equals(this.weight, shippingAttributes.weight) &&
        Objects.equals(this.dimensions, shippingAttributes.dimensions) &&
        Objects.equals(this.tags, shippingAttributes.tags);
  }

  @Override
  public int hashCode() {
    return Objects.hash(weight, dimensions, tags);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CheckoutShippingAttributes {\n");
    
    sb.append("    weight: ").append(toIndentedString(weight)).append("\n");
    sb.append("    dimensions: ").append(toIndentedString(dimensions)).append("\n");
    sb.append("    tags: ").append(toIndentedString(tags)).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    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy