IndexableSticker.java
5.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
package com.bitstrips.imoji.firebase.models;
import com.bitstrips.imoji.firebase.AppIndexablesFactory;
import com.bitstrips.imoji.models.Sticker;
import com.google.firebase.appindexing.FirebaseAppIndexingException;
import com.google.firebase.appindexing.Indexable;
import com.google.firebase.appindexing.Indexable.Builder;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
import java.util.List;
import org.apache.commons.lang3.builder.EqualsBuilder;
public class IndexableSticker
implements Serializable
{
private static final String INDEXABLE_TYPE = "Sticker";
private static final String KEYWORDS_KEY = "keywords";
private static final String STICKER_PACKS_KEY = "partOf";
@SerializedName("capabilities")
List<String> mCapabilities;
@SerializedName("comic_id")
String mComicId;
@SerializedName("generated_url")
String mGeneratedUrl;
@SerializedName("url")
String mImageUrl;
@SerializedName("sticker_pack_names")
List<String> mStickerPackNames;
@SerializedName("tags")
List<String> mTags;
@SerializedName("template_id")
String mTemplateId;
private IndexableSticker(String paramString1, String paramString2, String paramString3, String paramString4, List<String> paramList1, List<String> paramList2, List<String> paramList3)
{
this.mTemplateId = paramString1;
this.mComicId = paramString2;
this.mGeneratedUrl = paramString3;
this.mImageUrl = paramString4;
this.mTags = paramList1;
this.mCapabilities = paramList2;
this.mStickerPackNames = paramList3;
}
public boolean equals(Object paramObject)
{
if (paramObject == this) {
return true;
}
if (!(paramObject instanceof IndexableSticker)) {
return false;
}
paramObject = (IndexableSticker)paramObject;
return new EqualsBuilder().append(this.mComicId, ((IndexableSticker)paramObject).getComicId()).append(this.mGeneratedUrl, ((IndexableSticker)paramObject).getGeneratedUrl()).append(this.mImageUrl, ((IndexableSticker)paramObject).getImageUrl()).append(this.mTags, ((IndexableSticker)paramObject).getTags()).append(this.mStickerPackNames, ((IndexableSticker)paramObject).getStickerPackNames()).isEquals();
}
public String getComicId()
{
return this.mComicId;
}
public String getGeneratedUrl()
{
return this.mGeneratedUrl;
}
public String getImageUrl()
{
return this.mImageUrl;
}
public List<String> getStickerPackNames()
{
return this.mStickerPackNames;
}
public List<String> getTags()
{
return this.mTags;
}
public String getTemplateId()
{
return this.mTemplateId;
}
public int hashCode()
{
if (this.mImageUrl == null) {
return 0;
}
return this.mImageUrl.hashCode();
}
public Indexable toIndexable()
throws FirebaseAppIndexingException
{
Indexable.Builder localBuilder = (Indexable.Builder)((Indexable.Builder)new Indexable.Builder("Sticker").setName(this.mComicId)).setImage(this.mImageUrl);
if (this.mGeneratedUrl != null) {
localBuilder.setUrl(this.mGeneratedUrl);
}
if ((this.mTags != null) && (!this.mTags.isEmpty())) {
localBuilder.put("keywords", (String[])this.mTags.toArray(new String[this.mTags.size()]));
}
if ((this.mStickerPackNames != null) && (!this.mStickerPackNames.isEmpty()))
{
Indexable[] arrayOfIndexable = new Indexable[this.mStickerPackNames.size()];
int i = 0;
while (i < this.mStickerPackNames.size())
{
String str = (String)this.mStickerPackNames.get(i);
arrayOfIndexable[i] = new IndexableStickerPack.Builder().setUrl(AppIndexablesFactory.getStickerPackIndexableUrl(str)).setTitle(str).build().toIndexable();
i += 1;
}
localBuilder.put("partOf", arrayOfIndexable);
}
return localBuilder.build();
}
public Indexable toStickerPackStickerIndexable()
throws FirebaseAppIndexingException
{
return ((Indexable.Builder)((Indexable.Builder)((Indexable.Builder)new Indexable.Builder("Sticker").setUrl(this.mGeneratedUrl)).setName(this.mComicId)).setImage(this.mImageUrl)).build();
}
public static class Builder
{
private List<String> mCapabilities;
private String mComicId;
private String mGeneratedUrl;
private String mImageUrl;
private List<String> mStickerPackNames;
private List<String> mTags;
private String mTemplateId;
public IndexableSticker build()
{
return new IndexableSticker(this.mTemplateId, this.mComicId, this.mGeneratedUrl, this.mImageUrl, this.mTags, this.mCapabilities, this.mStickerPackNames, null);
}
public Builder fromSticker(Sticker paramSticker)
{
this.mTemplateId = paramSticker.getTemplateId();
this.mComicId = paramSticker.getComicId();
this.mImageUrl = paramSticker.getImageUrl();
this.mTags = paramSticker.getTags();
this.mCapabilities = paramSticker.getCapabilities();
return this;
}
public Builder setGeneratedUrl(String paramString)
{
this.mGeneratedUrl = paramString;
return this;
}
public Builder setImageUrl(String paramString)
{
this.mImageUrl = paramString;
return this;
}
public Builder setStickerPackNames(List<String> paramList)
{
this.mStickerPackNames = paramList;
return this;
}
public Builder setTags(List<String> paramList)
{
this.mTags = paramList;
return this;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/firebase/models/IndexableSticker.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/