Skip to content

Commit 9ae83ff

Browse files
microsoft-graph-devx-bot[bot]Microsoft Graph DevX Tooling
andauthored
feat(generation): update request builders and models (#2519)
Update generated files with build 204842 Co-authored-by: Microsoft Graph DevX Tooling <[email protected]>
1 parent 4c7685d commit 9ae83ff

File tree

171 files changed

+20813
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+20813
-126
lines changed

src/main/java/com/microsoft/graph/generated/chats/item/ChatItemRequestBuilder.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.microsoft.graph.chats.item.messages.MessagesRequestBuilder;
1010
import com.microsoft.graph.chats.item.permissiongrants.PermissionGrantsRequestBuilder;
1111
import com.microsoft.graph.chats.item.pinnedmessages.PinnedMessagesRequestBuilder;
12+
import com.microsoft.graph.chats.item.removeallaccessforuser.RemoveAllAccessForUserRequestBuilder;
1213
import com.microsoft.graph.chats.item.sendactivitynotification.SendActivityNotificationRequestBuilder;
1314
import com.microsoft.graph.chats.item.tabs.TabsRequestBuilder;
1415
import com.microsoft.graph.chats.item.unhideforuser.UnhideForUserRequestBuilder;
@@ -104,6 +105,14 @@ public PermissionGrantsRequestBuilder permissionGrants() {
104105
public PinnedMessagesRequestBuilder pinnedMessages() {
105106
return new PinnedMessagesRequestBuilder(pathParameters, requestAdapter);
106107
}
108+
/**
109+
* Provides operations to call the removeAllAccessForUser method.
110+
* @return a {@link RemoveAllAccessForUserRequestBuilder}
111+
*/
112+
@jakarta.annotation.Nonnull
113+
public RemoveAllAccessForUserRequestBuilder removeAllAccessForUser() {
114+
return new RemoveAllAccessForUserRequestBuilder(pathParameters, requestAdapter);
115+
}
107116
/**
108117
* Provides operations to call the sendActivityNotification method.
109118
* @return a {@link SendActivityNotificationRequestBuilder}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
package com.microsoft.graph.chats.item.removeallaccessforuser;
2+
3+
import com.microsoft.graph.models.TeamworkUserIdentity;
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.util.HashMap;
12+
import java.util.Map;
13+
import java.util.Objects;
14+
@jakarta.annotation.Generated("com.microsoft.kiota")
15+
public class RemoveAllAccessForUserPostRequestBody implements AdditionalDataHolder, BackedModel, Parsable {
16+
/**
17+
* Stores model information.
18+
*/
19+
@jakarta.annotation.Nonnull
20+
protected BackingStore backingStore;
21+
/**
22+
* Instantiates a new {@link RemoveAllAccessForUserPostRequestBody} and sets the default values.
23+
*/
24+
public RemoveAllAccessForUserPostRequestBody() {
25+
this.backingStore = BackingStoreFactorySingleton.instance.createBackingStore();
26+
this.setAdditionalData(new HashMap<>());
27+
}
28+
/**
29+
* Creates a new instance of the appropriate class based on discriminator value
30+
* @param parseNode The parse node to use to read the discriminator value and create the object
31+
* @return a {@link RemoveAllAccessForUserPostRequestBody}
32+
*/
33+
@jakarta.annotation.Nonnull
34+
public static RemoveAllAccessForUserPostRequestBody createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
35+
Objects.requireNonNull(parseNode);
36+
return new RemoveAllAccessForUserPostRequestBody();
37+
}
38+
/**
39+
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
40+
* @return a {@link Map<String, Object>}
41+
*/
42+
@jakarta.annotation.Nonnull
43+
public Map<String, Object> getAdditionalData() {
44+
Map<String, Object> value = this.backingStore.get("additionalData");
45+
if(value == null) {
46+
value = new HashMap<>();
47+
this.setAdditionalData(value);
48+
}
49+
return value;
50+
}
51+
/**
52+
* Gets the backingStore property value. Stores model information.
53+
* @return a {@link BackingStore}
54+
*/
55+
@jakarta.annotation.Nonnull
56+
public BackingStore getBackingStore() {
57+
return this.backingStore;
58+
}
59+
/**
60+
* The deserialization information for the current model
61+
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
62+
*/
63+
@jakarta.annotation.Nonnull
64+
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
65+
final HashMap<String, java.util.function.Consumer<ParseNode>> deserializerMap = new HashMap<String, java.util.function.Consumer<ParseNode>>(1);
66+
deserializerMap.put("user", (n) -> { this.setUser(n.getObjectValue(TeamworkUserIdentity::createFromDiscriminatorValue)); });
67+
return deserializerMap;
68+
}
69+
/**
70+
* Gets the user property value. The user property
71+
* @return a {@link TeamworkUserIdentity}
72+
*/
73+
@jakarta.annotation.Nullable
74+
public TeamworkUserIdentity getUser() {
75+
return this.backingStore.get("user");
76+
}
77+
/**
78+
* Serializes information the current object
79+
* @param writer Serialization writer to use to serialize this model
80+
*/
81+
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
82+
Objects.requireNonNull(writer);
83+
writer.writeObjectValue("user", this.getUser());
84+
writer.writeAdditionalData(this.getAdditionalData());
85+
}
86+
/**
87+
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
88+
* @param value Value to set for the AdditionalData property.
89+
*/
90+
public void setAdditionalData(@jakarta.annotation.Nullable final Map<String, Object> value) {
91+
this.backingStore.set("additionalData", value);
92+
}
93+
/**
94+
* Sets the backingStore property value. Stores model information.
95+
* @param value Value to set for the backingStore property.
96+
*/
97+
public void setBackingStore(@jakarta.annotation.Nonnull final BackingStore value) {
98+
Objects.requireNonNull(value);
99+
this.backingStore = value;
100+
}
101+
/**
102+
* Sets the user property value. The user property
103+
* @param value Value to set for the user property.
104+
*/
105+
public void setUser(@jakarta.annotation.Nullable final TeamworkUserIdentity value) {
106+
this.backingStore.set("user", value);
107+
}
108+
}
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
package com.microsoft.graph.chats.item.removeallaccessforuser;
2+
3+
import com.microsoft.graph.models.odataerrors.ODataError;
4+
import com.microsoft.kiota.BaseRequestBuilder;
5+
import com.microsoft.kiota.BaseRequestConfiguration;
6+
import com.microsoft.kiota.HttpMethod;
7+
import com.microsoft.kiota.RequestAdapter;
8+
import com.microsoft.kiota.RequestInformation;
9+
import com.microsoft.kiota.RequestOption;
10+
import com.microsoft.kiota.serialization.Parsable;
11+
import com.microsoft.kiota.serialization.ParsableFactory;
12+
import java.util.Collection;
13+
import java.util.HashMap;
14+
import java.util.Map;
15+
import java.util.Objects;
16+
/**
17+
* Provides operations to call the removeAllAccessForUser method.
18+
*/
19+
@jakarta.annotation.Generated("com.microsoft.kiota")
20+
public class RemoveAllAccessForUserRequestBuilder extends BaseRequestBuilder {
21+
/**
22+
* Instantiates a new {@link RemoveAllAccessForUserRequestBuilder} and sets the default values.
23+
* @param pathParameters Path parameters for the request
24+
* @param requestAdapter The request adapter to use to execute the requests.
25+
*/
26+
public RemoveAllAccessForUserRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
27+
super(requestAdapter, "{+baseurl}/chats/{chat%2Did}/removeAllAccessForUser", pathParameters);
28+
}
29+
/**
30+
* Instantiates a new {@link RemoveAllAccessForUserRequestBuilder} and sets the default values.
31+
* @param rawUrl The raw URL to use for the request builder.
32+
* @param requestAdapter The request adapter to use to execute the requests.
33+
*/
34+
public RemoveAllAccessForUserRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
35+
super(requestAdapter, "{+baseurl}/chats/{chat%2Did}/removeAllAccessForUser", rawUrl);
36+
}
37+
/**
38+
* Remove access to a chat for a user.
39+
* @param body The request body
40+
* @throws ODataError When receiving a 4XX or 5XX status code
41+
* @see <a href="https://learn.microsoft.com/graph/api/chat-removeallaccessforuser?view=graph-rest-1.0">Find more info here</a>
42+
*/
43+
public void post(@jakarta.annotation.Nonnull final RemoveAllAccessForUserPostRequestBody body) {
44+
post(body, null);
45+
}
46+
/**
47+
* Remove access to a chat for a user.
48+
* @param body The request body
49+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
50+
* @throws ODataError When receiving a 4XX or 5XX status code
51+
* @see <a href="https://learn.microsoft.com/graph/api/chat-removeallaccessforuser?view=graph-rest-1.0">Find more info here</a>
52+
*/
53+
public void post(@jakarta.annotation.Nonnull final RemoveAllAccessForUserPostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
54+
Objects.requireNonNull(body);
55+
final RequestInformation requestInfo = toPostRequestInformation(body, requestConfiguration);
56+
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
57+
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
58+
this.requestAdapter.sendPrimitive(requestInfo, errorMapping, Void.class);
59+
}
60+
/**
61+
* Remove access to a chat for a user.
62+
* @param body The request body
63+
* @return a {@link RequestInformation}
64+
*/
65+
@jakarta.annotation.Nonnull
66+
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final RemoveAllAccessForUserPostRequestBody body) {
67+
return toPostRequestInformation(body, null);
68+
}
69+
/**
70+
* Remove access to a chat for a user.
71+
* @param body The request body
72+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
73+
* @return a {@link RequestInformation}
74+
*/
75+
@jakarta.annotation.Nonnull
76+
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final RemoveAllAccessForUserPostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
77+
Objects.requireNonNull(body);
78+
final RequestInformation requestInfo = new RequestInformation(HttpMethod.POST, urlTemplate, pathParameters);
79+
requestInfo.configure(requestConfiguration, PostRequestConfiguration::new);
80+
requestInfo.headers.tryAdd("Accept", "application/json");
81+
requestInfo.setContentFromParsable(requestAdapter, "application/json", body);
82+
return requestInfo;
83+
}
84+
/**
85+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
86+
* @param rawUrl The raw URL to use for the request builder.
87+
* @return a {@link RemoveAllAccessForUserRequestBuilder}
88+
*/
89+
@jakarta.annotation.Nonnull
90+
public RemoveAllAccessForUserRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
91+
Objects.requireNonNull(rawUrl);
92+
return new RemoveAllAccessForUserRequestBuilder(rawUrl, requestAdapter);
93+
}
94+
/**
95+
* Configuration for the request such as headers, query parameters, and middleware options.
96+
*/
97+
@jakarta.annotation.Generated("com.microsoft.kiota")
98+
public class PostRequestConfiguration extends BaseRequestConfiguration {
99+
}
100+
}

src/main/java/com/microsoft/graph/generated/drives/item/items/item/retentionlabel/RetentionLabelRequestBuilder.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,21 @@ public void delete(@jakarta.annotation.Nullable final java.util.function.Consume
5757
this.requestAdapter.sendPrimitive(requestInfo, errorMapping, Void.class);
5858
}
5959
/**
60-
* Information about retention label and settings enforced on the driveItem. Read-write.
60+
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator&apos;s perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
6161
* @return a {@link ItemRetentionLabel}
6262
* @throws ODataError When receiving a 4XX or 5XX status code
63+
* @see <a href="https://learn.microsoft.com/graph/api/driveitem-getretentionlabel?view=graph-rest-1.0">Find more info here</a>
6364
*/
6465
@jakarta.annotation.Nullable
6566
public ItemRetentionLabel get() {
6667
return get(null);
6768
}
6869
/**
69-
* Information about retention label and settings enforced on the driveItem. Read-write.
70+
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator&apos;s perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
7071
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
7172
* @return a {@link ItemRetentionLabel}
7273
* @throws ODataError When receiving a 4XX or 5XX status code
74+
* @see <a href="https://learn.microsoft.com/graph/api/driveitem-getretentionlabel?view=graph-rest-1.0">Find more info here</a>
7375
*/
7476
@jakarta.annotation.Nullable
7577
public ItemRetentionLabel get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
@@ -126,15 +128,15 @@ public RequestInformation toDeleteRequestInformation(@jakarta.annotation.Nullabl
126128
return requestInfo;
127129
}
128130
/**
129-
* Information about retention label and settings enforced on the driveItem. Read-write.
131+
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator&apos;s perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
130132
* @return a {@link RequestInformation}
131133
*/
132134
@jakarta.annotation.Nonnull
133135
public RequestInformation toGetRequestInformation() {
134136
return toGetRequestInformation(null);
135137
}
136138
/**
137-
* Information about retention label and settings enforced on the driveItem. Read-write.
139+
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator&apos;s perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
138140
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
139141
* @return a {@link RequestInformation}
140142
*/
@@ -186,7 +188,7 @@ public RetentionLabelRequestBuilder withUrl(@jakarta.annotation.Nonnull final St
186188
public class DeleteRequestConfiguration extends BaseRequestConfiguration {
187189
}
188190
/**
189-
* Information about retention label and settings enforced on the driveItem. Read-write.
191+
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator&apos;s perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
190192
*/
191193
@jakarta.annotation.Generated("com.microsoft.kiota")
192194
public class GetQueryParameters implements QueryParameters {

0 commit comments

Comments
 (0)