aboutsummaryrefslogtreecommitdiff
path: root/src/com/android/tv/search/AutoValue_LocalSearchProvider_SearchResult.java
blob: 528096dd131b724ab4ea4658beee6d4f98e5c610 (plain)
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * 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.android.tv.search;

import android.support.annotation.Nullable;

/**
 * Hand copy of generated Autovalue class.
 *
 * TODO get autovalue working
 */

final class AutoValue_LocalSearchProvider_SearchResult extends LocalSearchProvider.SearchResult {

    private final long channelId;
    private final String channelNumber;
    private final String title;
    private final String description;
    private final String imageUri;
    private final String intentAction;
    private final String intentData;
    private final String intentExtraData;
    private final String contentType;
    private final boolean isLive;
    private final int videoWidth;
    private final int videoHeight;
    private final long duration;
    private final int progressPercentage;

    private AutoValue_LocalSearchProvider_SearchResult(
            long channelId,
            @Nullable String channelNumber,
            @Nullable String title,
            @Nullable String description,
            @Nullable String imageUri,
            @Nullable String intentAction,
            @Nullable String intentData,
            @Nullable String intentExtraData,
            @Nullable String contentType,
            boolean isLive,
            int videoWidth,
            int videoHeight,
            long duration,
            int progressPercentage) {
        this.channelId = channelId;
        this.channelNumber = channelNumber;
        this.title = title;
        this.description = description;
        this.imageUri = imageUri;
        this.intentAction = intentAction;
        this.intentData = intentData;
        this.intentExtraData = intentExtraData;
        this.contentType = contentType;
        this.isLive = isLive;
        this.videoWidth = videoWidth;
        this.videoHeight = videoHeight;
        this.duration = duration;
        this.progressPercentage = progressPercentage;
    }

    @Override
    long getChannelId() {
        return channelId;
    }

    @Nullable
    @Override
    String getChannelNumber() {
        return channelNumber;
    }

    @Nullable
    @Override
    String getTitle() {
        return title;
    }

    @Nullable
    @Override
    String getDescription() {
        return description;
    }

    @Nullable
    @Override
    String getImageUri() {
        return imageUri;
    }

    @Nullable
    @Override
    String getIntentAction() {
        return intentAction;
    }

    @Nullable
    @Override
    String getIntentData() {
        return intentData;
    }

    @Nullable
    @Override
    String getIntentExtraData() {
        return intentExtraData;
    }

    @Nullable
    @Override
    String getContentType() {
        return contentType;
    }

    @Override
    boolean getIsLive() {
        return isLive;
    }

    @Override
    int getVideoWidth() {
        return videoWidth;
    }

    @Override
    int getVideoHeight() {
        return videoHeight;
    }

    @Override
    long getDuration() {
        return duration;
    }

    @Override
    int getProgressPercentage() {
        return progressPercentage;
    }

    @Override
    public String toString() {
        return "SearchResult{"
                + "channelId=" + channelId + ", "
                + "channelNumber=" + channelNumber + ", "
                + "title=" + title + ", "
                + "description=" + description + ", "
                + "imageUri=" + imageUri + ", "
                + "intentAction=" + intentAction + ", "
                + "intentData=" + intentData + ", "
                + "intentExtraData=" + intentExtraData + ", "
                + "contentType=" + contentType + ", "
                + "isLive=" + isLive + ", "
                + "videoWidth=" + videoWidth + ", "
                + "videoHeight=" + videoHeight + ", "
                + "duration=" + duration + ", "
                + "progressPercentage=" + progressPercentage
                + "}";
    }

    @Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (o instanceof LocalSearchProvider.SearchResult) {
            LocalSearchProvider.SearchResult that = (LocalSearchProvider.SearchResult) o;
            return (this.channelId == that.getChannelId())
                    && ((this.channelNumber == null) ? (that.getChannelNumber() == null) : this.channelNumber.equals(that.getChannelNumber()))
                    && ((this.title == null) ? (that.getTitle() == null) : this.title.equals(that.getTitle()))
                    && ((this.description == null) ? (that.getDescription() == null) : this.description.equals(that.getDescription()))
                    && ((this.imageUri == null) ? (that.getImageUri() == null) : this.imageUri.equals(that.getImageUri()))
                    && ((this.intentAction == null) ? (that.getIntentAction() == null) : this.intentAction.equals(that.getIntentAction()))
                    && ((this.intentData == null) ? (that.getIntentData() == null) : this.intentData.equals(that.getIntentData()))
                    && ((this.intentExtraData == null) ? (that.getIntentExtraData() == null) : this.intentExtraData.equals(that.getIntentExtraData()))
                    && ((this.contentType == null) ? (that.getContentType() == null) : this.contentType.equals(that.getContentType()))
                    && (this.isLive == that.getIsLive())
                    && (this.videoWidth == that.getVideoWidth())
                    && (this.videoHeight == that.getVideoHeight())
                    && (this.duration == that.getDuration())
                    && (this.progressPercentage == that.getProgressPercentage());
        }
        return false;
    }

    @Override
    public int hashCode() {
        int h$ = 1;
        h$ *= 1000003;
        h$ ^= (int) ((channelId >>> 32) ^ channelId);
        h$ *= 1000003;
        h$ ^= (channelNumber == null) ? 0 : channelNumber.hashCode();
        h$ *= 1000003;
        h$ ^= (title == null) ? 0 : title.hashCode();
        h$ *= 1000003;
        h$ ^= (description == null) ? 0 : description.hashCode();
        h$ *= 1000003;
        h$ ^= (imageUri == null) ? 0 : imageUri.hashCode();
        h$ *= 1000003;
        h$ ^= (intentAction == null) ? 0 : intentAction.hashCode();
        h$ *= 1000003;
        h$ ^= (intentData == null) ? 0 : intentData.hashCode();
        h$ *= 1000003;
        h$ ^= (intentExtraData == null) ? 0 : intentExtraData.hashCode();
        h$ *= 1000003;
        h$ ^= (contentType == null) ? 0 : contentType.hashCode();
        h$ *= 1000003;
        h$ ^= isLive ? 1231 : 1237;
        h$ *= 1000003;
        h$ ^= videoWidth;
        h$ *= 1000003;
        h$ ^= videoHeight;
        h$ *= 1000003;
        h$ ^= (int) ((duration >>> 32) ^ duration);
        h$ *= 1000003;
        h$ ^= progressPercentage;
        return h$;
    }

    static final class Builder extends LocalSearchProvider.SearchResult.Builder {
        private Long channelId;
        private String channelNumber;
        private String title;
        private String description;
        private String imageUri;
        private String intentAction;
        private String intentData;
        private String intentExtraData;
        private String contentType;
        private Boolean isLive;
        private Integer videoWidth;
        private Integer videoHeight;
        private Long duration;
        private Integer progressPercentage;
        Builder() {
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setChannelId(long channelId) {
            this.channelId = channelId;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setChannelNumber(@Nullable String channelNumber) {
            this.channelNumber = channelNumber;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setTitle(@Nullable String title) {
            this.title = title;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setDescription(@Nullable String description) {
            this.description = description;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setImageUri(@Nullable String imageUri) {
            this.imageUri = imageUri;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setIntentAction(@Nullable String intentAction) {
            this.intentAction = intentAction;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setIntentData(@Nullable String intentData) {
            this.intentData = intentData;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setIntentExtraData(@Nullable String intentExtraData) {
            this.intentExtraData = intentExtraData;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setContentType(@Nullable String contentType) {
            this.contentType = contentType;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setIsLive(boolean isLive) {
            this.isLive = isLive;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setVideoWidth(int videoWidth) {
            this.videoWidth = videoWidth;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setVideoHeight(int videoHeight) {
            this.videoHeight = videoHeight;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setDuration(long duration) {
            this.duration = duration;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult.Builder setProgressPercentage(int progressPercentage) {
            this.progressPercentage = progressPercentage;
            return this;
        }
        @Override
        LocalSearchProvider.SearchResult build() {
            String missing = "";
            if (this.channelId == null) {
                missing += " channelId";
            }
            if (this.isLive == null) {
                missing += " isLive";
            }
            if (this.videoWidth == null) {
                missing += " videoWidth";
            }
            if (this.videoHeight == null) {
                missing += " videoHeight";
            }
            if (this.duration == null) {
                missing += " duration";
            }
            if (this.progressPercentage == null) {
                missing += " progressPercentage";
            }
            if (!missing.isEmpty()) {
                throw new IllegalStateException("Missing required properties:" + missing);
            }
            return new AutoValue_LocalSearchProvider_SearchResult(
                    this.channelId,
                    this.channelNumber,
                    this.title,
                    this.description,
                    this.imageUri,
                    this.intentAction,
                    this.intentData,
                    this.intentExtraData,
                    this.contentType,
                    this.isLive,
                    this.videoWidth,
                    this.videoHeight,
                    this.duration,
                    this.progressPercentage);
        }
    }

}