2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.groupepsa.internal.rest.api.dto;
15 import java.time.ZonedDateTime;
16 import java.util.List;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
21 import com.google.gson.annotations.SerializedName;
24 * @author Arjan Mels - Initial contribution
28 private @Nullable String email;
29 private @Nullable String firstName;
30 private @Nullable String lastName;
31 @SerializedName("_embedded")
32 private @Nullable Embedded embedded;
33 private @Nullable ZonedDateTime createdAt;
34 private @Nullable ZonedDateTime updatedAt;
36 private static class Embedded {
37 private @Nullable List<Vehicle> vehicles;
40 public String toString() {
41 return new ToStringBuilder(this).append("vehicles", vehicles).toString();
45 public @Nullable String getEmail() {
49 public @Nullable String getLastName() {
53 public @Nullable String getFirstName() {
57 public @Nullable List<Vehicle> getVehicles() {
58 final Embedded resEmbedded = embedded;
59 if (resEmbedded != null) {
60 return resEmbedded.vehicles;
66 public @Nullable ZonedDateTime getCreatedAt() {
70 public @Nullable ZonedDateTime getUpdatedAt() {
75 public String toString() {
76 return new ToStringBuilder(this).append("createdAt", createdAt).append("updatedAt", createdAt)
77 .append("email", email).append("firstName", firstName).append("lastName", lastName)
78 .append("vehicles", embedded != null ? embedded : null).toString();