]> git.basschouten.com Git - openhab-addons.git/blob
56baca7e7908067d43a4cae5c831eb7af853dca5
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.vesync.internal.dto.requests;
14
15 import org.openhab.binding.vesync.internal.dto.responses.VeSyncUserSession;
16 import org.openhab.binding.vesync.internal.exceptions.AuthenticationException;
17
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * The {@link VeSyncRequestManagedDevicesPage} is the Java class as a DTO to hold login credentials for the Vesync
22  * API.
23  *
24  * @author David Goodyear - Initial contribution
25  */
26 public class VeSyncRequestManagedDevicesPage extends VeSyncAuthenticatedRequest {
27
28     @SerializedName("pageNo")
29     public String pageNo;
30
31     @SerializedName("pageSize")
32     public String pageSize;
33
34     public VeSyncRequestManagedDevicesPage(final VeSyncUserSession user) throws AuthenticationException {
35         super(user);
36         method = "devices";
37     }
38
39     public VeSyncRequestManagedDevicesPage(final VeSyncUserSession user, int pageNo, int pageSize)
40             throws AuthenticationException {
41         this(user);
42         this.pageNo = String.valueOf(pageNo);
43         this.pageSize = String.valueOf(pageSize);
44     }
45
46     public String getPageNo() {
47         return pageNo;
48     }
49
50     public String getPageSize() {
51         return pageSize;
52     }
53 }