Skip to content

Commit

Permalink
feat(generation): update request builders and models
Browse files Browse the repository at this point in the history
Update generated files with build 175290
  • Loading branch information
Microsoft Graph DevX Tooling authored and Microsoft Graph DevX Tooling committed Jan 2, 2025
1 parent 2331559 commit 8372e0a
Show file tree
Hide file tree
Showing 103 changed files with 4,175 additions and 419 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.microsoft.graph.chats.item.members.add.AddRequestBuilder;
import com.microsoft.graph.chats.item.members.count.CountRequestBuilder;
import com.microsoft.graph.chats.item.members.item.ConversationMemberItemRequestBuilder;
import com.microsoft.graph.chats.item.members.remove.RemoveRequestBuilder;
import com.microsoft.graph.models.ConversationMember;
import com.microsoft.graph.models.ConversationMemberCollectionResponse;
import com.microsoft.graph.models.odataerrors.ODataError;
Expand Down Expand Up @@ -40,6 +41,14 @@ public AddRequestBuilder add() {
public CountRequestBuilder count() {
return new CountRequestBuilder(pathParameters, requestAdapter);
}
/**
* Provides operations to call the remove method.
* @return a {@link RemoveRequestBuilder}
*/
@jakarta.annotation.Nonnull
public RemoveRequestBuilder remove() {
return new RemoveRequestBuilder(pathParameters, requestAdapter);
}
/**
* Provides operations to manage the members property of the microsoft.graph.chat entity.
* @param conversationMemberId The unique identifier of conversationMember
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,21 @@ public void delete(@jakarta.annotation.Nullable final java.util.function.Consume
this.requestAdapter.sendPrimitive(requestInfo, errorMapping, Void.class);
}
/**
* Retrieve a conversationMember from a chat or channel.
* Retrieve a conversationMember from a chat.
* @return a {@link ConversationMember}
* @throws ODataError When receiving a 4XX or 5XX status code
* @see <a href="https://learn.microsoft.com/graph/api/conversationmember-get?view=graph-rest-1.0">Find more info here</a>
* @see <a href="https://learn.microsoft.com/graph/api/chat-get-members?view=graph-rest-1.0">Find more info here</a>
*/
@jakarta.annotation.Nullable
public ConversationMember get() {
return get(null);
}
/**
* Retrieve a conversationMember from a chat or channel.
* Retrieve a conversationMember from a chat.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link ConversationMember}
* @throws ODataError When receiving a 4XX or 5XX status code
* @see <a href="https://learn.microsoft.com/graph/api/conversationmember-get?view=graph-rest-1.0">Find more info here</a>
* @see <a href="https://learn.microsoft.com/graph/api/chat-get-members?view=graph-rest-1.0">Find more info here</a>
*/
@jakarta.annotation.Nullable
public ConversationMember get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
Expand Down Expand Up @@ -126,15 +126,15 @@ public RequestInformation toDeleteRequestInformation(@jakarta.annotation.Nullabl
return requestInfo;
}
/**
* Retrieve a conversationMember from a chat or channel.
* Retrieve a conversationMember from a chat.
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation() {
return toGetRequestInformation(null);
}
/**
* Retrieve a conversationMember from a chat or channel.
* Retrieve a conversationMember from a chat.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link RequestInformation}
*/
Expand Down Expand Up @@ -186,7 +186,7 @@ public ConversationMemberItemRequestBuilder withUrl(@jakarta.annotation.Nonnull
public class DeleteRequestConfiguration extends BaseRequestConfiguration {
}
/**
* Retrieve a conversationMember from a chat or channel.
* Retrieve a conversationMember from a chat.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class GetQueryParameters implements QueryParameters {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
package com.microsoft.graph.chats.item.members.remove;

import com.microsoft.graph.models.ConversationMember;
import com.microsoft.kiota.serialization.AdditionalDataHolder;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import com.microsoft.kiota.store.BackedModel;
import com.microsoft.kiota.store.BackingStore;
import com.microsoft.kiota.store.BackingStoreFactorySingleton;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class RemovePostRequestBody implements AdditionalDataHolder, BackedModel, Parsable {
/**
* Stores model information.
*/
@jakarta.annotation.Nonnull
protected BackingStore backingStore;
/**
* Instantiates a new {@link RemovePostRequestBody} and sets the default values.
*/
public RemovePostRequestBody() {
this.backingStore = BackingStoreFactorySingleton.instance.createBackingStore();
this.setAdditionalData(new HashMap<>());
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a {@link RemovePostRequestBody}
*/
@jakarta.annotation.Nonnull
public static RemovePostRequestBody createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new RemovePostRequestBody();
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> getAdditionalData() {
Map<String, Object> value = this.backingStore.get("additionalData");
if(value == null) {
value = new HashMap<>();
this.setAdditionalData(value);
}
return value;
}
/**
* Gets the backingStore property value. Stores model information.
* @return a {@link BackingStore}
*/
@jakarta.annotation.Nonnull
public BackingStore getBackingStore() {
return this.backingStore;
}
/**
* The deserialization information for the current model
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
final HashMap<String, java.util.function.Consumer<ParseNode>> deserializerMap = new HashMap<String, java.util.function.Consumer<ParseNode>>(1);
deserializerMap.put("values", (n) -> { this.setValues(n.getCollectionOfObjectValues(ConversationMember::createFromDiscriminatorValue)); });
return deserializerMap;
}
/**
* Gets the values property value. The values property
* @return a {@link java.util.List<ConversationMember>}
*/
@jakarta.annotation.Nullable
public java.util.List<ConversationMember> getValues() {
return this.backingStore.get("values");
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeCollectionOfObjectValues("values", this.getValues());
writer.writeAdditionalData(this.getAdditionalData());
}
/**
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param value Value to set for the AdditionalData property.
*/
public void setAdditionalData(@jakarta.annotation.Nullable final Map<String, Object> value) {
this.backingStore.set("additionalData", value);
}
/**
* Sets the backingStore property value. Stores model information.
* @param value Value to set for the backingStore property.
*/
public void setBackingStore(@jakarta.annotation.Nonnull final BackingStore value) {
Objects.requireNonNull(value);
this.backingStore = value;
}
/**
* Sets the values property value. The values property
* @param value Value to set for the values property.
*/
public void setValues(@jakarta.annotation.Nullable final java.util.List<ConversationMember> value) {
this.backingStore.set("values", value);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package com.microsoft.graph.chats.item.members.remove;

import com.microsoft.graph.models.ActionResultPart;
import com.microsoft.graph.models.BaseCollectionPaginationCountResponse;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class RemovePostResponse extends BaseCollectionPaginationCountResponse implements Parsable {
/**
* Instantiates a new {@link RemovePostResponse} and sets the default values.
*/
public RemovePostResponse() {
super();
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a {@link RemovePostResponse}
*/
@jakarta.annotation.Nonnull
public static RemovePostResponse createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new RemovePostResponse();
}
/**
* The deserialization information for the current model
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
final HashMap<String, java.util.function.Consumer<ParseNode>> deserializerMap = new HashMap<String, java.util.function.Consumer<ParseNode>>(super.getFieldDeserializers());
deserializerMap.put("value", (n) -> { this.setValue(n.getCollectionOfObjectValues(ActionResultPart::createFromDiscriminatorValue)); });
return deserializerMap;
}
/**
* Gets the value property value. The value property
* @return a {@link java.util.List<ActionResultPart>}
*/
@jakarta.annotation.Nullable
public java.util.List<ActionResultPart> getValue() {
return this.backingStore.get("value");
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
writer.writeCollectionOfObjectValues("value", this.getValue());
}
/**
* Sets the value property value. The value property
* @param value Value to set for the value property.
*/
public void setValue(@jakarta.annotation.Nullable final java.util.List<ActionResultPart> value) {
this.backingStore.set("value", value);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
package com.microsoft.graph.chats.item.members.remove;

import com.microsoft.graph.models.odataerrors.ODataError;
import com.microsoft.kiota.BaseRequestBuilder;
import com.microsoft.kiota.BaseRequestConfiguration;
import com.microsoft.kiota.HttpMethod;
import com.microsoft.kiota.RequestAdapter;
import com.microsoft.kiota.RequestInformation;
import com.microsoft.kiota.RequestOption;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParsableFactory;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* Provides operations to call the remove method.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class RemoveRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new {@link RemoveRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
public RemoveRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
super(requestAdapter, "{+baseurl}/chats/{chat%2Did}/members/remove", pathParameters);
}
/**
* Instantiates a new {@link RemoveRequestBuilder} and sets the default values.
* @param rawUrl The raw URL to use for the request builder.
* @param requestAdapter The request adapter to use to execute the requests.
*/
public RemoveRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
super(requestAdapter, "{+baseurl}/chats/{chat%2Did}/members/remove", rawUrl);
}
/**
* Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed.
* @param body The request body
* @return a {@link RemovePostResponse}
* @throws ODataError When receiving a 4XX or 5XX status code
* @see <a href="https://learn.microsoft.com/graph/api/conversationmember-remove?view=graph-rest-1.0">Find more info here</a>
*/
@jakarta.annotation.Nullable
public RemovePostResponse post(@jakarta.annotation.Nonnull final RemovePostRequestBody body) {
return post(body, null);
}
/**
* Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link RemovePostResponse}
* @throws ODataError When receiving a 4XX or 5XX status code
* @see <a href="https://learn.microsoft.com/graph/api/conversationmember-remove?view=graph-rest-1.0">Find more info here</a>
*/
@jakarta.annotation.Nullable
public RemovePostResponse post(@jakarta.annotation.Nonnull final RemovePostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
Objects.requireNonNull(body);
final RequestInformation requestInfo = toPostRequestInformation(body, requestConfiguration);
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
return this.requestAdapter.send(requestInfo, errorMapping, RemovePostResponse::createFromDiscriminatorValue);
}
/**
* Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed.
* @param body The request body
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final RemovePostRequestBody body) {
return toPostRequestInformation(body, null);
}
/**
* Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final RemovePostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
Objects.requireNonNull(body);
final RequestInformation requestInfo = new RequestInformation(HttpMethod.POST, urlTemplate, pathParameters);
requestInfo.configure(requestConfiguration, PostRequestConfiguration::new);
requestInfo.headers.tryAdd("Accept", "application/json");
requestInfo.setContentFromParsable(requestAdapter, "application/json", body);
return requestInfo;
}
/**
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
* @param rawUrl The raw URL to use for the request builder.
* @return a {@link RemoveRequestBuilder}
*/
@jakarta.annotation.Nonnull
public RemoveRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
Objects.requireNonNull(rawUrl);
return new RemoveRequestBuilder(rawUrl, requestAdapter);
}
/**
* Configuration for the request such as headers, query parameters, and middleware options.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class PostRequestConfiguration extends BaseRequestConfiguration {
}
}
Loading

0 comments on commit 8372e0a

Please sign in to comment.