-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(generation): update request builders and models
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
Showing
103 changed files
with
4,175 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
...n/java/com/microsoft/graph/generated/chats/item/members/remove/RemovePostRequestBody.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
...main/java/com/microsoft/graph/generated/chats/item/members/remove/RemovePostResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
104 changes: 104 additions & 0 deletions
104
...in/java/com/microsoft/graph/generated/chats/item/members/remove/RemoveRequestBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
} | ||
} |
Oops, something went wrong.