Advertisement
vergepuppeter

Img

May 20th, 2022
1,422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 1.49 KB | None | 0 0
  1. package com.byondwave.app.travel360.Model;
  2.  
  3. import android.os.Parcel;
  4. import android.os.Parcelable;
  5. import com.google.gson.annotations.Expose;
  6. import com.google.gson.annotations.SerializedName;
  7.  
  8. public class Img implements Parcelable {
  9.     @SerializedName("image_url")
  10.     @Expose
  11.     private String imageUrl;
  12.     @SerializedName("main_image")
  13.     @Expose
  14.     private String mainImage;
  15.  
  16.     public Img(String imageUrl, String mainImage) {
  17.         this.imageUrl = imageUrl;
  18.         this.mainImage = mainImage;
  19.     }
  20.  
  21.     protected Img(Parcel in) {
  22.         imageUrl = in.readString();
  23.         mainImage = in.readString();
  24.     }
  25.  
  26.     public static final Creator<Img> CREATOR = new Creator<Img>() {
  27.         @Override
  28.         public Img createFromParcel(Parcel in) {
  29.             return new Img(in);
  30.         }
  31.  
  32.         @Override
  33.         public Img[] newArray(int size) {
  34.             return new Img[size];
  35.         }
  36.     };
  37.  
  38.     public String getImageUrl() {
  39.         return imageUrl;
  40.     }
  41.  
  42.     public void setImageUrl(String imageUrl) {
  43.         this.imageUrl = imageUrl;
  44.     }
  45.  
  46.     public String getMainImage() {
  47.         return mainImage;
  48.     }
  49.  
  50.     public void setMainImage(String mainImage) {
  51.         this.mainImage = mainImage;
  52.     }
  53.  
  54.     @Override
  55.     public int describeContents() {
  56.         return 0;
  57.     }
  58.  
  59.     @Override
  60.     public void writeToParcel(Parcel dest, int flags) {
  61.         dest.writeString(imageUrl);
  62.         dest.writeString(mainImage);
  63.     }
  64. }
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement