/*
 *   Copyright (C) 2015 Karumi.
 *   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 com.karumi.marvelapiclient.model;

import com.google.gson.annotations.SerializedName;

public class MarvelImage {
  @SerializedName("path") private String path;
  @SerializedName("extension") private String extension;

  public String getPath() {
    return path;
  }

  public String getExtension() {
    return extension;
  }

  @Override public String toString() {
    return "MarvelImage{"
           + "path='" + path + '\''
           + ", extension='" + extension
           + '\'' + '}';
  }
}

@@ -724,16 +724,104 @@
 Image %7B%0A
+  private static final String SEPARATOR = %22/%22;%0A  private static final String DOT = %22.%22;%0A
   @Seria
@@ -1033,172 +1033,1712 @@
 %0A%0A  
-@Override public String toString() %7B%0A    return %22MarvelImage%7B%22%0A           + %22path='%22 + path + '%5C''%0A           + %22, extension='%22 + extension%0A           + '%5C'' + '%7D';
+public String getImageUrl(Size size) %7B%0A    if (size == Size.FULLSIZE) %7B%0A      return path + DOT + extension;%0A    %7D else %7B%0A      return path + SEPARATOR + size.toString() + DOT + extension;%0A    %7D%0A  %7D%0A%0A  @Override public String toString() %7B%0A    return %22MarvelImage%7B%22 + %22path='%22 + path + '%5C'' + %22, extension='%22 + extension + '%5C'' + '%7D';%0A  %7D%0A%0A  public enum Size %7B%0A    /** 50x75px */%0A    PORTRAIT_SMALL(%22portrait_small%22),%0A    /** 100x150px */%0A    PORTRAIT_MEDIUM(%22portrait_medium%22),%0A    /** 150x225px */%0A    PORTRAIT_XLARGE(%22portrait_xlarge%22),%0A    /** 168x252px */%0A    PORTRAIT_FANTASTIC(%22portrait_fantastic%22),%0A    /** 300x450px */%0A    PORTRAIT_UNCANNY(%22portrait_uncanny%22),%0A    /** 216x324px */%0A    PORTRAIT_INCREDIBLE(%22portrait_incredible%22),%0A    /** 65x45px */%0A    STANDARD_SMALL(%22standard_small%22),%0A    /** 100x100px */%0A    STANDARD_MEDIUM(%22standard_medium%22),%0A    /** 140x140px */%0A    STANDARD_LARGE(%22standard_large%22),%0A    /** 200x200px */%0A    STANDARD_XLARGE(%22standard_xlarge%22),%0A    /** 250x250px */%0A    STANDARD_FANTASTIC(%22standard_fantastic%22),%0A    /** 180x180px */%0A    STANDARD_AMAZING(%22standard_amazing%22),%0A    /** 120x90px */%0A    LANDSCAPE_SMALL(%22landscape_small%22),%0A    /** 175x130px */%0A    LANDSCAPE_MEDIUM(%22landscape_medium%22),%0A    /** 190x140px */%0A    LANDSCAPE_LARGE(%22landscape_large%22),%0A    /** 270x200px */%0A    LANDSCAPE_XLARGE(%22landscape_xlarge%22),%0A    /** 250x156px */%0A    LANDSCAPE_AMAZING(%22landscape_amazing%22),%0A    /** 464x261px */%0A    LANDSCAPE_INCREDIBLE(%22landscape_incredible%22),%0A    DETAIL(%22detail%22),%0A    FULLSIZE(%22fullsize%22);%0A%0A    private final String size;%0A%0A    private Size(final String size) %7B%0A      this.size = size;%0A    %7D%0A%0A    @Override public String toString() %7B%0A      return size;%0A    %7D
 %0A  %7D

Return valid Urls.