diff --git a/src/Generated/ApplicationTemplates/ApplicationTemplatesRequestBuilder.php b/src/Generated/ApplicationTemplates/ApplicationTemplatesRequestBuilder.php index d8daef1a16c..af7763eddce 100644 --- a/src/Generated/ApplicationTemplates/ApplicationTemplatesRequestBuilder.php +++ b/src/Generated/ApplicationTemplates/ApplicationTemplatesRequestBuilder.php @@ -51,7 +51,7 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap } /** - * Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. + * Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. If a risk property is included in the request without appropriate license, a @microsoft.graph.licenseRequired OData annotation is returned in the response. * @param ApplicationTemplatesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return Promise * @throws Exception @@ -66,7 +66,7 @@ public function get(?ApplicationTemplatesRequestBuilderGetRequestConfiguration $ } /** - * Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. + * Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. If a risk property is included in the request without appropriate license, a @microsoft.graph.licenseRequired OData annotation is returned in the response. * @param ApplicationTemplatesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return RequestInformation */ diff --git a/src/Generated/ApplicationTemplates/ApplicationTemplatesRequestBuilderGetQueryParameters.php b/src/Generated/ApplicationTemplates/ApplicationTemplatesRequestBuilderGetQueryParameters.php index a6887b6855b..7b21e7d0631 100644 --- a/src/Generated/ApplicationTemplates/ApplicationTemplatesRequestBuilderGetQueryParameters.php +++ b/src/Generated/ApplicationTemplates/ApplicationTemplatesRequestBuilderGetQueryParameters.php @@ -5,7 +5,7 @@ use Microsoft\Kiota\Abstractions\QueryParameter; /** - * Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. + * Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. If a risk property is included in the request without appropriate license, a @microsoft.graph.licenseRequired OData annotation is returned in the response. */ class ApplicationTemplatesRequestBuilderGetQueryParameters { diff --git a/src/Generated/Chats/Item/ChatItemRequestBuilder.php b/src/Generated/Chats/Item/ChatItemRequestBuilder.php index 99a41ee27b2..a81e2628839 100644 --- a/src/Generated/Chats/Item/ChatItemRequestBuilder.php +++ b/src/Generated/Chats/Item/ChatItemRequestBuilder.php @@ -19,6 +19,7 @@ use Microsoft\Graph\Beta\Generated\Chats\Item\SendActivityNotification\SendActivityNotificationRequestBuilder; use Microsoft\Graph\Beta\Generated\Chats\Item\StartMigration\StartMigrationRequestBuilder; use Microsoft\Graph\Beta\Generated\Chats\Item\Tabs\TabsRequestBuilder; +use Microsoft\Graph\Beta\Generated\Chats\Item\TargetedMessages\TargetedMessagesRequestBuilder; use Microsoft\Graph\Beta\Generated\Chats\Item\UnhideForUser\UnhideForUserRequestBuilder; use Microsoft\Graph\Beta\Generated\Models\Chat; use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError; @@ -137,6 +138,13 @@ public function tabs(): TabsRequestBuilder { return new TabsRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to manage the targetedMessages property of the microsoft.graph.chat entity. + */ + public function targetedMessages(): TargetedMessagesRequestBuilder { + return new TargetedMessagesRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the unhideForUser method. */ diff --git a/src/Generated/Chats/Item/TargetedMessages/Count/CountRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..758f4857cc2 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..c58b178f9c8 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..d56562d57e8 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Count/CountRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..72de774db00 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/hostedContents/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..e9d15c2d802 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..97e2f441525 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilder.php new file mode 100644 index 00000000000..f42c819c946 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilder.php @@ -0,0 +1,133 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. + * @param string $chatMessageHostedContentId The unique identifier of chatMessageHostedContent + * @return ChatMessageHostedContentItemRequestBuilder + */ + public function byChatMessageHostedContentId(string $chatMessageHostedContentId): ChatMessageHostedContentItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['chatMessageHostedContent%2Did'] = $chatMessageHostedContentId; + return new ChatMessageHostedContentItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new HostedContentsRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/hostedContents{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Content in a message hosted by Microsoft Teams - for example, images or code snippets. + * @param HostedContentsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?HostedContentsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessageHostedContentCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to hostedContents for chats + * @param ChatMessageHostedContent $body The request body + * @param HostedContentsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(ChatMessageHostedContent $body, ?HostedContentsRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessageHostedContent::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Content in a message hosted by Microsoft Teams - for example, images or code snippets. + * @param HostedContentsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?HostedContentsRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Create new navigation property to hostedContents for chats + * @param ChatMessageHostedContent $body The request body + * @param HostedContentsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(ChatMessageHostedContent $body, ?HostedContentsRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return HostedContentsRequestBuilder + */ + public function withUrl(string $rawUrl): HostedContentsRequestBuilder { + return new HostedContentsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..5089cce6aa8 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new HostedContentsRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..fd980460d56 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param HostedContentsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?HostedContentsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new HostedContentsRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return HostedContentsRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): HostedContentsRequestBuilderGetQueryParameters { + return new HostedContentsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilderPostRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..085be92bf5e --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/HostedContentsRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.php new file mode 100644 index 00000000000..1a3832926fd --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.php @@ -0,0 +1,152 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new ChatMessageHostedContentItemRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property hostedContents for chats + * @param ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Content in a message hosted by Microsoft Teams - for example, images or code snippets. + * @param ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessageHostedContent::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property hostedContents in chats + * @param ChatMessageHostedContent $body The request body + * @param ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(ChatMessageHostedContent $body, ?ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessageHostedContent::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property hostedContents for chats + * @param ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Content in a message hosted by Microsoft Teams - for example, images or code snippets. + * @param ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Update the navigation property hostedContents in chats + * @param ChatMessageHostedContent $body The request body + * @param ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(ChatMessageHostedContent $body, ?ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PATCH; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return ChatMessageHostedContentItemRequestBuilder + */ + public function withUrl(string $rawUrl): ChatMessageHostedContentItemRequestBuilder { + return new ChatMessageHostedContentItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..e28be4ed527 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..52ffb26eb30 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * Instantiates a new ChatMessageHostedContentItemRequestBuilderGetQueryParameters and sets the default values. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + */ + public function __construct(?array $expand = null, ?array $select = null) { + $this->expand = $expand; + $this->select = $select; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..e1743e5944f --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param ChatMessageHostedContentItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?ChatMessageHostedContentItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new ChatMessageHostedContentItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return ChatMessageHostedContentItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): ChatMessageHostedContentItemRequestBuilderGetQueryParameters { + return new ChatMessageHostedContentItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..8e2455112d6 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilder.php new file mode 100644 index 00000000000..e8ce0cc40bf --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilder.php @@ -0,0 +1,145 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}/$value'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * The unique identifier for an entity. Read-only. + * @param ContentRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?ContentRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * The unique identifier for an entity. Read-only. + * @param ContentRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?ContentRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, StreamInterface::class, $errorMappings); + return $result; + } + + /** + * The unique identifier for an entity. Read-only. + * @param StreamInterface $body Binary request body + * @param ContentRequestBuilderPutRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function put(StreamInterface $body, ?ContentRequestBuilderPutRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPutRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, StreamInterface::class, $errorMappings); + return $result; + } + + /** + * The unique identifier for an entity. Read-only. + * @param ContentRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?ContentRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * The unique identifier for an entity. Read-only. + * @param ContentRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?ContentRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/octet-stream, application/json"); + return $requestInfo; + } + + /** + * The unique identifier for an entity. Read-only. + * @param StreamInterface $body Binary request body + * @param ContentRequestBuilderPutRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPutRequestInformation(StreamInterface $body, ?ContentRequestBuilderPutRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PUT; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setStreamContent($body, "application/octet-stream"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return ContentRequestBuilder + */ + public function withUrl(string $rawUrl): ContentRequestBuilder { + return new ContentRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..9e2c7b461af --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..5ccef079b80 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilderPutRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilderPutRequestConfiguration.php new file mode 100644 index 00000000000..c9c68f2c5aa --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/HostedContents/Item/Value/ContentRequestBuilderPutRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Count/CountRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..0449df2415e --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..6db5f50f73d --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..1eb2e01a38e --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaGetResponse.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaGetResponse.php new file mode 100644 index 00000000000..4251888cc01 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaGetResponse.php @@ -0,0 +1,72 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([ChatMessage::class, 'createFromDiscriminatorValue'])), + ]); + } + + /** + * Gets the value property value. The value property + * @return array|null + */ + public function getValue(): ?array { + $val = $this->getBackingStore()->get('value'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, ChatMessage::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'value'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + $writer->writeCollectionOfObjectValues('value', $this->getValue()); + } + + /** + * Sets the value property value. The value property + * @param array|null $value Value to set for the value property. + */ + public function setValue(?array $value): void { + $this->getBackingStore()->set('value', $value); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaRequestBuilder.php new file mode 100644 index 00000000000..c66d4ed85da --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the list of messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats. When you use delta query, you can obtain new or updated messages. To get the replies for a message, use the list message replies or the get message reply operations. A GET request with the delta function returns one of the following: State tokens are opaque to the client. To proceed with a round of change tracking, copy and apply the @odata.nextLink or @odata.deltaLink URL returned from the last GET request to the next delta function call. An @odata.deltaLink returned in a response signifies that the current round of change tracking is complete. You can save and use the @odata.deltaLink URL when you begin to retrieve more changes (messages changed or posted after you acquire @odata.deltaLink). For more information, see the delta query documentation. + * @param DeltaRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/chatmessage-delta?view=graph-rest-beta Find more info here + */ + public function get(?DeltaRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [DeltaGetResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get the list of messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats. When you use delta query, you can obtain new or updated messages. To get the replies for a message, use the list message replies or the get message reply operations. A GET request with the delta function returns one of the following: State tokens are opaque to the client. To proceed with a round of change tracking, copy and apply the @odata.nextLink or @odata.deltaLink URL returned from the last GET request to the next delta function call. An @odata.deltaLink returned in a response signifies that the current round of change tracking is complete. You can save and use the @odata.deltaLink URL when you begin to retrieve more changes (messages changed or posted after you acquire @odata.deltaLink). For more information, see the delta query documentation. + * @param DeltaRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?DeltaRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return DeltaRequestBuilder + */ + public function withUrl(string $rawUrl): DeltaRequestBuilder { + return new DeltaRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..51e752f18dd --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new DeltaRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..009097ffc32 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Delta/DeltaRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param DeltaRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?DeltaRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new DeltaRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return DeltaRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): DeltaRequestBuilderGetQueryParameters { + return new DeltaRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.php new file mode 100644 index 00000000000..005c724f762 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.php @@ -0,0 +1,178 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return ForwardToChatPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): ForwardToChatPostRequestBody { + return new ForwardToChatPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the additionalMessage property value. The additionalMessage property + * @return ChatMessage|null + */ + public function getAdditionalMessage(): ?ChatMessage { + $val = $this->getBackingStore()->get('additionalMessage'); + if (is_null($val) || $val instanceof ChatMessage) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalMessage'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'additionalMessage' => fn(ParseNode $n) => $o->setAdditionalMessage($n->getObjectValue([ChatMessage::class, 'createFromDiscriminatorValue'])), + 'messageIds' => function (ParseNode $n) { + $val = $n->getCollectionOfPrimitiveValues(); + if (is_array($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + } + /** @var array|null $val */ + $this->setMessageIds($val); + }, + 'targetChatIds' => function (ParseNode $n) { + $val = $n->getCollectionOfPrimitiveValues(); + if (is_array($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + } + /** @var array|null $val */ + $this->setTargetChatIds($val); + }, + ]; + } + + /** + * Gets the messageIds property value. The messageIds property + * @return array|null + */ + public function getMessageIds(): ?array { + $val = $this->getBackingStore()->get('messageIds'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'messageIds'"); + } + + /** + * Gets the targetChatIds property value. The targetChatIds property + * @return array|null + */ + public function getTargetChatIds(): ?array { + $val = $this->getBackingStore()->get('targetChatIds'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'targetChatIds'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeObjectValue('additionalMessage', $this->getAdditionalMessage()); + $writer->writeCollectionOfPrimitiveValues('messageIds', $this->getMessageIds()); + $writer->writeCollectionOfPrimitiveValues('targetChatIds', $this->getTargetChatIds()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the additionalMessage property value. The additionalMessage property + * @param ChatMessage|null $value Value to set for the additionalMessage property. + */ + public function setAdditionalMessage(?ChatMessage $value): void { + $this->getBackingStore()->set('additionalMessage', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the messageIds property value. The messageIds property + * @param array|null $value Value to set for the messageIds property. + */ + public function setMessageIds(?array $value): void { + $this->getBackingStore()->set('messageIds', $value); + } + + /** + * Sets the targetChatIds property value. The targetChatIds property + * @param array|null $value Value to set for the targetChatIds property. + */ + public function setTargetChatIds(?array $value): void { + $this->getBackingStore()->set('targetChatIds', $value); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.php new file mode 100644 index 00000000000..b64cbeca6f1 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.php @@ -0,0 +1,72 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([ActionResultPart::class, 'createFromDiscriminatorValue'])), + ]); + } + + /** + * Gets the value property value. The value property + * @return array|null + */ + public function getValue(): ?array { + $val = $this->getBackingStore()->get('value'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, ActionResultPart::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'value'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + $writer->writeCollectionOfObjectValues('value', $this->getValue()); + } + + /** + * Sets the value property value. The value property + * @param array|null $value Value to set for the value property. + */ + public function setValue(?array $value): void { + $this->getBackingStore()->set('value', $value); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.php new file mode 100644 index 00000000000..889e3c8699b --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/forwardToChat'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Forward a chat message, a channel message, or a channel message reply to a chat. + * @param ForwardToChatPostRequestBody $body The request body + * @param ForwardToChatRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/chatmessage-forwardtochat?view=graph-rest-beta Find more info here + */ + public function post(ForwardToChatPostRequestBody $body, ?ForwardToChatRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ForwardToChatPostResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Forward a chat message, a channel message, or a channel message reply to a chat. + * @param ForwardToChatPostRequestBody $body The request body + * @param ForwardToChatRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(ForwardToChatPostRequestBody $body, ?ForwardToChatRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return ForwardToChatRequestBuilder + */ + public function withUrl(string $rawUrl): ForwardToChatRequestBuilder { + return new ForwardToChatRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilderPostRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..d59e7b35492 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilder.php new file mode 100644 index 00000000000..dda73b1859d --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilder.php @@ -0,0 +1,184 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the setReaction method. + */ + public function setReaction(): SetReactionRequestBuilder { + return new SetReactionRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the softDelete method. + */ + public function softDelete(): SoftDeleteRequestBuilder { + return new SoftDeleteRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the undoSoftDelete method. + */ + public function undoSoftDelete(): UndoSoftDeleteRequestBuilder { + return new UndoSoftDeleteRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the unsetReaction method. + */ + public function unsetReaction(): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new ChatMessageItemRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/{chatMessage%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property replies for chats + * @param ChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?ChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Replies for a specified message. Supports $expand for channel messages. + * @param ChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?ChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property replies in chats + * @param ChatMessage $body The request body + * @param ChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(ChatMessage $body, ?ChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property replies for chats + * @param ChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?ChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Replies for a specified message. Supports $expand for channel messages. + * @param ChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?ChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Update the navigation property replies in chats + * @param ChatMessage $body The request body + * @param ChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(ChatMessage $body, ?ChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PATCH; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return ChatMessageItemRequestBuilder + */ + public function withUrl(string $rawUrl): ChatMessageItemRequestBuilder { + return new ChatMessageItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..3f87ed4d6e1 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..aa08cf8543c --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * Instantiates a new ChatMessageItemRequestBuilderGetQueryParameters and sets the default values. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + */ + public function __construct(?array $expand = null, ?array $select = null) { + $this->expand = $expand; + $this->select = $select; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..6f0886db116 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param ChatMessageItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?ChatMessageItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new ChatMessageItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return ChatMessageItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): ChatMessageItemRequestBuilderGetQueryParameters { + return new ChatMessageItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..72dceaf6f06 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/ChatMessageItemRequestBuilderPatchRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Count/CountRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..b4d6b8e6354 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/{chatMessage%2Did}/hostedContents/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..34edd719548 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..65054601e7a --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.php new file mode 100644 index 00000000000..f6e5bad6b27 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.php @@ -0,0 +1,133 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. + * @param string $chatMessageHostedContentId The unique identifier of chatMessageHostedContent + * @return ChatMessageHostedContentItemRequestBuilder + */ + public function byChatMessageHostedContentId(string $chatMessageHostedContentId): ChatMessageHostedContentItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['chatMessageHostedContent%2Did'] = $chatMessageHostedContentId; + return new ChatMessageHostedContentItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new HostedContentsRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/{chatMessage%2Did}/hostedContents{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Content in a message hosted by Microsoft Teams - for example, images or code snippets. + * @param HostedContentsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?HostedContentsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessageHostedContentCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to hostedContents for chats + * @param ChatMessageHostedContent $body The request body + * @param HostedContentsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(ChatMessageHostedContent $body, ?HostedContentsRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessageHostedContent::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Content in a message hosted by Microsoft Teams - for example, images or code snippets. + * @param HostedContentsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?HostedContentsRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Create new navigation property to hostedContents for chats + * @param ChatMessageHostedContent $body The request body + * @param HostedContentsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(ChatMessageHostedContent $body, ?HostedContentsRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return HostedContentsRequestBuilder + */ + public function withUrl(string $rawUrl): HostedContentsRequestBuilder { + return new HostedContentsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..faa8c77e8c8 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new HostedContentsRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..a78090bebad --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param HostedContentsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?HostedContentsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new HostedContentsRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return HostedContentsRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): HostedContentsRequestBuilderGetQueryParameters { + return new HostedContentsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilderPostRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..1f87e2ad0de --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.php new file mode 100644 index 00000000000..1477017f979 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.php @@ -0,0 +1,152 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new ChatMessageHostedContentItemRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/{chatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property hostedContents for chats + * @param ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Content in a message hosted by Microsoft Teams - for example, images or code snippets. + * @param ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessageHostedContent::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property hostedContents in chats + * @param ChatMessageHostedContent $body The request body + * @param ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(ChatMessageHostedContent $body, ?ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessageHostedContent::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property hostedContents for chats + * @param ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Content in a message hosted by Microsoft Teams - for example, images or code snippets. + * @param ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Update the navigation property hostedContents in chats + * @param ChatMessageHostedContent $body The request body + * @param ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(ChatMessageHostedContent $body, ?ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PATCH; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return ChatMessageHostedContentItemRequestBuilder + */ + public function withUrl(string $rawUrl): ChatMessageHostedContentItemRequestBuilder { + return new ChatMessageHostedContentItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..69432dd1371 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..945fb7efb9a --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * Instantiates a new ChatMessageHostedContentItemRequestBuilderGetQueryParameters and sets the default values. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + */ + public function __construct(?array $expand = null, ?array $select = null) { + $this->expand = $expand; + $this->select = $select; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..74f0453f3f5 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param ChatMessageHostedContentItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?ChatMessageHostedContentItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new ChatMessageHostedContentItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return ChatMessageHostedContentItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): ChatMessageHostedContentItemRequestBuilderGetQueryParameters { + return new ChatMessageHostedContentItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..0a115b7cc71 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilderPatchRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.php new file mode 100644 index 00000000000..81e6f6bfad3 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.php @@ -0,0 +1,145 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/{chatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}/$value'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * The unique identifier for an entity. Read-only. + * @param ContentRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?ContentRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * The unique identifier for an entity. Read-only. + * @param ContentRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?ContentRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, StreamInterface::class, $errorMappings); + return $result; + } + + /** + * The unique identifier for an entity. Read-only. + * @param StreamInterface $body Binary request body + * @param ContentRequestBuilderPutRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function put(StreamInterface $body, ?ContentRequestBuilderPutRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPutRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, StreamInterface::class, $errorMappings); + return $result; + } + + /** + * The unique identifier for an entity. Read-only. + * @param ContentRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?ContentRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * The unique identifier for an entity. Read-only. + * @param ContentRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?ContentRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/octet-stream, application/json"); + return $requestInfo; + } + + /** + * The unique identifier for an entity. Read-only. + * @param StreamInterface $body Binary request body + * @param ContentRequestBuilderPutRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPutRequestInformation(StreamInterface $body, ?ContentRequestBuilderPutRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PUT; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setStreamContent($body, "application/octet-stream"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return ContentRequestBuilder + */ + public function withUrl(string $rawUrl): ContentRequestBuilder { + return new ContentRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..704fd66f786 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..1e5b14e309b --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilderPutRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilderPutRequestConfiguration.php new file mode 100644 index 00000000000..e4138296512 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilderPutRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.php new file mode 100644 index 00000000000..542dd70f1ba --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return SetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): SetReactionPostRequestBody { + return new SetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.php new file mode 100644 index 00000000000..713fce5bb71 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.php @@ -0,0 +1,76 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/{chatMessage%2Did}/setReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke action setReaction + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Invoke action setReaction + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return SetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): SetReactionRequestBuilder { + return new SetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..03d6b8842db --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SoftDelete/SoftDeleteRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SoftDelete/SoftDeleteRequestBuilder.php new file mode 100644 index 00000000000..dc2fb4a81c3 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SoftDelete/SoftDeleteRequestBuilder.php @@ -0,0 +1,74 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/{chatMessage%2Did}/softDelete'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete a single chatMessage or a chat message reply in a channel or a chat. + * @param SoftDeleteRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/chatmessage-softdelete?view=graph-rest-beta Find more info here + */ + public function post(?SoftDeleteRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Delete a single chatMessage or a chat message reply in a channel or a chat. + * @param SoftDeleteRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?SoftDeleteRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return SoftDeleteRequestBuilder + */ + public function withUrl(string $rawUrl): SoftDeleteRequestBuilder { + return new SoftDeleteRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SoftDelete/SoftDeleteRequestBuilderPostRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SoftDelete/SoftDeleteRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..e6ddfdc5fc9 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/SoftDelete/SoftDeleteRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UndoSoftDelete/UndoSoftDeleteRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UndoSoftDelete/UndoSoftDeleteRequestBuilder.php new file mode 100644 index 00000000000..9cade580735 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UndoSoftDelete/UndoSoftDeleteRequestBuilder.php @@ -0,0 +1,74 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/{chatMessage%2Did}/undoSoftDelete'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + * @param UndoSoftDeleteRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/chatmessage-undosoftdelete?view=graph-rest-beta Find more info here + */ + public function post(?UndoSoftDeleteRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. + * @param UndoSoftDeleteRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?UndoSoftDeleteRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return UndoSoftDeleteRequestBuilder + */ + public function withUrl(string $rawUrl): UndoSoftDeleteRequestBuilder { + return new UndoSoftDeleteRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UndoSoftDelete/UndoSoftDeleteRequestBuilderPostRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UndoSoftDelete/UndoSoftDeleteRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..70a0336c8c3 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UndoSoftDelete/UndoSoftDeleteRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.php new file mode 100644 index 00000000000..610dcb6fa60 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return UnsetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): UnsetReactionPostRequestBody { + return new UnsetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.php new file mode 100644 index 00000000000..eab12f5ae21 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.php @@ -0,0 +1,76 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/{chatMessage%2Did}/unsetReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke action unsetReaction + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Invoke action unsetReaction + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return UnsetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..6a094123159 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilder.php new file mode 100644 index 00000000000..f7299aaa8de --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilder.php @@ -0,0 +1,157 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the delta method. + */ + public function delta(): DeltaRequestBuilder { + return new DeltaRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the forwardToChat method. + */ + public function forwardToChat(): ForwardToChatRequestBuilder { + return new ForwardToChatRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the replyWithQuote method. + */ + public function replyWithQuote(): ReplyWithQuoteRequestBuilder { + return new ReplyWithQuoteRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. + * @param string $chatMessageId The unique identifier of chatMessage + * @return ChatMessageItemRequestBuilder + */ + public function byChatMessageId(string $chatMessageId): ChatMessageItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['chatMessage%2Did'] = $chatMessageId; + return new ChatMessageItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new RepliesRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Replies for a specified message. Supports $expand for channel messages. + * @param RepliesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?RepliesRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessageCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to replies for chats + * @param ChatMessage $body The request body + * @param RepliesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(ChatMessage $body, ?RepliesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Replies for a specified message. Supports $expand for channel messages. + * @param RepliesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RepliesRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Create new navigation property to replies for chats + * @param ChatMessage $body The request body + * @param RepliesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(ChatMessage $body, ?RepliesRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return RepliesRequestBuilder + */ + public function withUrl(string $rawUrl): RepliesRequestBuilder { + return new RepliesRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..d504ee09bf3 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new RepliesRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..b84f88e0af4 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param RepliesRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?RepliesRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new RepliesRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return RepliesRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): RepliesRequestBuilderGetQueryParameters { + return new RepliesRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilderPostRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..272907bba8a --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/RepliesRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.php new file mode 100644 index 00000000000..e9af48a7c94 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.php @@ -0,0 +1,147 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return ReplyWithQuotePostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): ReplyWithQuotePostRequestBody { + return new ReplyWithQuotePostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'messageIds' => function (ParseNode $n) { + $val = $n->getCollectionOfPrimitiveValues(); + if (is_array($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + } + /** @var array|null $val */ + $this->setMessageIds($val); + }, + 'replyMessage' => fn(ParseNode $n) => $o->setReplyMessage($n->getObjectValue([ChatMessage::class, 'createFromDiscriminatorValue'])), + ]; + } + + /** + * Gets the messageIds property value. The messageIds property + * @return array|null + */ + public function getMessageIds(): ?array { + $val = $this->getBackingStore()->get('messageIds'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'messageIds'"); + } + + /** + * Gets the replyMessage property value. The replyMessage property + * @return ChatMessage|null + */ + public function getReplyMessage(): ?ChatMessage { + $val = $this->getBackingStore()->get('replyMessage'); + if (is_null($val) || $val instanceof ChatMessage) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'replyMessage'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeCollectionOfPrimitiveValues('messageIds', $this->getMessageIds()); + $writer->writeObjectValue('replyMessage', $this->getReplyMessage()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the messageIds property value. The messageIds property + * @param array|null $value Value to set for the messageIds property. + */ + public function setMessageIds(?array $value): void { + $this->getBackingStore()->set('messageIds', $value); + } + + /** + * Sets the replyMessage property value. The replyMessage property + * @param ChatMessage|null $value Value to set for the replyMessage property. + */ + public function setReplyMessage(?ChatMessage $value): void { + $this->getBackingStore()->set('replyMessage', $value); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.php new file mode 100644 index 00000000000..6f7c95358d0 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}/replies/replyWithQuote'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Reply with quote to a single chat message or multiple chat messages in a chat. + * @param ReplyWithQuotePostRequestBody $body The request body + * @param ReplyWithQuoteRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/chatmessage-replywithquote?view=graph-rest-beta Find more info here + */ + public function post(ReplyWithQuotePostRequestBody $body, ?ReplyWithQuoteRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [ChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Reply with quote to a single chat message or multiple chat messages in a chat. + * @param ReplyWithQuotePostRequestBody $body The request body + * @param ReplyWithQuoteRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(ReplyWithQuotePostRequestBody $body, ?ReplyWithQuoteRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return ReplyWithQuoteRequestBuilder + */ + public function withUrl(string $rawUrl): ReplyWithQuoteRequestBuilder { + return new ReplyWithQuoteRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilderPostRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..073b847be54 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilder.php new file mode 100644 index 00000000000..3b1eaacf557 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilder.php @@ -0,0 +1,160 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. + */ + public function replies(): RepliesRequestBuilder { + return new RepliesRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new TargetedChatMessageItemRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages/{targetedChatMessage%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property targetedMessages for chats + * @param TargetedChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?TargetedChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Get targetedMessages from chats + * @param TargetedChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?TargetedChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [TargetedChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property targetedMessages in chats + * @param TargetedChatMessage $body The request body + * @param TargetedChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(TargetedChatMessage $body, ?TargetedChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [TargetedChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property targetedMessages for chats + * @param TargetedChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?TargetedChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Get targetedMessages from chats + * @param TargetedChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?TargetedChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Update the navigation property targetedMessages in chats + * @param TargetedChatMessage $body The request body + * @param TargetedChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(TargetedChatMessage $body, ?TargetedChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PATCH; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return TargetedChatMessageItemRequestBuilder + */ + public function withUrl(string $rawUrl): TargetedChatMessageItemRequestBuilder { + return new TargetedChatMessageItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..9d16dc9be95 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..6e2b05bed29 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * Instantiates a new TargetedChatMessageItemRequestBuilderGetQueryParameters and sets the default values. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + */ + public function __construct(?array $expand = null, ?array $select = null) { + $this->expand = $expand; + $this->select = $select; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..086b93a9332 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param TargetedChatMessageItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?TargetedChatMessageItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new TargetedChatMessageItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return TargetedChatMessageItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): TargetedChatMessageItemRequestBuilderGetQueryParameters { + return new TargetedChatMessageItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..1273e05c198 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/Item/TargetedChatMessageItemRequestBuilderPatchRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilder.php b/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilder.php new file mode 100644 index 00000000000..68ce53cca17 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilder.php @@ -0,0 +1,133 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the targetedMessages property of the microsoft.graph.chat entity. + * @param string $targetedChatMessageId The unique identifier of targetedChatMessage + * @return TargetedChatMessageItemRequestBuilder + */ + public function byTargetedChatMessageId(string $targetedChatMessageId): TargetedChatMessageItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['targetedChatMessage%2Did'] = $targetedChatMessageId; + return new TargetedChatMessageItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new TargetedMessagesRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/chats/{chat%2Did}/targetedMessages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get targetedMessages from chats + * @param TargetedMessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?TargetedMessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [TargetedChatMessageCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to targetedMessages for chats + * @param TargetedChatMessage $body The request body + * @param TargetedMessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(TargetedChatMessage $body, ?TargetedMessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [TargetedChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get targetedMessages from chats + * @param TargetedMessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?TargetedMessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Create new navigation property to targetedMessages for chats + * @param TargetedChatMessage $body The request body + * @param TargetedMessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(TargetedChatMessage $body, ?TargetedMessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return TargetedMessagesRequestBuilder + */ + public function withUrl(string $rawUrl): TargetedMessagesRequestBuilder { + return new TargetedMessagesRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilderGetQueryParameters.php b/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..7a90626d886 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new TargetedMessagesRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilderGetRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..58bad409e77 --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param TargetedMessagesRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?TargetedMessagesRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new TargetedMessagesRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return TargetedMessagesRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): TargetedMessagesRequestBuilderGetQueryParameters { + return new TargetedMessagesRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilderPostRequestConfiguration.php b/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..e155185f53b --- /dev/null +++ b/src/Generated/Chats/Item/TargetedMessages/TargetedMessagesRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceItemRequestBuilder.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceItemRequestBuilder.php index b574c505494..699f4975268 100644 --- a/src/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceItemRequestBuilder.php +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceItemRequestBuilder.php @@ -40,16 +40,21 @@ use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\RemoveDeviceFirmwareConfigurationInterfaceManagement\RemoveDeviceFirmwareConfigurationInterfaceManagementRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\RequestRemoteAssistance\RequestRemoteAssistanceRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\ResetPasscode\ResetPasscodeRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\RestoreManagedHomeScreen\RestoreManagedHomeScreenRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\Retire\RetireRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\RetrieveDeviceLocalAdminAccountDetail\RetrieveDeviceLocalAdminAccountDetailRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\RetrieveMacOSManagedDeviceLocalAdminAccountDetail\RetrieveMacOSManagedDeviceLocalAdminAccountDetailRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\RetrieveRecoveryLockPasscode\RetrieveRecoveryLockPasscodeRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\RevokeAppleVppLicenses\RevokeAppleVppLicensesRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\RotateBitLockerKeys\RotateBitLockerKeysRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\RotateFileVaultKey\RotateFileVaultKeyRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\RotateLocalAdminPassword\RotateLocalAdminPasswordRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\RotateRecoveryLockPasscode\RotateRecoveryLockPasscodeRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\SecurityBaselineStates\SecurityBaselineStatesRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\SendCustomNotificationToCompanyPortal\SendCustomNotificationToCompanyPortalRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\SetDeviceName\SetDeviceNameRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\ShutDown\ShutDownRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\SuspendManagedHomeScreen\SuspendManagedHomeScreenRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\SyncDevice\SyncDeviceRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\TriggerConfigurationManagerAction\TriggerConfigurationManagerActionRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ComanagedDevices\Item\UpdateWindowsDeviceAccount\UpdateWindowsDeviceAccountRequestBuilder; @@ -322,6 +327,13 @@ public function resetPasscode(): ResetPasscodeRequestBuilder { return new ResetPasscodeRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the restoreManagedHomeScreen method. + */ + public function restoreManagedHomeScreen(): RestoreManagedHomeScreenRequestBuilder { + return new RestoreManagedHomeScreenRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the retire method. */ @@ -329,6 +341,13 @@ public function retire(): RetireRequestBuilder { return new RetireRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the retrieveDeviceLocalAdminAccountDetail method. + */ + public function retrieveDeviceLocalAdminAccountDetail(): RetrieveDeviceLocalAdminAccountDetailRequestBuilder { + return new RetrieveDeviceLocalAdminAccountDetailRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the retrieveMacOSManagedDeviceLocalAdminAccountDetail method. */ @@ -336,6 +355,13 @@ public function retrieveMacOSManagedDeviceLocalAdminAccountDetail(): RetrieveMac return new RetrieveMacOSManagedDeviceLocalAdminAccountDetailRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the retrieveRecoveryLockPasscode method. + */ + public function retrieveRecoveryLockPasscode(): RetrieveRecoveryLockPasscodeRequestBuilder { + return new RetrieveRecoveryLockPasscodeRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the revokeAppleVppLicenses method. */ @@ -364,6 +390,13 @@ public function rotateLocalAdminPassword(): RotateLocalAdminPasswordRequestBuild return new RotateLocalAdminPasswordRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the rotateRecoveryLockPasscode method. + */ + public function rotateRecoveryLockPasscode(): RotateRecoveryLockPasscodeRequestBuilder { + return new RotateRecoveryLockPasscodeRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to manage the securityBaselineStates property of the microsoft.graph.managedDevice entity. */ @@ -392,6 +425,13 @@ public function shutDown(): ShutDownRequestBuilder { return new ShutDownRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the suspendManagedHomeScreen method. + */ + public function suspendManagedHomeScreen(): SuspendManagedHomeScreenRequestBuilder { + return new SuspendManagedHomeScreenRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the syncDevice method. */ diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilder.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilder.php new file mode 100644 index 00000000000..7209d950ddc --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilder.php @@ -0,0 +1,73 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/comanagedDevices/{managedDevice%2Did}/restoreManagedHomeScreen'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Restore Managed Home Screen + * @param RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(?RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Restore Managed Home Screen + * @param RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return RestoreManagedHomeScreenRequestBuilder + */ + public function withUrl(string $rawUrl): RestoreManagedHomeScreenRequestBuilder { + return new RestoreManagedHomeScreenRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..fa8be837f3b --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilder.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilder.php new file mode 100644 index 00000000000..78c6407bb3f --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilder.php @@ -0,0 +1,74 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/comanagedDevices/{managedDevice%2Did}/retrieveDeviceLocalAdminAccountDetail()'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke function retrieveDeviceLocalAdminAccountDetail + * @param RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [DeviceLocalAdminAccountDetail::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Invoke function retrieveDeviceLocalAdminAccountDetail + * @param RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return RetrieveDeviceLocalAdminAccountDetailRequestBuilder + */ + public function withUrl(string $rawUrl): RetrieveDeviceLocalAdminAccountDetailRequestBuilder { + return new RetrieveDeviceLocalAdminAccountDetailRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..f700588aa80 --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeGetResponse.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeGetResponse.php new file mode 100644 index 00000000000..f37f678ba9c --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeGetResponse.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return RetrieveRecoveryLockPasscodeGetResponse + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): RetrieveRecoveryLockPasscodeGetResponse { + return new RetrieveRecoveryLockPasscodeGetResponse(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getStringValue()), + ]; + } + + /** + * Gets the value property value. The value property + * @return string|null + */ + public function getValue(): ?string { + $val = $this->getBackingStore()->get('value'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'value'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('value', $this->getValue()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the value property value. The value property + * @param string|null $value Value to set for the value property. + */ + public function setValue(?string $value): void { + $this->getBackingStore()->set('value', $value); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilder.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilder.php new file mode 100644 index 00000000000..6125852b7f7 --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilder.php @@ -0,0 +1,73 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/comanagedDevices/{managedDevice%2Did}/retrieveRecoveryLockPasscode()'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke function retrieveRecoveryLockPasscode + * @param RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RetrieveRecoveryLockPasscodeGetResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Invoke function retrieveRecoveryLockPasscode + * @param RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return RetrieveRecoveryLockPasscodeRequestBuilder + */ + public function withUrl(string $rawUrl): RetrieveRecoveryLockPasscodeRequestBuilder { + return new RetrieveRecoveryLockPasscodeRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..a1757f5462a --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilder.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilder.php new file mode 100644 index 00000000000..df5ce1dde06 --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilder.php @@ -0,0 +1,73 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/comanagedDevices/{managedDevice%2Did}/rotateRecoveryLockPasscode'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Rotates the recovery lock passcode for the specified macOS device + * @param RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(?RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Rotates the recovery lock passcode for the specified macOS device + * @param RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return RotateRecoveryLockPasscodeRequestBuilder + */ + public function withUrl(string $rawUrl): RotateRecoveryLockPasscodeRequestBuilder { + return new RotateRecoveryLockPasscodeRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..02720e14c4f --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenPostRequestBody.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenPostRequestBody.php new file mode 100644 index 00000000000..25579355a39 --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return SuspendManagedHomeScreenPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): SuspendManagedHomeScreenPostRequestBody { + return new SuspendManagedHomeScreenPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'timeoutMinutes' => fn(ParseNode $n) => $o->setTimeoutMinutes($n->getStringValue()), + ]; + } + + /** + * Gets the timeoutMinutes property value. The timeoutMinutes property + * @return string|null + */ + public function getTimeoutMinutes(): ?string { + $val = $this->getBackingStore()->get('timeoutMinutes'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'timeoutMinutes'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('timeoutMinutes', $this->getTimeoutMinutes()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the timeoutMinutes property value. The timeoutMinutes property + * @param string|null $value Value to set for the timeoutMinutes property. + */ + public function setTimeoutMinutes(?string $value): void { + $this->getBackingStore()->set('timeoutMinutes', $value); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilder.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilder.php new file mode 100644 index 00000000000..c4b7df18039 --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilder.php @@ -0,0 +1,76 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/comanagedDevices/{managedDevice%2Did}/suspendManagedHomeScreen'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Temporarily suspend Managed Home Screen + * @param SuspendManagedHomeScreenPostRequestBody $body The request body + * @param SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(SuspendManagedHomeScreenPostRequestBody $body, ?SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Temporarily suspend Managed Home Screen + * @param SuspendManagedHomeScreenPostRequestBody $body The request body + * @param SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(SuspendManagedHomeScreenPostRequestBody $body, ?SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return SuspendManagedHomeScreenRequestBuilder + */ + public function withUrl(string $rawUrl): SuspendManagedHomeScreenRequestBuilder { + return new SuspendManagedHomeScreenRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/ComanagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration.php b/src/Generated/DeviceManagement/ComanagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..651033d04a1 --- /dev/null +++ b/src/Generated/DeviceManagement/ComanagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/DepOnboardingSettings/Item/DepOnboardingSettingItemRequestBuilder.php b/src/Generated/DeviceManagement/DepOnboardingSettings/Item/DepOnboardingSettingItemRequestBuilder.php index d4255cfc1b7..2c7c33687dd 100644 --- a/src/Generated/DeviceManagement/DepOnboardingSettings/Item/DepOnboardingSettingItemRequestBuilder.php +++ b/src/Generated/DeviceManagement/DepOnboardingSettings/Item/DepOnboardingSettingItemRequestBuilder.php @@ -12,6 +12,7 @@ use Microsoft\Graph\Beta\Generated\DeviceManagement\DepOnboardingSettings\Item\GenerateEncryptionPublicKey\GenerateEncryptionPublicKeyRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\DepOnboardingSettings\Item\GetEncryptionPublicKey\GetEncryptionPublicKeyRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\DepOnboardingSettings\Item\ImportedAppleDeviceIdentities\ImportedAppleDeviceIdentitiesRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\DepOnboardingSettings\Item\ReleaseAppleDevices\ReleaseAppleDevicesRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\DepOnboardingSettings\Item\ShareForSchoolDataSyncService\ShareForSchoolDataSyncServiceRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\DepOnboardingSettings\Item\SyncWithAppleDeviceEnrollmentProgram\SyncWithAppleDeviceEnrollmentProgramRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\DepOnboardingSettings\Item\UnshareForSchoolDataSyncService\UnshareForSchoolDataSyncServiceRequestBuilder; @@ -84,6 +85,13 @@ public function importedAppleDeviceIdentities(): ImportedAppleDeviceIdentitiesRe return new ImportedAppleDeviceIdentitiesRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the releaseAppleDevices method. + */ + public function releaseAppleDevices(): ReleaseAppleDevicesRequestBuilder { + return new ReleaseAppleDevicesRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the shareForSchoolDataSyncService method. */ diff --git a/src/Generated/DeviceManagement/DepOnboardingSettings/Item/ReleaseAppleDevices/ReleaseAppleDevicesPostRequestBody.php b/src/Generated/DeviceManagement/DepOnboardingSettings/Item/ReleaseAppleDevices/ReleaseAppleDevicesPostRequestBody.php new file mode 100644 index 00000000000..2f24d484e21 --- /dev/null +++ b/src/Generated/DeviceManagement/DepOnboardingSettings/Item/ReleaseAppleDevices/ReleaseAppleDevicesPostRequestBody.php @@ -0,0 +1,146 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return ReleaseAppleDevicesPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): ReleaseAppleDevicesPostRequestBody { + return new ReleaseAppleDevicesPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * Gets the depToken property value. The depToken property + * @return string|null + */ + public function getDepToken(): ?string { + $val = $this->getBackingStore()->get('depToken'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'depToken'"); + } + + /** + * Gets the deviceSerialNumbers property value. The deviceSerialNumbers property + * @return array|null + */ + public function getDeviceSerialNumbers(): ?array { + $val = $this->getBackingStore()->get('deviceSerialNumbers'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'deviceSerialNumbers'"); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'depToken' => fn(ParseNode $n) => $o->setDepToken($n->getStringValue()), + 'deviceSerialNumbers' => function (ParseNode $n) { + $val = $n->getCollectionOfPrimitiveValues(); + if (is_array($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + } + /** @var array|null $val */ + $this->setDeviceSerialNumbers($val); + }, + ]; + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('depToken', $this->getDepToken()); + $writer->writeCollectionOfPrimitiveValues('deviceSerialNumbers', $this->getDeviceSerialNumbers()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the depToken property value. The depToken property + * @param string|null $value Value to set for the depToken property. + */ + public function setDepToken(?string $value): void { + $this->getBackingStore()->set('depToken', $value); + } + + /** + * Sets the deviceSerialNumbers property value. The deviceSerialNumbers property + * @param array|null $value Value to set for the deviceSerialNumbers property. + */ + public function setDeviceSerialNumbers(?array $value): void { + $this->getBackingStore()->set('deviceSerialNumbers', $value); + } + +} diff --git a/src/Generated/DeviceManagement/DepOnboardingSettings/Item/ReleaseAppleDevices/ReleaseAppleDevicesRequestBuilder.php b/src/Generated/DeviceManagement/DepOnboardingSettings/Item/ReleaseAppleDevices/ReleaseAppleDevicesRequestBuilder.php new file mode 100644 index 00000000000..e0d92745dea --- /dev/null +++ b/src/Generated/DeviceManagement/DepOnboardingSettings/Item/ReleaseAppleDevices/ReleaseAppleDevicesRequestBuilder.php @@ -0,0 +1,76 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/depOnboardingSettings/{depOnboardingSetting%2Did}/releaseAppleDevices'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke action releaseAppleDevices + * @param ReleaseAppleDevicesPostRequestBody $body The request body + * @param ReleaseAppleDevicesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(ReleaseAppleDevicesPostRequestBody $body, ?ReleaseAppleDevicesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Invoke action releaseAppleDevices + * @param ReleaseAppleDevicesPostRequestBody $body The request body + * @param ReleaseAppleDevicesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(ReleaseAppleDevicesPostRequestBody $body, ?ReleaseAppleDevicesRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return ReleaseAppleDevicesRequestBuilder + */ + public function withUrl(string $rawUrl): ReleaseAppleDevicesRequestBuilder { + return new ReleaseAppleDevicesRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/DepOnboardingSettings/Item/ReleaseAppleDevices/ReleaseAppleDevicesRequestBuilderPostRequestConfiguration.php b/src/Generated/DeviceManagement/DepOnboardingSettings/Item/ReleaseAppleDevices/ReleaseAppleDevicesRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..5d7affe1777 --- /dev/null +++ b/src/Generated/DeviceManagement/DepOnboardingSettings/Item/ReleaseAppleDevices/ReleaseAppleDevicesRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.php b/src/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.php index 134bec4b1ed..cb722d5cf96 100644 --- a/src/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.php +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.php @@ -40,16 +40,21 @@ use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\RemoveDeviceFirmwareConfigurationInterfaceManagement\RemoveDeviceFirmwareConfigurationInterfaceManagementRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\RequestRemoteAssistance\RequestRemoteAssistanceRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\ResetPasscode\ResetPasscodeRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\RestoreManagedHomeScreen\RestoreManagedHomeScreenRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\Retire\RetireRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\RetrieveDeviceLocalAdminAccountDetail\RetrieveDeviceLocalAdminAccountDetailRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\RetrieveMacOSManagedDeviceLocalAdminAccountDetail\RetrieveMacOSManagedDeviceLocalAdminAccountDetailRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\RetrieveRecoveryLockPasscode\RetrieveRecoveryLockPasscodeRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\RevokeAppleVppLicenses\RevokeAppleVppLicensesRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\RotateBitLockerKeys\RotateBitLockerKeysRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\RotateFileVaultKey\RotateFileVaultKeyRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\RotateLocalAdminPassword\RotateLocalAdminPasswordRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\RotateRecoveryLockPasscode\RotateRecoveryLockPasscodeRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\SecurityBaselineStates\SecurityBaselineStatesRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\SendCustomNotificationToCompanyPortal\SendCustomNotificationToCompanyPortalRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\SetDeviceName\SetDeviceNameRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\ShutDown\ShutDownRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\SuspendManagedHomeScreen\SuspendManagedHomeScreenRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\SyncDevice\SyncDeviceRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\TriggerConfigurationManagerAction\TriggerConfigurationManagerActionRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\ManagedDevices\Item\UpdateWindowsDeviceAccount\UpdateWindowsDeviceAccountRequestBuilder; @@ -322,6 +327,13 @@ public function resetPasscode(): ResetPasscodeRequestBuilder { return new ResetPasscodeRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the restoreManagedHomeScreen method. + */ + public function restoreManagedHomeScreen(): RestoreManagedHomeScreenRequestBuilder { + return new RestoreManagedHomeScreenRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the retire method. */ @@ -329,6 +341,13 @@ public function retire(): RetireRequestBuilder { return new RetireRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the retrieveDeviceLocalAdminAccountDetail method. + */ + public function retrieveDeviceLocalAdminAccountDetail(): RetrieveDeviceLocalAdminAccountDetailRequestBuilder { + return new RetrieveDeviceLocalAdminAccountDetailRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the retrieveMacOSManagedDeviceLocalAdminAccountDetail method. */ @@ -336,6 +355,13 @@ public function retrieveMacOSManagedDeviceLocalAdminAccountDetail(): RetrieveMac return new RetrieveMacOSManagedDeviceLocalAdminAccountDetailRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the retrieveRecoveryLockPasscode method. + */ + public function retrieveRecoveryLockPasscode(): RetrieveRecoveryLockPasscodeRequestBuilder { + return new RetrieveRecoveryLockPasscodeRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the revokeAppleVppLicenses method. */ @@ -364,6 +390,13 @@ public function rotateLocalAdminPassword(): RotateLocalAdminPasswordRequestBuild return new RotateLocalAdminPasswordRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the rotateRecoveryLockPasscode method. + */ + public function rotateRecoveryLockPasscode(): RotateRecoveryLockPasscodeRequestBuilder { + return new RotateRecoveryLockPasscodeRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to manage the securityBaselineStates property of the microsoft.graph.managedDevice entity. */ @@ -392,6 +425,13 @@ public function shutDown(): ShutDownRequestBuilder { return new ShutDownRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the suspendManagedHomeScreen method. + */ + public function suspendManagedHomeScreen(): SuspendManagedHomeScreenRequestBuilder { + return new SuspendManagedHomeScreenRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the syncDevice method. */ diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilder.php b/src/Generated/DeviceManagement/ManagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilder.php new file mode 100644 index 00000000000..99b07c1c057 --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilder.php @@ -0,0 +1,73 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/restoreManagedHomeScreen'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Restore Managed Home Screen + * @param RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(?RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Restore Managed Home Screen + * @param RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return RestoreManagedHomeScreenRequestBuilder + */ + public function withUrl(string $rawUrl): RestoreManagedHomeScreenRequestBuilder { + return new RestoreManagedHomeScreenRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration.php b/src/Generated/DeviceManagement/ManagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..f89afd3924a --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/RestoreManagedHomeScreen/RestoreManagedHomeScreenRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilder.php b/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilder.php new file mode 100644 index 00000000000..b45ef97fd0e --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilder.php @@ -0,0 +1,74 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/retrieveDeviceLocalAdminAccountDetail()'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke function retrieveDeviceLocalAdminAccountDetail + * @param RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [DeviceLocalAdminAccountDetail::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Invoke function retrieveDeviceLocalAdminAccountDetail + * @param RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return RetrieveDeviceLocalAdminAccountDetailRequestBuilder + */ + public function withUrl(string $rawUrl): RetrieveDeviceLocalAdminAccountDetailRequestBuilder { + return new RetrieveDeviceLocalAdminAccountDetailRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration.php b/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..0d2f59a88db --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveDeviceLocalAdminAccountDetail/RetrieveDeviceLocalAdminAccountDetailRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeGetResponse.php b/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeGetResponse.php new file mode 100644 index 00000000000..425f07dfaad --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeGetResponse.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return RetrieveRecoveryLockPasscodeGetResponse + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): RetrieveRecoveryLockPasscodeGetResponse { + return new RetrieveRecoveryLockPasscodeGetResponse(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getStringValue()), + ]; + } + + /** + * Gets the value property value. The value property + * @return string|null + */ + public function getValue(): ?string { + $val = $this->getBackingStore()->get('value'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'value'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('value', $this->getValue()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the value property value. The value property + * @param string|null $value Value to set for the value property. + */ + public function setValue(?string $value): void { + $this->getBackingStore()->set('value', $value); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilder.php b/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilder.php new file mode 100644 index 00000000000..2c381224889 --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilder.php @@ -0,0 +1,73 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/retrieveRecoveryLockPasscode()'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke function retrieveRecoveryLockPasscode + * @param RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RetrieveRecoveryLockPasscodeGetResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Invoke function retrieveRecoveryLockPasscode + * @param RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return RetrieveRecoveryLockPasscodeRequestBuilder + */ + public function withUrl(string $rawUrl): RetrieveRecoveryLockPasscodeRequestBuilder { + return new RetrieveRecoveryLockPasscodeRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration.php b/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..6e4a72c0918 --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/RetrieveRecoveryLockPasscode/RetrieveRecoveryLockPasscodeRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilder.php b/src/Generated/DeviceManagement/ManagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilder.php new file mode 100644 index 00000000000..b8ebb6d67e2 --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilder.php @@ -0,0 +1,73 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/rotateRecoveryLockPasscode'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Rotates the recovery lock passcode for the specified macOS device + * @param RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(?RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Rotates the recovery lock passcode for the specified macOS device + * @param RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return RotateRecoveryLockPasscodeRequestBuilder + */ + public function withUrl(string $rawUrl): RotateRecoveryLockPasscodeRequestBuilder { + return new RotateRecoveryLockPasscodeRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration.php b/src/Generated/DeviceManagement/ManagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..5a9264a9c2e --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/RotateRecoveryLockPasscode/RotateRecoveryLockPasscodeRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenPostRequestBody.php b/src/Generated/DeviceManagement/ManagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenPostRequestBody.php new file mode 100644 index 00000000000..420fb722d09 --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return SuspendManagedHomeScreenPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): SuspendManagedHomeScreenPostRequestBody { + return new SuspendManagedHomeScreenPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'timeoutMinutes' => fn(ParseNode $n) => $o->setTimeoutMinutes($n->getStringValue()), + ]; + } + + /** + * Gets the timeoutMinutes property value. The timeoutMinutes property + * @return string|null + */ + public function getTimeoutMinutes(): ?string { + $val = $this->getBackingStore()->get('timeoutMinutes'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'timeoutMinutes'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('timeoutMinutes', $this->getTimeoutMinutes()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the timeoutMinutes property value. The timeoutMinutes property + * @param string|null $value Value to set for the timeoutMinutes property. + */ + public function setTimeoutMinutes(?string $value): void { + $this->getBackingStore()->set('timeoutMinutes', $value); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilder.php b/src/Generated/DeviceManagement/ManagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilder.php new file mode 100644 index 00000000000..93912c6ada4 --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilder.php @@ -0,0 +1,76 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/suspendManagedHomeScreen'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Temporarily suspend Managed Home Screen + * @param SuspendManagedHomeScreenPostRequestBody $body The request body + * @param SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(SuspendManagedHomeScreenPostRequestBody $body, ?SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Temporarily suspend Managed Home Screen + * @param SuspendManagedHomeScreenPostRequestBody $body The request body + * @param SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(SuspendManagedHomeScreenPostRequestBody $body, ?SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return SuspendManagedHomeScreenRequestBuilder + */ + public function withUrl(string $rawUrl): SuspendManagedHomeScreenRequestBuilder { + return new SuspendManagedHomeScreenRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/ManagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration.php b/src/Generated/DeviceManagement/ManagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..e87f52732ca --- /dev/null +++ b/src/Generated/DeviceManagement/ManagedDevices/Item/SuspendManagedHomeScreen/SuspendManagedHomeScreenRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportPostRequestBody.php b/src/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportPostRequestBody.php deleted file mode 100644 index ad89ee64e77..00000000000 --- a/src/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportPostRequestBody.php +++ /dev/null @@ -1,318 +0,0 @@ -backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); - $this->setAdditionalData([]); - } - - /** - * Creates a new instance of the appropriate class based on discriminator value - * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object - * @return GetZebraFotaDeploymentReportPostRequestBody - */ - public static function createFromDiscriminatorValue(ParseNode $parseNode): GetZebraFotaDeploymentReportPostRequestBody { - return new GetZebraFotaDeploymentReportPostRequestBody(); - } - - /** - * 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 array|null - */ - public function getAdditionalData(): ?array { - $val = $this->getBackingStore()->get('additionalData'); - if (is_null($val) || is_array($val)) { - /** @var array|null $val */ - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); - } - - /** - * Gets the BackingStore property value. Stores model information. - * @return BackingStore - */ - public function getBackingStore(): BackingStore { - return $this->backingStore; - } - - /** - * The deserialization information for the current model - * @return array - */ - public function getFieldDeserializers(): array { - $o = $this; - return [ - 'filter' => fn(ParseNode $n) => $o->setFilter($n->getStringValue()), - 'groupBy' => function (ParseNode $n) { - $val = $n->getCollectionOfPrimitiveValues(); - if (is_array($val)) { - TypeUtils::validateCollectionValues($val, 'string'); - } - /** @var array|null $val */ - $this->setGroupBy($val); - }, - 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()), - 'orderBy' => function (ParseNode $n) { - $val = $n->getCollectionOfPrimitiveValues(); - if (is_array($val)) { - TypeUtils::validateCollectionValues($val, 'string'); - } - /** @var array|null $val */ - $this->setOrderBy($val); - }, - 'search' => fn(ParseNode $n) => $o->setSearch($n->getStringValue()), - 'select' => function (ParseNode $n) { - $val = $n->getCollectionOfPrimitiveValues(); - if (is_array($val)) { - TypeUtils::validateCollectionValues($val, 'string'); - } - /** @var array|null $val */ - $this->setSelect($val); - }, - 'sessionId' => fn(ParseNode $n) => $o->setSessionId($n->getStringValue()), - 'skip' => fn(ParseNode $n) => $o->setSkip($n->getIntegerValue()), - 'top' => fn(ParseNode $n) => $o->setTop($n->getIntegerValue()), - ]; - } - - /** - * Gets the filter property value. The filter property - * @return string|null - */ - public function getFilter(): ?string { - $val = $this->getBackingStore()->get('filter'); - if (is_null($val) || is_string($val)) { - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'filter'"); - } - - /** - * Gets the groupBy property value. The groupBy property - * @return array|null - */ - public function getGroupBy(): ?array { - $val = $this->getBackingStore()->get('groupBy'); - if (is_array($val) || is_null($val)) { - TypeUtils::validateCollectionValues($val, 'string'); - /** @var array|null $val */ - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'groupBy'"); - } - - /** - * Gets the name property value. The name property - * @return string|null - */ - public function getName(): ?string { - $val = $this->getBackingStore()->get('name'); - if (is_null($val) || is_string($val)) { - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'name'"); - } - - /** - * Gets the orderBy property value. The orderBy property - * @return array|null - */ - public function getOrderBy(): ?array { - $val = $this->getBackingStore()->get('orderBy'); - if (is_array($val) || is_null($val)) { - TypeUtils::validateCollectionValues($val, 'string'); - /** @var array|null $val */ - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'orderBy'"); - } - - /** - * Gets the search property value. The search property - * @return string|null - */ - public function getSearch(): ?string { - $val = $this->getBackingStore()->get('search'); - if (is_null($val) || is_string($val)) { - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'search'"); - } - - /** - * Gets the select property value. The select property - * @return array|null - */ - public function getSelect(): ?array { - $val = $this->getBackingStore()->get('select'); - if (is_array($val) || is_null($val)) { - TypeUtils::validateCollectionValues($val, 'string'); - /** @var array|null $val */ - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'select'"); - } - - /** - * Gets the sessionId property value. The sessionId property - * @return string|null - */ - public function getSessionId(): ?string { - $val = $this->getBackingStore()->get('sessionId'); - if (is_null($val) || is_string($val)) { - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'sessionId'"); - } - - /** - * Gets the skip property value. The skip property - * @return int|null - */ - public function getSkip(): ?int { - $val = $this->getBackingStore()->get('skip'); - if (is_null($val) || is_int($val)) { - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'skip'"); - } - - /** - * Gets the top property value. The top property - * @return int|null - */ - public function getTop(): ?int { - $val = $this->getBackingStore()->get('top'); - if (is_null($val) || is_int($val)) { - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'top'"); - } - - /** - * Serializes information the current object - * @param SerializationWriter $writer Serialization writer to use to serialize this model - */ - public function serialize(SerializationWriter $writer): void { - $writer->writeStringValue('filter', $this->getFilter()); - $writer->writeCollectionOfPrimitiveValues('groupBy', $this->getGroupBy()); - $writer->writeStringValue('name', $this->getName()); - $writer->writeCollectionOfPrimitiveValues('orderBy', $this->getOrderBy()); - $writer->writeStringValue('search', $this->getSearch()); - $writer->writeCollectionOfPrimitiveValues('select', $this->getSelect()); - $writer->writeStringValue('sessionId', $this->getSessionId()); - $writer->writeIntegerValue('skip', $this->getSkip()); - $writer->writeIntegerValue('top', $this->getTop()); - $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 array $value Value to set for the AdditionalData property. - */ - public function setAdditionalData(?array $value): void { - $this->getBackingStore()->set('additionalData', $value); - } - - /** - * Sets the BackingStore property value. Stores model information. - * @param BackingStore $value Value to set for the BackingStore property. - */ - public function setBackingStore(BackingStore $value): void { - $this->backingStore = $value; - } - - /** - * Sets the filter property value. The filter property - * @param string|null $value Value to set for the filter property. - */ - public function setFilter(?string $value): void { - $this->getBackingStore()->set('filter', $value); - } - - /** - * Sets the groupBy property value. The groupBy property - * @param array|null $value Value to set for the groupBy property. - */ - public function setGroupBy(?array $value): void { - $this->getBackingStore()->set('groupBy', $value); - } - - /** - * Sets the name property value. The name property - * @param string|null $value Value to set for the name property. - */ - public function setName(?string $value): void { - $this->getBackingStore()->set('name', $value); - } - - /** - * Sets the orderBy property value. The orderBy property - * @param array|null $value Value to set for the orderBy property. - */ - public function setOrderBy(?array $value): void { - $this->getBackingStore()->set('orderBy', $value); - } - - /** - * Sets the search property value. The search property - * @param string|null $value Value to set for the search property. - */ - public function setSearch(?string $value): void { - $this->getBackingStore()->set('search', $value); - } - - /** - * Sets the select property value. The select property - * @param array|null $value Value to set for the select property. - */ - public function setSelect(?array $value): void { - $this->getBackingStore()->set('select', $value); - } - - /** - * Sets the sessionId property value. The sessionId property - * @param string|null $value Value to set for the sessionId property. - */ - public function setSessionId(?string $value): void { - $this->getBackingStore()->set('sessionId', $value); - } - - /** - * Sets the skip property value. The skip property - * @param int|null $value Value to set for the skip property. - */ - public function setSkip(?int $value): void { - $this->getBackingStore()->set('skip', $value); - } - - /** - * Sets the top property value. The top property - * @param int|null $value Value to set for the top property. - */ - public function setTop(?int $value): void { - $this->getBackingStore()->set('top', $value); - } - -} diff --git a/src/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportRequestBuilder.php b/src/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportRequestBuilder.php deleted file mode 100644 index 7e7840f5a0c..00000000000 --- a/src/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportRequestBuilder.php +++ /dev/null @@ -1,79 +0,0 @@ -|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. - * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. - */ - public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { - parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/reports/getZebraFotaDeploymentReport'); - if (is_array($pathParametersOrRawUrl)) { - $this->pathParameters = $pathParametersOrRawUrl; - } else { - $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; - } - } - - /** - * Invoke action getZebraFotaDeploymentReport - * @param GetZebraFotaDeploymentReportPostRequestBody $body The request body - * @param GetZebraFotaDeploymentReportRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @return Promise - * @throws Exception - */ - public function post(GetZebraFotaDeploymentReportPostRequestBody $body, ?GetZebraFotaDeploymentReportRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { - $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); - $errorMappings = [ - 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], - ]; - /** @var Promise $result */ - $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, StreamInterface::class, $errorMappings); - return $result; - } - - /** - * Invoke action getZebraFotaDeploymentReport - * @param GetZebraFotaDeploymentReportPostRequestBody $body The request body - * @param GetZebraFotaDeploymentReportRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @return RequestInformation - */ - public function toPostRequestInformation(GetZebraFotaDeploymentReportPostRequestBody $body, ?GetZebraFotaDeploymentReportRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { - $requestInfo = new RequestInformation(); - $requestInfo->urlTemplate = $this->urlTemplate; - $requestInfo->pathParameters = $this->pathParameters; - $requestInfo->httpMethod = HttpMethod::POST; - if ($requestConfiguration !== null) { - $requestInfo->addHeaders($requestConfiguration->headers); - $requestInfo->addRequestOptions(...$requestConfiguration->options); - } - $requestInfo->tryAddHeader('Accept', "application/octet-stream, application/json"); - $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. - * @return GetZebraFotaDeploymentReportRequestBuilder - */ - public function withUrl(string $rawUrl): GetZebraFotaDeploymentReportRequestBuilder { - return new GetZebraFotaDeploymentReportRequestBuilder($rawUrl, $this->requestAdapter); - } - -} diff --git a/src/Generated/DeviceManagement/Reports/ReportsRequestBuilder.php b/src/Generated/DeviceManagement/Reports/ReportsRequestBuilder.php index 35350cff6f9..bd9fb50af90 100644 --- a/src/Generated/DeviceManagement/Reports/ReportsRequestBuilder.php +++ b/src/Generated/DeviceManagement/Reports/ReportsRequestBuilder.php @@ -74,7 +74,6 @@ use Microsoft\Graph\Beta\Generated\DeviceManagement\Reports\GetWindowsQualityUpdateAlertSummaryReport\GetWindowsQualityUpdateAlertSummaryReportRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\Reports\GetWindowsUpdateAlertsPerPolicyPerDeviceReport\GetWindowsUpdateAlertsPerPolicyPerDeviceReportRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\Reports\GetWindowsUpdateAlertSummaryReport\GetWindowsUpdateAlertSummaryReportRequestBuilder; -use Microsoft\Graph\Beta\Generated\DeviceManagement\Reports\GetZebraFotaDeploymentReport\GetZebraFotaDeploymentReportRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\Reports\RetrieveAndroidWorkProfileDeviceMigrationStatuses\RetrieveAndroidWorkProfileDeviceMigrationStatusesRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\Reports\RetrieveAppleDeviceOSUpdateStatus\RetrieveAppleDeviceOSUpdateStatusRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\Reports\RetrieveAppleOSUpdateFailures\RetrieveAppleOSUpdateFailuresRequestBuilder; @@ -586,13 +585,6 @@ public function getWindowsUpdateAlertSummaryReport(): GetWindowsUpdateAlertSumma return new GetWindowsUpdateAlertSummaryReportRequestBuilder($this->pathParameters, $this->requestAdapter); } - /** - * Provides operations to call the getZebraFotaDeploymentReport method. - */ - public function getZebraFotaDeploymentReport(): GetZebraFotaDeploymentReportRequestBuilder { - return new GetZebraFotaDeploymentReportRequestBuilder($this->pathParameters, $this->requestAdapter); - } - /** * Provides operations to call the retrieveAndroidWorkProfileDeviceMigrationStatuses method. */ diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/CloudPcExternalPartnerItemRequestBuilder.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/CloudPcExternalPartnerItemRequestBuilder.php index b6860791f27..fd016f3ecfe 100644 --- a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/CloudPcExternalPartnerItemRequestBuilder.php +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/CloudPcExternalPartnerItemRequestBuilder.php @@ -4,6 +4,10 @@ use Exception; use Http\Promise\Promise; +use Microsoft\Graph\Beta\Generated\DeviceManagement\VirtualEndpoint\ExternalPartners\Item\ConfigureAgent\ConfigureAgentRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\VirtualEndpoint\ExternalPartners\Item\DeployAgent\DeployAgentRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\VirtualEndpoint\ExternalPartners\Item\RetrieveActionReports\RetrieveActionReportsRequestBuilder; +use Microsoft\Graph\Beta\Generated\DeviceManagement\VirtualEndpoint\ExternalPartners\Item\RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId\RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilder; use Microsoft\Graph\Beta\Generated\Models\CloudPcExternalPartner; use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError; use Microsoft\Kiota\Abstractions\BaseRequestBuilder; @@ -16,6 +20,34 @@ */ class CloudPcExternalPartnerItemRequestBuilder extends BaseRequestBuilder { + /** + * Provides operations to call the configureAgent method. + */ + public function configureAgent(): ConfigureAgentRequestBuilder { + return new ConfigureAgentRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the deployAgent method. + */ + public function deployAgent(): DeployAgentRequestBuilder { + return new DeployAgentRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the retrieveActionReports method. + */ + public function retrieveActionReports(): RetrieveActionReportsRequestBuilder { + return new RetrieveActionReportsRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the retrieveDeployAgentActionResults method. + */ + public function retrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId(): RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilder { + return new RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Instantiates a new CloudPcExternalPartnerItemRequestBuilder and sets the default values. * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/ConfigureAgent/ConfigureAgentPostRequestBody.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/ConfigureAgent/ConfigureAgentPostRequestBody.php new file mode 100644 index 00000000000..17bf65c3129 --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/ConfigureAgent/ConfigureAgentPostRequestBody.php @@ -0,0 +1,115 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return ConfigureAgentPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): ConfigureAgentPostRequestBody { + return new ConfigureAgentPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the agentSetting property value. The agentSetting property + * @return CloudPcExternalPartnerAgentSetting|null + */ + public function getAgentSetting(): ?CloudPcExternalPartnerAgentSetting { + $val = $this->getBackingStore()->get('agentSetting'); + if (is_null($val) || $val instanceof CloudPcExternalPartnerAgentSetting) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'agentSetting'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'agentSetting' => fn(ParseNode $n) => $o->setAgentSetting($n->getObjectValue([CloudPcExternalPartnerAgentSetting::class, 'createFromDiscriminatorValue'])), + ]; + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeObjectValue('agentSetting', $this->getAgentSetting()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the agentSetting property value. The agentSetting property + * @param CloudPcExternalPartnerAgentSetting|null $value Value to set for the agentSetting property. + */ + public function setAgentSetting(?CloudPcExternalPartnerAgentSetting $value): void { + $this->getBackingStore()->set('agentSetting', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/ConfigureAgent/ConfigureAgentRequestBuilder.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/ConfigureAgent/ConfigureAgentRequestBuilder.php new file mode 100644 index 00000000000..c8408cce6dc --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/ConfigureAgent/ConfigureAgentRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/virtualEndpoint/externalPartners/{cloudPcExternalPartner%2Did}/configureAgent'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Configure the cloudPcExternalPartnerAgentSetting of the cloudPcExternalPartner object. This setting is used for RMM partner agent installation. RMM partners must contact the Microsoft team to complete onboarding and add the agent URL prefix to the allow list before using this API. If autoDeploymentEnabled is enabled, the new provisioned Cloud PC is triggered agent deployment automatically. Currently supports only Windows 365 Business Cloud PC. + * @param ConfigureAgentPostRequestBody $body The request body + * @param ConfigureAgentRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/cloudpcexternalpartner-configureagent?view=graph-rest-beta Find more info here + */ + public function post(ConfigureAgentPostRequestBody $body, ?ConfigureAgentRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Configure the cloudPcExternalPartnerAgentSetting of the cloudPcExternalPartner object. This setting is used for RMM partner agent installation. RMM partners must contact the Microsoft team to complete onboarding and add the agent URL prefix to the allow list before using this API. If autoDeploymentEnabled is enabled, the new provisioned Cloud PC is triggered agent deployment automatically. Currently supports only Windows 365 Business Cloud PC. + * @param ConfigureAgentPostRequestBody $body The request body + * @param ConfigureAgentRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(ConfigureAgentPostRequestBody $body, ?ConfigureAgentRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return ConfigureAgentRequestBuilder + */ + public function withUrl(string $rawUrl): ConfigureAgentRequestBuilder { + return new ConfigureAgentRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/ConfigureAgent/ConfigureAgentRequestBuilderPostRequestConfiguration.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/ConfigureAgent/ConfigureAgentRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..720ee668faf --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/ConfigureAgent/ConfigureAgentRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentPostRequestBody.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentPostRequestBody.php new file mode 100644 index 00000000000..d3c7d47a135 --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentPostRequestBody.php @@ -0,0 +1,124 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return DeployAgentPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): DeployAgentPostRequestBody { + return new DeployAgentPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * Gets the cloudPcIds property value. The cloudPcIds property + * @return array|null + */ + public function getCloudPcIds(): ?array { + $val = $this->getBackingStore()->get('cloudPcIds'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'cloudPcIds'"); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'cloudPcIds' => function (ParseNode $n) { + $val = $n->getCollectionOfPrimitiveValues(); + if (is_array($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + } + /** @var array|null $val */ + $this->setCloudPcIds($val); + }, + ]; + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeCollectionOfPrimitiveValues('cloudPcIds', $this->getCloudPcIds()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the cloudPcIds property value. The cloudPcIds property + * @param array|null $value Value to set for the cloudPcIds property. + */ + public function setCloudPcIds(?array $value): void { + $this->getBackingStore()->set('cloudPcIds', $value); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentPostResponse.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentPostResponse.php new file mode 100644 index 00000000000..d5ce0588fc5 --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentPostResponse.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return DeployAgentPostResponse + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): DeployAgentPostResponse { + return new DeployAgentPostResponse(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getStringValue()), + ]; + } + + /** + * Gets the value property value. The value property + * @return string|null + */ + public function getValue(): ?string { + $val = $this->getBackingStore()->get('value'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'value'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('value', $this->getValue()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the value property value. The value property + * @param string|null $value Value to set for the value property. + */ + public function setValue(?string $value): void { + $this->getBackingStore()->set('value', $value); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentRequestBuilder.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentRequestBuilder.php new file mode 100644 index 00000000000..ab6e6031957 --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/virtualEndpoint/externalPartners/{cloudPcExternalPartner%2Did}/deployAgent'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Trigger agent deployment for a set of Windows 365 Cloud PCs that are provisioned, and return an activity ID. This API is supported when the connection is enabled and the agent setting is configured. Currently, only support Windows 365 business Cloud PC. + * @param DeployAgentPostRequestBody $body The request body + * @param DeployAgentRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/cloudpcexternalpartner-deployagent?view=graph-rest-beta Find more info here + */ + public function post(DeployAgentPostRequestBody $body, ?DeployAgentRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [DeployAgentPostResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Trigger agent deployment for a set of Windows 365 Cloud PCs that are provisioned, and return an activity ID. This API is supported when the connection is enabled and the agent setting is configured. Currently, only support Windows 365 business Cloud PC. + * @param DeployAgentPostRequestBody $body The request body + * @param DeployAgentRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(DeployAgentPostRequestBody $body, ?DeployAgentRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return DeployAgentRequestBuilder + */ + public function withUrl(string $rawUrl): DeployAgentRequestBuilder { + return new DeployAgentRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentRequestBuilderPostRequestConfiguration.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..5be5209a710 --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/DeployAgent/DeployAgentRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsGetResponse.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsGetResponse.php new file mode 100644 index 00000000000..a89991225a7 --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsGetResponse.php @@ -0,0 +1,72 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([CloudPcExternalPartnerActionReport::class, 'createFromDiscriminatorValue'])), + ]); + } + + /** + * Gets the value property value. The value property + * @return array|null + */ + public function getValue(): ?array { + $val = $this->getBackingStore()->get('value'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, CloudPcExternalPartnerActionReport::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'value'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + $writer->writeCollectionOfObjectValues('value', $this->getValue()); + } + + /** + * Sets the value property value. The value property + * @param array|null $value Value to set for the value property. + */ + public function setValue(?array $value): void { + $this->getBackingStore()->set('value', $value); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsRequestBuilder.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsRequestBuilder.php new file mode 100644 index 00000000000..6da1fe3e278 --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/virtualEndpoint/externalPartners/{cloudPcExternalPartner%2Did}/retrieveActionReports(){?%24count,%24filter,%24search,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Retrieve action reports of external partner. + * @param RetrieveActionReportsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/cloudpcexternalpartner-retrieveactionreports?view=graph-rest-beta Find more info here + */ + public function get(?RetrieveActionReportsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RetrieveActionReportsGetResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Retrieve action reports of external partner. + * @param RetrieveActionReportsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RetrieveActionReportsRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return RetrieveActionReportsRequestBuilder + */ + public function withUrl(string $rawUrl): RetrieveActionReportsRequestBuilder { + return new RetrieveActionReportsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsRequestBuilderGetQueryParameters.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..95635331e31 --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsRequestBuilderGetQueryParameters.php @@ -0,0 +1,58 @@ +count = $count; + $this->filter = $filter; + $this->search = $search; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsRequestBuilderGetRequestConfiguration.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..85788c2081b --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveActionReports/RetrieveActionReportsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,42 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param RetrieveActionReportsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?RetrieveActionReportsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new RetrieveActionReportsRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return RetrieveActionReportsRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?string $filter = null, ?string $search = null, ?int $skip = null, ?int $top = null): RetrieveActionReportsRequestBuilderGetQueryParameters { + return new RetrieveActionReportsRequestBuilderGetQueryParameters($count, $filter, $search, $skip, $top); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdGetResponse.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdGetResponse.php new file mode 100644 index 00000000000..b2316cdd4ba --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdGetResponse.php @@ -0,0 +1,72 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([CloudPcExternalPartnerActionResult::class, 'createFromDiscriminatorValue'])), + ]); + } + + /** + * Gets the value property value. The value property + * @return array|null + */ + public function getValue(): ?array { + $val = $this->getBackingStore()->get('value'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, CloudPcExternalPartnerActionResult::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'value'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + $writer->writeCollectionOfObjectValues('value', $this->getValue()); + } + + /** + * Sets the value property value. The value property + * @param array|null $value Value to set for the value property. + */ + public function setValue(?array $value): void { + $this->getBackingStore()->set('value', $value); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilder.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilder.php new file mode 100644 index 00000000000..6e8e5a1401a --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/deviceManagement/virtualEndpoint/externalPartners/{cloudPcExternalPartner%2Did}/retrieveDeployAgentActionResults(activityId=\'@activityId\',cloudPcId=\'@cloudPcId\'){?%24count,%24filter,%24search,%24skip,%24top,activityId*,cloudPcId*}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Retrieve the status of a specific deployment action on a specific Cloud PC device. If both activityId and cloudPcId are empty, the paging results are returned, and the pagination size is 100. + * @param RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/cloudpcexternalpartner-retrievedeployagentactionresults?view=graph-rest-beta Find more info here + */ + public function get(?RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdGetResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Retrieve the status of a specific deployment action on a specific Cloud PC device. If both activityId and cloudPcId are empty, the paging results are returned, and the pagination size is 100. + * @param RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilder + */ + public function withUrl(string $rawUrl): RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilder { + return new RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetQueryParameters.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..e10c1da3c90 --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetQueryParameters.php @@ -0,0 +1,72 @@ +activityId = $activityId; + $this->cloudPcId = $cloudPcId; + $this->count = $count; + $this->filter = $filter; + $this->search = $search; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetRequestConfiguration.php b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..de559373c71 --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/ExternalPartners/Item/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcId/RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,44 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetQueryParameters. + * @param string|null $activityId Usage: activityId='@activityId' + * @param string|null $cloudPcId Usage: cloudPcId='@cloudPcId' + * @param bool|null $count Include count of items + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $activityId = null, ?string $cloudPcId = null, ?bool $count = null, ?string $filter = null, ?string $search = null, ?int $skip = null, ?int $top = null): RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetQueryParameters { + return new RetrieveDeployAgentActionResultsactivityIdActivityIdCloudPcIdCloudPcIdRequestBuilderGetQueryParameters($activityId, $cloudPcId, $count, $filter, $search, $skip, $top); + } + +} diff --git a/src/Generated/Drives/Item/Items/Item/Archive/ArchiveRequestBuilder.php b/src/Generated/Drives/Item/Items/Item/Archive/ArchiveRequestBuilder.php new file mode 100644 index 00000000000..378ab93ce2c --- /dev/null +++ b/src/Generated/Drives/Item/Items/Item/Archive/ArchiveRequestBuilder.php @@ -0,0 +1,73 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/archive'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke action archive + * @param ArchiveRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(?ArchiveRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Invoke action archive + * @param ArchiveRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?ArchiveRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return ArchiveRequestBuilder + */ + public function withUrl(string $rawUrl): ArchiveRequestBuilder { + return new ArchiveRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Drives/Item/Items/Item/Archive/ArchiveRequestBuilderPostRequestConfiguration.php b/src/Generated/Drives/Item/Items/Item/Archive/ArchiveRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..795d1456be1 --- /dev/null +++ b/src/Generated/Drives/Item/Items/Item/Archive/ArchiveRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.php b/src/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.php index 1df37f466a8..56fa4f2eb6d 100644 --- a/src/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.php +++ b/src/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.php @@ -6,6 +6,7 @@ use Http\Promise\Promise; use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\Activities\ActivitiesRequestBuilder; use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\Analytics\AnalyticsRequestBuilder; +use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\Archive\ArchiveRequestBuilder; use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\AssignSensitivityLabel\AssignSensitivityLabelRequestBuilder; use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\Checkin\CheckinRequestBuilder; use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\Checkout\CheckoutRequestBuilder; @@ -34,6 +35,7 @@ use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\SearchWithQ\SearchWithQRequestBuilder; use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\Subscriptions\SubscriptionsRequestBuilder; use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\Thumbnails\ThumbnailsRequestBuilder; +use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\Unarchive\UnarchiveRequestBuilder; use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\Unfollow\UnfollowRequestBuilder; use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\ValidatePermission\ValidatePermissionRequestBuilder; use Microsoft\Graph\Beta\Generated\Drives\Item\Items\Item\Versions\VersionsRequestBuilder; @@ -64,6 +66,13 @@ public function analytics(): AnalyticsRequestBuilder { return new AnalyticsRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the archive method. + */ + public function archive(): ArchiveRequestBuilder { + return new ArchiveRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the assignSensitivityLabel method. */ @@ -239,6 +248,13 @@ public function thumbnails(): ThumbnailsRequestBuilder { return new ThumbnailsRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the unarchive method. + */ + public function unarchive(): UnarchiveRequestBuilder { + return new UnarchiveRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the unfollow method. */ diff --git a/src/Generated/Drives/Item/Items/Item/RetentionLabel/RetentionLabelRequestBuilder.php b/src/Generated/Drives/Item/Items/Item/RetentionLabel/RetentionLabelRequestBuilder.php index 38841718d2f..4f0528a720d 100644 --- a/src/Generated/Drives/Item/Items/Item/RetentionLabel/RetentionLabelRequestBuilder.php +++ b/src/Generated/Drives/Item/Items/Item/RetentionLabel/RetentionLabelRequestBuilder.php @@ -31,7 +31,7 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap } /** - * Remove a retention label from a driveItem. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. + * Remove the retention label from a driveItem. This operation clears the retention label and all associated retention settings enforced on the item. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. * @param RetentionLabelRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return Promise * @throws Exception @@ -77,7 +77,7 @@ public function patch(ItemRetentionLabel $body, ?RetentionLabelRequestBuilderPat } /** - * Remove a retention label from a driveItem. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. + * Remove the retention label from a driveItem. This operation clears the retention label and all associated retention settings enforced on the item. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. * @param RetentionLabelRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return RequestInformation */ diff --git a/src/Generated/Drives/Item/Items/Item/Unarchive/UnarchiveRequestBuilder.php b/src/Generated/Drives/Item/Items/Item/Unarchive/UnarchiveRequestBuilder.php new file mode 100644 index 00000000000..912646fa6c2 --- /dev/null +++ b/src/Generated/Drives/Item/Items/Item/Unarchive/UnarchiveRequestBuilder.php @@ -0,0 +1,74 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/unarchive'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke action unarchive + * @param UnarchiveRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(?UnarchiveRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [DriveItem::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Invoke action unarchive + * @param UnarchiveRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?UnarchiveRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return UnarchiveRequestBuilder + */ + public function withUrl(string $rawUrl): UnarchiveRequestBuilder { + return new UnarchiveRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Drives/Item/Items/Item/Unarchive/UnarchiveRequestBuilderPostRequestConfiguration.php b/src/Generated/Drives/Item/Items/Item/Unarchive/UnarchiveRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..be5605f27bc --- /dev/null +++ b/src/Generated/Drives/Item/Items/Item/Unarchive/UnarchiveRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..6ba85a2592f --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..3ad5484fac3 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..3edabdd3be7 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php new file mode 100644 index 00000000000..b0d43109e64 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php @@ -0,0 +1,160 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the unsetReaction method. + */ + public function unsetReaction(): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PATCH; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function withUrl(string $rawUrl): PlannerTaskChatMessageItemRequestBuilder { + return new PlannerTaskChatMessageItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..9cefca37f09 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..c499bd42250 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters and sets the default values. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + */ + public function __construct(?array $expand = null, ?array $select = null) { + $this->expand = $expand; + $this->select = $select; + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..c9b1a74f181 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param PlannerTaskChatMessageItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?PlannerTaskChatMessageItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return PlannerTaskChatMessageItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): PlannerTaskChatMessageItemRequestBuilderGetQueryParameters { + return new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..f68e7fe09f7 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php new file mode 100644 index 00000000000..37088c8a255 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return SetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): SetReactionPostRequestBody { + return new SetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php new file mode 100644 index 00000000000..30bbb331c2c --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/setReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-setreaction?view=graph-rest-beta Find more info here + */ + public function post(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return SetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): SetReactionRequestBuilder { + return new SetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..e9726d31210 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php new file mode 100644 index 00000000000..58c8381a698 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return UnsetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): UnsetReactionPostRequestBody { + return new UnsetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php new file mode 100644 index 00000000000..ba653154ae1 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/unsetReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-unsetreaction?view=graph-rest-beta Find more info here + */ + public function post(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return UnsetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..d41e8c3201d --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilder.php new file mode 100644 index 00000000000..342b1e6d53e --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilder.php @@ -0,0 +1,133 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + * @param string $plannerTaskChatMessageId The unique identifier of plannerTaskChatMessage + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function byPlannerTaskChatMessageId(string $plannerTaskChatMessageId): PlannerTaskChatMessageItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['plannerTaskChatMessage%2Did'] = $plannerTaskChatMessageId; + return new PlannerTaskChatMessageItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new MessagesRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessageCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return MessagesRequestBuilder + */ + public function withUrl(string $rawUrl): MessagesRequestBuilder { + return new MessagesRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..7bb5c4752a9 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..fa15911f971 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param MessagesRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?MessagesRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return MessagesRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): MessagesRequestBuilderGetQueryParameters { + return new MessagesRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..337a7c55e1e --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php index 40d5db49730..f35bf181401 100644 --- a/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php @@ -7,6 +7,7 @@ use Microsoft\Graph\Beta\Generated\Groups\Item\Planner\Plans\Item\Buckets\Item\Tasks\Item\AssignedToTaskBoardFormat\AssignedToTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Planner\Plans\Item\Buckets\Item\Tasks\Item\BucketTaskBoardFormat\BucketTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Planner\Plans\Item\Buckets\Item\Tasks\Item\Details\DetailsRequestBuilder; +use Microsoft\Graph\Beta\Generated\Groups\Item\Planner\Plans\Item\Buckets\Item\Tasks\Item\Messages\MessagesRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Planner\Plans\Item\Buckets\Item\Tasks\Item\ProgressTaskBoardFormat\ProgressTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError; use Microsoft\Graph\Beta\Generated\Models\PlannerTask; @@ -41,6 +42,13 @@ public function details(): DetailsRequestBuilder { return new DetailsRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + */ + public function messages(): MessagesRequestBuilder { + return new MessagesRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. */ diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..94684470512 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..a764c8b259e --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..5493f9b63b1 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php new file mode 100644 index 00000000000..62f7b302bba --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php @@ -0,0 +1,160 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the unsetReaction method. + */ + public function unsetReaction(): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PATCH; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function withUrl(string $rawUrl): PlannerTaskChatMessageItemRequestBuilder { + return new PlannerTaskChatMessageItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..359f44777ba --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..61fe67d85fe --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters and sets the default values. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + */ + public function __construct(?array $expand = null, ?array $select = null) { + $this->expand = $expand; + $this->select = $select; + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..6a817d2ff1c --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param PlannerTaskChatMessageItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?PlannerTaskChatMessageItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return PlannerTaskChatMessageItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): PlannerTaskChatMessageItemRequestBuilderGetQueryParameters { + return new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..e04dda48f7a --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php new file mode 100644 index 00000000000..88657ad391d --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return SetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): SetReactionPostRequestBody { + return new SetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php new file mode 100644 index 00000000000..f0c71224a49 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/setReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-setreaction?view=graph-rest-beta Find more info here + */ + public function post(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return SetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): SetReactionRequestBuilder { + return new SetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..31286ede40c --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php new file mode 100644 index 00000000000..7689853ad10 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return UnsetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): UnsetReactionPostRequestBody { + return new UnsetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php new file mode 100644 index 00000000000..d79a5e008c1 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/unsetReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-unsetreaction?view=graph-rest-beta Find more info here + */ + public function post(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return UnsetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..9c8b68d9b74 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilder.php new file mode 100644 index 00000000000..8d3cf9ef2c0 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilder.php @@ -0,0 +1,133 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + * @param string $plannerTaskChatMessageId The unique identifier of plannerTaskChatMessage + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function byPlannerTaskChatMessageId(string $plannerTaskChatMessageId): PlannerTaskChatMessageItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['plannerTaskChatMessage%2Did'] = $plannerTaskChatMessageId; + return new PlannerTaskChatMessageItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new MessagesRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessageCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return MessagesRequestBuilder + */ + public function withUrl(string $rawUrl): MessagesRequestBuilder { + return new MessagesRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..56d068019b7 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..53b6e899447 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param MessagesRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?MessagesRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return MessagesRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): MessagesRequestBuilderGetQueryParameters { + return new MessagesRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..f9cba537604 --- /dev/null +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php index d34497bce65..3e5a7a43e31 100644 --- a/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php +++ b/src/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php @@ -7,6 +7,7 @@ use Microsoft\Graph\Beta\Generated\Groups\Item\Planner\Plans\Item\Tasks\Item\AssignedToTaskBoardFormat\AssignedToTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Planner\Plans\Item\Tasks\Item\BucketTaskBoardFormat\BucketTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Planner\Plans\Item\Tasks\Item\Details\DetailsRequestBuilder; +use Microsoft\Graph\Beta\Generated\Groups\Item\Planner\Plans\Item\Tasks\Item\Messages\MessagesRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Planner\Plans\Item\Tasks\Item\ProgressTaskBoardFormat\ProgressTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError; use Microsoft\Graph\Beta\Generated\Models\PlannerTask; @@ -41,6 +42,13 @@ public function details(): DetailsRequestBuilder { return new DetailsRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + */ + public function messages(): MessagesRequestBuilder { + return new MessagesRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. */ diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..4fa86b2c300 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..91a1c454842 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..07317f065bf --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php new file mode 100644 index 00000000000..6b321ad1eec --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php @@ -0,0 +1,160 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the unsetReaction method. + */ + public function unsetReaction(): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PATCH; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function withUrl(string $rawUrl): PlannerTaskChatMessageItemRequestBuilder { + return new PlannerTaskChatMessageItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..19e5c735f1d --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..b0e20f5d8c0 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters and sets the default values. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + */ + public function __construct(?array $expand = null, ?array $select = null) { + $this->expand = $expand; + $this->select = $select; + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..05be1b5da31 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param PlannerTaskChatMessageItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?PlannerTaskChatMessageItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return PlannerTaskChatMessageItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): PlannerTaskChatMessageItemRequestBuilderGetQueryParameters { + return new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..9cf9f86f47f --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php new file mode 100644 index 00000000000..33c4d4cf7a6 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return SetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): SetReactionPostRequestBody { + return new SetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php new file mode 100644 index 00000000000..76c8749ce5d --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/setReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-setreaction?view=graph-rest-beta Find more info here + */ + public function post(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return SetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): SetReactionRequestBuilder { + return new SetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..dfbbe3b0f5e --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php new file mode 100644 index 00000000000..2969b6d2461 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return UnsetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): UnsetReactionPostRequestBody { + return new UnsetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php new file mode 100644 index 00000000000..8e74e95a995 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/unsetReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-unsetreaction?view=graph-rest-beta Find more info here + */ + public function post(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return UnsetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..18778d54cd4 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilder.php new file mode 100644 index 00000000000..6bbffa50547 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilder.php @@ -0,0 +1,133 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + * @param string $plannerTaskChatMessageId The unique identifier of plannerTaskChatMessage + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function byPlannerTaskChatMessageId(string $plannerTaskChatMessageId): PlannerTaskChatMessageItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['plannerTaskChatMessage%2Did'] = $plannerTaskChatMessageId; + return new PlannerTaskChatMessageItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new MessagesRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessageCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return MessagesRequestBuilder + */ + public function withUrl(string $rawUrl): MessagesRequestBuilder { + return new MessagesRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..644ac68efd0 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..192f28f296c --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param MessagesRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?MessagesRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return MessagesRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): MessagesRequestBuilderGetQueryParameters { + return new MessagesRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..9222c0c19d5 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php index a7cdca45707..0279e85cfd2 100644 --- a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php @@ -7,6 +7,7 @@ use Microsoft\Graph\Beta\Generated\Groups\Item\Team\Channels\Item\Planner\Plans\Item\Buckets\Item\Tasks\Item\AssignedToTaskBoardFormat\AssignedToTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\Channels\Item\Planner\Plans\Item\Buckets\Item\Tasks\Item\BucketTaskBoardFormat\BucketTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\Channels\Item\Planner\Plans\Item\Buckets\Item\Tasks\Item\Details\DetailsRequestBuilder; +use Microsoft\Graph\Beta\Generated\Groups\Item\Team\Channels\Item\Planner\Plans\Item\Buckets\Item\Tasks\Item\Messages\MessagesRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\Channels\Item\Planner\Plans\Item\Buckets\Item\Tasks\Item\ProgressTaskBoardFormat\ProgressTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError; use Microsoft\Graph\Beta\Generated\Models\PlannerTask; @@ -41,6 +42,13 @@ public function details(): DetailsRequestBuilder { return new DetailsRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + */ + public function messages(): MessagesRequestBuilder { + return new MessagesRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. */ diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..9041b437b3a --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..5fc644ece14 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..a8ee0a52db8 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php new file mode 100644 index 00000000000..6b5690daa4e --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php @@ -0,0 +1,160 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the unsetReaction method. + */ + public function unsetReaction(): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PATCH; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function withUrl(string $rawUrl): PlannerTaskChatMessageItemRequestBuilder { + return new PlannerTaskChatMessageItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..957b5cb6816 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..78a702ec65b --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters and sets the default values. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + */ + public function __construct(?array $expand = null, ?array $select = null) { + $this->expand = $expand; + $this->select = $select; + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..667578e9735 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param PlannerTaskChatMessageItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?PlannerTaskChatMessageItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return PlannerTaskChatMessageItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): PlannerTaskChatMessageItemRequestBuilderGetQueryParameters { + return new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..cb85a875024 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php new file mode 100644 index 00000000000..9f36a62e369 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return SetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): SetReactionPostRequestBody { + return new SetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php new file mode 100644 index 00000000000..84aa1d3e3de --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/setReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-setreaction?view=graph-rest-beta Find more info here + */ + public function post(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return SetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): SetReactionRequestBuilder { + return new SetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..bfd0e3368fe --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php new file mode 100644 index 00000000000..05e1ebe54f1 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return UnsetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): UnsetReactionPostRequestBody { + return new UnsetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php new file mode 100644 index 00000000000..dc6bb4cb3e2 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/unsetReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-unsetreaction?view=graph-rest-beta Find more info here + */ + public function post(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return UnsetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..6e4d6704c8a --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilder.php new file mode 100644 index 00000000000..82384ff1c19 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilder.php @@ -0,0 +1,133 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + * @param string $plannerTaskChatMessageId The unique identifier of plannerTaskChatMessage + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function byPlannerTaskChatMessageId(string $plannerTaskChatMessageId): PlannerTaskChatMessageItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['plannerTaskChatMessage%2Did'] = $plannerTaskChatMessageId; + return new PlannerTaskChatMessageItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new MessagesRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessageCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return MessagesRequestBuilder + */ + public function withUrl(string $rawUrl): MessagesRequestBuilder { + return new MessagesRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..0050d9fd00e --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..91ef3194032 --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param MessagesRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?MessagesRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return MessagesRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): MessagesRequestBuilderGetQueryParameters { + return new MessagesRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..c83bce1a85f --- /dev/null +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php index 4a9f6c6404c..99252d29f37 100644 --- a/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php +++ b/src/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php @@ -7,6 +7,7 @@ use Microsoft\Graph\Beta\Generated\Groups\Item\Team\Channels\Item\Planner\Plans\Item\Tasks\Item\AssignedToTaskBoardFormat\AssignedToTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\Channels\Item\Planner\Plans\Item\Tasks\Item\BucketTaskBoardFormat\BucketTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\Channels\Item\Planner\Plans\Item\Tasks\Item\Details\DetailsRequestBuilder; +use Microsoft\Graph\Beta\Generated\Groups\Item\Team\Channels\Item\Planner\Plans\Item\Tasks\Item\Messages\MessagesRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\Channels\Item\Planner\Plans\Item\Tasks\Item\ProgressTaskBoardFormat\ProgressTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError; use Microsoft\Graph\Beta\Generated\Models\PlannerTask; @@ -41,6 +42,13 @@ public function details(): DetailsRequestBuilder { return new DetailsRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + */ + public function messages(): MessagesRequestBuilder { + return new MessagesRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. */ diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..b2803101cb7 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..9839344f8f9 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..b0876ab74a8 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php new file mode 100644 index 00000000000..f54f5b199ad --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php @@ -0,0 +1,160 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the unsetReaction method. + */ + public function unsetReaction(): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PATCH; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function withUrl(string $rawUrl): PlannerTaskChatMessageItemRequestBuilder { + return new PlannerTaskChatMessageItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..044f4e84194 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..9de14156242 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters and sets the default values. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + */ + public function __construct(?array $expand = null, ?array $select = null) { + $this->expand = $expand; + $this->select = $select; + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..1840be4783e --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param PlannerTaskChatMessageItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?PlannerTaskChatMessageItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return PlannerTaskChatMessageItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): PlannerTaskChatMessageItemRequestBuilderGetQueryParameters { + return new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..179486f1e6a --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php new file mode 100644 index 00000000000..7c6b9b8d245 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return SetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): SetReactionPostRequestBody { + return new SetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php new file mode 100644 index 00000000000..af6fbde0279 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/setReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-setreaction?view=graph-rest-beta Find more info here + */ + public function post(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return SetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): SetReactionRequestBuilder { + return new SetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..2ca055ed564 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php new file mode 100644 index 00000000000..cf42f3c1462 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return UnsetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): UnsetReactionPostRequestBody { + return new UnsetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php new file mode 100644 index 00000000000..a07fa221365 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/unsetReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-unsetreaction?view=graph-rest-beta Find more info here + */ + public function post(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return UnsetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..2e2eba7fc7d --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilder.php new file mode 100644 index 00000000000..143db8428d6 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilder.php @@ -0,0 +1,133 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + * @param string $plannerTaskChatMessageId The unique identifier of plannerTaskChatMessage + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function byPlannerTaskChatMessageId(string $plannerTaskChatMessageId): PlannerTaskChatMessageItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['plannerTaskChatMessage%2Did'] = $plannerTaskChatMessageId; + return new PlannerTaskChatMessageItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new MessagesRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/messages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessageCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return MessagesRequestBuilder + */ + public function withUrl(string $rawUrl): MessagesRequestBuilder { + return new MessagesRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..94f45b91e2b --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..1299b9aa6a4 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param MessagesRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?MessagesRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return MessagesRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): MessagesRequestBuilderGetQueryParameters { + return new MessagesRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..43ea936e722 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php index 8f510c95bfc..724397825df 100644 --- a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php @@ -7,6 +7,7 @@ use Microsoft\Graph\Beta\Generated\Groups\Item\Team\PrimaryChannel\Planner\Plans\Item\Buckets\Item\Tasks\Item\AssignedToTaskBoardFormat\AssignedToTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\PrimaryChannel\Planner\Plans\Item\Buckets\Item\Tasks\Item\BucketTaskBoardFormat\BucketTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\PrimaryChannel\Planner\Plans\Item\Buckets\Item\Tasks\Item\Details\DetailsRequestBuilder; +use Microsoft\Graph\Beta\Generated\Groups\Item\Team\PrimaryChannel\Planner\Plans\Item\Buckets\Item\Tasks\Item\Messages\MessagesRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\PrimaryChannel\Planner\Plans\Item\Buckets\Item\Tasks\Item\ProgressTaskBoardFormat\ProgressTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError; use Microsoft\Graph\Beta\Generated\Models\PlannerTask; @@ -41,6 +42,13 @@ public function details(): DetailsRequestBuilder { return new DetailsRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + */ + public function messages(): MessagesRequestBuilder { + return new MessagesRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. */ diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..60d9c7a314e --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..748780dec1e --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..705a9bc8eb6 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php new file mode 100644 index 00000000000..fbe95457dc2 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilder.php @@ -0,0 +1,160 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the unsetReaction method. + */ + public function unsetReaction(): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property messages for groups + * @param PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::DELETE; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Update the navigation property messages in groups + * @param PlannerTaskChatMessage $body The request body + * @param PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(PlannerTaskChatMessage $body, ?PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::PATCH; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function withUrl(string $rawUrl): PlannerTaskChatMessageItemRequestBuilder { + return new PlannerTaskChatMessageItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..28b1230003f --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderDeleteRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..c4af2f65c52 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters and sets the default values. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + */ + public function __construct(?array $expand = null, ?array $select = null) { + $this->expand = $expand; + $this->select = $select; + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..b36cafd5ac0 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param PlannerTaskChatMessageItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?PlannerTaskChatMessageItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return PlannerTaskChatMessageItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): PlannerTaskChatMessageItemRequestBuilderGetQueryParameters { + return new PlannerTaskChatMessageItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..cd2641f8bc5 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/PlannerTaskChatMessageItemRequestBuilderPatchRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php new file mode 100644 index 00000000000..a69544cda30 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return SetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): SetReactionPostRequestBody { + return new SetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php new file mode 100644 index 00000000000..75b9af7cc3a --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/setReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-setreaction?view=graph-rest-beta Find more info here + */ + public function post(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Set a reaction to a plannerTaskChatMessage for the current user. + * @param SetReactionPostRequestBody $body The request body + * @param SetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(SetReactionPostRequestBody $body, ?SetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return SetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): SetReactionRequestBuilder { + return new SetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..8b4248b3e06 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/SetReaction/SetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php new file mode 100644 index 00000000000..780ed61490a --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.php @@ -0,0 +1,114 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return UnsetReactionPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): UnsetReactionPostRequestBody { + return new UnsetReactionPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'reactionType' => fn(ParseNode $n) => $o->setReactionType($n->getStringValue()), + ]; + } + + /** + * Gets the reactionType property value. The reactionType property + * @return string|null + */ + public function getReactionType(): ?string { + $val = $this->getBackingStore()->get('reactionType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reactionType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('reactionType', $this->getReactionType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the reactionType property value. The reactionType property + * @param string|null $value Value to set for the reactionType property. + */ + public function setReactionType(?string $value): void { + $this->getBackingStore()->set('reactionType', $value); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php new file mode 100644 index 00000000000..7a4acc77fca --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages/{plannerTaskChatMessage%2Did}/unsetReaction'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + * @link https://learn.microsoft.com/graph/api/plannertaskchatmessage-unsetreaction?view=graph-rest-beta Find more info here + */ + public function post(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Remove a reaction from a plannerTaskChatMessage for the current user. + * @param UnsetReactionPostRequestBody $body The request body + * @param UnsetReactionRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(UnsetReactionPostRequestBody $body, ?UnsetReactionRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return UnsetReactionRequestBuilder + */ + public function withUrl(string $rawUrl): UnsetReactionRequestBuilder { + return new UnsetReactionRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..039b342e993 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilder.php new file mode 100644 index 00000000000..a147d803565 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilder.php @@ -0,0 +1,133 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + * @param string $plannerTaskChatMessageId The unique identifier of plannerTaskChatMessage + * @return PlannerTaskChatMessageItemRequestBuilder + */ + public function byPlannerTaskChatMessageId(string $plannerTaskChatMessageId): PlannerTaskChatMessageItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['plannerTaskChatMessage%2Did'] = $plannerTaskChatMessageId; + return new PlannerTaskChatMessageItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new MessagesRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/messages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessageCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PlannerTaskChatMessage::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Read-only. Nullable. Chat messages associated with the task. + * @param MessagesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?MessagesRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Create new navigation property to messages for groups + * @param PlannerTaskChatMessage $body The request body + * @param MessagesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(PlannerTaskChatMessage $body, ?MessagesRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return MessagesRequestBuilder + */ + public function withUrl(string $rawUrl): MessagesRequestBuilder { + return new MessagesRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..7bba3367f05 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..8ff1b40fc08 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param MessagesRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?MessagesRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new MessagesRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return MessagesRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): MessagesRequestBuilderGetQueryParameters { + return new MessagesRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..d2c68fec6b8 --- /dev/null +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Messages/MessagesRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php index 7acf1c97590..f3c92a1f814 100644 --- a/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php +++ b/src/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.php @@ -7,6 +7,7 @@ use Microsoft\Graph\Beta\Generated\Groups\Item\Team\PrimaryChannel\Planner\Plans\Item\Tasks\Item\AssignedToTaskBoardFormat\AssignedToTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\PrimaryChannel\Planner\Plans\Item\Tasks\Item\BucketTaskBoardFormat\BucketTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\PrimaryChannel\Planner\Plans\Item\Tasks\Item\Details\DetailsRequestBuilder; +use Microsoft\Graph\Beta\Generated\Groups\Item\Team\PrimaryChannel\Planner\Plans\Item\Tasks\Item\Messages\MessagesRequestBuilder; use Microsoft\Graph\Beta\Generated\Groups\Item\Team\PrimaryChannel\Planner\Plans\Item\Tasks\Item\ProgressTaskBoardFormat\ProgressTaskBoardFormatRequestBuilder; use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError; use Microsoft\Graph\Beta\Generated\Models\PlannerTask; @@ -41,6 +42,13 @@ public function details(): DetailsRequestBuilder { return new DetailsRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to manage the messages property of the microsoft.graph.plannerTask entity. + */ + public function messages(): MessagesRequestBuilder { + return new MessagesRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. */ diff --git a/src/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilder.php b/src/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilder.php index e84c23f8fa3..8749debd0d5 100644 --- a/src/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilder.php +++ b/src/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilder.php @@ -46,10 +46,11 @@ public function delete(?AuthenticationEventListenerItemRequestBuilderDeleteReque } /** - * Get authenticationEventListeners from identity + * Read the properties and relationships of an authenticationEventListener object. The @odata.type property in the response object indicates the type of the authenticationEventListener object. The following derived types are currently supported. * @param AuthenticationEventListenerItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return Promise * @throws Exception + * @link https://learn.microsoft.com/graph/api/authenticationeventlistener-get?view=graph-rest-beta Find more info here */ public function get(?AuthenticationEventListenerItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { $requestInfo = $this->toGetRequestInformation($requestConfiguration); @@ -94,7 +95,7 @@ public function toDeleteRequestInformation(?AuthenticationEventListenerItemReque } /** - * Get authenticationEventListeners from identity + * Read the properties and relationships of an authenticationEventListener object. The @odata.type property in the response object indicates the type of the authenticationEventListener object. The following derived types are currently supported. * @param AuthenticationEventListenerItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return RequestInformation */ diff --git a/src/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilderGetQueryParameters.php b/src/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilderGetQueryParameters.php index 908391ad6c0..f054f4e3c1e 100644 --- a/src/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilderGetQueryParameters.php +++ b/src/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilderGetQueryParameters.php @@ -5,7 +5,7 @@ use Microsoft\Kiota\Abstractions\QueryParameter; /** - * Get authenticationEventListeners from identity + * Read the properties and relationships of an authenticationEventListener object. The @odata.type property in the response object indicates the type of the authenticationEventListener object. The following derived types are currently supported. */ class AuthenticationEventListenerItemRequestBuilderGetQueryParameters { diff --git a/src/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilder.php b/src/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilder.php index 02637068d88..5be5c780b5c 100644 --- a/src/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilder.php +++ b/src/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilder.php @@ -54,11 +54,11 @@ public function delete(?CustomAuthenticationExtensionItemRequestBuilderDeleteReq } /** - * Read the properties and relationships of an authenticationEventListener object. The @odata.type property in the response object indicates the type of the authenticationEventListener object. The following derived types are currently supported. + * Read the properties and relationships of a customAuthenticationExtension object. The following derived types are currently supported. * @param CustomAuthenticationExtensionItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return Promise * @throws Exception - * @link https://learn.microsoft.com/graph/api/authenticationeventlistener-get?view=graph-rest-beta Find more info here + * @link https://learn.microsoft.com/graph/api/customauthenticationextension-get?view=graph-rest-beta Find more info here */ public function get(?CustomAuthenticationExtensionItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { $requestInfo = $this->toGetRequestInformation($requestConfiguration); @@ -102,7 +102,7 @@ public function toDeleteRequestInformation(?CustomAuthenticationExtensionItemReq } /** - * Read the properties and relationships of an authenticationEventListener object. The @odata.type property in the response object indicates the type of the authenticationEventListener object. The following derived types are currently supported. + * Read the properties and relationships of a customAuthenticationExtension object. The following derived types are currently supported. * @param CustomAuthenticationExtensionItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return RequestInformation */ diff --git a/src/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilderGetQueryParameters.php b/src/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilderGetQueryParameters.php index 6ac33f29928..64cff1ae17d 100644 --- a/src/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilderGetQueryParameters.php +++ b/src/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilderGetQueryParameters.php @@ -5,7 +5,7 @@ use Microsoft\Kiota\Abstractions\QueryParameter; /** - * Read the properties and relationships of an authenticationEventListener object. The @odata.type property in the response object indicates the type of the authenticationEventListener object. The following derived types are currently supported. + * Read the properties and relationships of a customAuthenticationExtension object. The following derived types are currently supported. */ class CustomAuthenticationExtensionItemRequestBuilderGetQueryParameters { diff --git a/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/Item/AccessPackageSubjectItemRequestBuilder.php b/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/Item/AccessPackageSubjectItemRequestBuilder.php index d6a8abe2ded..05cee64f68d 100644 --- a/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/Item/AccessPackageSubjectItemRequestBuilder.php +++ b/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/Item/AccessPackageSubjectItemRequestBuilder.php @@ -67,7 +67,7 @@ public function get(?AccessPackageSubjectItemRequestBuilderGetRequestConfigurati } /** - * Update an existing accessPackageSubject object to change the subject lifecycle. + * Update an external directory user represented by an existing accessPackageSubject object to change the subject lifecycle. * @param AccessPackageSubject $body The request body * @param AccessPackageSubjectItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return Promise @@ -122,7 +122,7 @@ public function toGetRequestInformation(?AccessPackageSubjectItemRequestBuilderG } /** - * Update an existing accessPackageSubject object to change the subject lifecycle. + * Update an external directory user represented by an existing accessPackageSubject object to change the subject lifecycle. * @param AccessPackageSubject $body The request body * @param AccessPackageSubjectItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return RequestInformation diff --git a/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilder.php b/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilder.php index 50039f528f3..793d22f69fe 100644 --- a/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilder.php +++ b/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilder.php @@ -52,7 +52,7 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap } /** - * Get the properties of an existing accessPackageSubject object. + * Get the properties of an external directory user represented by an existing accessPackageSubject object. * @param SubjectsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return Promise * @throws Exception @@ -82,7 +82,7 @@ public function post(AccessPackageSubject $body, ?SubjectsRequestBuilderPostRequ } /** - * Get the properties of an existing accessPackageSubject object. + * Get the properties of an external directory user represented by an existing accessPackageSubject object. * @param SubjectsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return RequestInformation */ diff --git a/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilderGetQueryParameters.php b/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilderGetQueryParameters.php index b28dd395942..65f530ddcb6 100644 --- a/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilderGetQueryParameters.php +++ b/src/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilderGetQueryParameters.php @@ -5,7 +5,7 @@ use Microsoft\Kiota\Abstractions\QueryParameter; /** - * Get the properties of an existing accessPackageSubject object. + * Get the properties of an external directory user represented by an existing accessPackageSubject object. */ class SubjectsRequestBuilderGetQueryParameters { diff --git a/src/Generated/IdentityGovernance/EntitlementManagement/SubjectsWithObjectId/SubjectsWithObjectIdRequestBuilder.php b/src/Generated/IdentityGovernance/EntitlementManagement/SubjectsWithObjectId/SubjectsWithObjectIdRequestBuilder.php index 44ea580a6d7..8ea17b99804 100644 --- a/src/Generated/IdentityGovernance/EntitlementManagement/SubjectsWithObjectId/SubjectsWithObjectIdRequestBuilder.php +++ b/src/Generated/IdentityGovernance/EntitlementManagement/SubjectsWithObjectId/SubjectsWithObjectIdRequestBuilder.php @@ -62,7 +62,7 @@ public function get(?SubjectsWithObjectIdRequestBuilderGetRequestConfiguration $ } /** - * Update an existing accessPackageSubject object to change the subject lifecycle. + * Update an external directory user represented by an existing accessPackageSubject object to change the subject lifecycle. * @param AccessPackageSubject $body The request body * @param SubjectsWithObjectIdRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return Promise @@ -117,7 +117,7 @@ public function toGetRequestInformation(?SubjectsWithObjectIdRequestBuilderGetRe } /** - * Update an existing accessPackageSubject object to change the subject lifecycle. + * Update an external directory user represented by an existing accessPackageSubject object to change the subject lifecycle. * @param AccessPackageSubject $body The request body * @param SubjectsWithObjectIdRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return RequestInformation diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder.php new file mode 100644 index 00000000000..637dc756d1c --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder.php @@ -0,0 +1,73 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/microsoft.graph.identityGovernance.previewTaskFailures'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke action previewTaskFailures + * @param MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(?MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PreviewTaskFailuresPostResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Invoke action previewTaskFailures + * @param MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder + */ + public function withUrl(string $rawUrl): MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder { + return new MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..1d9564de1eb --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/PreviewTaskFailuresPostResponse.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/PreviewTaskFailuresPostResponse.php new file mode 100644 index 00000000000..6e5dd0ec25f --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/PreviewTaskFailuresPostResponse.php @@ -0,0 +1,72 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([PreviewFailedTask::class, 'createFromDiscriminatorValue'])), + ]); + } + + /** + * Gets the value property value. The value property + * @return array|null + */ + public function getValue(): ?array { + $val = $this->getBackingStore()->get('value'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, PreviewFailedTask::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'value'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + $writer->writeCollectionOfObjectValues('value', $this->getValue()); + } + + /** + * Sets the value property value. The value property + * @param array|null $value Value to set for the value property. + */ + public function setValue(?array $value): void { + $this->getBackingStore()->set('value', $value); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder.php new file mode 100644 index 00000000000..6e5fd800be2 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder.php @@ -0,0 +1,76 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/microsoft.graph.identityGovernance.previewWorkflow'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke action previewWorkflow + * @param PreviewWorkflowPostRequestBody $body The request body + * @param MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(PreviewWorkflowPostRequestBody $body, ?MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Invoke action previewWorkflow + * @param PreviewWorkflowPostRequestBody $body The request body + * @param MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(PreviewWorkflowPostRequestBody $body, ?MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder + */ + public function withUrl(string $rawUrl): MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder { + return new MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..b935fd61268 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/PreviewWorkflowPostRequestBody.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/PreviewWorkflowPostRequestBody.php new file mode 100644 index 00000000000..ec237438059 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/PreviewWorkflowPostRequestBody.php @@ -0,0 +1,118 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return PreviewWorkflowPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): PreviewWorkflowPostRequestBody { + return new PreviewWorkflowPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'subjects' => fn(ParseNode $n) => $o->setSubjects($n->getCollectionOfObjectValues([DirectoryObject::class, 'createFromDiscriminatorValue'])), + ]; + } + + /** + * Gets the subjects property value. The subjects property + * @return array|null + */ + public function getSubjects(): ?array { + $val = $this->getBackingStore()->get('subjects'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, DirectoryObject::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'subjects'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeCollectionOfObjectValues('subjects', $this->getSubjects()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the subjects property value. The subjects property + * @param array|null $value Value to set for the subjects property. + */ + public function setSubjects(?array $value): void { + $this->getBackingStore()->set('subjects', $value); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Count/CountRequestBuilder.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..e18e6dfdd11 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/previewScope/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..01ff3cd3f8d --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..de52c71a2c4 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilder.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilder.php new file mode 100644 index 00000000000..33f75d4d085 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/previewScope/{directoryObject%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get previewScope from identityGovernance + * @param DirectoryObjectItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?DirectoryObjectItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [DirectoryObject::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get previewScope from identityGovernance + * @param DirectoryObjectItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?DirectoryObjectItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return DirectoryObjectItemRequestBuilder + */ + public function withUrl(string $rawUrl): DirectoryObjectItemRequestBuilder { + return new DirectoryObjectItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php similarity index 76% rename from src/Generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php rename to src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php index 00e5419ba8d..e153f8230f3 100644 --- a/src/Generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php @@ -1,11 +1,11 @@ |string>|null $headers Request headers + * @param array|null $options Request options + * @param DirectoryObjectItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?DirectoryObjectItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new DirectoryObjectItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return DirectoryObjectItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): DirectoryObjectItemRequestBuilderGetQueryParameters { + return new DirectoryObjectItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/PreviewScopeRequestBuilder.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/PreviewScopeRequestBuilder.php new file mode 100644 index 00000000000..37f65dae9c9 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/PreviewScopeRequestBuilder.php @@ -0,0 +1,97 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the previewScope property of the microsoft.graph.identityGovernance.workflow entity. + * @param string $directoryObjectId The unique identifier of directoryObject + * @return DirectoryObjectItemRequestBuilder + */ + public function byDirectoryObjectId(string $directoryObjectId): DirectoryObjectItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['directoryObject%2Did'] = $directoryObjectId; + return new DirectoryObjectItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new PreviewScopeRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/previewScope{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get previewScope from identityGovernance + * @param PreviewScopeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?PreviewScopeRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [DirectoryObjectCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get previewScope from identityGovernance + * @param PreviewScopeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?PreviewScopeRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return PreviewScopeRequestBuilder + */ + public function withUrl(string $rawUrl): PreviewScopeRequestBuilder { + return new PreviewScopeRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetQueryParameters.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..ba3ab55dd57 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new PreviewScopeRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetRequestConfiguration.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..87391b4661e --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param PreviewScopeRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?PreviewScopeRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new PreviewScopeRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return PreviewScopeRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): PreviewScopeRequestBuilderGetQueryParameters { + return new PreviewScopeRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/WorkflowItemRequestBuilder.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/WorkflowItemRequestBuilder.php index 3b9e684a901..e939bc09a10 100644 --- a/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/WorkflowItemRequestBuilder.php +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/WorkflowItemRequestBuilder.php @@ -11,7 +11,10 @@ use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\DeletedItems\Workflows\Item\MicrosoftGraphIdentityGovernanceActivate\MicrosoftGraphIdentityGovernanceActivateRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\DeletedItems\Workflows\Item\MicrosoftGraphIdentityGovernanceActivateWithScope\MicrosoftGraphIdentityGovernanceActivateWithScopeRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\DeletedItems\Workflows\Item\MicrosoftGraphIdentityGovernanceCreateNewVersion\MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder; +use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\DeletedItems\Workflows\Item\MicrosoftGraphIdentityGovernancePreviewTaskFailures\MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder; +use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\DeletedItems\Workflows\Item\MicrosoftGraphIdentityGovernancePreviewWorkflow\MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\DeletedItems\Workflows\Item\MicrosoftGraphIdentityGovernanceRestore\MicrosoftGraphIdentityGovernanceRestoreRequestBuilder; +use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\DeletedItems\Workflows\Item\PreviewScope\PreviewScopeRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\DeletedItems\Workflows\Item\Runs\RunsRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\DeletedItems\Workflows\Item\TaskReports\TaskReportsRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\DeletedItems\Workflows\Item\Tasks\TasksRequestBuilder; @@ -78,6 +81,20 @@ public function microsoftGraphIdentityGovernanceCreateNewVersion(): MicrosoftGra return new MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the previewTaskFailures method. + */ + public function microsoftGraphIdentityGovernancePreviewTaskFailures(): MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder { + return new MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the previewWorkflow method. + */ + public function microsoftGraphIdentityGovernancePreviewWorkflow(): MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder { + return new MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the restore method. */ @@ -85,6 +102,13 @@ public function microsoftGraphIdentityGovernanceRestore(): MicrosoftGraphIdentit return new MicrosoftGraphIdentityGovernanceRestoreRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to manage the previewScope property of the microsoft.graph.identityGovernance.workflow entity. + */ + public function previewScope(): PreviewScopeRequestBuilder { + return new PreviewScopeRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to manage the runs property of the microsoft.graph.identityGovernance.workflow entity. */ diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder.php new file mode 100644 index 00000000000..be28887b2b0 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder.php @@ -0,0 +1,73 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/microsoft.graph.identityGovernance.previewTaskFailures'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke action previewTaskFailures + * @param MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(?MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [PreviewTaskFailuresPostResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Invoke action previewTaskFailures + * @param MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder + */ + public function withUrl(string $rawUrl): MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder { + return new MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..934d02ab143 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/PreviewTaskFailuresPostResponse.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/PreviewTaskFailuresPostResponse.php new file mode 100644 index 00000000000..2f56008aea1 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/PreviewTaskFailuresPostResponse.php @@ -0,0 +1,72 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([PreviewFailedTask::class, 'createFromDiscriminatorValue'])), + ]); + } + + /** + * Gets the value property value. The value property + * @return array|null + */ + public function getValue(): ?array { + $val = $this->getBackingStore()->get('value'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, PreviewFailedTask::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'value'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + $writer->writeCollectionOfObjectValues('value', $this->getValue()); + } + + /** + * Sets the value property value. The value property + * @param array|null $value Value to set for the value property. + */ + public function setValue(?array $value): void { + $this->getBackingStore()->set('value', $value); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder.php new file mode 100644 index 00000000000..5841440f5fa --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder.php @@ -0,0 +1,76 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/microsoft.graph.identityGovernance.previewWorkflow'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Invoke action previewWorkflow + * @param PreviewWorkflowPostRequestBody $body The request body + * @param MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(PreviewWorkflowPostRequestBody $body, ?MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Invoke action previewWorkflow + * @param PreviewWorkflowPostRequestBody $body The request body + * @param MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(PreviewWorkflowPostRequestBody $body, ?MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::POST; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + $requestInfo->setContentFromParsable($this->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 string $rawUrl The raw URL to use for the request builder. + * @return MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder + */ + public function withUrl(string $rawUrl): MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder { + return new MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..7c002b3982c --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilderPostRequestConfiguration.php @@ -0,0 +1,22 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + */ + public function __construct(?array $headers = null, ?array $options = null) { + parent::__construct($headers ?? [], $options ?? []); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/PreviewWorkflowPostRequestBody.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/PreviewWorkflowPostRequestBody.php new file mode 100644 index 00000000000..d605b75183d --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/PreviewWorkflowPostRequestBody.php @@ -0,0 +1,118 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return PreviewWorkflowPostRequestBody + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): PreviewWorkflowPostRequestBody { + return new PreviewWorkflowPostRequestBody(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'subjects' => fn(ParseNode $n) => $o->setSubjects($n->getCollectionOfObjectValues([DirectoryObject::class, 'createFromDiscriminatorValue'])), + ]; + } + + /** + * Gets the subjects property value. The subjects property + * @return array|null + */ + public function getSubjects(): ?array { + $val = $this->getBackingStore()->get('subjects'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, DirectoryObject::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'subjects'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeCollectionOfObjectValues('subjects', $this->getSubjects()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the subjects property value. The subjects property + * @param array|null $value Value to set for the subjects property. + */ + public function setSubjects(?array $value): void { + $this->getBackingStore()->set('subjects', $value); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Count/CountRequestBuilder.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..dd0388e45ed --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Count/CountRequestBuilder.php @@ -0,0 +1,78 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/previewScope/$count{?%24filter,%24search}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + /** @var Promise $result */ + $result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings); + return $result; + } + + /** + * Get the number of the resource + * @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "text/plain;q=0.9"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return CountRequestBuilder + */ + public function withUrl(string $rawUrl): CountRequestBuilder { + return new CountRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..5be7fe5be20 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..3bbcd1ece06 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Count/CountRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new CountRequestBuilderGetQueryParameters. + * @param string|null $filter Filter items by property values + * @param string|null $search Search items by search phrases + * @return CountRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters { + return new CountRequestBuilderGetQueryParameters($filter, $search); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilder.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilder.php new file mode 100644 index 00000000000..ff9ef6cc7c4 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilder.php @@ -0,0 +1,77 @@ +|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/previewScope/{directoryObject%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get previewScope from identityGovernance + * @param DirectoryObjectItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?DirectoryObjectItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [DirectoryObject::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get previewScope from identityGovernance + * @param DirectoryObjectItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?DirectoryObjectItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return DirectoryObjectItemRequestBuilder + */ + public function withUrl(string $rawUrl): DirectoryObjectItemRequestBuilder { + return new DirectoryObjectItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..752aaf37d09 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * Instantiates a new DirectoryObjectItemRequestBuilderGetQueryParameters and sets the default values. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + */ + public function __construct(?array $expand = null, ?array $select = null) { + $this->expand = $expand; + $this->select = $select; + } + +} diff --git a/src/Generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilderGetRequestConfiguration.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetRequestConfiguration.php similarity index 93% rename from src/Generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilderGetRequestConfiguration.php rename to src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetRequestConfiguration.php index 7a30079ba88..d51e54ef47a 100644 --- a/src/Generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilderGetRequestConfiguration.php +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetRequestConfiguration.php @@ -1,6 +1,6 @@ pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the previewScope property of the microsoft.graph.identityGovernance.workflow entity. + * @param string $directoryObjectId The unique identifier of directoryObject + * @return DirectoryObjectItemRequestBuilder + */ + public function byDirectoryObjectId(string $directoryObjectId): DirectoryObjectItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['directoryObject%2Did'] = $directoryObjectId; + return new DirectoryObjectItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new PreviewScopeRequestBuilder and sets the default values. + * @param array|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL. + * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. + */ + public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { + parent::__construct($requestAdapter, [], '{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/previewScope{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get previewScope from identityGovernance + * @param PreviewScopeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?PreviewScopeRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [DirectoryObjectCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get previewScope from identityGovernance + * @param PreviewScopeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?PreviewScopeRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { + $requestInfo = new RequestInformation(); + $requestInfo->urlTemplate = $this->urlTemplate; + $requestInfo->pathParameters = $this->pathParameters; + $requestInfo->httpMethod = HttpMethod::GET; + if ($requestConfiguration !== null) { + $requestInfo->addHeaders($requestConfiguration->headers); + if ($requestConfiguration->queryParameters !== null) { + $requestInfo->setQueryParameters($requestConfiguration->queryParameters); + } + $requestInfo->addRequestOptions(...$requestConfiguration->options); + } + $requestInfo->tryAddHeader('Accept', "application/json"); + return $requestInfo; + } + + /** + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + * @param string $rawUrl The raw URL to use for the request builder. + * @return PreviewScopeRequestBuilder + */ + public function withUrl(string $rawUrl): PreviewScopeRequestBuilder { + return new PreviewScopeRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetQueryParameters.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..d98966b8ab9 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetQueryParameters.php @@ -0,0 +1,82 @@ +|null $expand Expand related entities + */ + public ?array $expand = null; + + /** + * @QueryParameter("%24filter") + * @var string|null $filter Filter items by property values + */ + public ?string $filter = null; + + /** + * @QueryParameter("%24orderby") + * @var array|null $orderby Order items by property values + */ + public ?array $orderby = null; + + /** + * @QueryParameter("%24search") + * @var string|null $search Search items by search phrases + */ + public ?string $search = null; + + /** + * @QueryParameter("%24select") + * @var array|null $select Select properties to be returned + */ + public ?array $select = null; + + /** + * @QueryParameter("%24skip") + * @var int|null $skip Skip the first n items + */ + public ?int $skip = null; + + /** + * @QueryParameter("%24top") + * @var int|null $top Show only the first n items + */ + public ?int $top = null; + + /** + * Instantiates a new PreviewScopeRequestBuilderGetQueryParameters and sets the default values. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + */ + public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) { + $this->count = $count; + $this->expand = $expand; + $this->filter = $filter; + $this->orderby = $orderby; + $this->search = $search; + $this->select = $select; + $this->skip = $skip; + $this->top = $top; + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetRequestConfiguration.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..9cf902c686f --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/PreviewScopeRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param PreviewScopeRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?PreviewScopeRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new PreviewScopeRequestBuilderGetQueryParameters. + * @param bool|null $count Include count of items + * @param array|null $expand Expand related entities + * @param string|null $filter Filter items by property values + * @param array|null $orderby Order items by property values + * @param string|null $search Search items by search phrases + * @param array|null $select Select properties to be returned + * @param int|null $skip Skip the first n items + * @param int|null $top Show only the first n items + * @return PreviewScopeRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null): PreviewScopeRequestBuilderGetQueryParameters { + return new PreviewScopeRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/WorkflowItemRequestBuilder.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/WorkflowItemRequestBuilder.php index 4d1e9b3d524..9c31b1a024f 100644 --- a/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/WorkflowItemRequestBuilder.php +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/WorkflowItemRequestBuilder.php @@ -11,7 +11,10 @@ use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\MicrosoftGraphIdentityGovernanceActivate\MicrosoftGraphIdentityGovernanceActivateRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\MicrosoftGraphIdentityGovernanceActivateWithScope\MicrosoftGraphIdentityGovernanceActivateWithScopeRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\MicrosoftGraphIdentityGovernanceCreateNewVersion\MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder; +use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\MicrosoftGraphIdentityGovernancePreviewTaskFailures\MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder; +use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\MicrosoftGraphIdentityGovernancePreviewWorkflow\MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\MicrosoftGraphIdentityGovernanceRestore\MicrosoftGraphIdentityGovernanceRestoreRequestBuilder; +use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\PreviewScope\PreviewScopeRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\Runs\RunsRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\TaskReports\TaskReportsRequestBuilder; use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\Tasks\TasksRequestBuilder; @@ -78,6 +81,20 @@ public function microsoftGraphIdentityGovernanceCreateNewVersion(): MicrosoftGra return new MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to call the previewTaskFailures method. + */ + public function microsoftGraphIdentityGovernancePreviewTaskFailures(): MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder { + return new MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the previewWorkflow method. + */ + public function microsoftGraphIdentityGovernancePreviewWorkflow(): MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder { + return new MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the restore method. */ @@ -85,6 +102,13 @@ public function microsoftGraphIdentityGovernanceRestore(): MicrosoftGraphIdentit return new MicrosoftGraphIdentityGovernanceRestoreRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to manage the previewScope property of the microsoft.graph.identityGovernance.workflow entity. + */ + public function previewScope(): PreviewScopeRequestBuilder { + return new PreviewScopeRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to manage the runs property of the microsoft.graph.identityGovernance.workflow entity. */ diff --git a/src/Generated/Models/AccessPackageCatalog.php b/src/Generated/Models/AccessPackageCatalog.php index 01cc4d02c0c..c9f0862ede0 100644 --- a/src/Generated/Models/AccessPackageCatalog.php +++ b/src/Generated/Models/AccessPackageCatalog.php @@ -204,6 +204,7 @@ public function getFieldDeserializers(): array { 'isExternallyVisible' => fn(ParseNode $n) => $o->setIsExternallyVisible($n->getBooleanValue()), 'modifiedBy' => fn(ParseNode $n) => $o->setModifiedBy($n->getStringValue()), 'modifiedDateTime' => fn(ParseNode $n) => $o->setModifiedDateTime($n->getDateTimeValue()), + 'privilegeLevel' => fn(ParseNode $n) => $o->setPrivilegeLevel($n->getEnumValue(PrivilegeLevel::class)), 'uniqueName' => fn(ParseNode $n) => $o->setUniqueName($n->getStringValue()), ]); } @@ -244,6 +245,18 @@ public function getModifiedDateTime(): ?DateTime { throw new \UnexpectedValueException("Invalid type found in backing store for 'modifiedDateTime'"); } + /** + * Gets the privilegeLevel property value. The privilegeLevel property + * @return PrivilegeLevel|null + */ + public function getPrivilegeLevel(): ?PrivilegeLevel { + $val = $this->getBackingStore()->get('privilegeLevel'); + if (is_null($val) || $val instanceof PrivilegeLevel) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'privilegeLevel'"); + } + /** * Gets the uniqueName property value. The uniqueName property * @return string|null @@ -277,6 +290,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeBooleanValue('isExternallyVisible', $this->getIsExternallyVisible()); $writer->writeStringValue('modifiedBy', $this->getModifiedBy()); $writer->writeDateTimeValue('modifiedDateTime', $this->getModifiedDateTime()); + $writer->writeEnumValue('privilegeLevel', $this->getPrivilegeLevel()); $writer->writeStringValue('uniqueName', $this->getUniqueName()); } @@ -400,6 +414,14 @@ public function setModifiedDateTime(?DateTime $value): void { $this->getBackingStore()->set('modifiedDateTime', $value); } + /** + * Sets the privilegeLevel property value. The privilegeLevel property + * @param PrivilegeLevel|null $value Value to set for the privilegeLevel property. + */ + public function setPrivilegeLevel(?PrivilegeLevel $value): void { + $this->getBackingStore()->set('privilegeLevel', $value); + } + /** * Sets the uniqueName property value. The uniqueName property * @param string|null $value Value to set for the uniqueName property. diff --git a/src/Generated/Models/ActivityLogBase.php b/src/Generated/Models/ActivityLogBase.php new file mode 100644 index 00000000000..59e9857ab24 --- /dev/null +++ b/src/Generated/Models/ActivityLogBase.php @@ -0,0 +1,210 @@ +getChildNode("@odata.type"); + if ($mappingValueNode !== null) { + $mappingValue = $mappingValueNode->getStringValue(); + switch ($mappingValue) { + case '#microsoft.graph.backupPolicyActivityLog': return new BackupPolicyActivityLog(); + case '#microsoft.graph.dynamicRuleActivityLog': return new DynamicRuleActivityLog(); + case '#microsoft.graph.offboardingActivityLog': return new OffboardingActivityLog(); + case '#microsoft.graph.restoreTaskActivityLog': return new RestoreTaskActivityLog(); + } + } + return new ActivityLogBase(); + } + + /** + * Gets the activityType property value. The activityType property + * @return ActivityLogOperationType|null + */ + public function getActivityType(): ?ActivityLogOperationType { + $val = $this->getBackingStore()->get('activityType'); + if (is_null($val) || $val instanceof ActivityLogOperationType) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'activityType'"); + } + + /** + * Gets the error property value. The error property + * @return PublicError|null + */ + public function getError(): ?PublicError { + $val = $this->getBackingStore()->get('error'); + if (is_null($val) || $val instanceof PublicError) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'error'"); + } + + /** + * Gets the eventDateTime property value. The eventDateTime property + * @return DateTime|null + */ + public function getEventDateTime(): ?DateTime { + $val = $this->getBackingStore()->get('eventDateTime'); + if (is_null($val) || $val instanceof DateTime) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'eventDateTime'"); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'activityType' => fn(ParseNode $n) => $o->setActivityType($n->getEnumValue(ActivityLogOperationType::class)), + 'error' => fn(ParseNode $n) => $o->setError($n->getObjectValue([PublicError::class, 'createFromDiscriminatorValue'])), + 'eventDateTime' => fn(ParseNode $n) => $o->setEventDateTime($n->getDateTimeValue()), + 'performedBy' => fn(ParseNode $n) => $o->setPerformedBy($n->getStringValue()), + 'resultStatus' => fn(ParseNode $n) => $o->setResultStatus($n->getEnumValue(ActivityLogResultStatus::class)), + 'serviceType' => fn(ParseNode $n) => $o->setServiceType($n->getEnumValue(ServiceType::class)), + 'severity' => fn(ParseNode $n) => $o->setSeverity($n->getEnumValue(ActivityLogSeverity::class)), + ]); + } + + /** + * Gets the performedBy property value. The performedBy property + * @return string|null + */ + public function getPerformedBy(): ?string { + $val = $this->getBackingStore()->get('performedBy'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'performedBy'"); + } + + /** + * Gets the resultStatus property value. The resultStatus property + * @return ActivityLogResultStatus|null + */ + public function getResultStatus(): ?ActivityLogResultStatus { + $val = $this->getBackingStore()->get('resultStatus'); + if (is_null($val) || $val instanceof ActivityLogResultStatus) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'resultStatus'"); + } + + /** + * Gets the serviceType property value. The serviceType property + * @return ServiceType|null + */ + public function getServiceType(): ?ServiceType { + $val = $this->getBackingStore()->get('serviceType'); + if (is_null($val) || $val instanceof ServiceType) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'serviceType'"); + } + + /** + * Gets the severity property value. The severity property + * @return ActivityLogSeverity|null + */ + public function getSeverity(): ?ActivityLogSeverity { + $val = $this->getBackingStore()->get('severity'); + if (is_null($val) || $val instanceof ActivityLogSeverity) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'severity'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + $writer->writeEnumValue('activityType', $this->getActivityType()); + $writer->writeObjectValue('error', $this->getError()); + $writer->writeDateTimeValue('eventDateTime', $this->getEventDateTime()); + $writer->writeStringValue('performedBy', $this->getPerformedBy()); + $writer->writeEnumValue('resultStatus', $this->getResultStatus()); + $writer->writeEnumValue('serviceType', $this->getServiceType()); + $writer->writeEnumValue('severity', $this->getSeverity()); + } + + /** + * Sets the activityType property value. The activityType property + * @param ActivityLogOperationType|null $value Value to set for the activityType property. + */ + public function setActivityType(?ActivityLogOperationType $value): void { + $this->getBackingStore()->set('activityType', $value); + } + + /** + * Sets the error property value. The error property + * @param PublicError|null $value Value to set for the error property. + */ + public function setError(?PublicError $value): void { + $this->getBackingStore()->set('error', $value); + } + + /** + * Sets the eventDateTime property value. The eventDateTime property + * @param DateTime|null $value Value to set for the eventDateTime property. + */ + public function setEventDateTime(?DateTime $value): void { + $this->getBackingStore()->set('eventDateTime', $value); + } + + /** + * Sets the performedBy property value. The performedBy property + * @param string|null $value Value to set for the performedBy property. + */ + public function setPerformedBy(?string $value): void { + $this->getBackingStore()->set('performedBy', $value); + } + + /** + * Sets the resultStatus property value. The resultStatus property + * @param ActivityLogResultStatus|null $value Value to set for the resultStatus property. + */ + public function setResultStatus(?ActivityLogResultStatus $value): void { + $this->getBackingStore()->set('resultStatus', $value); + } + + /** + * Sets the serviceType property value. The serviceType property + * @param ServiceType|null $value Value to set for the serviceType property. + */ + public function setServiceType(?ServiceType $value): void { + $this->getBackingStore()->set('serviceType', $value); + } + + /** + * Sets the severity property value. The severity property + * @param ActivityLogSeverity|null $value Value to set for the severity property. + */ + public function setSeverity(?ActivityLogSeverity $value): void { + $this->getBackingStore()->set('severity', $value); + } + +} diff --git a/src/Generated/Models/ActivityLogBaseCollectionResponse.php b/src/Generated/Models/ActivityLogBaseCollectionResponse.php new file mode 100644 index 00000000000..228ce4ebb2f --- /dev/null +++ b/src/Generated/Models/ActivityLogBaseCollectionResponse.php @@ -0,0 +1,70 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([ActivityLogBase::class, 'createFromDiscriminatorValue'])), + ]); + } + + /** + * Gets the value property value. The value property + * @return array|null + */ + public function getValue(): ?array { + $val = $this->getBackingStore()->get('value'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, ActivityLogBase::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'value'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + $writer->writeCollectionOfObjectValues('value', $this->getValue()); + } + + /** + * Sets the value property value. The value property + * @param array|null $value Value to set for the value property. + */ + public function setValue(?array $value): void { + $this->getBackingStore()->set('value', $value); + } + +} diff --git a/src/Generated/Models/ActivityLogOperationType.php b/src/Generated/Models/ActivityLogOperationType.php new file mode 100644 index 00000000000..17601333628 --- /dev/null +++ b/src/Generated/Models/ActivityLogOperationType.php @@ -0,0 +1,20 @@ +|null */ public function getFileStates(): ?array { @@ -334,7 +334,7 @@ public function getHistoryStates(): ?array { } /** - * Gets the hostStates property value. Security-related stateful information generated by the provider about the host(s) related to this alert. + * Gets the hostStates property value. Security-related stateful information generated by the provider about the hosts related to this alert. * @return array|null */ public function getHostStates(): ?array { @@ -428,7 +428,7 @@ public function getMessageSecurityStates(): ?array { } /** - * Gets the networkConnections property value. Security-related stateful information generated by the provider about the network connection(s) related to this alert. + * Gets the networkConnections property value. Security-related stateful information generated by the provider about the network connections related to this alert. * @return array|null */ public function getNetworkConnections(): ?array { @@ -456,7 +456,7 @@ public function getProcesses(): ?array { } /** - * Gets the recommendedActions property value. Vendor/provider recommended action(s) to take as a result of the alert (for example, isolate machine, enforce2FA, reimage host). + * Gets the recommendedActions property value. Vendor/provider recommended actions to take as a result of the alert (for example, isolate machine, enforce2FA, reimage host). * @return array|null */ public function getRecommendedActions(): ?array { @@ -484,7 +484,7 @@ public function getRegistryKeyStates(): ?array { } /** - * Gets the securityResources property value. Resources related to current alert. For example, for some alerts this can have the Azure Resource value. + * Gets the securityResources property value. Resources related to current alert. For example, some alerts have the Azure Resource value. * @return array|null */ public function getSecurityResources(): ?array { @@ -536,7 +536,7 @@ public function getStatus(): ?AlertStatus { } /** - * Gets the tags property value. User-definable labels that can be applied to an alert and can serve as filter conditions (for example 'HVA', 'SAW') (supports update). + * Gets the tags property value. User-definable labels that can be applied to an alert and can serve as filter conditions (for example, 'HVA', 'SAW'). Updatable. * @return array|null */ public function getTags(): ?array { @@ -757,7 +757,7 @@ public function setConfidence(?int $value): void { } /** - * Sets the createdDateTime property value. Time at which the alert was created by the alert provider. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required. + * Sets the createdDateTime property value. Time at which the alert provider created the alert. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required. * @param DateTime|null $value Value to set for the createdDateTime property. */ public function setCreatedDateTime(?DateTime $value): void { @@ -797,7 +797,7 @@ public function setFeedback(?AlertFeedback $value): void { } /** - * Sets the fileStates property value. Security-related stateful information generated by the provider about the file(s) related to this alert. + * Sets the fileStates property value. Security-related stateful information generated by the provider about the files related to this alert. * @param array|null $value Value to set for the fileStates property. */ public function setFileStates(?array $value): void { @@ -813,7 +813,7 @@ public function setHistoryStates(?array $value): void { } /** - * Sets the hostStates property value. Security-related stateful information generated by the provider about the host(s) related to this alert. + * Sets the hostStates property value. Security-related stateful information generated by the provider about the hosts related to this alert. * @param array|null $value Value to set for the hostStates property. */ public function setHostStates(?array $value): void { @@ -869,7 +869,7 @@ public function setMessageSecurityStates(?array $value): void { } /** - * Sets the networkConnections property value. Security-related stateful information generated by the provider about the network connection(s) related to this alert. + * Sets the networkConnections property value. Security-related stateful information generated by the provider about the network connections related to this alert. * @param array|null $value Value to set for the networkConnections property. */ public function setNetworkConnections(?array $value): void { @@ -885,7 +885,7 @@ public function setProcesses(?array $value): void { } /** - * Sets the recommendedActions property value. Vendor/provider recommended action(s) to take as a result of the alert (for example, isolate machine, enforce2FA, reimage host). + * Sets the recommendedActions property value. Vendor/provider recommended actions to take as a result of the alert (for example, isolate machine, enforce2FA, reimage host). * @param array|null $value Value to set for the recommendedActions property. */ public function setRecommendedActions(?array $value): void { @@ -901,7 +901,7 @@ public function setRegistryKeyStates(?array $value): void { } /** - * Sets the securityResources property value. Resources related to current alert. For example, for some alerts this can have the Azure Resource value. + * Sets the securityResources property value. Resources related to current alert. For example, some alerts have the Azure Resource value. * @param array|null $value Value to set for the securityResources property. */ public function setSecurityResources(?array $value): void { @@ -933,7 +933,7 @@ public function setStatus(?AlertStatus $value): void { } /** - * Sets the tags property value. User-definable labels that can be applied to an alert and can serve as filter conditions (for example 'HVA', 'SAW') (supports update). + * Sets the tags property value. User-definable labels that can be applied to an alert and can serve as filter conditions (for example, 'HVA', 'SAW'). Updatable. * @param array|null $value Value to set for the tags property. */ public function setTags(?array $value): void { diff --git a/src/Generated/Models/AndroidAppCredentialProviderRoleState.php b/src/Generated/Models/AndroidAppCredentialProviderRoleState.php new file mode 100644 index 00000000000..22a6a7acbf0 --- /dev/null +++ b/src/Generated/Models/AndroidAppCredentialProviderRoleState.php @@ -0,0 +1,11 @@ + fn(ParseNode $n) => $o->setGlobalProxy($n->getObjectValue([AndroidDeviceOwnerGlobalProxy::class, 'createFromDiscriminatorValue'])), 'googleAccountsBlocked' => fn(ParseNode $n) => $o->setGoogleAccountsBlocked($n->getBooleanValue()), + 'isKioskModeExitCodeSet' => fn(ParseNode $n) => $o->setIsKioskModeExitCodeSet($n->getBooleanValue()), 'kioskCustomizationDeviceSettingsBlocked' => fn(ParseNode $n) => $o->setKioskCustomizationDeviceSettingsBlocked($n->getBooleanValue()), 'kioskCustomizationPowerButtonActionsBlocked' => fn(ParseNode $n) => $o->setKioskCustomizationPowerButtonActionsBlocked($n->getBooleanValue()), 'kioskCustomizationStatusBar' => fn(ParseNode $n) => $o->setKioskCustomizationStatusBar($n->getEnumValue(AndroidDeviceOwnerKioskCustomizationStatusBar::class)), @@ -499,6 +500,18 @@ public function getGoogleAccountsBlocked(): ?bool { throw new \UnexpectedValueException("Invalid type found in backing store for 'googleAccountsBlocked'"); } + /** + * Gets the isKioskModeExitCodeSet property value. Exit code to allow a user to escape from Kiosk Mode when the device is in Kiosk Mode. + * @return bool|null + */ + public function getIsKioskModeExitCodeSet(): ?bool { + $val = $this->getBackingStore()->get('isKioskModeExitCodeSet'); + if (is_null($val) || is_bool($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'isKioskModeExitCodeSet'"); + } + /** * Gets the kioskCustomizationDeviceSettingsBlocked property value. Indicates whether a user can access the device's Settings app while in Kiosk Mode. * @return bool|null @@ -1928,6 +1941,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeCollectionOfPrimitiveValues('factoryResetDeviceAdministratorEmails', $this->getFactoryResetDeviceAdministratorEmails()); $writer->writeObjectValue('globalProxy', $this->getGlobalProxy()); $writer->writeBooleanValue('googleAccountsBlocked', $this->getGoogleAccountsBlocked()); + $writer->writeBooleanValue('isKioskModeExitCodeSet', $this->getIsKioskModeExitCodeSet()); $writer->writeBooleanValue('kioskCustomizationDeviceSettingsBlocked', $this->getKioskCustomizationDeviceSettingsBlocked()); $writer->writeBooleanValue('kioskCustomizationPowerButtonActionsBlocked', $this->getKioskCustomizationPowerButtonActionsBlocked()); $writer->writeEnumValue('kioskCustomizationStatusBar', $this->getKioskCustomizationStatusBar()); @@ -2245,6 +2259,14 @@ public function setGoogleAccountsBlocked(?bool $value): void { $this->getBackingStore()->set('googleAccountsBlocked', $value); } + /** + * Sets the isKioskModeExitCodeSet property value. Exit code to allow a user to escape from Kiosk Mode when the device is in Kiosk Mode. + * @param bool|null $value Value to set for the isKioskModeExitCodeSet property. + */ + public function setIsKioskModeExitCodeSet(?bool $value): void { + $this->getBackingStore()->set('isKioskModeExitCodeSet', $value); + } + /** * Sets the kioskCustomizationDeviceSettingsBlocked property value. Indicates whether a user can access the device's Settings app while in Kiosk Mode. * @param bool|null $value Value to set for the kioskCustomizationDeviceSettingsBlocked property. diff --git a/src/Generated/Models/AndroidForWorkMobileAppConfiguration.php b/src/Generated/Models/AndroidForWorkMobileAppConfiguration.php index e84f7ed885a..b0c9c59d7c7 100644 --- a/src/Generated/Models/AndroidForWorkMobileAppConfiguration.php +++ b/src/Generated/Models/AndroidForWorkMobileAppConfiguration.php @@ -41,6 +41,18 @@ public function getConnectedAppsEnabled(): ?bool { throw new \UnexpectedValueException("Invalid type found in backing store for 'connectedAppsEnabled'"); } + /** + * Gets the credentialProviderRoleState property value. The Android credential provider role state for apps. + * @return AndroidAppCredentialProviderRoleState|null + */ + public function getCredentialProviderRoleState(): ?AndroidAppCredentialProviderRoleState { + $val = $this->getBackingStore()->get('credentialProviderRoleState'); + if (is_null($val) || $val instanceof AndroidAppCredentialProviderRoleState) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'credentialProviderRoleState'"); + } + /** * The deserialization information for the current model * @return array @@ -49,6 +61,7 @@ public function getFieldDeserializers(): array { $o = $this; return array_merge(parent::getFieldDeserializers(), [ 'connectedAppsEnabled' => fn(ParseNode $n) => $o->setConnectedAppsEnabled($n->getBooleanValue()), + 'credentialProviderRoleState' => fn(ParseNode $n) => $o->setCredentialProviderRoleState($n->getEnumValue(AndroidAppCredentialProviderRoleState::class)), 'packageId' => fn(ParseNode $n) => $o->setPackageId($n->getStringValue()), 'payloadJson' => fn(ParseNode $n) => $o->setPayloadJson($n->getStringValue()), 'permissionActions' => fn(ParseNode $n) => $o->setPermissionActions($n->getCollectionOfObjectValues([AndroidPermissionAction::class, 'createFromDiscriminatorValue'])), @@ -113,6 +126,7 @@ public function getProfileApplicability(): ?AndroidProfileApplicability { public function serialize(SerializationWriter $writer): void { parent::serialize($writer); $writer->writeBooleanValue('connectedAppsEnabled', $this->getConnectedAppsEnabled()); + $writer->writeEnumValue('credentialProviderRoleState', $this->getCredentialProviderRoleState()); $writer->writeStringValue('packageId', $this->getPackageId()); $writer->writeStringValue('payloadJson', $this->getPayloadJson()); $writer->writeCollectionOfObjectValues('permissionActions', $this->getPermissionActions()); @@ -127,6 +141,14 @@ public function setConnectedAppsEnabled(?bool $value): void { $this->getBackingStore()->set('connectedAppsEnabled', $value); } + /** + * Sets the credentialProviderRoleState property value. The Android credential provider role state for apps. + * @param AndroidAppCredentialProviderRoleState|null $value Value to set for the credentialProviderRoleState property. + */ + public function setCredentialProviderRoleState(?AndroidAppCredentialProviderRoleState $value): void { + $this->getBackingStore()->set('credentialProviderRoleState', $value); + } + /** * Sets the packageId property value. Android For Work app configuration package id. * @param string|null $value Value to set for the packageId property. diff --git a/src/Generated/Models/AndroidManagedStoreAppConfiguration.php b/src/Generated/Models/AndroidManagedStoreAppConfiguration.php index 7e40169ddd1..fa120237d84 100644 --- a/src/Generated/Models/AndroidManagedStoreAppConfiguration.php +++ b/src/Generated/Models/AndroidManagedStoreAppConfiguration.php @@ -53,6 +53,18 @@ public function getConnectedAppsEnabled(): ?bool { throw new \UnexpectedValueException("Invalid type found in backing store for 'connectedAppsEnabled'"); } + /** + * Gets the credentialProviderRoleState property value. The Android credential provider role state for apps. + * @return AndroidAppCredentialProviderRoleState|null + */ + public function getCredentialProviderRoleState(): ?AndroidAppCredentialProviderRoleState { + $val = $this->getBackingStore()->get('credentialProviderRoleState'); + if (is_null($val) || $val instanceof AndroidAppCredentialProviderRoleState) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'credentialProviderRoleState'"); + } + /** * The deserialization information for the current model * @return array @@ -62,6 +74,7 @@ public function getFieldDeserializers(): array { return array_merge(parent::getFieldDeserializers(), [ 'appSupportsOemConfig' => fn(ParseNode $n) => $o->setAppSupportsOemConfig($n->getBooleanValue()), 'connectedAppsEnabled' => fn(ParseNode $n) => $o->setConnectedAppsEnabled($n->getBooleanValue()), + 'credentialProviderRoleState' => fn(ParseNode $n) => $o->setCredentialProviderRoleState($n->getEnumValue(AndroidAppCredentialProviderRoleState::class)), 'packageId' => fn(ParseNode $n) => $o->setPackageId($n->getStringValue()), 'payloadJson' => fn(ParseNode $n) => $o->setPayloadJson($n->getStringValue()), 'permissionActions' => fn(ParseNode $n) => $o->setPermissionActions($n->getCollectionOfObjectValues([AndroidPermissionAction::class, 'createFromDiscriminatorValue'])), @@ -126,6 +139,7 @@ public function getProfileApplicability(): ?AndroidProfileApplicability { public function serialize(SerializationWriter $writer): void { parent::serialize($writer); $writer->writeBooleanValue('connectedAppsEnabled', $this->getConnectedAppsEnabled()); + $writer->writeEnumValue('credentialProviderRoleState', $this->getCredentialProviderRoleState()); $writer->writeStringValue('packageId', $this->getPackageId()); $writer->writeStringValue('payloadJson', $this->getPayloadJson()); $writer->writeCollectionOfObjectValues('permissionActions', $this->getPermissionActions()); @@ -148,6 +162,14 @@ public function setConnectedAppsEnabled(?bool $value): void { $this->getBackingStore()->set('connectedAppsEnabled', $value); } + /** + * Sets the credentialProviderRoleState property value. The Android credential provider role state for apps. + * @param AndroidAppCredentialProviderRoleState|null $value Value to set for the credentialProviderRoleState property. + */ + public function setCredentialProviderRoleState(?AndroidAppCredentialProviderRoleState $value): void { + $this->getBackingStore()->set('credentialProviderRoleState', $value); + } + /** * Sets the packageId property value. Android Enterprise app configuration package id. * @param string|null $value Value to set for the packageId property. diff --git a/src/Generated/Models/Application.php b/src/Generated/Models/Application.php index 3ea8a5dc666..179352b4203 100644 --- a/src/Generated/Models/Application.php +++ b/src/Generated/Models/Application.php @@ -124,7 +124,7 @@ public function getConnectorGroup(): ?ConnectorGroup { } /** - * Gets the createdByAppId property value. The globally unique appId (called Application (client) ID on the Microsoft Entra admin center) of the application that created this application. Set internally by Microsoft Entra ID. Read-only. + * Gets the createdByAppId property value. The appId of the application that created this application. Set internally by Microsoft Entra ID. Read-only. * @return string|null */ public function getCreatedByAppId(): ?string { @@ -274,6 +274,14 @@ public function getFieldDeserializers(): array { 'isFallbackPublicClient' => fn(ParseNode $n) => $o->setIsFallbackPublicClient($n->getBooleanValue()), 'keyCredentials' => fn(ParseNode $n) => $o->setKeyCredentials($n->getCollectionOfObjectValues([KeyCredential::class, 'createFromDiscriminatorValue'])), 'logo' => fn(ParseNode $n) => $o->setLogo($n->getBinaryContent()), + 'managerApplications' => function (ParseNode $n) { + $val = $n->getCollectionOfPrimitiveValues(); + if (is_array($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + } + /** @var array|null $val */ + $this->setManagerApplications($val); + }, 'nativeAuthenticationApisEnabled' => fn(ParseNode $n) => $o->setNativeAuthenticationApisEnabled($n->getEnumValue(NativeAuthenticationApisEnabled::class)), 'notes' => fn(ParseNode $n) => $o->setNotes($n->getStringValue()), 'onPremisesPublishing' => fn(ParseNode $n) => $o->setOnPremisesPublishing($n->getObjectValue([OnPremisesPublishing::class, 'createFromDiscriminatorValue'])), @@ -424,6 +432,20 @@ public function getLogo(): ?StreamInterface { throw new \UnexpectedValueException("Invalid type found in backing store for 'logo'"); } + /** + * Gets the managerApplications property value. A collection of application IDs for applications designated as managers of this application. Manager applications can create service principals for the applications they manage. Currently, only Microsoft first-party application IDs can be set as values. Maximum of 10 values. Not nullable. Read-only for third-party (3P) callers; writes by 3P callers are rejected with a 400 Bad Request error. Returned only on $select. + * @return array|null + */ + public function getManagerApplications(): ?array { + $val = $this->getBackingStore()->get('managerApplications'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'managerApplications'"); + } + /** * Gets the nativeAuthenticationApisEnabled property value. Specifies whether the Native Authentication APIs are enabled for the application. The possible values are: noneand all. Default is none. For more information, see Native Authentication. * @return NativeAuthenticationApisEnabled|null @@ -779,6 +801,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeBooleanValue('isFallbackPublicClient', $this->getIsFallbackPublicClient()); $writer->writeCollectionOfObjectValues('keyCredentials', $this->getKeyCredentials()); $writer->writeBinaryContent('logo', $this->getLogo()); + $writer->writeCollectionOfPrimitiveValues('managerApplications', $this->getManagerApplications()); $writer->writeEnumValue('nativeAuthenticationApisEnabled', $this->getNativeAuthenticationApisEnabled()); $writer->writeStringValue('notes', $this->getNotes()); $writer->writeObjectValue('onPremisesPublishing', $this->getOnPremisesPublishing()); @@ -864,7 +887,7 @@ public function setConnectorGroup(?ConnectorGroup $value): void { } /** - * Sets the createdByAppId property value. The globally unique appId (called Application (client) ID on the Microsoft Entra admin center) of the application that created this application. Set internally by Microsoft Entra ID. Read-only. + * Sets the createdByAppId property value. The appId of the application that created this application. Set internally by Microsoft Entra ID. Read-only. * @param string|null $value Value to set for the createdByAppId property. */ public function setCreatedByAppId(?string $value): void { @@ -1007,6 +1030,14 @@ public function setLogo(?StreamInterface $value): void { $this->getBackingStore()->set('logo', $value); } + /** + * Sets the managerApplications property value. A collection of application IDs for applications designated as managers of this application. Manager applications can create service principals for the applications they manage. Currently, only Microsoft first-party application IDs can be set as values. Maximum of 10 values. Not nullable. Read-only for third-party (3P) callers; writes by 3P callers are rejected with a 400 Bad Request error. Returned only on $select. + * @param array|null $value Value to set for the managerApplications property. + */ + public function setManagerApplications(?array $value): void { + $this->getBackingStore()->set('managerApplications', $value); + } + /** * Sets the nativeAuthenticationApisEnabled property value. Specifies whether the Native Authentication APIs are enabled for the application. The possible values are: noneand all. Default is none. For more information, see Native Authentication. * @param NativeAuthenticationApisEnabled|null $value Value to set for the nativeAuthenticationApisEnabled property. diff --git a/src/Generated/Models/ApplicationTemplate.php b/src/Generated/Models/ApplicationTemplate.php index dbbf5b2e567..5d71a25cce6 100644 --- a/src/Generated/Models/ApplicationTemplate.php +++ b/src/Generated/Models/ApplicationTemplate.php @@ -120,6 +120,7 @@ public function getFieldDeserializers(): array { }, 'homePageUrl' => fn(ParseNode $n) => $o->setHomePageUrl($n->getStringValue()), 'informationalUrls' => fn(ParseNode $n) => $o->setInformationalUrls($n->getObjectValue([InformationalUrls::class, 'createFromDiscriminatorValue'])), + 'isEntraIntegrated' => fn(ParseNode $n) => $o->setIsEntraIntegrated($n->getBooleanValue()), 'lastModifiedDateTime' => fn(ParseNode $n) => $o->setLastModifiedDateTime($n->getDateTimeValue()), 'logoUrl' => fn(ParseNode $n) => $o->setLogoUrl($n->getStringValue()), 'publisher' => fn(ParseNode $n) => $o->setPublisher($n->getStringValue()), @@ -169,6 +170,18 @@ public function getInformationalUrls(): ?InformationalUrls { throw new \UnexpectedValueException("Invalid type found in backing store for 'informationalUrls'"); } + /** + * Gets the isEntraIntegrated property value. Indicates whether the application is integrated with Entra ID (for example, through single sign-on or user provisioning). + * @return bool|null + */ + public function getIsEntraIntegrated(): ?bool { + $val = $this->getBackingStore()->get('isEntraIntegrated'); + if (is_null($val) || is_bool($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'isEntraIntegrated'"); + } + /** * Gets the lastModifiedDateTime property value. The date and time when the data for the application was last updated, represented using ISO 8601 format and always in UTC time. * @return DateTime|null @@ -282,6 +295,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeCollectionOfPrimitiveValues('endpoints', $this->getEndpoints()); $writer->writeStringValue('homePageUrl', $this->getHomePageUrl()); $writer->writeObjectValue('informationalUrls', $this->getInformationalUrls()); + $writer->writeBooleanValue('isEntraIntegrated', $this->getIsEntraIntegrated()); $writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime()); $writer->writeStringValue('logoUrl', $this->getLogoUrl()); $writer->writeStringValue('publisher', $this->getPublisher()); @@ -348,6 +362,14 @@ public function setInformationalUrls(?InformationalUrls $value): void { $this->getBackingStore()->set('informationalUrls', $value); } + /** + * Sets the isEntraIntegrated property value. Indicates whether the application is integrated with Entra ID (for example, through single sign-on or user provisioning). + * @param bool|null $value Value to set for the isEntraIntegrated property. + */ + public function setIsEntraIntegrated(?bool $value): void { + $this->getBackingStore()->set('isEntraIntegrated', $value); + } + /** * Sets the lastModifiedDateTime property value. The date and time when the data for the application was last updated, represented using ISO 8601 format and always in UTC time. * @param DateTime|null $value Value to set for the lastModifiedDateTime property. diff --git a/src/Generated/Models/Authentication.php b/src/Generated/Models/Authentication.php index 1f22dc6a26f..94fdb3ec841 100644 --- a/src/Generated/Models/Authentication.php +++ b/src/Generated/Models/Authentication.php @@ -40,7 +40,7 @@ public function getEmailMethods(): ?array { } /** - * Gets the externalAuthenticationMethods property value. Represents the external methods registered to a user for authentication. + * Gets the externalAuthenticationMethods property value. Represents the external MFA registered to a user for authentication. * @return array|null */ public function getExternalAuthenticationMethods(): ?array { @@ -318,7 +318,7 @@ public function setEmailMethods(?array $value): void { } /** - * Sets the externalAuthenticationMethods property value. Represents the external methods registered to a user for authentication. + * Sets the externalAuthenticationMethods property value. Represents the external MFA registered to a user for authentication. * @param array|null $value Value to set for the externalAuthenticationMethods property. */ public function setExternalAuthenticationMethods(?array $value): void { diff --git a/src/Generated/Models/BackupCountStatistics.php b/src/Generated/Models/BackupCountStatistics.php new file mode 100644 index 00000000000..27f5aecb248 --- /dev/null +++ b/src/Generated/Models/BackupCountStatistics.php @@ -0,0 +1,335 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return BackupCountStatistics + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): BackupCountStatistics { + return new BackupCountStatistics(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'lastComputedDateTime' => fn(ParseNode $n) => $o->setLastComputedDateTime($n->getDateTimeValue()), + '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()), + 'offboardRequested' => fn(ParseNode $n) => $o->setOffboardRequested($n->getIntegerValue()), + 'protectedCompleted' => fn(ParseNode $n) => $o->setProtectedCompleted($n->getIntegerValue()), + 'protectedFailed' => fn(ParseNode $n) => $o->setProtectedFailed($n->getIntegerValue()), + 'protectedInProgress' => fn(ParseNode $n) => $o->setProtectedInProgress($n->getIntegerValue()), + 'removed' => fn(ParseNode $n) => $o->setRemoved($n->getIntegerValue()), + 'total' => fn(ParseNode $n) => $o->setTotal($n->getIntegerValue()), + 'unprotectedCompleted' => fn(ParseNode $n) => $o->setUnprotectedCompleted($n->getIntegerValue()), + 'unprotectedFailed' => fn(ParseNode $n) => $o->setUnprotectedFailed($n->getIntegerValue()), + 'unprotectedInProgress' => fn(ParseNode $n) => $o->setUnprotectedInProgress($n->getIntegerValue()), + ]; + } + + /** + * Gets the lastComputedDateTime property value. The lastComputedDateTime property + * @return DateTime|null + */ + public function getLastComputedDateTime(): ?DateTime { + $val = $this->getBackingStore()->get('lastComputedDateTime'); + if (is_null($val) || $val instanceof DateTime) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'lastComputedDateTime'"); + } + + /** + * Gets the @odata.type property value. The OdataType property + * @return string|null + */ + public function getOdataType(): ?string { + $val = $this->getBackingStore()->get('odataType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'odataType'"); + } + + /** + * Gets the offboardRequested property value. The offboardRequested property + * @return int|null + */ + public function getOffboardRequested(): ?int { + $val = $this->getBackingStore()->get('offboardRequested'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'offboardRequested'"); + } + + /** + * Gets the protectedCompleted property value. The protectedCompleted property + * @return int|null + */ + public function getProtectedCompleted(): ?int { + $val = $this->getBackingStore()->get('protectedCompleted'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'protectedCompleted'"); + } + + /** + * Gets the protectedFailed property value. The protectedFailed property + * @return int|null + */ + public function getProtectedFailed(): ?int { + $val = $this->getBackingStore()->get('protectedFailed'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'protectedFailed'"); + } + + /** + * Gets the protectedInProgress property value. The protectedInProgress property + * @return int|null + */ + public function getProtectedInProgress(): ?int { + $val = $this->getBackingStore()->get('protectedInProgress'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'protectedInProgress'"); + } + + /** + * Gets the removed property value. The removed property + * @return int|null + */ + public function getRemoved(): ?int { + $val = $this->getBackingStore()->get('removed'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'removed'"); + } + + /** + * Gets the total property value. The total property + * @return int|null + */ + public function getTotal(): ?int { + $val = $this->getBackingStore()->get('total'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'total'"); + } + + /** + * Gets the unprotectedCompleted property value. The unprotectedCompleted property + * @return int|null + */ + public function getUnprotectedCompleted(): ?int { + $val = $this->getBackingStore()->get('unprotectedCompleted'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'unprotectedCompleted'"); + } + + /** + * Gets the unprotectedFailed property value. The unprotectedFailed property + * @return int|null + */ + public function getUnprotectedFailed(): ?int { + $val = $this->getBackingStore()->get('unprotectedFailed'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'unprotectedFailed'"); + } + + /** + * Gets the unprotectedInProgress property value. The unprotectedInProgress property + * @return int|null + */ + public function getUnprotectedInProgress(): ?int { + $val = $this->getBackingStore()->get('unprotectedInProgress'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'unprotectedInProgress'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeDateTimeValue('lastComputedDateTime', $this->getLastComputedDateTime()); + $writer->writeStringValue('@odata.type', $this->getOdataType()); + $writer->writeIntegerValue('offboardRequested', $this->getOffboardRequested()); + $writer->writeIntegerValue('protectedCompleted', $this->getProtectedCompleted()); + $writer->writeIntegerValue('protectedFailed', $this->getProtectedFailed()); + $writer->writeIntegerValue('protectedInProgress', $this->getProtectedInProgress()); + $writer->writeIntegerValue('removed', $this->getRemoved()); + $writer->writeIntegerValue('total', $this->getTotal()); + $writer->writeIntegerValue('unprotectedCompleted', $this->getUnprotectedCompleted()); + $writer->writeIntegerValue('unprotectedFailed', $this->getUnprotectedFailed()); + $writer->writeIntegerValue('unprotectedInProgress', $this->getUnprotectedInProgress()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the lastComputedDateTime property value. The lastComputedDateTime property + * @param DateTime|null $value Value to set for the lastComputedDateTime property. + */ + public function setLastComputedDateTime(?DateTime $value): void { + $this->getBackingStore()->set('lastComputedDateTime', $value); + } + + /** + * Sets the @odata.type property value. The OdataType property + * @param string|null $value Value to set for the @odata.type property. + */ + public function setOdataType(?string $value): void { + $this->getBackingStore()->set('odataType', $value); + } + + /** + * Sets the offboardRequested property value. The offboardRequested property + * @param int|null $value Value to set for the offboardRequested property. + */ + public function setOffboardRequested(?int $value): void { + $this->getBackingStore()->set('offboardRequested', $value); + } + + /** + * Sets the protectedCompleted property value. The protectedCompleted property + * @param int|null $value Value to set for the protectedCompleted property. + */ + public function setProtectedCompleted(?int $value): void { + $this->getBackingStore()->set('protectedCompleted', $value); + } + + /** + * Sets the protectedFailed property value. The protectedFailed property + * @param int|null $value Value to set for the protectedFailed property. + */ + public function setProtectedFailed(?int $value): void { + $this->getBackingStore()->set('protectedFailed', $value); + } + + /** + * Sets the protectedInProgress property value. The protectedInProgress property + * @param int|null $value Value to set for the protectedInProgress property. + */ + public function setProtectedInProgress(?int $value): void { + $this->getBackingStore()->set('protectedInProgress', $value); + } + + /** + * Sets the removed property value. The removed property + * @param int|null $value Value to set for the removed property. + */ + public function setRemoved(?int $value): void { + $this->getBackingStore()->set('removed', $value); + } + + /** + * Sets the total property value. The total property + * @param int|null $value Value to set for the total property. + */ + public function setTotal(?int $value): void { + $this->getBackingStore()->set('total', $value); + } + + /** + * Sets the unprotectedCompleted property value. The unprotectedCompleted property + * @param int|null $value Value to set for the unprotectedCompleted property. + */ + public function setUnprotectedCompleted(?int $value): void { + $this->getBackingStore()->set('unprotectedCompleted', $value); + } + + /** + * Sets the unprotectedFailed property value. The unprotectedFailed property + * @param int|null $value Value to set for the unprotectedFailed property. + */ + public function setUnprotectedFailed(?int $value): void { + $this->getBackingStore()->set('unprotectedFailed', $value); + } + + /** + * Sets the unprotectedInProgress property value. The unprotectedInProgress property + * @param int|null $value Value to set for the unprotectedInProgress property. + */ + public function setUnprotectedInProgress(?int $value): void { + $this->getBackingStore()->set('unprotectedInProgress', $value); + } + +} diff --git a/src/Generated/Models/BackupPolicyActivityLog.php b/src/Generated/Models/BackupPolicyActivityLog.php new file mode 100644 index 00000000000..35f0f257060 --- /dev/null +++ b/src/Generated/Models/BackupPolicyActivityLog.php @@ -0,0 +1,178 @@ +setOdataType('#microsoft.graph.backupPolicyActivityLog'); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return BackupPolicyActivityLog + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): BackupPolicyActivityLog { + return new BackupPolicyActivityLog(); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'oldPolicyName' => fn(ParseNode $n) => $o->setOldPolicyName($n->getStringValue()), + 'policyId' => fn(ParseNode $n) => $o->setPolicyId($n->getStringValue()), + 'policyName' => fn(ParseNode $n) => $o->setPolicyName($n->getStringValue()), + 'policyStatus' => fn(ParseNode $n) => $o->setPolicyStatus($n->getEnumValue(ProtectionPolicyStatus::class)), + 'protectionUnitDetails' => fn(ParseNode $n) => $o->setProtectionUnitDetails($n->getObjectValue([ProtectionUnitDetails::class, 'createFromDiscriminatorValue'])), + 'retentionPeriod' => fn(ParseNode $n) => $o->setRetentionPeriod($n->getStringValue()), + ]); + } + + /** + * Gets the oldPolicyName property value. The oldPolicyName property + * @return string|null + */ + public function getOldPolicyName(): ?string { + $val = $this->getBackingStore()->get('oldPolicyName'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'oldPolicyName'"); + } + + /** + * Gets the policyId property value. The policyId property + * @return string|null + */ + public function getPolicyId(): ?string { + $val = $this->getBackingStore()->get('policyId'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'policyId'"); + } + + /** + * Gets the policyName property value. The policyName property + * @return string|null + */ + public function getPolicyName(): ?string { + $val = $this->getBackingStore()->get('policyName'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'policyName'"); + } + + /** + * Gets the policyStatus property value. The policyStatus property + * @return ProtectionPolicyStatus|null + */ + public function getPolicyStatus(): ?ProtectionPolicyStatus { + $val = $this->getBackingStore()->get('policyStatus'); + if (is_null($val) || $val instanceof ProtectionPolicyStatus) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'policyStatus'"); + } + + /** + * Gets the protectionUnitDetails property value. The protectionUnitDetails property + * @return ProtectionUnitDetails|null + */ + public function getProtectionUnitDetails(): ?ProtectionUnitDetails { + $val = $this->getBackingStore()->get('protectionUnitDetails'); + if (is_null($val) || $val instanceof ProtectionUnitDetails) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'protectionUnitDetails'"); + } + + /** + * Gets the retentionPeriod property value. The retentionPeriod property + * @return string|null + */ + public function getRetentionPeriod(): ?string { + $val = $this->getBackingStore()->get('retentionPeriod'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'retentionPeriod'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + $writer->writeStringValue('oldPolicyName', $this->getOldPolicyName()); + $writer->writeStringValue('policyId', $this->getPolicyId()); + $writer->writeStringValue('policyName', $this->getPolicyName()); + $writer->writeEnumValue('policyStatus', $this->getPolicyStatus()); + $writer->writeObjectValue('protectionUnitDetails', $this->getProtectionUnitDetails()); + $writer->writeStringValue('retentionPeriod', $this->getRetentionPeriod()); + } + + /** + * Sets the oldPolicyName property value. The oldPolicyName property + * @param string|null $value Value to set for the oldPolicyName property. + */ + public function setOldPolicyName(?string $value): void { + $this->getBackingStore()->set('oldPolicyName', $value); + } + + /** + * Sets the policyId property value. The policyId property + * @param string|null $value Value to set for the policyId property. + */ + public function setPolicyId(?string $value): void { + $this->getBackingStore()->set('policyId', $value); + } + + /** + * Sets the policyName property value. The policyName property + * @param string|null $value Value to set for the policyName property. + */ + public function setPolicyName(?string $value): void { + $this->getBackingStore()->set('policyName', $value); + } + + /** + * Sets the policyStatus property value. The policyStatus property + * @param ProtectionPolicyStatus|null $value Value to set for the policyStatus property. + */ + public function setPolicyStatus(?ProtectionPolicyStatus $value): void { + $this->getBackingStore()->set('policyStatus', $value); + } + + /** + * Sets the protectionUnitDetails property value. The protectionUnitDetails property + * @param ProtectionUnitDetails|null $value Value to set for the protectionUnitDetails property. + */ + public function setProtectionUnitDetails(?ProtectionUnitDetails $value): void { + $this->getBackingStore()->set('protectionUnitDetails', $value); + } + + /** + * Sets the retentionPeriod property value. The retentionPeriod property + * @param string|null $value Value to set for the retentionPeriod property. + */ + public function setRetentionPeriod(?string $value): void { + $this->getBackingStore()->set('retentionPeriod', $value); + } + +} diff --git a/src/Generated/Models/AndroidFotaDeploymentAssignment.php b/src/Generated/Models/BackupPolicyReport.php similarity index 56% rename from src/Generated/Models/AndroidFotaDeploymentAssignment.php rename to src/Generated/Models/BackupPolicyReport.php index 24d93d270eb..aa47a751e64 100644 --- a/src/Generated/Models/AndroidFotaDeploymentAssignment.php +++ b/src/Generated/Models/BackupPolicyReport.php @@ -10,10 +10,7 @@ use Microsoft\Kiota\Abstractions\Store\BackingStore; use Microsoft\Kiota\Abstractions\Store\BackingStoreFactorySingleton; -/** - * Describes deployment security group to assign a deployment to. The backend will expand the security Group ID to extract device serial numbers prior sending a create deployment request to Zebra. -*/ -class AndroidFotaDeploymentAssignment implements AdditionalDataHolder, BackedModel, Parsable +class BackupPolicyReport implements AdditionalDataHolder, BackedModel, Parsable { /** * @var BackingStore $backingStore Stores model information. @@ -21,7 +18,7 @@ class AndroidFotaDeploymentAssignment implements AdditionalDataHolder, BackedMod private BackingStore $backingStore; /** - * Instantiates a new AndroidFotaDeploymentAssignment and sets the default values. + * Instantiates a new BackupPolicyReport and sets the default values. */ public function __construct() { $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); @@ -31,10 +28,10 @@ public function __construct() { /** * Creates a new instance of the appropriate class based on discriminator value * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object - * @return AndroidFotaDeploymentAssignment + * @return BackupPolicyReport */ - public static function createFromDiscriminatorValue(ParseNode $parseNode): AndroidFotaDeploymentAssignment { - return new AndroidFotaDeploymentAssignment(); + public static function createFromDiscriminatorValue(ParseNode $parseNode): BackupPolicyReport { + return new BackupPolicyReport(); } /** @@ -51,27 +48,39 @@ public function getAdditionalData(): ?array { } /** - * Gets the assignmentTarget property value. The Azure Active Directory (Azure AD) we are deploying firmware updates to (e.g.: d93c8f48-bd42-4514-ba40-bc6b84780930). NOTE: Use this property moving forward because the existing property, target, is deprecated. - * @return DeviceAndAppManagementAssignmentTarget|null + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * Gets the backupPolicyId property value. The backupPolicyId property + * @return string|null */ - public function getAssignmentTarget(): ?DeviceAndAppManagementAssignmentTarget { - $val = $this->getBackingStore()->get('assignmentTarget'); - if (is_null($val) || $val instanceof DeviceAndAppManagementAssignmentTarget) { + public function getBackupPolicyId(): ?string { + $val = $this->getBackingStore()->get('backupPolicyId'); + if (is_null($val) || is_string($val)) { return $val; } - throw new \UnexpectedValueException("Invalid type found in backing store for 'assignmentTarget'"); + throw new \UnexpectedValueException("Invalid type found in backing store for 'backupPolicyId'"); } /** - * Gets the BackingStore property value. Stores model information. - * @return BackingStore + * Gets the countStatistics property value. The countStatistics property + * @return BackupCountStatistics|null */ - public function getBackingStore(): BackingStore { - return $this->backingStore; + public function getCountStatistics(): ?BackupCountStatistics { + $val = $this->getBackingStore()->get('countStatistics'); + if (is_null($val) || $val instanceof BackupCountStatistics) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'countStatistics'"); } /** - * Gets the displayName property value. The display name of the Azure AD security group used for the assignment. + * Gets the displayName property value. The displayName property * @return string|null */ public function getDisplayName(): ?string { @@ -89,26 +98,13 @@ public function getDisplayName(): ?string { public function getFieldDeserializers(): array { $o = $this; return [ - 'assignmentTarget' => fn(ParseNode $n) => $o->setAssignmentTarget($n->getObjectValue([DeviceAndAppManagementAssignmentTarget::class, 'createFromDiscriminatorValue'])), + 'backupPolicyId' => fn(ParseNode $n) => $o->setBackupPolicyId($n->getStringValue()), + 'countStatistics' => fn(ParseNode $n) => $o->setCountStatistics($n->getObjectValue([BackupCountStatistics::class, 'createFromDiscriminatorValue'])), 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()), - 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()), '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()), - 'target' => fn(ParseNode $n) => $o->setTarget($n->getObjectValue([AndroidFotaDeploymentAssignmentTarget::class, 'createFromDiscriminatorValue'])), ]; } - /** - * Gets the id property value. A unique identifier assigned to each Android FOTA Assignment entity - * @return string|null - */ - public function getId(): ?string { - $val = $this->getBackingStore()->get('id'); - if (is_null($val) || is_string($val)) { - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'id'"); - } - /** * Gets the @odata.type property value. The OdataType property * @return string|null @@ -121,28 +117,15 @@ public function getOdataType(): ?string { throw new \UnexpectedValueException("Invalid type found in backing store for 'odataType'"); } - /** - * Gets the target property value. The AAD Group we are deploying firmware updates to - * @return AndroidFotaDeploymentAssignmentTarget|null - */ - public function getTarget(): ?AndroidFotaDeploymentAssignmentTarget { - $val = $this->getBackingStore()->get('target'); - if (is_null($val) || $val instanceof AndroidFotaDeploymentAssignmentTarget) { - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'target'"); - } - /** * Serializes information the current object * @param SerializationWriter $writer Serialization writer to use to serialize this model */ public function serialize(SerializationWriter $writer): void { - $writer->writeObjectValue('assignmentTarget', $this->getAssignmentTarget()); + $writer->writeStringValue('backupPolicyId', $this->getBackupPolicyId()); + $writer->writeObjectValue('countStatistics', $this->getCountStatistics()); $writer->writeStringValue('displayName', $this->getDisplayName()); - $writer->writeStringValue('id', $this->getId()); $writer->writeStringValue('@odata.type', $this->getOdataType()); - $writer->writeObjectValue('target', $this->getTarget()); $writer->writeAdditionalData($this->getAdditionalData()); } @@ -154,14 +137,6 @@ public function setAdditionalData(?array $value): void { $this->getBackingStore()->set('additionalData', $value); } - /** - * Sets the assignmentTarget property value. The Azure Active Directory (Azure AD) we are deploying firmware updates to (e.g.: d93c8f48-bd42-4514-ba40-bc6b84780930). NOTE: Use this property moving forward because the existing property, target, is deprecated. - * @param DeviceAndAppManagementAssignmentTarget|null $value Value to set for the assignmentTarget property. - */ - public function setAssignmentTarget(?DeviceAndAppManagementAssignmentTarget $value): void { - $this->getBackingStore()->set('assignmentTarget', $value); - } - /** * Sets the BackingStore property value. Stores model information. * @param BackingStore $value Value to set for the BackingStore property. @@ -171,35 +146,35 @@ public function setBackingStore(BackingStore $value): void { } /** - * Sets the displayName property value. The display name of the Azure AD security group used for the assignment. - * @param string|null $value Value to set for the displayName property. + * Sets the backupPolicyId property value. The backupPolicyId property + * @param string|null $value Value to set for the backupPolicyId property. */ - public function setDisplayName(?string $value): void { - $this->getBackingStore()->set('displayName', $value); + public function setBackupPolicyId(?string $value): void { + $this->getBackingStore()->set('backupPolicyId', $value); } /** - * Sets the id property value. A unique identifier assigned to each Android FOTA Assignment entity - * @param string|null $value Value to set for the id property. + * Sets the countStatistics property value. The countStatistics property + * @param BackupCountStatistics|null $value Value to set for the countStatistics property. */ - public function setId(?string $value): void { - $this->getBackingStore()->set('id', $value); + public function setCountStatistics(?BackupCountStatistics $value): void { + $this->getBackingStore()->set('countStatistics', $value); } /** - * Sets the @odata.type property value. The OdataType property - * @param string|null $value Value to set for the @odata.type property. + * Sets the displayName property value. The displayName property + * @param string|null $value Value to set for the displayName property. */ - public function setOdataType(?string $value): void { - $this->getBackingStore()->set('odataType', $value); + public function setDisplayName(?string $value): void { + $this->getBackingStore()->set('displayName', $value); } /** - * Sets the target property value. The AAD Group we are deploying firmware updates to - * @param AndroidFotaDeploymentAssignmentTarget|null $value Value to set for the target property. + * Sets the @odata.type property value. The OdataType property + * @param string|null $value Value to set for the @odata.type property. */ - public function setTarget(?AndroidFotaDeploymentAssignmentTarget $value): void { - $this->getBackingStore()->set('target', $value); + public function setOdataType(?string $value): void { + $this->getBackingStore()->set('odataType', $value); } } diff --git a/src/Generated/Models/BackupReport.php b/src/Generated/Models/BackupReport.php new file mode 100644 index 00000000000..ddf97129edf --- /dev/null +++ b/src/Generated/Models/BackupReport.php @@ -0,0 +1,45 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + ]); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + } + +} diff --git a/src/Generated/Models/BackupRestoreRoot.php b/src/Generated/Models/BackupRestoreRoot.php index 146ae714611..1ad5f81bf33 100644 --- a/src/Generated/Models/BackupRestoreRoot.php +++ b/src/Generated/Models/BackupRestoreRoot.php @@ -25,6 +25,20 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Backu return new BackupRestoreRoot(); } + /** + * Gets the activityLogs property value. The activityLogs property + * @return array|null + */ + public function getActivityLogs(): ?array { + $val = $this->getBackingStore()->get('activityLogs'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, ActivityLogBase::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'activityLogs'"); + } + /** * Gets the allDrivesBackup property value. The allDrivesBackup property * @return AllDrivesBackup|null @@ -164,6 +178,7 @@ public function getExchangeRestoreSessions(): ?array { public function getFieldDeserializers(): array { $o = $this; return array_merge(parent::getFieldDeserializers(), [ + 'activityLogs' => fn(ParseNode $n) => $o->setActivityLogs($n->getCollectionOfObjectValues([ActivityLogBase::class, 'createFromDiscriminatorValue'])), 'allDrivesBackup' => fn(ParseNode $n) => $o->setAllDrivesBackup($n->getObjectValue([AllDrivesBackup::class, 'createFromDiscriminatorValue'])), 'allMailboxesBackup' => fn(ParseNode $n) => $o->setAllMailboxesBackup($n->getObjectValue([AllMailboxesBackup::class, 'createFromDiscriminatorValue'])), 'allSitesBackup' => fn(ParseNode $n) => $o->setAllSitesBackup($n->getObjectValue([AllSitesBackup::class, 'createFromDiscriminatorValue'])), @@ -182,6 +197,7 @@ public function getFieldDeserializers(): array { 'oneDriveForBusinessRestoreSessions' => fn(ParseNode $n) => $o->setOneDriveForBusinessRestoreSessions($n->getCollectionOfObjectValues([OneDriveForBusinessRestoreSession::class, 'createFromDiscriminatorValue'])), 'protectionPolicies' => fn(ParseNode $n) => $o->setProtectionPolicies($n->getCollectionOfObjectValues([ProtectionPolicyBase::class, 'createFromDiscriminatorValue'])), 'protectionUnits' => fn(ParseNode $n) => $o->setProtectionUnits($n->getCollectionOfObjectValues([ProtectionUnitBase::class, 'createFromDiscriminatorValue'])), + 'reports' => fn(ParseNode $n) => $o->setReports($n->getObjectValue([BackupReport::class, 'createFromDiscriminatorValue'])), 'restorePoints' => fn(ParseNode $n) => $o->setRestorePoints($n->getCollectionOfObjectValues([RestorePoint::class, 'createFromDiscriminatorValue'])), 'restoreSessions' => fn(ParseNode $n) => $o->setRestoreSessions($n->getCollectionOfObjectValues([RestoreSessionBase::class, 'createFromDiscriminatorValue'])), 'serviceApps' => fn(ParseNode $n) => $o->setServiceApps($n->getCollectionOfObjectValues([ServiceApp::class, 'createFromDiscriminatorValue'])), @@ -307,6 +323,18 @@ public function getProtectionUnits(): ?array { throw new \UnexpectedValueException("Invalid type found in backing store for 'protectionUnits'"); } + /** + * Gets the reports property value. The reports property + * @return BackupReport|null + */ + public function getReports(): ?BackupReport { + $val = $this->getBackingStore()->get('reports'); + if (is_null($val) || $val instanceof BackupReport) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'reports'"); + } + /** * Gets the restorePoints property value. List of restore points in the tenant. * @return array|null @@ -451,6 +479,7 @@ public function getSiteProtectionUnitsBulkAdditionJobs(): ?array { */ public function serialize(SerializationWriter $writer): void { parent::serialize($writer); + $writer->writeCollectionOfObjectValues('activityLogs', $this->getActivityLogs()); $writer->writeObjectValue('allDrivesBackup', $this->getAllDrivesBackup()); $writer->writeObjectValue('allMailboxesBackup', $this->getAllMailboxesBackup()); $writer->writeObjectValue('allSitesBackup', $this->getAllSitesBackup()); @@ -469,6 +498,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeCollectionOfObjectValues('oneDriveForBusinessRestoreSessions', $this->getOneDriveForBusinessRestoreSessions()); $writer->writeCollectionOfObjectValues('protectionPolicies', $this->getProtectionPolicies()); $writer->writeCollectionOfObjectValues('protectionUnits', $this->getProtectionUnits()); + $writer->writeObjectValue('reports', $this->getReports()); $writer->writeCollectionOfObjectValues('restorePoints', $this->getRestorePoints()); $writer->writeCollectionOfObjectValues('restoreSessions', $this->getRestoreSessions()); $writer->writeCollectionOfObjectValues('serviceApps', $this->getServiceApps()); @@ -481,6 +511,14 @@ public function serialize(SerializationWriter $writer): void { $writer->writeCollectionOfObjectValues('siteProtectionUnitsBulkAdditionJobs', $this->getSiteProtectionUnitsBulkAdditionJobs()); } + /** + * Sets the activityLogs property value. The activityLogs property + * @param array|null $value Value to set for the activityLogs property. + */ + public function setActivityLogs(?array $value): void { + $this->getBackingStore()->set('activityLogs', $value); + } + /** * Sets the allDrivesBackup property value. The allDrivesBackup property * @param AllDrivesBackup|null $value Value to set for the allDrivesBackup property. @@ -625,6 +663,14 @@ public function setProtectionUnits(?array $value): void { $this->getBackingStore()->set('protectionUnits', $value); } + /** + * Sets the reports property value. The reports property + * @param BackupReport|null $value Value to set for the reports property. + */ + public function setReports(?BackupReport $value): void { + $this->getBackingStore()->set('reports', $value); + } + /** * Sets the restorePoints property value. List of restore points in the tenant. * @param array|null $value Value to set for the restorePoints property. diff --git a/src/Generated/Models/BrowseSessionBase.php b/src/Generated/Models/BrowseSessionBase.php index bd934ae2905..8fcb69d6eeb 100644 --- a/src/Generated/Models/BrowseSessionBase.php +++ b/src/Generated/Models/BrowseSessionBase.php @@ -93,6 +93,7 @@ public function getFieldDeserializers(): array { 'error' => fn(ParseNode $n) => $o->setError($n->getObjectValue([PublicError::class, 'createFromDiscriminatorValue'])), 'expirationDateTime' => fn(ParseNode $n) => $o->setExpirationDateTime($n->getDateTimeValue()), 'restorePointDateTime' => fn(ParseNode $n) => $o->setRestorePointDateTime($n->getDateTimeValue()), + 'restorePointId' => fn(ParseNode $n) => $o->setRestorePointId($n->getStringValue()), 'status' => fn(ParseNode $n) => $o->setStatus($n->getEnumValue(BrowseSessionStatus::class)), ]); } @@ -109,6 +110,18 @@ public function getRestorePointDateTime(): ?DateTime { throw new \UnexpectedValueException("Invalid type found in backing store for 'restorePointDateTime'"); } + /** + * Gets the restorePointId property value. The restorePointId property + * @return string|null + */ + public function getRestorePointId(): ?string { + $val = $this->getBackingStore()->get('restorePointId'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'restorePointId'"); + } + /** * Gets the status property value. The status property * @return BrowseSessionStatus|null @@ -132,6 +145,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeObjectValue('error', $this->getError()); $writer->writeDateTimeValue('expirationDateTime', $this->getExpirationDateTime()); $writer->writeDateTimeValue('restorePointDateTime', $this->getRestorePointDateTime()); + $writer->writeStringValue('restorePointId', $this->getRestorePointId()); $writer->writeEnumValue('status', $this->getStatus()); } @@ -175,6 +189,14 @@ public function setRestorePointDateTime(?DateTime $value): void { $this->getBackingStore()->set('restorePointDateTime', $value); } + /** + * Sets the restorePointId property value. The restorePointId property + * @param string|null $value Value to set for the restorePointId property. + */ + public function setRestorePointId(?string $value): void { + $this->getBackingStore()->set('restorePointId', $value); + } + /** * Sets the status property value. The status property * @param BrowseSessionStatus|null $value Value to set for the status property. diff --git a/src/Generated/Models/Chat.php b/src/Generated/Models/Chat.php index 7a90416e230..652e5c4849d 100644 --- a/src/Generated/Models/Chat.php +++ b/src/Generated/Models/Chat.php @@ -85,6 +85,7 @@ public function getFieldDeserializers(): array { 'permissionGrants' => fn(ParseNode $n) => $o->setPermissionGrants($n->getCollectionOfObjectValues([ResourceSpecificPermissionGrant::class, 'createFromDiscriminatorValue'])), 'pinnedMessages' => fn(ParseNode $n) => $o->setPinnedMessages($n->getCollectionOfObjectValues([PinnedChatMessageInfo::class, 'createFromDiscriminatorValue'])), 'tabs' => fn(ParseNode $n) => $o->setTabs($n->getCollectionOfObjectValues([TeamsTab::class, 'createFromDiscriminatorValue'])), + 'targetedMessages' => fn(ParseNode $n) => $o->setTargetedMessages($n->getCollectionOfObjectValues([TargetedChatMessage::class, 'createFromDiscriminatorValue'])), 'tenantId' => fn(ParseNode $n) => $o->setTenantId($n->getStringValue()), 'topic' => fn(ParseNode $n) => $o->setTopic($n->getStringValue()), 'viewpoint' => fn(ParseNode $n) => $o->setViewpoint($n->getObjectValue([ChatViewpoint::class, 'createFromDiscriminatorValue'])), @@ -262,6 +263,20 @@ public function getTabs(): ?array { throw new \UnexpectedValueException("Invalid type found in backing store for 'tabs'"); } + /** + * Gets the targetedMessages property value. The targetedMessages property + * @return array|null + */ + public function getTargetedMessages(): ?array { + $val = $this->getBackingStore()->get('targetedMessages'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, TargetedChatMessage::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'targetedMessages'"); + } + /** * Gets the tenantId property value. The identifier of the tenant in which the chat was created. Read-only. * @return string|null @@ -332,6 +347,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeCollectionOfObjectValues('permissionGrants', $this->getPermissionGrants()); $writer->writeCollectionOfObjectValues('pinnedMessages', $this->getPinnedMessages()); $writer->writeCollectionOfObjectValues('tabs', $this->getTabs()); + $writer->writeCollectionOfObjectValues('targetedMessages', $this->getTargetedMessages()); $writer->writeStringValue('tenantId', $this->getTenantId()); $writer->writeStringValue('topic', $this->getTopic()); $writer->writeObjectValue('viewpoint', $this->getViewpoint()); @@ -466,6 +482,14 @@ public function setTabs(?array $value): void { $this->getBackingStore()->set('tabs', $value); } + /** + * Sets the targetedMessages property value. The targetedMessages property + * @param array|null $value Value to set for the targetedMessages property. + */ + public function setTargetedMessages(?array $value): void { + $this->getBackingStore()->set('targetedMessages', $value); + } + /** * Sets the tenantId property value. The identifier of the tenant in which the chat was created. Read-only. * @param string|null $value Value to set for the tenantId property. diff --git a/src/Generated/Models/ChatMessage.php b/src/Generated/Models/ChatMessage.php index 5abcc624ed8..124494dd87a 100644 --- a/src/Generated/Models/ChatMessage.php +++ b/src/Generated/Models/ChatMessage.php @@ -23,6 +23,13 @@ public function __construct() { * @return ChatMessage */ public static function createFromDiscriminatorValue(ParseNode $parseNode): ChatMessage { + $mappingValueNode = $parseNode->getChildNode("@odata.type"); + if ($mappingValueNode !== null) { + $mappingValue = $mappingValueNode->getStringValue(); + switch ($mappingValue) { + case '#microsoft.graph.targetedChatMessage': return new TargetedChatMessage(); + } + } return new ChatMessage(); } diff --git a/src/Generated/Models/CloudPcExternalPartner.php b/src/Generated/Models/CloudPcExternalPartner.php index 53c7eadc4b5..40d0fa21536 100644 --- a/src/Generated/Models/CloudPcExternalPartner.php +++ b/src/Generated/Models/CloudPcExternalPartner.php @@ -25,6 +25,18 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Cloud return new CloudPcExternalPartner(); } + /** + * Gets the agentSetting property value. The agent settings associated with the external partner. + * @return CloudPcExternalPartnerAgentSetting|null + */ + public function getAgentSetting(): ?CloudPcExternalPartnerAgentSetting { + $val = $this->getBackingStore()->get('agentSetting'); + if (is_null($val) || $val instanceof CloudPcExternalPartnerAgentSetting) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'agentSetting'"); + } + /** * Gets the connectionStatus property value. The connectionStatus property * @return CloudPcExternalPartnerStatus|null @@ -56,6 +68,7 @@ public function getEnableConnection(): ?bool { public function getFieldDeserializers(): array { $o = $this; return array_merge(parent::getFieldDeserializers(), [ + 'agentSetting' => fn(ParseNode $n) => $o->setAgentSetting($n->getObjectValue([CloudPcExternalPartnerAgentSetting::class, 'createFromDiscriminatorValue'])), 'connectionStatus' => fn(ParseNode $n) => $o->setConnectionStatus($n->getEnumValue(CloudPcExternalPartnerStatus::class)), 'enableConnection' => fn(ParseNode $n) => $o->setEnableConnection($n->getBooleanValue()), 'lastSyncDateTime' => fn(ParseNode $n) => $o->setLastSyncDateTime($n->getDateTimeValue()), @@ -106,6 +119,7 @@ public function getStatusDetails(): ?string { */ public function serialize(SerializationWriter $writer): void { parent::serialize($writer); + $writer->writeObjectValue('agentSetting', $this->getAgentSetting()); $writer->writeEnumValue('connectionStatus', $this->getConnectionStatus()); $writer->writeBooleanValue('enableConnection', $this->getEnableConnection()); $writer->writeDateTimeValue('lastSyncDateTime', $this->getLastSyncDateTime()); @@ -113,6 +127,14 @@ public function serialize(SerializationWriter $writer): void { $writer->writeStringValue('statusDetails', $this->getStatusDetails()); } + /** + * Sets the agentSetting property value. The agent settings associated with the external partner. + * @param CloudPcExternalPartnerAgentSetting|null $value Value to set for the agentSetting property. + */ + public function setAgentSetting(?CloudPcExternalPartnerAgentSetting $value): void { + $this->getBackingStore()->set('agentSetting', $value); + } + /** * Sets the connectionStatus property value. The connectionStatus property * @param CloudPcExternalPartnerStatus|null $value Value to set for the connectionStatus property. diff --git a/src/Generated/Models/CloudPcExternalPartnerActionErrorCode.php b/src/Generated/Models/CloudPcExternalPartnerActionErrorCode.php new file mode 100644 index 00000000000..f24436c2b9d --- /dev/null +++ b/src/Generated/Models/CloudPcExternalPartnerActionErrorCode.php @@ -0,0 +1,19 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return CloudPcExternalPartnerActionReport + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): CloudPcExternalPartnerActionReport { + return new CloudPcExternalPartnerActionReport(); + } + + /** + * Gets the actionType property value. The actionType property + * @return CloudPcExternalPartnerActionType|null + */ + public function getActionType(): ?CloudPcExternalPartnerActionType { + $val = $this->getBackingStore()->get('actionType'); + if (is_null($val) || $val instanceof CloudPcExternalPartnerActionType) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'actionType'"); + } + + /** + * Gets the activityId property value. The ID of external partner activity. Read-only. + * @return string|null + */ + public function getActivityId(): ?string { + $val = $this->getBackingStore()->get('activityId'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'activityId'"); + } + + /** + * Gets the activityMessage property value. The message of external partner activity. Read-only. + * @return string|null + */ + public function getActivityMessage(): ?string { + $val = $this->getBackingStore()->get('activityMessage'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'activityMessage'"); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the agentName property value. The agent name of the external partner. Read-only. + * @return string|null + */ + public function getAgentName(): ?string { + $val = $this->getBackingStore()->get('agentName'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'agentName'"); + } + + /** + * Gets the agentSetting property value. The agent setting of the external partner. Read-only. + * @return CloudPcExternalPartnerAgentSetting|null + */ + public function getAgentSetting(): ?CloudPcExternalPartnerAgentSetting { + $val = $this->getBackingStore()->get('agentSetting'); + if (is_null($val) || $val instanceof CloudPcExternalPartnerAgentSetting) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'agentSetting'"); + } + + /** + * Gets the authenticatedAppId property value. Indicates the authenticated Microsoft Entra (Azure AD) app ID of the action request. Read-only. + * @return string|null + */ + public function getAuthenticatedAppId(): ?string { + $val = $this->getBackingStore()->get('authenticatedAppId'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'authenticatedAppId'"); + } + + /** + * Gets the authenticatedAppName property value. Indicates the authenticated Microsoft Entra (Azure AD) app name of the action request. Read-only. + * @return string|null + */ + public function getAuthenticatedAppName(): ?string { + $val = $this->getBackingStore()->get('authenticatedAppName'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'authenticatedAppName'"); + } + + /** + * Gets the authenticatedMethod property value. The authenticatedMethod property + * @return CloudPcExternalPartnerAuthenticatedMethod|null + */ + public function getAuthenticatedMethod(): ?CloudPcExternalPartnerAuthenticatedMethod { + $val = $this->getBackingStore()->get('authenticatedMethod'); + if (is_null($val) || $val instanceof CloudPcExternalPartnerAuthenticatedMethod) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'authenticatedMethod'"); + } + + /** + * Gets the authenticatedUserPrincipalName property value. Indicates the authenticated Microsoft Entra (Azure AD) user principal name of the action request. Read-only. + * @return string|null + */ + public function getAuthenticatedUserPrincipalName(): ?string { + $val = $this->getBackingStore()->get('authenticatedUserPrincipalName'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'authenticatedUserPrincipalName'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * Gets the cloudPcId property value. The Cloud PC's ID of the partner agent is deployed. Read-only. + * @return string|null + */ + public function getCloudPcId(): ?string { + $val = $this->getBackingStore()->get('cloudPcId'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'cloudPcId'"); + } + + /** + * Gets the cloudPcName property value. The Cloud PC's Name of the partner agent is deployed. Read-only. + * @return string|null + */ + public function getCloudPcName(): ?string { + $val = $this->getBackingStore()->get('cloudPcName'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'cloudPcName'"); + } + + /** + * Gets the createdDateTime property value. The create time of the action. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. Read-only. + * @return DateTime|null + */ + public function getCreatedDateTime(): ?DateTime { + $val = $this->getBackingStore()->get('createdDateTime'); + if (is_null($val) || $val instanceof DateTime) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'createdDateTime'"); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'actionType' => fn(ParseNode $n) => $o->setActionType($n->getEnumValue(CloudPcExternalPartnerActionType::class)), + 'activityId' => fn(ParseNode $n) => $o->setActivityId($n->getStringValue()), + 'activityMessage' => fn(ParseNode $n) => $o->setActivityMessage($n->getStringValue()), + 'agentName' => fn(ParseNode $n) => $o->setAgentName($n->getStringValue()), + 'agentSetting' => fn(ParseNode $n) => $o->setAgentSetting($n->getObjectValue([CloudPcExternalPartnerAgentSetting::class, 'createFromDiscriminatorValue'])), + 'authenticatedAppId' => fn(ParseNode $n) => $o->setAuthenticatedAppId($n->getStringValue()), + 'authenticatedAppName' => fn(ParseNode $n) => $o->setAuthenticatedAppName($n->getStringValue()), + 'authenticatedMethod' => fn(ParseNode $n) => $o->setAuthenticatedMethod($n->getEnumValue(CloudPcExternalPartnerAuthenticatedMethod::class)), + 'authenticatedUserPrincipalName' => fn(ParseNode $n) => $o->setAuthenticatedUserPrincipalName($n->getStringValue()), + 'cloudPcId' => fn(ParseNode $n) => $o->setCloudPcId($n->getStringValue()), + 'cloudPcName' => fn(ParseNode $n) => $o->setCloudPcName($n->getStringValue()), + 'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()), + '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()), + ]; + } + + /** + * Gets the @odata.type property value. The OdataType property + * @return string|null + */ + public function getOdataType(): ?string { + $val = $this->getBackingStore()->get('odataType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'odataType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeEnumValue('actionType', $this->getActionType()); + $writer->writeStringValue('activityId', $this->getActivityId()); + $writer->writeStringValue('activityMessage', $this->getActivityMessage()); + $writer->writeStringValue('agentName', $this->getAgentName()); + $writer->writeObjectValue('agentSetting', $this->getAgentSetting()); + $writer->writeStringValue('authenticatedAppId', $this->getAuthenticatedAppId()); + $writer->writeStringValue('authenticatedAppName', $this->getAuthenticatedAppName()); + $writer->writeEnumValue('authenticatedMethod', $this->getAuthenticatedMethod()); + $writer->writeStringValue('authenticatedUserPrincipalName', $this->getAuthenticatedUserPrincipalName()); + $writer->writeStringValue('cloudPcId', $this->getCloudPcId()); + $writer->writeStringValue('cloudPcName', $this->getCloudPcName()); + $writer->writeDateTimeValue('createdDateTime', $this->getCreatedDateTime()); + $writer->writeStringValue('@odata.type', $this->getOdataType()); + $writer->writeAdditionalData($this->getAdditionalData()); + } + + /** + * Sets the actionType property value. The actionType property + * @param CloudPcExternalPartnerActionType|null $value Value to set for the actionType property. + */ + public function setActionType(?CloudPcExternalPartnerActionType $value): void { + $this->getBackingStore()->set('actionType', $value); + } + + /** + * Sets the activityId property value. The ID of external partner activity. Read-only. + * @param string|null $value Value to set for the activityId property. + */ + public function setActivityId(?string $value): void { + $this->getBackingStore()->set('activityId', $value); + } + + /** + * Sets the activityMessage property value. The message of external partner activity. Read-only. + * @param string|null $value Value to set for the activityMessage property. + */ + public function setActivityMessage(?string $value): void { + $this->getBackingStore()->set('activityMessage', $value); + } + + /** + * 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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the agentName property value. The agent name of the external partner. Read-only. + * @param string|null $value Value to set for the agentName property. + */ + public function setAgentName(?string $value): void { + $this->getBackingStore()->set('agentName', $value); + } + + /** + * Sets the agentSetting property value. The agent setting of the external partner. Read-only. + * @param CloudPcExternalPartnerAgentSetting|null $value Value to set for the agentSetting property. + */ + public function setAgentSetting(?CloudPcExternalPartnerAgentSetting $value): void { + $this->getBackingStore()->set('agentSetting', $value); + } + + /** + * Sets the authenticatedAppId property value. Indicates the authenticated Microsoft Entra (Azure AD) app ID of the action request. Read-only. + * @param string|null $value Value to set for the authenticatedAppId property. + */ + public function setAuthenticatedAppId(?string $value): void { + $this->getBackingStore()->set('authenticatedAppId', $value); + } + + /** + * Sets the authenticatedAppName property value. Indicates the authenticated Microsoft Entra (Azure AD) app name of the action request. Read-only. + * @param string|null $value Value to set for the authenticatedAppName property. + */ + public function setAuthenticatedAppName(?string $value): void { + $this->getBackingStore()->set('authenticatedAppName', $value); + } + + /** + * Sets the authenticatedMethod property value. The authenticatedMethod property + * @param CloudPcExternalPartnerAuthenticatedMethod|null $value Value to set for the authenticatedMethod property. + */ + public function setAuthenticatedMethod(?CloudPcExternalPartnerAuthenticatedMethod $value): void { + $this->getBackingStore()->set('authenticatedMethod', $value); + } + + /** + * Sets the authenticatedUserPrincipalName property value. Indicates the authenticated Microsoft Entra (Azure AD) user principal name of the action request. Read-only. + * @param string|null $value Value to set for the authenticatedUserPrincipalName property. + */ + public function setAuthenticatedUserPrincipalName(?string $value): void { + $this->getBackingStore()->set('authenticatedUserPrincipalName', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the cloudPcId property value. The Cloud PC's ID of the partner agent is deployed. Read-only. + * @param string|null $value Value to set for the cloudPcId property. + */ + public function setCloudPcId(?string $value): void { + $this->getBackingStore()->set('cloudPcId', $value); + } + + /** + * Sets the cloudPcName property value. The Cloud PC's Name of the partner agent is deployed. Read-only. + * @param string|null $value Value to set for the cloudPcName property. + */ + public function setCloudPcName(?string $value): void { + $this->getBackingStore()->set('cloudPcName', $value); + } + + /** + * Sets the createdDateTime property value. The create time of the action. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. Read-only. + * @param DateTime|null $value Value to set for the createdDateTime property. + */ + public function setCreatedDateTime(?DateTime $value): void { + $this->getBackingStore()->set('createdDateTime', $value); + } + + /** + * Sets the @odata.type property value. The OdataType property + * @param string|null $value Value to set for the @odata.type property. + */ + public function setOdataType(?string $value): void { + $this->getBackingStore()->set('odataType', $value); + } + +} diff --git a/src/Generated/Models/CloudPcExternalPartnerActionResult.php b/src/Generated/Models/CloudPcExternalPartnerActionResult.php new file mode 100644 index 00000000000..10c3b37e0cd --- /dev/null +++ b/src/Generated/Models/CloudPcExternalPartnerActionResult.php @@ -0,0 +1,269 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return CloudPcExternalPartnerActionResult + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): CloudPcExternalPartnerActionResult { + return new CloudPcExternalPartnerActionResult(); + } + + /** + * Gets the activityId property value. The activity ID associated with the external partner action. Read-only. + * @return string|null + */ + public function getActivityId(): ?string { + $val = $this->getBackingStore()->get('activityId'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'activityId'"); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * Gets the cloudPcId property value. The Cloud PC ID associated with the external partner action. Read-only. + * @return string|null + */ + public function getCloudPcId(): ?string { + $val = $this->getBackingStore()->get('cloudPcId'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'cloudPcId'"); + } + + /** + * Gets the errorCode property value. The errorCode property + * @return CloudPcExternalPartnerActionErrorCode|null + */ + public function getErrorCode(): ?CloudPcExternalPartnerActionErrorCode { + $val = $this->getBackingStore()->get('errorCode'); + if (is_null($val) || $val instanceof CloudPcExternalPartnerActionErrorCode) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'errorCode'"); + } + + /** + * Gets the errorMessage property value. The error message of the action. Read-only. + * @return string|null + */ + public function getErrorMessage(): ?string { + $val = $this->getBackingStore()->get('errorMessage'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'errorMessage'"); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'activityId' => fn(ParseNode $n) => $o->setActivityId($n->getStringValue()), + 'cloudPcId' => fn(ParseNode $n) => $o->setCloudPcId($n->getStringValue()), + 'errorCode' => fn(ParseNode $n) => $o->setErrorCode($n->getEnumValue(CloudPcExternalPartnerActionErrorCode::class)), + 'errorMessage' => fn(ParseNode $n) => $o->setErrorMessage($n->getStringValue()), + 'lastModifiedDateTime' => fn(ParseNode $n) => $o->setLastModifiedDateTime($n->getDateTimeValue()), + '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()), + 'startDateTime' => fn(ParseNode $n) => $o->setStartDateTime($n->getDateTimeValue()), + 'state' => fn(ParseNode $n) => $o->setState($n->getEnumValue(CloudPcExternalPartnerActionStatus::class)), + ]; + } + + /** + * Gets the lastModifiedDateTime property value. The last update time of the action. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. Read-only. + * @return DateTime|null + */ + public function getLastModifiedDateTime(): ?DateTime { + $val = $this->getBackingStore()->get('lastModifiedDateTime'); + if (is_null($val) || $val instanceof DateTime) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'lastModifiedDateTime'"); + } + + /** + * Gets the @odata.type property value. The OdataType property + * @return string|null + */ + public function getOdataType(): ?string { + $val = $this->getBackingStore()->get('odataType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'odataType'"); + } + + /** + * Gets the startDateTime property value. The start time of the action. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. Read-only. + * @return DateTime|null + */ + public function getStartDateTime(): ?DateTime { + $val = $this->getBackingStore()->get('startDateTime'); + if (is_null($val) || $val instanceof DateTime) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'startDateTime'"); + } + + /** + * Gets the state property value. The state property + * @return CloudPcExternalPartnerActionStatus|null + */ + public function getState(): ?CloudPcExternalPartnerActionStatus { + $val = $this->getBackingStore()->get('state'); + if (is_null($val) || $val instanceof CloudPcExternalPartnerActionStatus) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'state'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('activityId', $this->getActivityId()); + $writer->writeStringValue('cloudPcId', $this->getCloudPcId()); + $writer->writeEnumValue('errorCode', $this->getErrorCode()); + $writer->writeStringValue('errorMessage', $this->getErrorMessage()); + $writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime()); + $writer->writeStringValue('@odata.type', $this->getOdataType()); + $writer->writeDateTimeValue('startDateTime', $this->getStartDateTime()); + $writer->writeEnumValue('state', $this->getState()); + $writer->writeAdditionalData($this->getAdditionalData()); + } + + /** + * Sets the activityId property value. The activity ID associated with the external partner action. Read-only. + * @param string|null $value Value to set for the activityId property. + */ + public function setActivityId(?string $value): void { + $this->getBackingStore()->set('activityId', $value); + } + + /** + * 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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the cloudPcId property value. The Cloud PC ID associated with the external partner action. Read-only. + * @param string|null $value Value to set for the cloudPcId property. + */ + public function setCloudPcId(?string $value): void { + $this->getBackingStore()->set('cloudPcId', $value); + } + + /** + * Sets the errorCode property value. The errorCode property + * @param CloudPcExternalPartnerActionErrorCode|null $value Value to set for the errorCode property. + */ + public function setErrorCode(?CloudPcExternalPartnerActionErrorCode $value): void { + $this->getBackingStore()->set('errorCode', $value); + } + + /** + * Sets the errorMessage property value. The error message of the action. Read-only. + * @param string|null $value Value to set for the errorMessage property. + */ + public function setErrorMessage(?string $value): void { + $this->getBackingStore()->set('errorMessage', $value); + } + + /** + * Sets the lastModifiedDateTime property value. The last update time of the action. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. Read-only. + * @param DateTime|null $value Value to set for the lastModifiedDateTime property. + */ + public function setLastModifiedDateTime(?DateTime $value): void { + $this->getBackingStore()->set('lastModifiedDateTime', $value); + } + + /** + * Sets the @odata.type property value. The OdataType property + * @param string|null $value Value to set for the @odata.type property. + */ + public function setOdataType(?string $value): void { + $this->getBackingStore()->set('odataType', $value); + } + + /** + * Sets the startDateTime property value. The start time of the action. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. Read-only. + * @param DateTime|null $value Value to set for the startDateTime property. + */ + public function setStartDateTime(?DateTime $value): void { + $this->getBackingStore()->set('startDateTime', $value); + } + + /** + * Sets the state property value. The state property + * @param CloudPcExternalPartnerActionStatus|null $value Value to set for the state property. + */ + public function setState(?CloudPcExternalPartnerActionStatus $value): void { + $this->getBackingStore()->set('state', $value); + } + +} diff --git a/src/Generated/Models/CloudPcExternalPartnerActionStatus.php b/src/Generated/Models/CloudPcExternalPartnerActionStatus.php new file mode 100644 index 00000000000..30dd161aac9 --- /dev/null +++ b/src/Generated/Models/CloudPcExternalPartnerActionStatus.php @@ -0,0 +1,15 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return CloudPcExternalPartnerAgentSetting + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): CloudPcExternalPartnerAgentSetting { + return new CloudPcExternalPartnerAgentSetting(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the agentSha256 property value. The hash value of agent file by sha256 algorithm. + * @return string|null + */ + public function getAgentSha256(): ?string { + $val = $this->getBackingStore()->get('agentSha256'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'agentSha256'"); + } + + /** + * Gets the agentUrl property value. The download link url of the agent, when admin sets this url, then partner can call deploy agent API to deploy this agent to targeted Cloud PCs. The format is like this: https://www.external-partner.com/resources/agents/exampleAgentFile.exe + * @return string|null + */ + public function getAgentUrl(): ?string { + $val = $this->getBackingStore()->get('agentUrl'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'agentUrl'"); + } + + /** + * Gets the autoDeploymentEnabled property value. Indicates whether partner agent auto deployment is enabled. When true, then the partner agent will be deployed after the Cloud PC is provisioned. When false, auto deployment isn't performed. Default value is false + * @return bool|null + */ + public function getAutoDeploymentEnabled(): ?bool { + $val = $this->getBackingStore()->get('autoDeploymentEnabled'); + if (is_null($val) || is_bool($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'autoDeploymentEnabled'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'agentSha256' => fn(ParseNode $n) => $o->setAgentSha256($n->getStringValue()), + 'agentUrl' => fn(ParseNode $n) => $o->setAgentUrl($n->getStringValue()), + 'autoDeploymentEnabled' => fn(ParseNode $n) => $o->setAutoDeploymentEnabled($n->getBooleanValue()), + 'installParameters' => function (ParseNode $n) { + $val = $n->getCollectionOfPrimitiveValues(); + if (is_array($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + } + /** @var array|null $val */ + $this->setInstallParameters($val); + }, + '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()), + ]; + } + + /** + * Gets the installParameters property value. The install command parameters to run the agent install command. The format is like this: ['/p paramValue', '/quiet'] + * @return array|null + */ + public function getInstallParameters(): ?array { + $val = $this->getBackingStore()->get('installParameters'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'installParameters'"); + } + + /** + * Gets the @odata.type property value. The OdataType property + * @return string|null + */ + public function getOdataType(): ?string { + $val = $this->getBackingStore()->get('odataType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'odataType'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('agentSha256', $this->getAgentSha256()); + $writer->writeStringValue('agentUrl', $this->getAgentUrl()); + $writer->writeBooleanValue('autoDeploymentEnabled', $this->getAutoDeploymentEnabled()); + $writer->writeCollectionOfPrimitiveValues('installParameters', $this->getInstallParameters()); + $writer->writeStringValue('@odata.type', $this->getOdataType()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the agentSha256 property value. The hash value of agent file by sha256 algorithm. + * @param string|null $value Value to set for the agentSha256 property. + */ + public function setAgentSha256(?string $value): void { + $this->getBackingStore()->set('agentSha256', $value); + } + + /** + * Sets the agentUrl property value. The download link url of the agent, when admin sets this url, then partner can call deploy agent API to deploy this agent to targeted Cloud PCs. The format is like this: https://www.external-partner.com/resources/agents/exampleAgentFile.exe + * @param string|null $value Value to set for the agentUrl property. + */ + public function setAgentUrl(?string $value): void { + $this->getBackingStore()->set('agentUrl', $value); + } + + /** + * Sets the autoDeploymentEnabled property value. Indicates whether partner agent auto deployment is enabled. When true, then the partner agent will be deployed after the Cloud PC is provisioned. When false, auto deployment isn't performed. Default value is false + * @param bool|null $value Value to set for the autoDeploymentEnabled property. + */ + public function setAutoDeploymentEnabled(?bool $value): void { + $this->getBackingStore()->set('autoDeploymentEnabled', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the installParameters property value. The install command parameters to run the agent install command. The format is like this: ['/p paramValue', '/quiet'] + * @param array|null $value Value to set for the installParameters property. + */ + public function setInstallParameters(?array $value): void { + $this->getBackingStore()->set('installParameters', $value); + } + + /** + * Sets the @odata.type property value. The OdataType property + * @param string|null $value Value to set for the @odata.type property. + */ + public function setOdataType(?string $value): void { + $this->getBackingStore()->set('odataType', $value); + } + +} diff --git a/src/Generated/Models/CloudPcExternalPartnerAuthenticatedMethod.php b/src/Generated/Models/CloudPcExternalPartnerAuthenticatedMethod.php new file mode 100644 index 00000000000..f7cde4015dc --- /dev/null +++ b/src/Generated/Models/CloudPcExternalPartnerAuthenticatedMethod.php @@ -0,0 +1,14 @@ +getBackingStore()->get('appId'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'appId'"); + } + + /** + * Gets the assetId property value. The assetId property + * @return string|null + */ + public function getAssetId(): ?string { + $val = $this->getBackingStore()->get('assetId'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'assetId'"); + } + /** * Gets the availableTo property value. The availableTo property * @return PackageStatus|null @@ -91,6 +115,8 @@ public function getElementTypes(): ?array { public function getFieldDeserializers(): array { $o = $this; return array_merge(parent::getFieldDeserializers(), [ + 'appId' => fn(ParseNode $n) => $o->setAppId($n->getStringValue()), + 'assetId' => fn(ParseNode $n) => $o->setAssetId($n->getStringValue()), 'availableTo' => fn(ParseNode $n) => $o->setAvailableTo($n->getEnumValue(PackageStatus::class)), 'deployedTo' => fn(ParseNode $n) => $o->setDeployedTo($n->getEnumValue(PackageStatus::class)), 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()), @@ -104,6 +130,9 @@ public function getFieldDeserializers(): array { }, 'isBlocked' => fn(ParseNode $n) => $o->setIsBlocked($n->getBooleanValue()), 'lastModifiedDateTime' => fn(ParseNode $n) => $o->setLastModifiedDateTime($n->getDateTimeValue()), + 'manifestId' => fn(ParseNode $n) => $o->setManifestId($n->getStringValue()), + 'manifestVersion' => fn(ParseNode $n) => $o->setManifestVersion($n->getStringValue()), + 'platform' => fn(ParseNode $n) => $o->setPlatform($n->getStringValue()), 'publisher' => fn(ParseNode $n) => $o->setPublisher($n->getStringValue()), 'shortDescription' => fn(ParseNode $n) => $o->setShortDescription($n->getStringValue()), 'supportedHosts' => function (ParseNode $n) { @@ -115,6 +144,7 @@ public function getFieldDeserializers(): array { $this->setSupportedHosts($val); }, 'type' => fn(ParseNode $n) => $o->setType($n->getEnumValue(PackageType::class)), + 'version' => fn(ParseNode $n) => $o->setVersion($n->getStringValue()), 'zipFile' => fn(ParseNode $n) => $o->setZipFile($n->getBinaryContent()), ]); } @@ -143,6 +173,42 @@ public function getLastModifiedDateTime(): ?DateTime { throw new \UnexpectedValueException("Invalid type found in backing store for 'lastModifiedDateTime'"); } + /** + * Gets the manifestId property value. The manifestId property + * @return string|null + */ + public function getManifestId(): ?string { + $val = $this->getBackingStore()->get('manifestId'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'manifestId'"); + } + + /** + * Gets the manifestVersion property value. The manifestVersion property + * @return string|null + */ + public function getManifestVersion(): ?string { + $val = $this->getBackingStore()->get('manifestVersion'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'manifestVersion'"); + } + + /** + * Gets the platform property value. The platform property + * @return string|null + */ + public function getPlatform(): ?string { + $val = $this->getBackingStore()->get('platform'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'platform'"); + } + /** * Gets the publisher property value. The publisher property * @return string|null @@ -193,6 +259,18 @@ public function getType(): ?PackageType { throw new \UnexpectedValueException("Invalid type found in backing store for 'type'"); } + /** + * Gets the version property value. The version property + * @return string|null + */ + public function getVersion(): ?string { + $val = $this->getBackingStore()->get('version'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'version'"); + } + /** * Gets the zipFile property value. The zipFile property * @return StreamInterface|null @@ -211,19 +289,41 @@ public function getZipFile(): ?StreamInterface { */ public function serialize(SerializationWriter $writer): void { parent::serialize($writer); + $writer->writeStringValue('appId', $this->getAppId()); + $writer->writeStringValue('assetId', $this->getAssetId()); $writer->writeEnumValue('availableTo', $this->getAvailableTo()); $writer->writeEnumValue('deployedTo', $this->getDeployedTo()); $writer->writeStringValue('displayName', $this->getDisplayName()); $writer->writeCollectionOfPrimitiveValues('elementTypes', $this->getElementTypes()); $writer->writeBooleanValue('isBlocked', $this->getIsBlocked()); $writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime()); + $writer->writeStringValue('manifestId', $this->getManifestId()); + $writer->writeStringValue('manifestVersion', $this->getManifestVersion()); + $writer->writeStringValue('platform', $this->getPlatform()); $writer->writeStringValue('publisher', $this->getPublisher()); $writer->writeStringValue('shortDescription', $this->getShortDescription()); $writer->writeCollectionOfPrimitiveValues('supportedHosts', $this->getSupportedHosts()); $writer->writeEnumValue('type', $this->getType()); + $writer->writeStringValue('version', $this->getVersion()); $writer->writeBinaryContent('zipFile', $this->getZipFile()); } + /** + * Sets the appId property value. The appId property + * @param string|null $value Value to set for the appId property. + */ + public function setAppId(?string $value): void { + $this->getBackingStore()->set('appId', $value); + } + + /** + * Sets the assetId property value. The assetId property + * @param string|null $value Value to set for the assetId property. + */ + public function setAssetId(?string $value): void { + $this->getBackingStore()->set('assetId', $value); + } + /** * Sets the availableTo property value. The availableTo property * @param PackageStatus|null $value Value to set for the availableTo property. @@ -272,6 +372,30 @@ public function setLastModifiedDateTime(?DateTime $value): void { $this->getBackingStore()->set('lastModifiedDateTime', $value); } + /** + * Sets the manifestId property value. The manifestId property + * @param string|null $value Value to set for the manifestId property. + */ + public function setManifestId(?string $value): void { + $this->getBackingStore()->set('manifestId', $value); + } + + /** + * Sets the manifestVersion property value. The manifestVersion property + * @param string|null $value Value to set for the manifestVersion property. + */ + public function setManifestVersion(?string $value): void { + $this->getBackingStore()->set('manifestVersion', $value); + } + + /** + * Sets the platform property value. The platform property + * @param string|null $value Value to set for the platform property. + */ + public function setPlatform(?string $value): void { + $this->getBackingStore()->set('platform', $value); + } + /** * Sets the publisher property value. The publisher property * @param string|null $value Value to set for the publisher property. @@ -304,6 +428,14 @@ public function setType(?PackageType $value): void { $this->getBackingStore()->set('type', $value); } + /** + * Sets the version property value. The version property + * @param string|null $value Value to set for the version property. + */ + public function setVersion(?string $value): void { + $this->getBackingStore()->set('version', $value); + } + /** * Sets the zipFile property value. The zipFile property * @param StreamInterface|null $value Value to set for the zipFile property. diff --git a/src/Generated/Models/CopilotPackageDetail.php b/src/Generated/Models/CopilotPackageDetail.php index 7f1e1382d47..1a9b3659e55 100644 --- a/src/Generated/Models/CopilotPackageDetail.php +++ b/src/Generated/Models/CopilotPackageDetail.php @@ -101,9 +101,7 @@ public function getFieldDeserializers(): array { }, 'elementDetails' => fn(ParseNode $n) => $o->setElementDetails($n->getCollectionOfObjectValues([PackageElementDetail::class, 'createFromDiscriminatorValue'])), 'longDescription' => fn(ParseNode $n) => $o->setLongDescription($n->getStringValue()), - 'manifestVersion' => fn(ParseNode $n) => $o->setManifestVersion($n->getStringValue()), 'sensitivity' => fn(ParseNode $n) => $o->setSensitivity($n->getStringValue()), - 'version' => fn(ParseNode $n) => $o->setVersion($n->getStringValue()), ]); } @@ -119,18 +117,6 @@ public function getLongDescription(): ?string { throw new \UnexpectedValueException("Invalid type found in backing store for 'longDescription'"); } - /** - * Gets the manifestVersion property value. The manifestVersion property - * @return string|null - */ - public function getManifestVersion(): ?string { - $val = $this->getBackingStore()->get('manifestVersion'); - if (is_null($val) || is_string($val)) { - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'manifestVersion'"); - } - /** * Gets the sensitivity property value. The sensitivity property * @return string|null @@ -143,18 +129,6 @@ public function getSensitivity(): ?string { throw new \UnexpectedValueException("Invalid type found in backing store for 'sensitivity'"); } - /** - * Gets the version property value. The version property - * @return string|null - */ - public function getVersion(): ?string { - $val = $this->getBackingStore()->get('version'); - if (is_null($val) || is_string($val)) { - return $val; - } - throw new \UnexpectedValueException("Invalid type found in backing store for 'version'"); - } - /** * Serializes information the current object * @param SerializationWriter $writer Serialization writer to use to serialize this model @@ -166,9 +140,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeCollectionOfPrimitiveValues('categories', $this->getCategories()); $writer->writeCollectionOfObjectValues('elementDetails', $this->getElementDetails()); $writer->writeStringValue('longDescription', $this->getLongDescription()); - $writer->writeStringValue('manifestVersion', $this->getManifestVersion()); $writer->writeStringValue('sensitivity', $this->getSensitivity()); - $writer->writeStringValue('version', $this->getVersion()); } /** @@ -211,14 +183,6 @@ public function setLongDescription(?string $value): void { $this->getBackingStore()->set('longDescription', $value); } - /** - * Sets the manifestVersion property value. The manifestVersion property - * @param string|null $value Value to set for the manifestVersion property. - */ - public function setManifestVersion(?string $value): void { - $this->getBackingStore()->set('manifestVersion', $value); - } - /** * Sets the sensitivity property value. The sensitivity property * @param string|null $value Value to set for the sensitivity property. @@ -227,12 +191,4 @@ public function setSensitivity(?string $value): void { $this->getBackingStore()->set('sensitivity', $value); } - /** - * Sets the version property value. The version property - * @param string|null $value Value to set for the version property. - */ - public function setVersion(?string $value): void { - $this->getBackingStore()->set('version', $value); - } - } diff --git a/src/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.php b/src/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.php index 5ec0521ba36..0cbb3868ae9 100644 --- a/src/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.php +++ b/src/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.php @@ -84,6 +84,18 @@ public function getB2bDirectConnectOutbound(): ?CrossTenantAccessPolicyB2BSettin throw new \UnexpectedValueException("Invalid type found in backing store for 'b2bDirectConnectOutbound'"); } + /** + * Gets the blockServiceProviderOutboundAccess property value. The blockServiceProviderOutboundAccess property + * @return bool|null + */ + public function getBlockServiceProviderOutboundAccess(): ?bool { + $val = $this->getBackingStore()->get('blockServiceProviderOutboundAccess'); + if (is_null($val) || is_bool($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'blockServiceProviderOutboundAccess'"); + } + /** * The deserialization information for the current model * @return array @@ -96,6 +108,7 @@ public function getFieldDeserializers(): array { 'b2bCollaborationOutbound' => fn(ParseNode $n) => $o->setB2bCollaborationOutbound($n->getObjectValue([CrossTenantAccessPolicyB2BSetting::class, 'createFromDiscriminatorValue'])), 'b2bDirectConnectInbound' => fn(ParseNode $n) => $o->setB2bDirectConnectInbound($n->getObjectValue([CrossTenantAccessPolicyB2BSetting::class, 'createFromDiscriminatorValue'])), 'b2bDirectConnectOutbound' => fn(ParseNode $n) => $o->setB2bDirectConnectOutbound($n->getObjectValue([CrossTenantAccessPolicyB2BSetting::class, 'createFromDiscriminatorValue'])), + 'blockServiceProviderOutboundAccess' => fn(ParseNode $n) => $o->setBlockServiceProviderOutboundAccess($n->getBooleanValue()), 'inboundTrust' => fn(ParseNode $n) => $o->setInboundTrust($n->getObjectValue([CrossTenantAccessPolicyInboundTrust::class, 'createFromDiscriminatorValue'])), 'invitationRedemptionIdentityProviderConfiguration' => fn(ParseNode $n) => $o->setInvitationRedemptionIdentityProviderConfiguration($n->getObjectValue([DefaultInvitationRedemptionIdentityProviderConfiguration::class, 'createFromDiscriminatorValue'])), 'isServiceDefault' => fn(ParseNode $n) => $o->setIsServiceDefault($n->getBooleanValue()), @@ -162,6 +175,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeObjectValue('b2bCollaborationOutbound', $this->getB2bCollaborationOutbound()); $writer->writeObjectValue('b2bDirectConnectInbound', $this->getB2bDirectConnectInbound()); $writer->writeObjectValue('b2bDirectConnectOutbound', $this->getB2bDirectConnectOutbound()); + $writer->writeBooleanValue('blockServiceProviderOutboundAccess', $this->getBlockServiceProviderOutboundAccess()); $writer->writeObjectValue('inboundTrust', $this->getInboundTrust()); $writer->writeObjectValue('invitationRedemptionIdentityProviderConfiguration', $this->getInvitationRedemptionIdentityProviderConfiguration()); $writer->writeBooleanValue('isServiceDefault', $this->getIsServiceDefault()); @@ -208,6 +222,14 @@ public function setB2bDirectConnectOutbound(?CrossTenantAccessPolicyB2BSetting $ $this->getBackingStore()->set('b2bDirectConnectOutbound', $value); } + /** + * Sets the blockServiceProviderOutboundAccess property value. The blockServiceProviderOutboundAccess property + * @param bool|null $value Value to set for the blockServiceProviderOutboundAccess property. + */ + public function setBlockServiceProviderOutboundAccess(?bool $value): void { + $this->getBackingStore()->set('blockServiceProviderOutboundAccess', $value); + } + /** * Sets the inboundTrust property value. Determines the default configuration for trusting other Conditional Access claims from external Microsoft Entra organizations. * @param CrossTenantAccessPolicyInboundTrust|null $value Value to set for the inboundTrust property. diff --git a/src/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.php b/src/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.php index ab1a628a549..d7d67d7c2c2 100644 --- a/src/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.php +++ b/src/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.php @@ -85,6 +85,18 @@ public function getB2bDirectConnectOutbound(): ?CrossTenantAccessPolicyB2BSettin throw new \UnexpectedValueException("Invalid type found in backing store for 'b2bDirectConnectOutbound'"); } + /** + * Gets the blockServiceProviderOutboundAccess property value. The blockServiceProviderOutboundAccess property + * @return bool|null + */ + public function getBlockServiceProviderOutboundAccess(): ?bool { + $val = $this->getBackingStore()->get('blockServiceProviderOutboundAccess'); + if (is_null($val) || is_bool($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'blockServiceProviderOutboundAccess'"); + } + /** * The deserialization information for the current model * @return array @@ -97,6 +109,7 @@ public function getFieldDeserializers(): array { 'b2bCollaborationOutbound' => fn(ParseNode $n) => $o->setB2bCollaborationOutbound($n->getObjectValue([CrossTenantAccessPolicyB2BSetting::class, 'createFromDiscriminatorValue'])), 'b2bDirectConnectInbound' => fn(ParseNode $n) => $o->setB2bDirectConnectInbound($n->getObjectValue([CrossTenantAccessPolicyB2BSetting::class, 'createFromDiscriminatorValue'])), 'b2bDirectConnectOutbound' => fn(ParseNode $n) => $o->setB2bDirectConnectOutbound($n->getObjectValue([CrossTenantAccessPolicyB2BSetting::class, 'createFromDiscriminatorValue'])), + 'blockServiceProviderOutboundAccess' => fn(ParseNode $n) => $o->setBlockServiceProviderOutboundAccess($n->getBooleanValue()), 'identitySynchronization' => fn(ParseNode $n) => $o->setIdentitySynchronization($n->getObjectValue([CrossTenantIdentitySyncPolicyPartner::class, 'createFromDiscriminatorValue'])), 'inboundTrust' => fn(ParseNode $n) => $o->setInboundTrust($n->getObjectValue([CrossTenantAccessPolicyInboundTrust::class, 'createFromDiscriminatorValue'])), 'isInMultiTenantOrganization' => fn(ParseNode $n) => $o->setIsInMultiTenantOrganization($n->getBooleanValue()), @@ -189,6 +202,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeObjectValue('b2bCollaborationOutbound', $this->getB2bCollaborationOutbound()); $writer->writeObjectValue('b2bDirectConnectInbound', $this->getB2bDirectConnectInbound()); $writer->writeObjectValue('b2bDirectConnectOutbound', $this->getB2bDirectConnectOutbound()); + $writer->writeBooleanValue('blockServiceProviderOutboundAccess', $this->getBlockServiceProviderOutboundAccess()); $writer->writeObjectValue('identitySynchronization', $this->getIdentitySynchronization()); $writer->writeObjectValue('inboundTrust', $this->getInboundTrust()); $writer->writeBooleanValue('isInMultiTenantOrganization', $this->getIsInMultiTenantOrganization()); @@ -237,6 +251,14 @@ public function setB2bDirectConnectOutbound(?CrossTenantAccessPolicyB2BSetting $ $this->getBackingStore()->set('b2bDirectConnectOutbound', $value); } + /** + * Sets the blockServiceProviderOutboundAccess property value. The blockServiceProviderOutboundAccess property + * @param bool|null $value Value to set for the blockServiceProviderOutboundAccess property. + */ + public function setBlockServiceProviderOutboundAccess(?bool $value): void { + $this->getBackingStore()->set('blockServiceProviderOutboundAccess', $value); + } + /** * Sets the identitySynchronization property value. Defines the cross-tenant policy for the synchronization of users from a partner tenant. Use this user synchronization policy to streamline collaboration between users in a multitenant organization by automating the creation, update, and deletion of users from one tenant to another. * @param CrossTenantIdentitySyncPolicyPartner|null $value Value to set for the identitySynchronization property. diff --git a/src/Generated/Models/CustomDataProvidedResourceFile.php b/src/Generated/Models/CustomDataProvidedResourceFile.php new file mode 100644 index 00000000000..01746f493b0 --- /dev/null +++ b/src/Generated/Models/CustomDataProvidedResourceFile.php @@ -0,0 +1,112 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()), + 'size' => fn(ParseNode $n) => $o->setSize($n->getIntegerValue()), + 'uploadedDateTime' => fn(ParseNode $n) => $o->setUploadedDateTime($n->getDateTimeValue()), + ]); + } + + /** + * Gets the name property value. Name of the file that was uploaded. + * @return string|null + */ + public function getName(): ?string { + $val = $this->getBackingStore()->get('name'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'name'"); + } + + /** + * Gets the size property value. Size of the uploaded file in bytes. + * @return int|null + */ + public function getSize(): ?int { + $val = $this->getBackingStore()->get('size'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'size'"); + } + + /** + * Gets the uploadedDateTime property value. Time at which the file was uploaded. + * @return DateTime|null + */ + public function getUploadedDateTime(): ?DateTime { + $val = $this->getBackingStore()->get('uploadedDateTime'); + if (is_null($val) || $val instanceof DateTime) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'uploadedDateTime'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + $writer->writeStringValue('name', $this->getName()); + $writer->writeIntegerValue('size', $this->getSize()); + $writer->writeDateTimeValue('uploadedDateTime', $this->getUploadedDateTime()); + } + + /** + * Sets the name property value. Name of the file that was uploaded. + * @param string|null $value Value to set for the name property. + */ + public function setName(?string $value): void { + $this->getBackingStore()->set('name', $value); + } + + /** + * Sets the size property value. Size of the uploaded file in bytes. + * @param int|null $value Value to set for the size property. + */ + public function setSize(?int $value): void { + $this->getBackingStore()->set('size', $value); + } + + /** + * Sets the uploadedDateTime property value. Time at which the file was uploaded. + * @param DateTime|null $value Value to set for the uploadedDateTime property. + */ + public function setUploadedDateTime(?DateTime $value): void { + $this->getBackingStore()->set('uploadedDateTime', $value); + } + +} diff --git a/src/Generated/Models/DepMacOSEnrollmentProfile.php b/src/Generated/Models/DepMacOSEnrollmentProfile.php index 8f07f264eb6..faf8890e3bf 100644 --- a/src/Generated/Models/DepMacOSEnrollmentProfile.php +++ b/src/Generated/Models/DepMacOSEnrollmentProfile.php @@ -176,6 +176,7 @@ public function getFieldDeserializers(): array { 'requestRequiresNetworkTether' => fn(ParseNode $n) => $o->setRequestRequiresNetworkTether($n->getBooleanValue()), 'setPrimarySetupAccountAsRegularUser' => fn(ParseNode $n) => $o->setSetPrimarySetupAccountAsRegularUser($n->getBooleanValue()), 'skipPrimarySetupAccountCreation' => fn(ParseNode $n) => $o->setSkipPrimarySetupAccountCreation($n->getBooleanValue()), + 'usePlatformSSODuringSetupAssistant' => fn(ParseNode $n) => $o->setUsePlatformSSODuringSetupAssistant($n->getBooleanValue()), 'zoomDisabled' => fn(ParseNode $n) => $o->setZoomDisabled($n->getBooleanValue()), ]); } @@ -312,6 +313,18 @@ public function getSkipPrimarySetupAccountCreation(): ?bool { throw new \UnexpectedValueException("Invalid type found in backing store for 'skipPrimarySetupAccountCreation'"); } + /** + * Gets the usePlatformSSODuringSetupAssistant property value. Indicates whether Platform SSO is used as part of device enrollment during Setup Assistant. When TRUE, Platform SSO is used in device enrollment during Setup Assistant. When FALSE Platform SSO is not used in enrollment during Setup Assistant. Note: This value cannot be TRUE when configurationWebUrl is TRUE. + * @return bool|null + */ + public function getUsePlatformSSODuringSetupAssistant(): ?bool { + $val = $this->getBackingStore()->get('usePlatformSSODuringSetupAssistant'); + if (is_null($val) || is_bool($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'usePlatformSSODuringSetupAssistant'"); + } + /** * Gets the zoomDisabled property value. Indicates if zoom setup pane is disabled * @return bool|null @@ -351,6 +364,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeBooleanValue('requestRequiresNetworkTether', $this->getRequestRequiresNetworkTether()); $writer->writeBooleanValue('setPrimarySetupAccountAsRegularUser', $this->getSetPrimarySetupAccountAsRegularUser()); $writer->writeBooleanValue('skipPrimarySetupAccountCreation', $this->getSkipPrimarySetupAccountCreation()); + $writer->writeBooleanValue('usePlatformSSODuringSetupAssistant', $this->getUsePlatformSSODuringSetupAssistant()); $writer->writeBooleanValue('zoomDisabled', $this->getZoomDisabled()); } @@ -522,6 +536,14 @@ public function setSkipPrimarySetupAccountCreation(?bool $value): void { $this->getBackingStore()->set('skipPrimarySetupAccountCreation', $value); } + /** + * Sets the usePlatformSSODuringSetupAssistant property value. Indicates whether Platform SSO is used as part of device enrollment during Setup Assistant. When TRUE, Platform SSO is used in device enrollment during Setup Assistant. When FALSE Platform SSO is not used in enrollment during Setup Assistant. Note: This value cannot be TRUE when configurationWebUrl is TRUE. + * @param bool|null $value Value to set for the usePlatformSSODuringSetupAssistant property. + */ + public function setUsePlatformSSODuringSetupAssistant(?bool $value): void { + $this->getBackingStore()->set('usePlatformSSODuringSetupAssistant', $value); + } + /** * Sets the zoomDisabled property value. Indicates if zoom setup pane is disabled * @param bool|null $value Value to set for the zoomDisabled property. diff --git a/src/Generated/Models/DeviceAndAppManagementAssignmentTarget.php b/src/Generated/Models/DeviceAndAppManagementAssignmentTarget.php index 74ca8f5ae6d..8e412b25d3c 100644 --- a/src/Generated/Models/DeviceAndAppManagementAssignmentTarget.php +++ b/src/Generated/Models/DeviceAndAppManagementAssignmentTarget.php @@ -40,7 +40,6 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Devic switch ($mappingValue) { case '#microsoft.graph.allDevicesAssignmentTarget': return new AllDevicesAssignmentTarget(); case '#microsoft.graph.allLicensedUsersAssignmentTarget': return new AllLicensedUsersAssignmentTarget(); - case '#microsoft.graph.androidFotaDeploymentAssignmentTarget': return new AndroidFotaDeploymentAssignmentTarget(); case '#microsoft.graph.configurationManagerCollectionAssignmentTarget': return new ConfigurationManagerCollectionAssignmentTarget(); case '#microsoft.graph.exclusionGroupAssignmentTarget': return new ExclusionGroupAssignmentTarget(); case '#microsoft.graph.groupAssignmentTarget': return new GroupAssignmentTarget(); diff --git a/src/Generated/Models/DeviceLocalAdminAccountDetail.php b/src/Generated/Models/DeviceLocalAdminAccountDetail.php new file mode 100644 index 00000000000..a5586622e38 --- /dev/null +++ b/src/Generated/Models/DeviceLocalAdminAccountDetail.php @@ -0,0 +1,147 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return DeviceLocalAdminAccountDetail + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): DeviceLocalAdminAccountDetail { + $mappingValueNode = $parseNode->getChildNode("@odata.type"); + if ($mappingValueNode !== null) { + $mappingValue = $mappingValueNode->getStringValue(); + switch ($mappingValue) { + case '#microsoft.graph.macOSDeviceLocalAdminAccountDetail': return new MacOSDeviceLocalAdminAccountDetail(); + } + } + return new DeviceLocalAdminAccountDetail(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()), + 'passwordLastRotationDateTime' => fn(ParseNode $n) => $o->setPasswordLastRotationDateTime($n->getDateTimeValue()), + ]; + } + + /** + * Gets the @odata.type property value. The OdataType property + * @return string|null + */ + public function getOdataType(): ?string { + $val = $this->getBackingStore()->get('odataType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'odataType'"); + } + + /** + * Gets the passwordLastRotationDateTime property value. The last rotation date and time of the local admin account password. Read-only. + * @return DateTime|null + */ + public function getPasswordLastRotationDateTime(): ?DateTime { + $val = $this->getBackingStore()->get('passwordLastRotationDateTime'); + if (is_null($val) || $val instanceof DateTime) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'passwordLastRotationDateTime'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('@odata.type', $this->getOdataType()); + $writer->writeDateTimeValue('passwordLastRotationDateTime', $this->getPasswordLastRotationDateTime()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the @odata.type property value. The OdataType property + * @param string|null $value Value to set for the @odata.type property. + */ + public function setOdataType(?string $value): void { + $this->getBackingStore()->set('odataType', $value); + } + + /** + * Sets the passwordLastRotationDateTime property value. The last rotation date and time of the local admin account password. Read-only. + * @param DateTime|null $value Value to set for the passwordLastRotationDateTime property. + */ + public function setPasswordLastRotationDateTime(?DateTime $value): void { + $this->getBackingStore()->set('passwordLastRotationDateTime', $value); + } + +} diff --git a/src/Generated/Models/DeviceManagement/DeviceManagement.php b/src/Generated/Models/DeviceManagement/DeviceManagement.php index f063a3ee469..0ef9ef4a190 100644 --- a/src/Generated/Models/DeviceManagement/DeviceManagement.php +++ b/src/Generated/Models/DeviceManagement/DeviceManagement.php @@ -115,6 +115,7 @@ use Microsoft\Graph\Beta\Generated\Models\RestrictedAppsViolation; use Microsoft\Graph\Beta\Generated\Models\RoleDefinition; use Microsoft\Graph\Beta\Generated\Models\RoleScopeTag; +use Microsoft\Graph\Beta\Generated\Models\SamsungEFotaFirmwareVersion; use Microsoft\Graph\Beta\Generated\Models\ServiceNowConnection; use Microsoft\Graph\Beta\Generated\Models\SoftwareUpdateStatusSummary; use Microsoft\Graph\Beta\Generated\Models\TenantAttachRBAC; @@ -1204,6 +1205,7 @@ public function getFieldDeserializers(): array { 'roleAssignments' => fn(ParseNode $n) => $o->setRoleAssignments($n->getCollectionOfObjectValues([DeviceAndAppManagementRoleAssignment::class, 'createFromDiscriminatorValue'])), 'roleDefinitions' => fn(ParseNode $n) => $o->setRoleDefinitions($n->getCollectionOfObjectValues([RoleDefinition::class, 'createFromDiscriminatorValue'])), 'roleScopeTags' => fn(ParseNode $n) => $o->setRoleScopeTags($n->getCollectionOfObjectValues([RoleScopeTag::class, 'createFromDiscriminatorValue'])), + 'samsungEFotaFirmwareVersions' => fn(ParseNode $n) => $o->setSamsungEFotaFirmwareVersions($n->getCollectionOfObjectValues([SamsungEFotaFirmwareVersion::class, 'createFromDiscriminatorValue'])), 'serviceNowConnections' => fn(ParseNode $n) => $o->setServiceNowConnections($n->getCollectionOfObjectValues([ServiceNowConnection::class, 'createFromDiscriminatorValue'])), 'settingDefinitions' => fn(ParseNode $n) => $o->setSettingDefinitions($n->getCollectionOfObjectValues([DeviceManagementSettingDefinition::class, 'createFromDiscriminatorValue'])), 'settings' => fn(ParseNode $n) => $o->setSettings($n->getObjectValue([DeviceManagementSettings::class, 'createFromDiscriminatorValue'])), @@ -1963,6 +1965,20 @@ public function getRoleScopeTags(): ?array { throw new \UnexpectedValueException("Invalid type found in backing store for 'roleScopeTags'"); } + /** + * Gets the samsungEFotaFirmwareVersions property value. The collection of Samsung EFOTA firmware versions. + * @return array|null + */ + public function getSamsungEFotaFirmwareVersions(): ?array { + $val = $this->getBackingStore()->get('samsungEFotaFirmwareVersions'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, SamsungEFotaFirmwareVersion::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'samsungEFotaFirmwareVersions'"); + } + /** * Gets the serviceNowConnections property value. A list of ServiceNowConnections * @return array|null @@ -3109,6 +3125,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeCollectionOfObjectValues('roleAssignments', $this->getRoleAssignments()); $writer->writeCollectionOfObjectValues('roleDefinitions', $this->getRoleDefinitions()); $writer->writeCollectionOfObjectValues('roleScopeTags', $this->getRoleScopeTags()); + $writer->writeCollectionOfObjectValues('samsungEFotaFirmwareVersions', $this->getSamsungEFotaFirmwareVersions()); $writer->writeCollectionOfObjectValues('serviceNowConnections', $this->getServiceNowConnections()); $writer->writeCollectionOfObjectValues('settingDefinitions', $this->getSettingDefinitions()); $writer->writeObjectValue('settings', $this->getSettings()); @@ -4106,6 +4123,14 @@ public function setRoleScopeTags(?array $value): void { $this->getBackingStore()->set('roleScopeTags', $value); } + /** + * Sets the samsungEFotaFirmwareVersions property value. The collection of Samsung EFOTA firmware versions. + * @param array|null $value Value to set for the samsungEFotaFirmwareVersions property. + */ + public function setSamsungEFotaFirmwareVersions(?array $value): void { + $this->getBackingStore()->set('samsungEFotaFirmwareVersions', $value); + } + /** * Sets the serviceNowConnections property value. A list of ServiceNowConnections * @param array|null $value Value to set for the serviceNowConnections property. diff --git a/src/Generated/Models/DeviceManagementConfigurationTemplateFamily.php b/src/Generated/Models/DeviceManagementConfigurationTemplateFamily.php index 5c0d1565e79..4817a981c29 100644 --- a/src/Generated/Models/DeviceManagementConfigurationTemplateFamily.php +++ b/src/Generated/Models/DeviceManagementConfigurationTemplateFamily.php @@ -22,4 +22,5 @@ class DeviceManagementConfigurationTemplateFamily extends Enum { public const DEVICE_CONFIGURATION_POLICIES = "deviceConfigurationPolicies"; public const WINDOWS_OS_RECOVERY_POLICIES = "windowsOsRecoveryPolicies"; public const COMPANY_PORTAL = "companyPortal"; + public const WINDOWS_RECOVERY_AND_REMEDIATION_CONFIGURATION = "windowsRecoveryAndRemediationConfiguration"; } diff --git a/src/Generated/Models/DlpAction.php b/src/Generated/Models/DlpAction.php index bdd273fac3c..353a23cdb2d 100644 --- a/src/Generated/Models/DlpAction.php +++ b/src/Generated/Models/DlpAction.php @@ -17,4 +17,5 @@ class DlpAction extends Enum { public const S_P_RUNTIME_ACCESS_CONTROL = "sPRuntimeAccessControl"; public const S_P_SHARING_NOTIFY_USER = "sPSharingNotifyUser"; public const S_P_SHARING_GENERATE_INCIDENT_REPORT = "sPSharingGenerateIncidentReport"; + public const RESTRICT_WEB_GROUNDING = "restrictWebGrounding"; } diff --git a/src/Generated/Models/DynamicRuleActivityLog.php b/src/Generated/Models/DynamicRuleActivityLog.php new file mode 100644 index 00000000000..a149da743ec --- /dev/null +++ b/src/Generated/Models/DynamicRuleActivityLog.php @@ -0,0 +1,112 @@ +setOdataType('#microsoft.graph.dynamicRuleActivityLog'); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return DynamicRuleActivityLog + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): DynamicRuleActivityLog { + return new DynamicRuleActivityLog(); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'policyId' => fn(ParseNode $n) => $o->setPolicyId($n->getStringValue()), + 'policyName' => fn(ParseNode $n) => $o->setPolicyName($n->getStringValue()), + 'protectionUnitDetails' => fn(ParseNode $n) => $o->setProtectionUnitDetails($n->getObjectValue([ProtectionUnitDetails::class, 'createFromDiscriminatorValue'])), + ]); + } + + /** + * Gets the policyId property value. The policyId property + * @return string|null + */ + public function getPolicyId(): ?string { + $val = $this->getBackingStore()->get('policyId'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'policyId'"); + } + + /** + * Gets the policyName property value. The policyName property + * @return string|null + */ + public function getPolicyName(): ?string { + $val = $this->getBackingStore()->get('policyName'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'policyName'"); + } + + /** + * Gets the protectionUnitDetails property value. The protectionUnitDetails property + * @return ProtectionUnitDetails|null + */ + public function getProtectionUnitDetails(): ?ProtectionUnitDetails { + $val = $this->getBackingStore()->get('protectionUnitDetails'); + if (is_null($val) || $val instanceof ProtectionUnitDetails) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'protectionUnitDetails'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + parent::serialize($writer); + $writer->writeStringValue('policyId', $this->getPolicyId()); + $writer->writeStringValue('policyName', $this->getPolicyName()); + $writer->writeObjectValue('protectionUnitDetails', $this->getProtectionUnitDetails()); + } + + /** + * Sets the policyId property value. The policyId property + * @param string|null $value Value to set for the policyId property. + */ + public function setPolicyId(?string $value): void { + $this->getBackingStore()->set('policyId', $value); + } + + /** + * Sets the policyName property value. The policyName property + * @param string|null $value Value to set for the policyName property. + */ + public function setPolicyName(?string $value): void { + $this->getBackingStore()->set('policyName', $value); + } + + /** + * Sets the protectionUnitDetails property value. The protectionUnitDetails property + * @param ProtectionUnitDetails|null $value Value to set for the protectionUnitDetails property. + */ + public function setProtectionUnitDetails(?ProtectionUnitDetails $value): void { + $this->getBackingStore()->set('protectionUnitDetails', $value); + } + +} diff --git a/src/Generated/Models/EmailDetails.php b/src/Generated/Models/EmailDetails.php new file mode 100644 index 00000000000..0c0a8fdf0bf --- /dev/null +++ b/src/Generated/Models/EmailDetails.php @@ -0,0 +1,180 @@ +backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); + $this->setAdditionalData([]); + } + + /** + * Creates a new instance of the appropriate class based on discriminator value + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object + * @return EmailDetails + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): EmailDetails { + return new EmailDetails(); + } + + /** + * 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 array|null + */ + public function getAdditionalData(): ?array { + $val = $this->getBackingStore()->get('additionalData'); + if (is_null($val) || is_array($val)) { + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); + } + + /** + * Gets the BackingStore property value. Stores model information. + * @return BackingStore + */ + public function getBackingStore(): BackingStore { + return $this->backingStore; + } + + /** + * Gets the body property value. The body property + * @return string|null + */ + public function getBody(): ?string { + $val = $this->getBackingStore()->get('body'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'body'"); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'body' => fn(ParseNode $n) => $o->setBody($n->getStringValue()), + '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()), + 'senderEmailAddress' => fn(ParseNode $n) => $o->setSenderEmailAddress($n->getStringValue()), + 'subject' => fn(ParseNode $n) => $o->setSubject($n->getStringValue()), + ]; + } + + /** + * Gets the @odata.type property value. The OdataType property + * @return string|null + */ + public function getOdataType(): ?string { + $val = $this->getBackingStore()->get('odataType'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'odataType'"); + } + + /** + * Gets the senderEmailAddress property value. The senderEmailAddress property + * @return string|null + */ + public function getSenderEmailAddress(): ?string { + $val = $this->getBackingStore()->get('senderEmailAddress'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'senderEmailAddress'"); + } + + /** + * Gets the subject property value. The subject property + * @return string|null + */ + public function getSubject(): ?string { + $val = $this->getBackingStore()->get('subject'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'subject'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeStringValue('body', $this->getBody()); + $writer->writeStringValue('@odata.type', $this->getOdataType()); + $writer->writeStringValue('senderEmailAddress', $this->getSenderEmailAddress()); + $writer->writeStringValue('subject', $this->getSubject()); + $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 array $value Value to set for the AdditionalData property. + */ + public function setAdditionalData(?array $value): void { + $this->getBackingStore()->set('additionalData', $value); + } + + /** + * Sets the BackingStore property value. Stores model information. + * @param BackingStore $value Value to set for the BackingStore property. + */ + public function setBackingStore(BackingStore $value): void { + $this->backingStore = $value; + } + + /** + * Sets the body property value. The body property + * @param string|null $value Value to set for the body property. + */ + public function setBody(?string $value): void { + $this->getBackingStore()->set('body', $value); + } + + /** + * Sets the @odata.type property value. The OdataType property + * @param string|null $value Value to set for the @odata.type property. + */ + public function setOdataType(?string $value): void { + $this->getBackingStore()->set('odataType', $value); + } + + /** + * Sets the senderEmailAddress property value. The senderEmailAddress property + * @param string|null $value Value to set for the senderEmailAddress property. + */ + public function setSenderEmailAddress(?string $value): void { + $this->getBackingStore()->set('senderEmailAddress', $value); + } + + /** + * Sets the subject property value. The subject property + * @param string|null $value Value to set for the subject property. + */ + public function setSubject(?string $value): void { + $this->getBackingStore()->set('subject', $value); + } + +} diff --git a/src/Generated/Models/EmployeeExperienceUser.php b/src/Generated/Models/EmployeeExperienceUser.php index 75887b59511..5395ff157e4 100644 --- a/src/Generated/Models/EmployeeExperienceUser.php +++ b/src/Generated/Models/EmployeeExperienceUser.php @@ -51,6 +51,7 @@ public function getFieldDeserializers(): array { return array_merge(parent::getFieldDeserializers(), [ 'assignedRoles' => fn(ParseNode $n) => $o->setAssignedRoles($n->getCollectionOfObjectValues([EngagementRole::class, 'createFromDiscriminatorValue'])), 'learningCourseActivities' => fn(ParseNode $n) => $o->setLearningCourseActivities($n->getCollectionOfObjectValues([LearningCourseActivity::class, 'createFromDiscriminatorValue'])), + 'storyline' => fn(ParseNode $n) => $o->setStoryline($n->getObjectValue([Storyline::class, 'createFromDiscriminatorValue'])), ]); } @@ -68,6 +69,18 @@ public function getLearningCourseActivities(): ?array { throw new \UnexpectedValueException("Invalid type found in backing store for 'learningCourseActivities'"); } + /** + * Gets the storyline property value. The storyline property + * @return Storyline|null + */ + public function getStoryline(): ?Storyline { + $val = $this->getBackingStore()->get('storyline'); + if (is_null($val) || $val instanceof Storyline) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'storyline'"); + } + /** * Serializes information the current object * @param SerializationWriter $writer Serialization writer to use to serialize this model @@ -76,6 +89,7 @@ public function serialize(SerializationWriter $writer): void { parent::serialize($writer); $writer->writeCollectionOfObjectValues('assignedRoles', $this->getAssignedRoles()); $writer->writeCollectionOfObjectValues('learningCourseActivities', $this->getLearningCourseActivities()); + $writer->writeObjectValue('storyline', $this->getStoryline()); } /** @@ -94,4 +108,12 @@ public function setLearningCourseActivities(?array $value): void { $this->getBackingStore()->set('learningCourseActivities', $value); } + /** + * Sets the storyline property value. The storyline property + * @param Storyline|null $value Value to set for the storyline property. + */ + public function setStoryline(?Storyline $value): void { + $this->getBackingStore()->set('storyline', $value); + } + } diff --git a/src/Generated/Models/Entity.php b/src/Generated/Models/Entity.php index 14f8ff483cc..737bc09b5f4 100644 --- a/src/Generated/Models/Entity.php +++ b/src/Generated/Models/Entity.php @@ -120,6 +120,9 @@ use Microsoft\Graph\Beta\Generated\Models\ManagedTenants\WindowsProtectionState; use Microsoft\Graph\Beta\Generated\Models\Networkaccess\BaseEntity; use Microsoft\Graph\Beta\Generated\Models\Networkaccess\BranchSite; +use Microsoft\Graph\Beta\Generated\Models\Networkaccess\CloudFirewallPolicy; +use Microsoft\Graph\Beta\Generated\Models\Networkaccess\CloudFirewallPolicyLink; +use Microsoft\Graph\Beta\Generated\Models\Networkaccess\CloudFirewallRule; use Microsoft\Graph\Beta\Generated\Models\Networkaccess\ConditionalAccessPolicy; use Microsoft\Graph\Beta\Generated\Models\Networkaccess\ConditionalAccessSettings; use Microsoft\Graph\Beta\Generated\Models\Networkaccess\Connection; @@ -209,6 +212,12 @@ use Microsoft\Graph\Beta\Generated\Models\Security\DiscoveredCloudAppDetail; use Microsoft\Graph\Beta\Generated\Models\Security\DiscoveredCloudAppInfo; use Microsoft\Graph\Beta\Generated\Models\Security\DispositionReviewStage; +use Microsoft\Graph\Beta\Generated\Models\Security\Dlp\BaseAuditRecord; +use Microsoft\Graph\Beta\Generated\Models\Security\Dlp\ComplianceBaseAuditRecord; +use Microsoft\Graph\Beta\Generated\Models\Security\Dlp\ComplianceDLPBaseAuditRecord; +use Microsoft\Graph\Beta\Generated\Models\Security\Dlp\ComplianceDlpEndpointAuditRecord; +use Microsoft\Graph\Beta\Generated\Models\Security\Dlp\ComplianceDlpExchangeAuditRecord; +use Microsoft\Graph\Beta\Generated\Models\Security\Dlp\ComplianceDlpSharePointAuditRecord; use Microsoft\Graph\Beta\Generated\Models\Security\EdiscoveryAddToReviewSetOperation; use Microsoft\Graph\Beta\Generated\Models\Security\EdiscoveryCase; use Microsoft\Graph\Beta\Generated\Models\Security\EdiscoveryCaseMember; @@ -404,6 +413,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.activitiesContainer': return new ActivitiesContainer(); case '#microsoft.graph.activityBasedTimeoutPolicy': return new ActivityBasedTimeoutPolicy(); case '#microsoft.graph.activityHistoryItem': return new ActivityHistoryItem(); + case '#microsoft.graph.activityLogBase': return new ActivityLogBase(); case '#microsoft.graph.activityStatistics': return new ActivityStatistics(); case '#microsoft.graph.addLargeGalleryViewOperation': return new AddLargeGalleryViewOperation(); case '#microsoft.graph.adhocCall': return new AdhocCall(); @@ -631,6 +641,8 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.b2cAuthenticationMethodsPolicy': return new B2cAuthenticationMethodsPolicy(); case '#microsoft.graph.b2cIdentityUserFlow': return new B2cIdentityUserFlow(); case '#microsoft.graph.b2xIdentityUserFlow': return new B2xIdentityUserFlow(); + case '#microsoft.graph.backupPolicyActivityLog': return new BackupPolicyActivityLog(); + case '#microsoft.graph.backupReport': return new BackupReport(); case '#microsoft.graph.backupRestoreRoot': return new BackupRestoreRoot(); case '#microsoft.graph.baseItem': return new BaseItem(); case '#microsoft.graph.baseItemVersion': return new BaseItemVersion(); @@ -814,6 +826,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.customCalloutExtension': return new CustomCalloutExtension(); case '#microsoft.graph.customClaimsPolicy': return new CustomClaimsPolicy(); case '#microsoft.graph.customDataProvidedResource': return new CustomDataProvidedResource(); + case '#microsoft.graph.customDataProvidedResourceFile': return new CustomDataProvidedResourceFile(); case '#microsoft.graph.customDataProvidedResourceUploadSession': return new CustomDataProvidedResourceUploadSession(); case '#microsoft.graph.customExtensionHandler': return new CustomExtensionHandler(); case '#microsoft.graph.customExtensionStageSetting': return new CustomExtensionStageSetting(); @@ -1008,6 +1021,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.driveProtectionUnitsBulkAdditionJob': return new DriveProtectionUnitsBulkAdditionJob(); case '#microsoft.graph.driveRestoreArtifact': return new DriveRestoreArtifact(); case '#microsoft.graph.driveRestoreArtifactsBulkAdditionRequest': return new DriveRestoreArtifactsBulkAdditionRequest(); + case '#microsoft.graph.dynamicRuleActivityLog': return new DynamicRuleActivityLog(); case '#microsoft.graph.easEmailProfileConfigurationBase': return new EasEmailProfileConfigurationBase(); case '#microsoft.graph.eBookInstallSummary': return new EBookInstallSummary(); case '#microsoft.graph.edge': return new Edge(); @@ -1579,6 +1593,9 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.networkaccess.alert': return new \Microsoft\Graph\Beta\Generated\Models\Networkaccess\Alert(); case '#microsoft.graph.networkaccess.baseEntity': return new BaseEntity(); case '#microsoft.graph.networkaccess.branchSite': return new BranchSite(); + case '#microsoft.graph.networkaccess.cloudFirewallPolicy': return new CloudFirewallPolicy(); + case '#microsoft.graph.networkaccess.cloudFirewallPolicyLink': return new CloudFirewallPolicyLink(); + case '#microsoft.graph.networkaccess.cloudFirewallRule': return new CloudFirewallRule(); case '#microsoft.graph.networkaccess.conditionalAccessPolicy': return new ConditionalAccessPolicy(); case '#microsoft.graph.networkaccess.conditionalAccessSettings': return new ConditionalAccessSettings(); case '#microsoft.graph.networkaccess.connection': return new Connection(); @@ -1629,6 +1646,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.notification': return new Notification(); case '#microsoft.graph.notificationMessageTemplate': return new NotificationMessageTemplate(); case '#microsoft.graph.oAuth2PermissionGrant': return new OAuth2PermissionGrant(); + case '#microsoft.graph.offboardingActivityLog': return new OffboardingActivityLog(); case '#microsoft.graph.offerShiftRequest': return new OfferShiftRequest(); case '#microsoft.graph.office365ActiveUserCounts': return new Office365ActiveUserCounts(); case '#microsoft.graph.office365ActiveUserDetail': return new Office365ActiveUserDetail(); @@ -1707,6 +1725,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.overprovisionedGcpServiceAccountFinding': return new OverprovisionedGcpServiceAccountFinding(); case '#microsoft.graph.overprovisionedServerlessFunctionFinding': return new OverprovisionedServerlessFunctionFinding(); case '#microsoft.graph.overprovisionedUserFinding': return new OverprovisionedUserFinding(); + case '#microsoft.graph.ownerlessGroupPolicy': return new OwnerlessGroupPolicy(); case '#microsoft.graph.pageTemplate': return new PageTemplate(); case '#microsoft.graph.participant': return new Participant(); case '#microsoft.graph.participantJoiningNotification': return new ParticipantJoiningNotification(); @@ -1784,6 +1803,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.plannerRoster': return new PlannerRoster(); case '#microsoft.graph.plannerRosterMember': return new PlannerRosterMember(); case '#microsoft.graph.plannerTask': return new PlannerTask(); + case '#microsoft.graph.plannerTaskChatMessage': return new PlannerTaskChatMessage(); case '#microsoft.graph.plannerTaskConfiguration': return new PlannerTaskConfiguration(); case '#microsoft.graph.plannerTaskDetails': return new PlannerTaskDetails(); case '#microsoft.graph.plannerUser': return new PlannerUser(); @@ -1901,6 +1921,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.restoreArtifactsBulkRequestBase': return new RestoreArtifactsBulkRequestBase(); case '#microsoft.graph.restorePoint': return new RestorePoint(); case '#microsoft.graph.restoreSessionBase': return new RestoreSessionBase(); + case '#microsoft.graph.restoreTaskActivityLog': return new RestoreTaskActivityLog(); case '#microsoft.graph.restrictedAppsViolation': return new RestrictedAppsViolation(); case '#microsoft.graph.richLongRunningOperation': return new RichLongRunningOperation(); case '#microsoft.graph.riskDetection': return new RiskDetection(); @@ -1975,6 +1996,12 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.security.discoveredCloudAppDetail': return new DiscoveredCloudAppDetail(); case '#microsoft.graph.security.discoveredCloudAppInfo': return new DiscoveredCloudAppInfo(); case '#microsoft.graph.security.dispositionReviewStage': return new DispositionReviewStage(); + case '#microsoft.graph.security.dlp.baseAuditRecord': return new BaseAuditRecord(); + case '#microsoft.graph.security.dlp.complianceBaseAuditRecord': return new ComplianceBaseAuditRecord(); + case '#microsoft.graph.security.dlp.complianceDLPBaseAuditRecord': return new ComplianceDLPBaseAuditRecord(); + case '#microsoft.graph.security.dlp.complianceDlpEndpointAuditRecord': return new ComplianceDlpEndpointAuditRecord(); + case '#microsoft.graph.security.dlp.complianceDlpExchangeAuditRecord': return new ComplianceDlpExchangeAuditRecord(); + case '#microsoft.graph.security.dlp.complianceDlpSharePointAuditRecord': return new ComplianceDlpSharePointAuditRecord(); case '#microsoft.graph.security.ediscoveryAddToReviewSetOperation': return new EdiscoveryAddToReviewSetOperation(); case '#microsoft.graph.security.ediscoveryCase': return new EdiscoveryCase(); case '#microsoft.graph.security.ediscoveryCaseMember': return new EdiscoveryCaseMember(); @@ -2174,6 +2201,9 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.stopTranscriptionOperation': return new StopTranscriptionOperation(); case '#microsoft.graph.storageQuotaBreakdown': return new StorageQuotaBreakdown(); case '#microsoft.graph.storageSettings': return new StorageSettings(); + case '#microsoft.graph.storyline': return new Storyline(); + case '#microsoft.graph.storylineFollower': return new StorylineFollower(); + case '#microsoft.graph.storylineFollowing': return new StorylineFollowing(); case '#microsoft.graph.strongAuthenticationDetail': return new StrongAuthenticationDetail(); case '#microsoft.graph.strongAuthenticationPhoneAppDetail': return new StrongAuthenticationPhoneAppDetail(); case '#microsoft.graph.stsPolicy': return new StsPolicy(); @@ -2195,6 +2225,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.synchronizationSchema': return new SynchronizationSchema(); case '#microsoft.graph.synchronizationTemplate': return new SynchronizationTemplate(); case '#microsoft.graph.targetDeviceGroup': return new TargetDeviceGroup(); + case '#microsoft.graph.targetedChatMessage': return new TargetedChatMessage(); case '#microsoft.graph.targetedManagedAppConfiguration': return new TargetedManagedAppConfiguration(); case '#microsoft.graph.targetedManagedAppConfigurationPolicySetItem': return new TargetedManagedAppConfigurationPolicySetItem(); case '#microsoft.graph.targetedManagedAppPolicyAssignment': return new TargetedManagedAppPolicyAssignment(); @@ -2471,6 +2502,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.windowsAutopilotDeploymentProfilePolicySetItem': return new WindowsAutopilotDeploymentProfilePolicySetItem(); case '#microsoft.graph.windowsAutopilotDeviceIdentity': return new WindowsAutopilotDeviceIdentity(); case '#microsoft.graph.windowsAutopilotSettings': return new WindowsAutopilotSettings(); + case '#microsoft.graph.windowsAutoUpdateCatalogApp': return new WindowsAutoUpdateCatalogApp(); case '#microsoft.graph.windowsCertificateProfileBase': return new WindowsCertificateProfileBase(); case '#microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration': return new WindowsDefenderAdvancedThreatProtectionConfiguration(); case '#microsoft.graph.windowsDefenderApplicationControlSupplementalPolicy': return new WindowsDefenderApplicationControlSupplementalPolicy(); diff --git a/src/Generated/Models/EscapedList.php b/src/Generated/Models/EscapedList.php index 5f7697365c2..2b72af72af4 100644 --- a/src/Generated/Models/EscapedList.php +++ b/src/Generated/Models/EscapedList.php @@ -117,6 +117,7 @@ public function getFieldDeserializers(): array { 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()), 'drive' => fn(ParseNode $n) => $o->setDrive($n->getObjectValue([Drive::class, 'createFromDiscriminatorValue'])), 'list' => fn(ParseNode $n) => $o->setEscapedList($n->getObjectValue([ListInfo::class, 'createFromDiscriminatorValue'])), + 'itemCount' => fn(ParseNode $n) => $o->setItemCount($n->getIntegerValue()), 'items' => fn(ParseNode $n) => $o->setItems($n->getCollectionOfObjectValues([ListItem::class, 'createFromDiscriminatorValue'])), 'operations' => fn(ParseNode $n) => $o->setOperations($n->getCollectionOfObjectValues([RichLongRunningOperation::class, 'createFromDiscriminatorValue'])), 'permissions' => fn(ParseNode $n) => $o->setPermissions($n->getCollectionOfObjectValues([Permission::class, 'createFromDiscriminatorValue'])), @@ -126,6 +127,18 @@ public function getFieldDeserializers(): array { ]); } + /** + * Gets the itemCount property value. The itemCount property + * @return int|null + */ + public function getItemCount(): ?int { + $val = $this->getBackingStore()->get('itemCount'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'itemCount'"); + } + /** * Gets the items property value. All items contained in the list. * @return array|null @@ -218,6 +231,7 @@ public function serialize(SerializationWriter $writer): void { $writer->writeStringValue('displayName', $this->getDisplayName()); $writer->writeObjectValue('drive', $this->getDrive()); $writer->writeObjectValue('list', $this->getEscapedList()); + $writer->writeIntegerValue('itemCount', $this->getItemCount()); $writer->writeCollectionOfObjectValues('items', $this->getItems()); $writer->writeCollectionOfObjectValues('operations', $this->getOperations()); $writer->writeCollectionOfObjectValues('permissions', $this->getPermissions()); @@ -274,6 +288,14 @@ public function setEscapedList(?ListInfo $value): void { $this->getBackingStore()->set('escapedList', $value); } + /** + * Sets the itemCount property value. The itemCount property + * @param int|null $value Value to set for the itemCount property. + */ + public function setItemCount(?int $value): void { + $this->getBackingStore()->set('itemCount', $value); + } + /** * Sets the items property value. All items contained in the list. * @param array|null $value Value to set for the items property. diff --git a/src/Generated/Models/ExclusionGroupAssignmentTarget.php b/src/Generated/Models/ExclusionGroupAssignmentTarget.php index be578026aa1..a1e2112b86c 100644 --- a/src/Generated/Models/ExclusionGroupAssignmentTarget.php +++ b/src/Generated/Models/ExclusionGroupAssignmentTarget.php @@ -7,7 +7,7 @@ use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter; /** - * The AAD Group we are deploying firmware updates to + * Represents a group that should be excluded from an assignment. */ class ExclusionGroupAssignmentTarget extends GroupAssignmentTarget implements Parsable { diff --git a/src/Generated/Models/ExternalAuthenticationMethod.php b/src/Generated/Models/ExternalAuthenticationMethod.php index a5f67daa04b..fe5b3b596b6 100644 --- a/src/Generated/Models/ExternalAuthenticationMethod.php +++ b/src/Generated/Models/ExternalAuthenticationMethod.php @@ -38,7 +38,7 @@ public function getConfigurationId(): ?string { } /** - * Gets the displayName property value. Custom name given to the registered external authentication method. + * Gets the displayName property value. Custom name given to the registered external MFA. * @return string|null */ public function getDisplayName(): ?string { @@ -80,7 +80,7 @@ public function setConfigurationId(?string $value): void { } /** - * Sets the displayName property value. Custom name given to the registered external authentication method. + * Sets the displayName property value. Custom name given to the registered external MFA. * @param string|null $value Value to set for the displayName property. */ public function setDisplayName(?string $value): void { diff --git a/src/Generated/Models/ExternalAuthenticationMethodConfiguration.php b/src/Generated/Models/ExternalAuthenticationMethodConfiguration.php index c9f208d00c0..c61386c9d65 100644 --- a/src/Generated/Models/ExternalAuthenticationMethodConfiguration.php +++ b/src/Generated/Models/ExternalAuthenticationMethodConfiguration.php @@ -39,7 +39,7 @@ public function getAppId(): ?string { } /** - * Gets the displayName property value. Display name for the external authentication method. This name is shown to users during sign-in. + * Gets the displayName property value. Display name for the external MFA. This name is shown to users during sign-in. * @return string|null */ public function getDisplayName(): ?string { @@ -111,7 +111,7 @@ public function setAppId(?string $value): void { } /** - * Sets the displayName property value. Display name for the external authentication method. This name is shown to users during sign-in. + * Sets the displayName property value. Display name for the external MFA. This name is shown to users during sign-in. * @param string|null $value Value to set for the displayName property. */ public function setDisplayName(?string $value): void { diff --git a/src/Generated/Models/ExternalConnectors/Property.php b/src/Generated/Models/ExternalConnectors/Property.php index f5e69eec0ef..d43191cbe5b 100644 --- a/src/Generated/Models/ExternalConnectors/Property.php +++ b/src/Generated/Models/ExternalConnectors/Property.php @@ -172,7 +172,7 @@ public function getIsSearchable(): ?bool { } /** - * Gets the labels property value. Specifies one or more well-known tags added against a property. Labels help Microsoft Search understand the semantics of the data in the connection. Adding appropriate labels would result in an enhanced search experience (for example, better relevance). Optional.The possible values are: title, url, createdBy, lastModifiedBy, authors, createdDateTime, lastModifiedDateTime, fileName, fileExtension, unknownFutureValue, containerName, containerUrl, iconUrl. Use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: containerName, containerUrl, iconUrl, personEmails, personAddresses, personAnniversaries, personName, personNote, personPhones, personCurrentPosition, personWebAccounts, personWebSite, personSkills, personProjects, personAccount, personAwards, personCertifications, personAssistants, personColleagues, personManager, personAlternateContacts, personEmergencyContacts. + * Gets the labels property value. Specifies one or more well-known tags added against a property. Labels help Microsoft Search understand the semantics of the data in the connection. Adding appropriate labels would result in an enhanced search experience (for example, better relevance). Optional.. The possible values are: title, url, createdBy, lastModifiedBy, authors, createdDateTime, lastModifiedDateTime, fileName, fileExtension, unknownFutureValue, containerName, containerUrl, iconUrl, assignedTo, dueDate, closedDate, closedBy, reportedBy, sprintName, severity, state, priority, secondaryId, itemParentId, parentUrl, tags, itemType, itemPath, numReactions. Use the Prefer: include-unknown-enum-members request header to retrieve additional values defined in this evolvable enum.For people connectors you can include : personEmails, personAddresses, personAnniversaries, personName, personNote, personPhones, personCurrentPosition, personWebAccounts, personWebSite, personSkills, personProjects, personAccount, personAwards, personCertifications, personAssistants, personColleagues, personManager, personAlternateContacts, personEmergencyContacts. * @return array