Skip to content

Commit 4e07ed7

Browse files
authored
Merge pull request #2259 from microsoftgraph/v1.0/pipelinebuild/175190
Generated models and request builders
2 parents 2331559 + 986769a commit 4e07ed7

File tree

98 files changed

+4161
-405
lines changed

Some content is hidden

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

98 files changed

+4161
-405
lines changed

src/main/java/com/microsoft/graph/generated/chats/item/members/MembersRequestBuilder.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.microsoft.graph.chats.item.members.add.AddRequestBuilder;
44
import com.microsoft.graph.chats.item.members.count.CountRequestBuilder;
55
import com.microsoft.graph.chats.item.members.item.ConversationMemberItemRequestBuilder;
6+
import com.microsoft.graph.chats.item.members.remove.RemoveRequestBuilder;
67
import com.microsoft.graph.models.ConversationMember;
78
import com.microsoft.graph.models.ConversationMemberCollectionResponse;
89
import com.microsoft.graph.models.odataerrors.ODataError;
@@ -40,6 +41,14 @@ public AddRequestBuilder add() {
4041
public CountRequestBuilder count() {
4142
return new CountRequestBuilder(pathParameters, requestAdapter);
4243
}
44+
/**
45+
* Provides operations to call the remove method.
46+
* @return a {@link RemoveRequestBuilder}
47+
*/
48+
@jakarta.annotation.Nonnull
49+
public RemoveRequestBuilder remove() {
50+
return new RemoveRequestBuilder(pathParameters, requestAdapter);
51+
}
4352
/**
4453
* Provides operations to manage the members property of the microsoft.graph.chat entity.
4554
* @param conversationMemberId The unique identifier of conversationMember
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.members.remove;
2+
3+
import com.microsoft.graph.models.ConversationMember;
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 RemovePostRequestBody implements AdditionalDataHolder, BackedModel, Parsable {
16+
/**
17+
* Stores model information.
18+
*/
19+
@jakarta.annotation.Nonnull
20+
protected BackingStore backingStore;
21+
/**
22+
* Instantiates a new {@link RemovePostRequestBody} and sets the default values.
23+
*/
24+
public RemovePostRequestBody() {
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 RemovePostRequestBody}
32+
*/
33+
@jakarta.annotation.Nonnull
34+
public static RemovePostRequestBody createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
35+
Objects.requireNonNull(parseNode);
36+
return new RemovePostRequestBody();
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("values", (n) -> { this.setValues(n.getCollectionOfObjectValues(ConversationMember::createFromDiscriminatorValue)); });
67+
return deserializerMap;
68+
}
69+
/**
70+
* Gets the values property value. The values property
71+
* @return a {@link java.util.List<ConversationMember>}
72+
*/
73+
@jakarta.annotation.Nullable
74+
public java.util.List<ConversationMember> getValues() {
75+
return this.backingStore.get("values");
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.writeCollectionOfObjectValues("values", this.getValues());
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 values property value. The values property
103+
* @param value Value to set for the values property.
104+
*/
105+
public void setValues(@jakarta.annotation.Nullable final java.util.List<ConversationMember> value) {
106+
this.backingStore.set("values", value);
107+
}
108+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
package com.microsoft.graph.chats.item.members.remove;
2+
3+
import com.microsoft.graph.models.ActionResultPart;
4+
import com.microsoft.graph.models.BaseCollectionPaginationCountResponse;
5+
import com.microsoft.kiota.serialization.Parsable;
6+
import com.microsoft.kiota.serialization.ParseNode;
7+
import com.microsoft.kiota.serialization.SerializationWriter;
8+
import java.util.HashMap;
9+
import java.util.Map;
10+
import java.util.Objects;
11+
@jakarta.annotation.Generated("com.microsoft.kiota")
12+
public class RemovePostResponse extends BaseCollectionPaginationCountResponse implements Parsable {
13+
/**
14+
* Instantiates a new {@link RemovePostResponse} and sets the default values.
15+
*/
16+
public RemovePostResponse() {
17+
super();
18+
}
19+
/**
20+
* Creates a new instance of the appropriate class based on discriminator value
21+
* @param parseNode The parse node to use to read the discriminator value and create the object
22+
* @return a {@link RemovePostResponse}
23+
*/
24+
@jakarta.annotation.Nonnull
25+
public static RemovePostResponse createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
26+
Objects.requireNonNull(parseNode);
27+
return new RemovePostResponse();
28+
}
29+
/**
30+
* The deserialization information for the current model
31+
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
32+
*/
33+
@jakarta.annotation.Nonnull
34+
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
35+
final HashMap<String, java.util.function.Consumer<ParseNode>> deserializerMap = new HashMap<String, java.util.function.Consumer<ParseNode>>(super.getFieldDeserializers());
36+
deserializerMap.put("value", (n) -> { this.setValue(n.getCollectionOfObjectValues(ActionResultPart::createFromDiscriminatorValue)); });
37+
return deserializerMap;
38+
}
39+
/**
40+
* Gets the value property value. The value property
41+
* @return a {@link java.util.List<ActionResultPart>}
42+
*/
43+
@jakarta.annotation.Nullable
44+
public java.util.List<ActionResultPart> getValue() {
45+
return this.backingStore.get("value");
46+
}
47+
/**
48+
* Serializes information the current object
49+
* @param writer Serialization writer to use to serialize this model
50+
*/
51+
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
52+
Objects.requireNonNull(writer);
53+
super.serialize(writer);
54+
writer.writeCollectionOfObjectValues("value", this.getValue());
55+
}
56+
/**
57+
* Sets the value property value. The value property
58+
* @param value Value to set for the value property.
59+
*/
60+
public void setValue(@jakarta.annotation.Nullable final java.util.List<ActionResultPart> value) {
61+
this.backingStore.set("value", value);
62+
}
63+
}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
package com.microsoft.graph.chats.item.members.remove;
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 remove method.
18+
*/
19+
@jakarta.annotation.Generated("com.microsoft.kiota")
20+
public class RemoveRequestBuilder extends BaseRequestBuilder {
21+
/**
22+
* Instantiates a new {@link RemoveRequestBuilder} 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 RemoveRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
27+
super(requestAdapter, "{+baseurl}/chats/{chat%2Did}/members/remove", pathParameters);
28+
}
29+
/**
30+
* Instantiates a new {@link RemoveRequestBuilder} 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 RemoveRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
35+
super(requestAdapter, "{+baseurl}/chats/{chat%2Did}/members/remove", rawUrl);
36+
}
37+
/**
38+
* Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed.
39+
* @param body The request body
40+
* @return a {@link RemovePostResponse}
41+
* @throws ODataError When receiving a 4XX or 5XX status code
42+
* @see <a href="https://learn.microsoft.com/graph/api/conversationmember-remove?view=graph-rest-1.0">Find more info here</a>
43+
*/
44+
@jakarta.annotation.Nullable
45+
public RemovePostResponse post(@jakarta.annotation.Nonnull final RemovePostRequestBody body) {
46+
return post(body, null);
47+
}
48+
/**
49+
* Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed.
50+
* @param body The request body
51+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
52+
* @return a {@link RemovePostResponse}
53+
* @throws ODataError When receiving a 4XX or 5XX status code
54+
* @see <a href="https://learn.microsoft.com/graph/api/conversationmember-remove?view=graph-rest-1.0">Find more info here</a>
55+
*/
56+
@jakarta.annotation.Nullable
57+
public RemovePostResponse post(@jakarta.annotation.Nonnull final RemovePostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
58+
Objects.requireNonNull(body);
59+
final RequestInformation requestInfo = toPostRequestInformation(body, requestConfiguration);
60+
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
61+
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
62+
return this.requestAdapter.send(requestInfo, errorMapping, RemovePostResponse::createFromDiscriminatorValue);
63+
}
64+
/**
65+
* Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed.
66+
* @param body The request body
67+
* @return a {@link RequestInformation}
68+
*/
69+
@jakarta.annotation.Nonnull
70+
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final RemovePostRequestBody body) {
71+
return toPostRequestInformation(body, null);
72+
}
73+
/**
74+
* Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed.
75+
* @param body The request body
76+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
77+
* @return a {@link RequestInformation}
78+
*/
79+
@jakarta.annotation.Nonnull
80+
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final RemovePostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
81+
Objects.requireNonNull(body);
82+
final RequestInformation requestInfo = new RequestInformation(HttpMethod.POST, urlTemplate, pathParameters);
83+
requestInfo.configure(requestConfiguration, PostRequestConfiguration::new);
84+
requestInfo.headers.tryAdd("Accept", "application/json");
85+
requestInfo.setContentFromParsable(requestAdapter, "application/json", body);
86+
return requestInfo;
87+
}
88+
/**
89+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
90+
* @param rawUrl The raw URL to use for the request builder.
91+
* @return a {@link RemoveRequestBuilder}
92+
*/
93+
@jakarta.annotation.Nonnull
94+
public RemoveRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
95+
Objects.requireNonNull(rawUrl);
96+
return new RemoveRequestBuilder(rawUrl, requestAdapter);
97+
}
98+
/**
99+
* Configuration for the request such as headers, query parameters, and middleware options.
100+
*/
101+
@jakarta.annotation.Generated("com.microsoft.kiota")
102+
public class PostRequestConfiguration extends BaseRequestConfiguration {
103+
}
104+
}

src/main/java/com/microsoft/graph/generated/chats/item/messages/MessagesRequestBuilder.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,23 +93,23 @@ public ChatMessageCollectionResponse get(@jakarta.annotation.Nullable final java
9393
return this.requestAdapter.send(requestInfo, errorMapping, ChatMessageCollectionResponse::createFromDiscriminatorValue);
9494
}
9595
/**
96-
* Send a new chatMessage in the specified channel or a chat.
96+
* Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
9797
* @param body The request body
9898
* @return a {@link ChatMessage}
9999
* @throws ODataError When receiving a 4XX or 5XX status code
100-
* @see <a href="https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0">Find more info here</a>
100+
* @see <a href="https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0">Find more info here</a>
101101
*/
102102
@jakarta.annotation.Nullable
103103
public ChatMessage post(@jakarta.annotation.Nonnull final ChatMessage body) {
104104
return post(body, null);
105105
}
106106
/**
107-
* Send a new chatMessage in the specified channel or a chat.
107+
* Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
108108
* @param body The request body
109109
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
110110
* @return a {@link ChatMessage}
111111
* @throws ODataError When receiving a 4XX or 5XX status code
112-
* @see <a href="https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0">Find more info here</a>
112+
* @see <a href="https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0">Find more info here</a>
113113
*/
114114
@jakarta.annotation.Nullable
115115
public ChatMessage post(@jakarta.annotation.Nonnull final ChatMessage body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@@ -140,7 +140,7 @@ public RequestInformation toGetRequestInformation(@jakarta.annotation.Nullable f
140140
return requestInfo;
141141
}
142142
/**
143-
* Send a new chatMessage in the specified channel or a chat.
143+
* Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
144144
* @param body The request body
145145
* @return a {@link RequestInformation}
146146
*/
@@ -149,7 +149,7 @@ public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull f
149149
return toPostRequestInformation(body, null);
150150
}
151151
/**
152-
* Send a new chatMessage in the specified channel or a chat.
152+
* Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
153153
* @param body The request body
154154
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
155155
* @return a {@link RequestInformation}

0 commit comments

Comments
 (0)