Skip to content

Commit b75bbea

Browse files
committed
feat: add ChangeNotification models
1 parent c7ce014 commit b75bbea

File tree

8 files changed

+838
-3
lines changed

8 files changed

+838
-3
lines changed

gradle/dependencies.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
dependencies {
2-
2+
33
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
44
implementation 'jakarta.annotation:jakarta.annotation-api:2.1.1'
55

66
// Core Http library
7-
api 'com.microsoft.graph:microsoft-graph-core:3.5.0'
8-
7+
api 'com.microsoft.graph:microsoft-graph-core:3.6.0'
8+
99
implementation 'com.microsoft.kiota:microsoft-kiota-authentication-azure:1.8.2'
1010
implementation 'com.microsoft.kiota:microsoft-kiota-http-okHttp:1.8.2'
1111
implementation 'com.microsoft.kiota:microsoft-kiota-serialization-json:1.8.2'
Lines changed: 280 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,280 @@
1+
package com.microsoft.graph.models;
2+
3+
import com.microsoft.graph.core.models.EncryptedContentBearer;
4+
import com.microsoft.kiota.serialization.AdditionalDataHolder;
5+
import com.microsoft.kiota.serialization.Parsable;
6+
import com.microsoft.kiota.serialization.ParseNode;
7+
import com.microsoft.kiota.serialization.SerializationWriter;
8+
import com.microsoft.kiota.store.BackedModel;
9+
import com.microsoft.kiota.store.BackingStore;
10+
import com.microsoft.kiota.store.BackingStoreFactorySingleton;
11+
import java.time.OffsetDateTime;
12+
import java.util.HashMap;
13+
import java.util.Map;
14+
import java.util.Objects;
15+
16+
17+
public class ChangeNotification implements EncryptedContentBearer<ChangeNotificationEncryptedContent>, AdditionalDataHolder, BackedModel, Parsable {
18+
/**
19+
* Stores model information.
20+
*/
21+
@jakarta.annotation.Nonnull
22+
protected BackingStore backingStore;
23+
/**
24+
* Instantiates a new {@link ChangeNotification} and sets the default values.
25+
*/
26+
public ChangeNotification() {
27+
this.backingStore = BackingStoreFactorySingleton.instance.createBackingStore();
28+
this.setAdditionalData(new HashMap<>());
29+
}
30+
/**
31+
* Creates a new instance of the appropriate class based on discriminator value
32+
* @param parseNode The parse node to use to read the discriminator value and create the object
33+
* @return a {@link ChangeNotification}
34+
*/
35+
@jakarta.annotation.Nonnull
36+
public static ChangeNotification createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
37+
Objects.requireNonNull(parseNode);
38+
return new ChangeNotification();
39+
}
40+
/**
41+
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
42+
* @return a {@link Map<String, Object>}
43+
*/
44+
@jakarta.annotation.Nonnull
45+
public Map<String, Object> getAdditionalData() {
46+
Map<String, Object> value = this.backingStore.get("additionalData");
47+
if(value == null) {
48+
value = new HashMap<>();
49+
this.setAdditionalData(value);
50+
}
51+
return value;
52+
}
53+
/**
54+
* Gets the backingStore property value. Stores model information.
55+
* @return a {@link BackingStore}
56+
*/
57+
@jakarta.annotation.Nonnull
58+
public BackingStore getBackingStore() {
59+
return this.backingStore;
60+
}
61+
/**
62+
* Gets the changeType property value. The changeType property
63+
* @return a {@link ChangeType}
64+
*/
65+
@jakarta.annotation.Nullable
66+
public ChangeType getChangeType() {
67+
return this.backingStore.get("changeType");
68+
}
69+
/**
70+
* Gets the clientState property value. The clientState property
71+
* @return a {@link String}
72+
*/
73+
@jakarta.annotation.Nullable
74+
public String getClientState() {
75+
return this.backingStore.get("clientState");
76+
}
77+
/**
78+
* Gets the encryptedContent property value. The encryptedContent property
79+
* @return a {@link ChangeNotificationEncryptedContent}
80+
*/
81+
@jakarta.annotation.Nullable
82+
public ChangeNotificationEncryptedContent getEncryptedContent() {
83+
return this.backingStore.get("encryptedContent");
84+
}
85+
/**
86+
* The deserialization information for the current model
87+
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
88+
*/
89+
@jakarta.annotation.Nonnull
90+
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
91+
final HashMap<String, java.util.function.Consumer<ParseNode>> deserializerMap = new HashMap<String, java.util.function.Consumer<ParseNode>>(11);
92+
deserializerMap.put("changeType", (n) -> { this.setChangeType(n.getEnumValue(ChangeType::forValue)); });
93+
deserializerMap.put("clientState", (n) -> { this.setClientState(n.getStringValue()); });
94+
deserializerMap.put("encryptedContent", (n) -> { this.setEncryptedContent(n.getObjectValue(ChangeNotificationEncryptedContent::createFromDiscriminatorValue)); });
95+
deserializerMap.put("id", (n) -> { this.setId(n.getStringValue()); });
96+
deserializerMap.put("lifecycleEvent", (n) -> { this.setLifecycleEvent(n.getEnumValue(LifecycleEventType::forValue)); });
97+
deserializerMap.put("@odata.type", (n) -> { this.setOdataType(n.getStringValue()); });
98+
deserializerMap.put("resource", (n) -> { this.setResource(n.getStringValue()); });
99+
deserializerMap.put("resourceData", (n) -> { this.setResourceData(n.getObjectValue(ResourceData::createFromDiscriminatorValue)); });
100+
deserializerMap.put("subscriptionExpirationDateTime", (n) -> { this.setSubscriptionExpirationDateTime(n.getOffsetDateTimeValue()); });
101+
deserializerMap.put("subscriptionId", (n) -> { this.setSubscriptionId(n.getStringValue()); });
102+
deserializerMap.put("tenantId", (n) -> { this.setTenantId(n.getStringValue()); });
103+
return deserializerMap;
104+
}
105+
/**
106+
* Gets the id property value. The id property
107+
* @return a {@link String}
108+
*/
109+
@jakarta.annotation.Nullable
110+
public String getId() {
111+
return this.backingStore.get("id");
112+
}
113+
/**
114+
* Gets the lifecycleEvent property value. The lifecycleEvent property
115+
* @return a {@link LifecycleEventType}
116+
*/
117+
@jakarta.annotation.Nullable
118+
public LifecycleEventType getLifecycleEvent() {
119+
return this.backingStore.get("lifecycleEvent");
120+
}
121+
/**
122+
* Gets the @odata.type property value. The OdataType property
123+
* @return a {@link String}
124+
*/
125+
@jakarta.annotation.Nullable
126+
public String getOdataType() {
127+
return this.backingStore.get("odataType");
128+
}
129+
/**
130+
* Gets the resource property value. The resource property
131+
* @return a {@link String}
132+
*/
133+
@jakarta.annotation.Nullable
134+
public String getResource() {
135+
return this.backingStore.get("resource");
136+
}
137+
/**
138+
* Gets the resourceData property value. The resourceData property
139+
* @return a {@link ResourceData}
140+
*/
141+
@jakarta.annotation.Nullable
142+
public ResourceData getResourceData() {
143+
return this.backingStore.get("resourceData");
144+
}
145+
/**
146+
* Gets the subscriptionExpirationDateTime property value. The subscriptionExpirationDateTime property
147+
* @return a {@link OffsetDateTime}
148+
*/
149+
@jakarta.annotation.Nullable
150+
public OffsetDateTime getSubscriptionExpirationDateTime() {
151+
return this.backingStore.get("subscriptionExpirationDateTime");
152+
}
153+
/**
154+
* Gets the subscriptionId property value. The subscriptionId property
155+
* @return a {@link String}
156+
*/
157+
@jakarta.annotation.Nullable
158+
public String getSubscriptionId() {
159+
return this.backingStore.get("subscriptionId");
160+
}
161+
/**
162+
* Gets the tenantId property value. The tenantId property
163+
* @return a {@link String}
164+
*/
165+
@jakarta.annotation.Nullable
166+
public String getTenantId() {
167+
return this.backingStore.get("tenantId");
168+
}
169+
/**
170+
* Serializes information the current object
171+
* @param writer Serialization writer to use to serialize this model
172+
*/
173+
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
174+
Objects.requireNonNull(writer);
175+
writer.writeEnumValue("changeType", this.getChangeType());
176+
writer.writeStringValue("clientState", this.getClientState());
177+
writer.writeObjectValue("encryptedContent", this.getEncryptedContent());
178+
writer.writeStringValue("id", this.getId());
179+
writer.writeEnumValue("lifecycleEvent", this.getLifecycleEvent());
180+
writer.writeStringValue("@odata.type", this.getOdataType());
181+
writer.writeStringValue("resource", this.getResource());
182+
writer.writeObjectValue("resourceData", this.getResourceData());
183+
writer.writeOffsetDateTimeValue("subscriptionExpirationDateTime", this.getSubscriptionExpirationDateTime());
184+
writer.writeStringValue("subscriptionId", this.getSubscriptionId());
185+
writer.writeStringValue("tenantId", this.getTenantId());
186+
writer.writeAdditionalData(this.getAdditionalData());
187+
}
188+
/**
189+
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
190+
* @param value Value to set for the AdditionalData property.
191+
*/
192+
public void setAdditionalData(@jakarta.annotation.Nullable final Map<String, Object> value) {
193+
this.backingStore.set("additionalData", value);
194+
}
195+
/**
196+
* Sets the backingStore property value. Stores model information.
197+
* @param value Value to set for the backingStore property.
198+
*/
199+
public void setBackingStore(@jakarta.annotation.Nonnull final BackingStore value) {
200+
Objects.requireNonNull(value);
201+
this.backingStore = value;
202+
}
203+
/**
204+
* Sets the changeType property value. The changeType property
205+
* @param value Value to set for the changeType property.
206+
*/
207+
public void setChangeType(@jakarta.annotation.Nullable final ChangeType value) {
208+
this.backingStore.set("changeType", value);
209+
}
210+
/**
211+
* Sets the clientState property value. The clientState property
212+
* @param value Value to set for the clientState property.
213+
*/
214+
public void setClientState(@jakarta.annotation.Nullable final String value) {
215+
this.backingStore.set("clientState", value);
216+
}
217+
/**
218+
* Sets the encryptedContent property value. The encryptedContent property
219+
* @param value Value to set for the encryptedContent property.
220+
*/
221+
public void setEncryptedContent(@jakarta.annotation.Nullable final ChangeNotificationEncryptedContent value) {
222+
this.backingStore.set("encryptedContent", value);
223+
}
224+
/**
225+
* Sets the id property value. The id property
226+
* @param value Value to set for the id property.
227+
*/
228+
public void setId(@jakarta.annotation.Nullable final String value) {
229+
this.backingStore.set("id", value);
230+
}
231+
/**
232+
* Sets the lifecycleEvent property value. The lifecycleEvent property
233+
* @param value Value to set for the lifecycleEvent property.
234+
*/
235+
public void setLifecycleEvent(@jakarta.annotation.Nullable final LifecycleEventType value) {
236+
this.backingStore.set("lifecycleEvent", value);
237+
}
238+
/**
239+
* Sets the @odata.type property value. The OdataType property
240+
* @param value Value to set for the @odata.type property.
241+
*/
242+
public void setOdataType(@jakarta.annotation.Nullable final String value) {
243+
this.backingStore.set("odataType", value);
244+
}
245+
/**
246+
* Sets the resource property value. The resource property
247+
* @param value Value to set for the resource property.
248+
*/
249+
public void setResource(@jakarta.annotation.Nullable final String value) {
250+
this.backingStore.set("resource", value);
251+
}
252+
/**
253+
* Sets the resourceData property value. The resourceData property
254+
* @param value Value to set for the resourceData property.
255+
*/
256+
public void setResourceData(@jakarta.annotation.Nullable final ResourceData value) {
257+
this.backingStore.set("resourceData", value);
258+
}
259+
/**
260+
* Sets the subscriptionExpirationDateTime property value. The subscriptionExpirationDateTime property
261+
* @param value Value to set for the subscriptionExpirationDateTime property.
262+
*/
263+
public void setSubscriptionExpirationDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
264+
this.backingStore.set("subscriptionExpirationDateTime", value);
265+
}
266+
/**
267+
* Sets the subscriptionId property value. The subscriptionId property
268+
* @param value Value to set for the subscriptionId property.
269+
*/
270+
public void setSubscriptionId(@jakarta.annotation.Nullable final String value) {
271+
this.backingStore.set("subscriptionId", value);
272+
}
273+
/**
274+
* Sets the tenantId property value. The tenantId property
275+
* @param value Value to set for the tenantId property.
276+
*/
277+
public void setTenantId(@jakarta.annotation.Nullable final String value) {
278+
this.backingStore.set("tenantId", value);
279+
}
280+
}

0 commit comments

Comments
 (0)