1+ /*
2+ *
3+ * Copyright (c) 2018-2025 Green Button Alliance, Inc.
4+ *
5+ * Portions (c) 2013-2018 EnergyOS.org
6+ *
7+ * Licensed under the Apache License, Version 2.0 (the "License");
8+ * you may not use this file except in compliance with the License.
9+ * You may obtain a copy of the License at
10+ *
11+ * http://www.apache.org/licenses/LICENSE-2.0
12+ *
13+ * Unless required by applicable law or agreed to in writing, software
14+ * distributed under the License is distributed on an "AS IS" BASIS,
15+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+ * See the License for the specific language governing permissions and
17+ * limitations under the License.
18+ *
19+ */
20+
21+ package org .greenbuttonalliance .espi .common .dto .usage ;
22+
23+ import jakarta .xml .bind .annotation .*;
24+
25+ /**
26+ * ApplicationInformation DTO record for JAXB XML marshalling/unmarshalling.
27+ *
28+ * Represents OAuth 2.0 application information for third-party access
29+ * to Green Button data.
30+ */
31+ @ XmlRootElement (name = "ApplicationInformation" , namespace = "http://naesb.org/espi" )
32+ @ XmlAccessorType (XmlAccessType .PROPERTY )
33+ @ XmlType (name = "ApplicationInformation" , namespace = "http://naesb.org/espi" , propOrder = {
34+ "dataCustodianBulkRequestURI" , "dataCustodianResourceEndpoint" , "dataCustodianApplicationStatus" ,
35+ "thirdPartyApplicationDescription" , "thirdPartyApplicationStatus" , "thirdPartyApplicationType" ,
36+ "thirdPartyApplicationUse" , "thirdPartyPhone" , "authorizationServerAuthorizationEndpoint" ,
37+ "authorizationServerRegistrationEndpoint" , "authorizationServerTokenEndpoint" ,
38+ "dataCustodianScopeSelectionScreenURI" , "thirdPartyLoginScreenURI" , "thirdPartyNotifyURI" ,
39+ "authorizationServerUri" , "thirdPartyApplicationName" , "clientName" , "clientId" , "clientSecret" ,
40+ "clientIdIssuedAt" , "clientSecretExpiresAt" , "contacts" , "clientUri" , "logoUri" , "policyUri" ,
41+ "redirectUri" , "softwareId" , "softwareVersion" , "tokenEndpointAuthMethod" , "responseType" ,
42+ "registrationAccessToken" , "registrationClientUri" , "grantTypes" , "scopes"
43+ })
44+ public record ApplicationInformationDto (
45+
46+ String uuid ,
47+ String dataCustodianBulkRequestURI ,
48+ String dataCustodianResourceEndpoint ,
49+ Short dataCustodianApplicationStatus ,
50+ String thirdPartyApplicationDescription ,
51+ Short thirdPartyApplicationStatus ,
52+ Short thirdPartyApplicationType ,
53+ Short thirdPartyApplicationUse ,
54+ String thirdPartyPhone ,
55+ String authorizationServerAuthorizationEndpoint ,
56+ String authorizationServerRegistrationEndpoint ,
57+ String authorizationServerTokenEndpoint ,
58+ String dataCustodianScopeSelectionScreenURI ,
59+ String thirdPartyLoginScreenURI ,
60+ String thirdPartyNotifyURI ,
61+ String authorizationServerUri ,
62+ String thirdPartyApplicationName ,
63+ String clientName ,
64+ String clientId ,
65+ String clientSecret ,
66+ Long clientIdIssuedAt ,
67+ Long clientSecretExpiresAt ,
68+ String contacts ,
69+ String clientUri ,
70+ String logoUri ,
71+ String policyUri ,
72+ String redirectUri ,
73+ String softwareId ,
74+ String softwareVersion ,
75+ String tokenEndpointAuthMethod ,
76+ String responseType ,
77+ String registrationAccessToken ,
78+ String registrationClientUri ,
79+ String grantTypes ,
80+ String scopes
81+ ) {
82+
83+ /**
84+ * Default constructor for JAXB.
85+ */
86+ public ApplicationInformationDto () {
87+ this (null , null , null , null , null , null , null , null , null ,
88+ null , null , null , null , null , null , null , null , null ,
89+ null , null , null , null , null , null , null , null , null ,
90+ null , null , null , null , null , null , null , null );
91+ }
92+
93+ /**
94+ * Constructor for basic application information.
95+ */
96+ public ApplicationInformationDto (String clientId , String clientSecret , String thirdPartyApplicationName ) {
97+ this (null , null , null , null , null , null , null , null , null ,
98+ null , null , null , null , null , null , null , thirdPartyApplicationName , null ,
99+ clientId , clientSecret , null , null , null , null , null , null , null ,
100+ null , null , null , null , null , null , null , null );
101+ }
102+
103+ // JAXB property accessors
104+ @ XmlElement (name = "dataCustodianBulkRequestURI" , namespace = "http://naesb.org/espi" )
105+ public String getDataCustodianBulkRequestURI () { return dataCustodianBulkRequestURI ; }
106+
107+ @ XmlElement (name = "dataCustodianResourceEndpoint" , namespace = "http://naesb.org/espi" )
108+ public String getDataCustodianResourceEndpoint () { return dataCustodianResourceEndpoint ; }
109+
110+ @ XmlElement (name = "dataCustodianApplicationStatus" , namespace = "http://naesb.org/espi" )
111+ public Short getDataCustodianApplicationStatus () { return dataCustodianApplicationStatus ; }
112+
113+ @ XmlElement (name = "thirdPartyApplicationDescription" , namespace = "http://naesb.org/espi" )
114+ public String getThirdPartyApplicationDescription () { return thirdPartyApplicationDescription ; }
115+
116+ @ XmlElement (name = "thirdPartyApplicationStatus" , namespace = "http://naesb.org/espi" )
117+ public Short getThirdPartyApplicationStatus () { return thirdPartyApplicationStatus ; }
118+
119+ @ XmlElement (name = "thirdPartyApplicationType" , namespace = "http://naesb.org/espi" )
120+ public Short getThirdPartyApplicationType () { return thirdPartyApplicationType ; }
121+
122+ @ XmlElement (name = "thirdPartyApplicationUse" , namespace = "http://naesb.org/espi" )
123+ public Short getThirdPartyApplicationUse () { return thirdPartyApplicationUse ; }
124+
125+ @ XmlElement (name = "thirdPartyPhone" , namespace = "http://naesb.org/espi" )
126+ public String getThirdPartyPhone () { return thirdPartyPhone ; }
127+
128+ @ XmlElement (name = "authorizationServerAuthorizationEndpoint" , namespace = "http://naesb.org/espi" )
129+ public String getAuthorizationServerAuthorizationEndpoint () { return authorizationServerAuthorizationEndpoint ; }
130+
131+ @ XmlElement (name = "authorizationServerRegistrationEndpoint" , namespace = "http://naesb.org/espi" )
132+ public String getAuthorizationServerRegistrationEndpoint () { return authorizationServerRegistrationEndpoint ; }
133+
134+ @ XmlElement (name = "authorizationServerTokenEndpoint" , namespace = "http://naesb.org/espi" )
135+ public String getAuthorizationServerTokenEndpoint () { return authorizationServerTokenEndpoint ; }
136+
137+ @ XmlElement (name = "dataCustodianScopeSelectionScreenURI" , namespace = "http://naesb.org/espi" )
138+ public String getDataCustodianScopeSelectionScreenURI () { return dataCustodianScopeSelectionScreenURI ; }
139+
140+ @ XmlElement (name = "thirdPartyLoginScreenURI" , namespace = "http://naesb.org/espi" )
141+ public String getThirdPartyLoginScreenURI () { return thirdPartyLoginScreenURI ; }
142+
143+ @ XmlElement (name = "thirdPartyNotifyURI" , namespace = "http://naesb.org/espi" )
144+ public String getThirdPartyNotifyURI () { return thirdPartyNotifyURI ; }
145+
146+ @ XmlElement (name = "authorizationServerUri" , namespace = "http://naesb.org/espi" )
147+ public String getAuthorizationServerUri () { return authorizationServerUri ; }
148+
149+ @ XmlElement (name = "thirdPartyApplicationName" , namespace = "http://naesb.org/espi" )
150+ public String getThirdPartyApplicationName () { return thirdPartyApplicationName ; }
151+
152+ @ XmlElement (name = "client_name" , namespace = "http://naesb.org/espi" )
153+ public String getClientName () { return clientName ; }
154+
155+ @ XmlElement (name = "client_id" , namespace = "http://naesb.org/espi" )
156+ public String getClientId () { return clientId ; }
157+
158+ @ XmlElement (name = "client_secret" , namespace = "http://naesb.org/espi" )
159+ public String getClientSecret () { return clientSecret ; }
160+
161+ @ XmlElement (name = "client_id_issued_at" , namespace = "http://naesb.org/espi" )
162+ public Long getClientIdIssuedAt () { return clientIdIssuedAt ; }
163+
164+ @ XmlElement (name = "client_secret_expires_at" , namespace = "http://naesb.org/espi" )
165+ public Long getClientSecretExpiresAt () { return clientSecretExpiresAt ; }
166+
167+ @ XmlElement (name = "contacts" , namespace = "http://naesb.org/espi" )
168+ public String getContacts () { return contacts ; }
169+
170+ @ XmlElement (name = "client_uri" , namespace = "http://naesb.org/espi" )
171+ public String getClientUri () { return clientUri ; }
172+
173+ @ XmlElement (name = "logo_uri" , namespace = "http://naesb.org/espi" )
174+ public String getLogoUri () { return logoUri ; }
175+
176+ @ XmlElement (name = "policy_uri" , namespace = "http://naesb.org/espi" )
177+ public String getPolicyUri () { return policyUri ; }
178+
179+ @ XmlElement (name = "redirect_uri" , namespace = "http://naesb.org/espi" )
180+ public String getRedirectUri () { return redirectUri ; }
181+
182+ @ XmlElement (name = "software_id" , namespace = "http://naesb.org/espi" )
183+ public String getSoftwareId () { return softwareId ; }
184+
185+ @ XmlElement (name = "software_version" , namespace = "http://naesb.org/espi" )
186+ public String getSoftwareVersion () { return softwareVersion ; }
187+
188+ @ XmlElement (name = "token_endpoint_auth_method" , namespace = "http://naesb.org/espi" )
189+ public String getTokenEndpointAuthMethod () { return tokenEndpointAuthMethod ; }
190+
191+ @ XmlElement (name = "response_type" , namespace = "http://naesb.org/espi" )
192+ public String getResponseType () { return responseType ; }
193+
194+ @ XmlElement (name = "registration_access_token" , namespace = "http://naesb.org/espi" )
195+ public String getRegistrationAccessToken () { return registrationAccessToken ; }
196+
197+ @ XmlElement (name = "registration_client_uri" , namespace = "http://naesb.org/espi" )
198+ public String getRegistrationClientUri () { return registrationClientUri ; }
199+
200+ @ XmlElement (name = "grant_types" , namespace = "http://naesb.org/espi" )
201+ public String getGrantTypes () { return grantTypes ; }
202+
203+ @ XmlElement (name = "scope" , namespace = "http://naesb.org/espi" )
204+ public String getScopes () { return scopes ; }
205+ }
0 commit comments