Skip to content

Commit 43a031f

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 175190
1 parent 340d420 commit 43a031f

File tree

136 files changed

+4137
-225
lines changed

Some content is hidden

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

136 files changed

+4137
-225
lines changed

src/Generated/Chats/Item/Members/MembersRequestBuilder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Microsoft\Graph\Generated\Chats\Item\Members\Add\AddRequestBuilder;
88
use Microsoft\Graph\Generated\Chats\Item\Members\Count\CountRequestBuilder;
99
use Microsoft\Graph\Generated\Chats\Item\Members\Item\ConversationMemberItemRequestBuilder;
10+
use Microsoft\Graph\Generated\Chats\Item\Members\Remove\RemoveRequestBuilder;
1011
use Microsoft\Graph\Generated\Models\ConversationMember;
1112
use Microsoft\Graph\Generated\Models\ConversationMemberCollectionResponse;
1213
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
@@ -34,6 +35,13 @@ public function count(): CountRequestBuilder {
3435
return new CountRequestBuilder($this->pathParameters, $this->requestAdapter);
3536
}
3637

38+
/**
39+
* Provides operations to call the remove method.
40+
*/
41+
public function remove(): RemoveRequestBuilder {
42+
return new RemoveRequestBuilder($this->pathParameters, $this->requestAdapter);
43+
}
44+
3745
/**
3846
* Provides operations to manage the members property of the microsoft.graph.chat entity.
3947
* @param string $conversationMemberId The unique identifier of conversationMember
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Chats\Item\Members\Remove;
4+
5+
use Microsoft\Graph\Generated\Models\ConversationMember;
6+
use Microsoft\Kiota\Abstractions\Serialization\AdditionalDataHolder;
7+
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
8+
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
9+
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
10+
use Microsoft\Kiota\Abstractions\Store\BackedModel;
11+
use Microsoft\Kiota\Abstractions\Store\BackingStore;
12+
use Microsoft\Kiota\Abstractions\Store\BackingStoreFactorySingleton;
13+
use Microsoft\Kiota\Abstractions\Types\TypeUtils;
14+
15+
class RemovePostRequestBody implements AdditionalDataHolder, BackedModel, Parsable
16+
{
17+
/**
18+
* @var BackingStore $backingStore Stores model information.
19+
*/
20+
private BackingStore $backingStore;
21+
22+
/**
23+
* Instantiates a new RemovePostRequestBody and sets the default values.
24+
*/
25+
public function __construct() {
26+
$this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();
27+
$this->setAdditionalData([]);
28+
}
29+
30+
/**
31+
* Creates a new instance of the appropriate class based on discriminator value
32+
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object
33+
* @return RemovePostRequestBody
34+
*/
35+
public static function createFromDiscriminatorValue(ParseNode $parseNode): RemovePostRequestBody {
36+
return new RemovePostRequestBody();
37+
}
38+
39+
/**
40+
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
41+
* @return array<string, mixed>|null
42+
*/
43+
public function getAdditionalData(): ?array {
44+
$val = $this->getBackingStore()->get('additionalData');
45+
if (is_null($val) || is_array($val)) {
46+
/** @var array<string, mixed>|null $val */
47+
return $val;
48+
}
49+
throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'");
50+
}
51+
52+
/**
53+
* Gets the BackingStore property value. Stores model information.
54+
* @return BackingStore
55+
*/
56+
public function getBackingStore(): BackingStore {
57+
return $this->backingStore;
58+
}
59+
60+
/**
61+
* The deserialization information for the current model
62+
* @return array<string, callable(ParseNode): void>
63+
*/
64+
public function getFieldDeserializers(): array {
65+
$o = $this;
66+
return [
67+
'values' => fn(ParseNode $n) => $o->setValues($n->getCollectionOfObjectValues([ConversationMember::class, 'createFromDiscriminatorValue'])),
68+
];
69+
}
70+
71+
/**
72+
* Gets the values property value. The values property
73+
* @return array<ConversationMember>|null
74+
*/
75+
public function getValues(): ?array {
76+
$val = $this->getBackingStore()->get('values');
77+
if (is_array($val) || is_null($val)) {
78+
TypeUtils::validateCollectionValues($val, ConversationMember::class);
79+
/** @var array<ConversationMember>|null $val */
80+
return $val;
81+
}
82+
throw new \UnexpectedValueException("Invalid type found in backing store for 'values'");
83+
}
84+
85+
/**
86+
* Serializes information the current object
87+
* @param SerializationWriter $writer Serialization writer to use to serialize this model
88+
*/
89+
public function serialize(SerializationWriter $writer): void {
90+
$writer->writeCollectionOfObjectValues('values', $this->getValues());
91+
$writer->writeAdditionalData($this->getAdditionalData());
92+
}
93+
94+
/**
95+
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
96+
* @param array<string,mixed> $value Value to set for the AdditionalData property.
97+
*/
98+
public function setAdditionalData(?array $value): void {
99+
$this->getBackingStore()->set('additionalData', $value);
100+
}
101+
102+
/**
103+
* Sets the BackingStore property value. Stores model information.
104+
* @param BackingStore $value Value to set for the BackingStore property.
105+
*/
106+
public function setBackingStore(BackingStore $value): void {
107+
$this->backingStore = $value;
108+
}
109+
110+
/**
111+
* Sets the values property value. The values property
112+
* @param array<ConversationMember>|null $value Value to set for the values property.
113+
*/
114+
public function setValues(?array $value): void {
115+
$this->getBackingStore()->set('values', $value);
116+
}
117+
118+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Chats\Item\Members\Remove;
4+
5+
use Microsoft\Graph\Generated\Models\ActionResultPart;
6+
use Microsoft\Graph\Generated\Models\BaseCollectionPaginationCountResponse;
7+
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
8+
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
9+
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
10+
use Microsoft\Kiota\Abstractions\Types\TypeUtils;
11+
12+
class RemovePostResponse extends BaseCollectionPaginationCountResponse implements Parsable
13+
{
14+
/**
15+
* Instantiates a new RemovePostResponse and sets the default values.
16+
*/
17+
public function __construct() {
18+
parent::__construct();
19+
}
20+
21+
/**
22+
* Creates a new instance of the appropriate class based on discriminator value
23+
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object
24+
* @return RemovePostResponse
25+
*/
26+
public static function createFromDiscriminatorValue(ParseNode $parseNode): RemovePostResponse {
27+
return new RemovePostResponse();
28+
}
29+
30+
/**
31+
* The deserialization information for the current model
32+
* @return array<string, callable(ParseNode): void>
33+
*/
34+
public function getFieldDeserializers(): array {
35+
$o = $this;
36+
return array_merge(parent::getFieldDeserializers(), [
37+
'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([ActionResultPart::class, 'createFromDiscriminatorValue'])),
38+
]);
39+
}
40+
41+
/**
42+
* Gets the value property value. The value property
43+
* @return array<ActionResultPart>|null
44+
*/
45+
public function getValue(): ?array {
46+
$val = $this->getBackingStore()->get('value');
47+
if (is_array($val) || is_null($val)) {
48+
TypeUtils::validateCollectionValues($val, ActionResultPart::class);
49+
/** @var array<ActionResultPart>|null $val */
50+
return $val;
51+
}
52+
throw new \UnexpectedValueException("Invalid type found in backing store for 'value'");
53+
}
54+
55+
/**
56+
* Serializes information the current object
57+
* @param SerializationWriter $writer Serialization writer to use to serialize this model
58+
*/
59+
public function serialize(SerializationWriter $writer): void {
60+
parent::serialize($writer);
61+
$writer->writeCollectionOfObjectValues('value', $this->getValue());
62+
}
63+
64+
/**
65+
* Sets the value property value. The value property
66+
* @param array<ActionResultPart>|null $value Value to set for the value property.
67+
*/
68+
public function setValue(?array $value): void {
69+
$this->getBackingStore()->set('value', $value);
70+
}
71+
72+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Chats\Item\Members\Remove;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
8+
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
9+
use Microsoft\Kiota\Abstractions\HttpMethod;
10+
use Microsoft\Kiota\Abstractions\RequestAdapter;
11+
use Microsoft\Kiota\Abstractions\RequestInformation;
12+
13+
/**
14+
* Provides operations to call the remove method.
15+
*/
16+
class RemoveRequestBuilder extends BaseRequestBuilder
17+
{
18+
/**
19+
* Instantiates a new RemoveRequestBuilder and sets the default values.
20+
* @param array<string, mixed>|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL.
21+
* @param RequestAdapter $requestAdapter The request adapter to use to execute the requests.
22+
*/
23+
public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) {
24+
parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/members/remove');
25+
if (is_array($pathParametersOrRawUrl)) {
26+
$this->pathParameters = $pathParametersOrRawUrl;
27+
} else {
28+
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
29+
}
30+
}
31+
32+
/**
33+
* Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed.
34+
* @param RemovePostRequestBody $body The request body
35+
* @param RemoveRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
36+
* @return Promise<RemovePostResponse|null>
37+
* @throws Exception
38+
* @link https://learn.microsoft.com/graph/api/conversationmember-remove?view=graph-rest-1.0 Find more info here
39+
*/
40+
public function post(RemovePostRequestBody $body, ?RemoveRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise {
41+
$requestInfo = $this->toPostRequestInformation($body, $requestConfiguration);
42+
$errorMappings = [
43+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
44+
];
45+
return $this->requestAdapter->sendAsync($requestInfo, [RemovePostResponse::class, 'createFromDiscriminatorValue'], $errorMappings);
46+
}
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 RemovePostRequestBody $body The request body
51+
* @param RemoveRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
52+
* @return RequestInformation
53+
*/
54+
public function toPostRequestInformation(RemovePostRequestBody $body, ?RemoveRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation {
55+
$requestInfo = new RequestInformation();
56+
$requestInfo->urlTemplate = $this->urlTemplate;
57+
$requestInfo->pathParameters = $this->pathParameters;
58+
$requestInfo->httpMethod = HttpMethod::POST;
59+
if ($requestConfiguration !== null) {
60+
$requestInfo->addHeaders($requestConfiguration->headers);
61+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
62+
}
63+
$requestInfo->tryAddHeader('Accept', "application/json");
64+
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
65+
return $requestInfo;
66+
}
67+
68+
/**
69+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
70+
* @param string $rawUrl The raw URL to use for the request builder.
71+
* @return RemoveRequestBuilder
72+
*/
73+
public function withUrl(string $rawUrl): RemoveRequestBuilder {
74+
return new RemoveRequestBuilder($rawUrl, $this->requestAdapter);
75+
}
76+
77+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Chats\Item\Members\Remove;
4+
5+
use Microsoft\Kiota\Abstractions\BaseRequestConfiguration;
6+
use Microsoft\Kiota\Abstractions\RequestOption;
7+
8+
/**
9+
* Configuration for the request such as headers, query parameters, and middleware options.
10+
*/
11+
class RemoveRequestBuilderPostRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* Instantiates a new RemoveRequestBuilderPostRequestConfiguration and sets the default values.
15+
* @param array<string, array<string>|string>|null $headers Request headers
16+
* @param array<RequestOption>|null $options Request options
17+
*/
18+
public function __construct(?array $headers = null, ?array $options = null) {
19+
parent::__construct($headers ?? [], $options ?? []);
20+
}
21+
22+
}

src/Generated/Chats/Item/Messages/MessagesRequestBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ public function get(?MessagesRequestBuilderGetRequestConfiguration $requestConfi
7575
}
7676

7777
/**
78-
* Send a new chatMessage in the specified channel or a chat.
78+
* 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.
7979
* @param ChatMessage $body The request body
8080
* @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
8181
* @return Promise<ChatMessage|null>
8282
* @throws Exception
83-
* @link https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 Find more info here
83+
* @link https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0 Find more info here
8484
*/
8585
public function post(ChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise {
8686
$requestInfo = $this->toPostRequestInformation($body, $requestConfiguration);
@@ -112,7 +112,7 @@ public function toGetRequestInformation(?MessagesRequestBuilderGetRequestConfigu
112112
}
113113

114114
/**
115-
* Send a new chatMessage in the specified channel or a chat.
115+
* 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.
116116
* @param ChatMessage $body The request body
117117
* @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
118118
* @return RequestInformation

src/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
155155
* @param DeviceAppManagementRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
156156
* @return Promise<DeviceAppManagement|null>
157157
* @throws Exception
158-
* @link https://learn.microsoft.com/graph/api/intune-books-deviceappmanagement-get?view=graph-rest-1.0 Find more info here
158+
* @link https://learn.microsoft.com/graph/api/intune-partnerintegration-deviceappmanagement-get?view=graph-rest-1.0 Find more info here
159159
*/
160160
public function get(?DeviceAppManagementRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
161161
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
@@ -171,7 +171,7 @@ public function get(?DeviceAppManagementRequestBuilderGetRequestConfiguration $r
171171
* @param DeviceAppManagementRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
172172
* @return Promise<DeviceAppManagement|null>
173173
* @throws Exception
174-
* @link https://learn.microsoft.com/graph/api/intune-partnerintegration-deviceappmanagement-update?view=graph-rest-1.0 Find more info here
174+
* @link https://learn.microsoft.com/graph/api/intune-unlock-deviceappmanagement-update?view=graph-rest-1.0 Find more info here
175175
*/
176176
public function patch(DeviceAppManagement $body, ?DeviceAppManagementRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
177177
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);

src/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
5252
}
5353

5454
/**
55-
* List properties and relationships of the targetedManagedAppProtection objects.
55+
* List properties and relationships of the managedAppProtection objects.
5656
* @param ManagedAppPoliciesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
5757
* @return Promise<ManagedAppPolicyCollectionResponse|null>
5858
* @throws Exception
59-
* @link https://learn.microsoft.com/graph/api/intune-mam-targetedmanagedappprotection-list?view=graph-rest-1.0 Find more info here
59+
* @link https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-list?view=graph-rest-1.0 Find more info here
6060
*/
6161
public function get(?ManagedAppPoliciesRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
6262
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
@@ -82,7 +82,7 @@ public function post(ManagedAppPolicy $body, ?ManagedAppPoliciesRequestBuilderPo
8282
}
8383

8484
/**
85-
* List properties and relationships of the targetedManagedAppProtection objects.
85+
* List properties and relationships of the managedAppProtection objects.
8686
* @param ManagedAppPoliciesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
8787
* @return RequestInformation
8888
*/

src/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilderGetQueryParameters.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Microsoft\Kiota\Abstractions\QueryParameter;
66

77
/**
8-
* List properties and relationships of the targetedManagedAppProtection objects.
8+
* List properties and relationships of the managedAppProtection objects.
99
*/
1010
class ManagedAppPoliciesRequestBuilderGetQueryParameters
1111
{

0 commit comments

Comments
 (0)