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

io.sphere.sdk.products.ImageDimensions Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.products;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.sphere.sdk.models.Base;

public class ImageDimensions extends Base {
    @JsonProperty("w")
    private final Integer width;
    @JsonProperty("h")
    private final Integer height;

    @JsonCreator
    private ImageDimensions(final Integer width, final Integer height) {
        this.width = width;
        this.height = height;
    }

    public Integer getWidth() {
        return width;
    }

    public Integer getHeight() {
        return height;
    }

    @JsonIgnore
    public static ImageDimensions of(final Integer width, final Integer height) {
        return new ImageDimensions(width, height);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy