// Path: src/main/java/io/kraken/client/model/RGBA.java
// public class RGBA {
// 
//     private final Integer red;
//     private final Integer green;
//     private final Integer blue;
//     private final BigDecimal alpha;
// 
//     @JsonCreator
//     public RGBA(@JsonProperty("red") Integer red,
//                 @JsonProperty("green") Integer green,
//                 @JsonProperty("blue") Integer blue,
//                 @JsonProperty("alpha") BigDecimal alpha) {
//         checkNotNull(red, "red must not be null");
//         checkNotNull(green, "green must not be null");
//         checkNotNull(blue, "blue must not be null");
//         checkNotNull(alpha, "alpha must not be null");
//         checkArgument(red >= 0 && red <= 256, "red must be between 0-256");
//         checkArgument(green >= 0 && green <= 256, "green must be between 0-256");
//         checkArgument(blue >= 0 && blue <= 256, "blue must be between 0-256");
//         checkArgument(alpha.compareTo(BigDecimal.valueOf(0.0)) > -1 && alpha.compareTo(BigDecimal.valueOf(1.0)) < 1, "red must be between 0-1");
// 
//         this.red = red;
//         this.green = green;
//         this.blue = blue;
//         this.alpha = alpha;
//     }
// 
//     public Integer getRed() {
//         return red;
//     }
// 
//     public Integer getGreen() {
//         return green;
//     }
// 
//     public Integer getBlue() {
//         return blue;
//     }
// 
//     public BigDecimal getAlpha() {
//         return alpha;
//     }
// }
// 
// Path: src/main/java/io/kraken/client/model/Strategy.java
// public enum Strategy {
//     EXACT("exact"),
//     PORTRAIT("portrait"),
//     LANDSCAPE("landscape"),
//     AUTO("auto"),
//     FIT("fit"),
//     CROP("crop"),
//     SQUARE("square"),
//     FILL("fill");
// 
//     private static Map<String, Strategy> REVERSE_LOOKUP = new HashMap<String, Strategy>();
//     static {
//         for (Strategy strategy : values()) {
//             REVERSE_LOOKUP.put(strategy.getValue(), strategy);
//         }
//     }
// 
//     private final String value;
// 
//     Strategy(String value) {
//         this.value = value;
//     }
// 
//     public String getValue() {
//         return value;
//     }
// 
//     public static Strategy fromString(String value) {
//         return REVERSE_LOOKUP.get(value);
//     }
// 
//     @Override
//     public String toString() {
//         return value;
//     }
// }
// 
// Path: src/main/java/io/kraken/client/serializer/RGBASerializer.java
// public class RGBASerializer extends JsonSerializer<RGBA> {
// 
//     @Override
//     public void serialize(RGBA value, JsonGenerator gen, SerializerProvider serializers) throws IOException, JsonProcessingException {
//         gen.writeString("rgba(" + value.getRed() + ", " + value.getGreen() + ", " + value.getBlue() + ", " + value.getAlpha() + ")");
//     }
// }


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.kraken.client.model.RGBA;
import io.kraken.client.model.Strategy;
import io.kraken.client.serializer.RGBASerializer;
import javax.annotation.Nullable;
import static com.google.common.base.Preconditions.checkNotNull;
/**
 * Copyright (C) 2015 Nekkra UG (oss@kraken.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.kraken.client.model.resize;




/**
 * @author Emir Dizdarevic
 * @since 1.0.0
 */
public class FillResize extends AbstractDimensionBasedResize {

    @JsonSerialize(using = RGBASerializer.class)
    private final RGBA background;

    @JsonCreator
// Path: src/main/java/io/kraken/client/model/RGBA.java
// public class RGBA {
// 
//     private final Integer red;
//     private final Integer green;
//     private final Integer blue;
//     private final BigDecimal alpha;
// 
//     @JsonCreator
//     public RGBA(@JsonProperty("red") Integer red,
//                 @JsonProperty("green") Integer green,
//                 @JsonProperty("blue") Integer blue,
//                 @JsonProperty("alpha") BigDecimal alpha) {
//         checkNotNull(red, "red must not be null");
//         checkNotNull(green, "green must not be null");
//         checkNotNull(blue, "blue must not be null");
//         checkNotNull(alpha, "alpha must not be null");
//         checkArgument(red >= 0 && red <= 256, "red must be between 0-256");
//         checkArgument(green >= 0 && green <= 256, "green must be between 0-256");
//         checkArgument(blue >= 0 && blue <= 256, "blue must be between 0-256");
//         checkArgument(alpha.compareTo(BigDecimal.valueOf(0.0)) > -1 && alpha.compareTo(BigDecimal.valueOf(1.0)) < 1, "red must be between 0-1");
// 
//         this.red = red;
//         this.green = green;
//         this.blue = blue;
//         this.alpha = alpha;
//     }
// 
//     public Integer getRed() {
//         return red;
//     }
// 
//     public Integer getGreen() {
//         return green;
//     }
// 
//     public Integer getBlue() {
//         return blue;
//     }
// 
//     public BigDecimal getAlpha() {
//         return alpha;
//     }
// }
// 
// Path: src/main/java/io/kraken/client/model/Strategy.java
// public enum Strategy {
//     EXACT("exact"),
//     PORTRAIT("portrait"),
//     LANDSCAPE("landscape"),
//     AUTO("auto"),
//     FIT("fit"),
//     CROP("crop"),
//     SQUARE("square"),
//     FILL("fill");
// 
//     private static Map<String, Strategy> REVERSE_LOOKUP = new HashMap<String, Strategy>();
//     static {
//         for (Strategy strategy : values()) {
//             REVERSE_LOOKUP.put(strategy.getValue(), strategy);
//         }
//     }
// 
//     private final String value;
// 
//     Strategy(String value) {
//         this.value = value;
//     }
// 
//     public String getValue() {
//         return value;
//     }
// 
//     public static Strategy fromString(String value) {
//         return REVERSE_LOOKUP.get(value);
//     }
// 
//     @Override
//     public String toString() {
//         return value;
//     }
// }
// 
// Path: src/main/java/io/kraken/client/serializer/RGBASerializer.java
// public class RGBASerializer extends JsonSerializer<RGBA> {
// 
//     @Override
//     public void serialize(RGBA value, JsonGenerator gen, SerializerProvider serializers) throws IOException, JsonProcessingException {
//         gen.writeString("rgba(" + value.getRed() + ", " + value.getGreen() + ", " + value.getBlue() + ", " + value.getAlpha() + ")");
//     }
// }


// Path: src/main/java/io/kraken/client/model/resize/FillResize.java
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.kraken.client.model.RGBA;
import io.kraken.client.model.Strategy;
import io.kraken.client.serializer.RGBASerializer;
import javax.annotation.Nullable;
import static com.google.common.base.Preconditions.checkNotNull;

/**
 * Copyright (C) 2015 Nekkra UG (oss@kraken.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.kraken.client.model.resize;




/**
 * @author Emir Dizdarevic
 * @since 1.0.0
 */
public class FillResize extends AbstractDimensionBasedResize {

    @JsonSerialize(using = RGBASerializer.class)
    private final RGBA background;

    @JsonCreator
    public FillResize(@JsonProperty("width") Integer width,