diff --git a/src/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilder.php b/src/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilder.php index 7845fcbb908..a0fac236adf 100644 --- a/src/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilder.php +++ b/src/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilder.php @@ -52,10 +52,11 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap } /** - * A container for configuration snapshot baselines. + * Get a list of configurationBaseline objects that represent configuration snapshots and their properties. * @param ConfigurationSnapshotsRequestBuilderGetRequestConfiguration|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/configurationmanagement-list-configurationsnapshots?view=graph-rest-beta Find more info here */ public function get(?ConfigurationSnapshotsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { $requestInfo = $this->toGetRequestInformation($requestConfiguration); @@ -81,7 +82,7 @@ public function post(ConfigurationBaseline $body, ?ConfigurationSnapshotsRequest } /** - * A container for configuration snapshot baselines. + * Get a list of configurationBaseline objects that represent configuration snapshots and their properties. * @param ConfigurationSnapshotsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return RequestInformation */ diff --git a/src/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilderGetQueryParameters.php b/src/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilderGetQueryParameters.php index 8108f4c8666..b829a61bace 100644 --- a/src/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilderGetQueryParameters.php +++ b/src/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilderGetQueryParameters.php @@ -5,7 +5,7 @@ use Microsoft\Kiota\Abstractions\QueryParameter; /** - * A container for configuration snapshot baselines. + * Get a list of configurationBaseline objects that represent configuration snapshots and their properties. */ class ConfigurationSnapshotsRequestBuilderGetQueryParameters { 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/DeviceImages/Item/CloudPcDeviceImageItemRequestBuilder.php b/src/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/CloudPcDeviceImageItemRequestBuilder.php index c6ed73120a5..eeeab5310ee 100644 --- a/src/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/CloudPcDeviceImageItemRequestBuilder.php +++ b/src/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/CloudPcDeviceImageItemRequestBuilder.php @@ -4,6 +4,7 @@ use Exception; use Http\Promise\Promise; +use Microsoft\Graph\Beta\Generated\DeviceManagement\VirtualEndpoint\DeviceImages\Item\RetryUpload\RetryUploadRequestBuilder; use Microsoft\Graph\Beta\Generated\DeviceManagement\VirtualEndpoint\DeviceImages\Item\Reupload\ReuploadRequestBuilder; use Microsoft\Graph\Beta\Generated\Models\CloudPcDeviceImage; use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError; @@ -17,6 +18,13 @@ */ class CloudPcDeviceImageItemRequestBuilder extends BaseRequestBuilder { + /** + * Provides operations to call the retryUpload method. + */ + public function retryUpload(): RetryUploadRequestBuilder { + return new RetryUploadRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to call the reupload method. */ diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/RetryUpload/RetryUploadRequestBuilder.php b/src/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/RetryUpload/RetryUploadRequestBuilder.php new file mode 100644 index 00000000000..acc07220c3a --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/RetryUpload/RetryUploadRequestBuilder.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/virtualEndpoint/deviceImages/{cloudPcDeviceImage%2Did}/retryUpload'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Retry the upload of a cloudPcDeviceImage object that previously failed. + * @param RetryUploadRequestBuilderPostRequestConfiguration|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/cloudpcdeviceimage-retryupload?view=graph-rest-beta Find more info here + */ + public function post(?RetryUploadRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Retry the upload of a cloudPcDeviceImage object that previously failed. + * @param RetryUploadRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?RetryUploadRequestBuilderPostRequestConfiguration $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 RetryUploadRequestBuilder + */ + public function withUrl(string $rawUrl): RetryUploadRequestBuilder { + return new RetryUploadRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/RetryUpload/RetryUploadRequestBuilderPostRequestConfiguration.php b/src/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/RetryUpload/RetryUploadRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..fa3fc953fdd --- /dev/null +++ b/src/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/RetryUpload/RetryUploadRequestBuilderPostRequestConfiguration.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/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/Directory/DeletedItems/DeletedItemsRequestBuilder.php b/src/Generated/Directory/DeletedItems/DeletedItemsRequestBuilder.php index 93f835ea6cd..34c86b41a45 100644 --- a/src/Generated/Directory/DeletedItems/DeletedItemsRequestBuilder.php +++ b/src/Generated/Directory/DeletedItems/DeletedItemsRequestBuilder.php @@ -115,7 +115,7 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap } /** - * Recently deleted items. Read-only. Nullable. + * Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- agentIdentityBlueprint- agentIdentity- agentIdentityBlueprintPrincipal- agentUser- certificateBasedAuthPki- certificateAuthorityDetail- externalUserProfile- group- pendingExternalUserProfile- servicePrincipal- user * @param DeletedItemsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return Promise * @throws Exception @@ -129,7 +129,7 @@ public function get(?DeletedItemsRequestBuilderGetRequestConfiguration $requestC } /** - * Recently deleted items. Read-only. Nullable. + * Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- agentIdentityBlueprint- agentIdentity- agentIdentityBlueprintPrincipal- agentUser- certificateBasedAuthPki- certificateAuthorityDetail- externalUserProfile- group- pendingExternalUserProfile- servicePrincipal- user * @param DeletedItemsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return RequestInformation */ diff --git a/src/Generated/Directory/DeletedItems/DeletedItemsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/DeletedItems/DeletedItemsRequestBuilderGetQueryParameters.php index 416f0384c55..87fbe7c13fc 100644 --- a/src/Generated/Directory/DeletedItems/DeletedItemsRequestBuilderGetQueryParameters.php +++ b/src/Generated/Directory/DeletedItems/DeletedItemsRequestBuilderGetQueryParameters.php @@ -5,7 +5,7 @@ use Microsoft\Kiota\Abstractions\QueryParameter; /** - * Recently deleted items. Read-only. Nullable. + * Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- agentIdentityBlueprint- agentIdentity- agentIdentityBlueprintPrincipal- agentUser- certificateBasedAuthPki- certificateAuthorityDetail- externalUserProfile- group- pendingExternalUserProfile- servicePrincipal- user */ class DeletedItemsRequestBuilderGetQueryParameters { diff --git a/src/Generated/Directory/DeletedItems/Item/DirectoryObjectItemRequestBuilder.php b/src/Generated/Directory/DeletedItems/Item/DirectoryObjectItemRequestBuilder.php index c2d2232511b..082e1a83697 100644 --- a/src/Generated/Directory/DeletedItems/Item/DirectoryObjectItemRequestBuilder.php +++ b/src/Generated/Directory/DeletedItems/Item/DirectoryObjectItemRequestBuilder.php @@ -119,10 +119,11 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap } /** - * Delete navigation property deletedItems for directory + * Permanently delete a recently deleted directory object from deleted items. The following types are supported:- application- agentIdentityBlueprint- agentIdentity- agentIdentityBlueprintPrincipal- agentUser- certificateBasedAuthPki- certificateAuthorityDetail- externalUserProfile- group- pendingExternalUserProfile- servicePrincipal- user After an item is permanently deleted, it cannot be restored. Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored. * @param DirectoryObjectItemRequestBuilderDeleteRequestConfiguration|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/directory-deleteditems-delete?view=graph-rest-beta Find more info here */ public function delete(?DirectoryObjectItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); @@ -133,10 +134,11 @@ public function delete(?DirectoryObjectItemRequestBuilderDeleteRequestConfigurat } /** - * Recently deleted items. Read-only. Nullable. + * Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- agentIdentityBlueprint- agentIdentity- agentIdentityBlueprintPrincipal- agentUser- certificateBasedAuthPki- certificateAuthorityDetail- externalUserProfile- group- pendingExternalUserProfile- servicePrincipal- user * @param DirectoryObjectItemRequestBuilderGetRequestConfiguration|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/directory-deleteditems-get?view=graph-rest-beta Find more info here */ public function get(?DirectoryObjectItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { $requestInfo = $this->toGetRequestInformation($requestConfiguration); @@ -147,7 +149,7 @@ public function get(?DirectoryObjectItemRequestBuilderGetRequestConfiguration $r } /** - * Delete navigation property deletedItems for directory + * Permanently delete a recently deleted directory object from deleted items. The following types are supported:- application- agentIdentityBlueprint- agentIdentity- agentIdentityBlueprintPrincipal- agentUser- certificateBasedAuthPki- certificateAuthorityDetail- externalUserProfile- group- pendingExternalUserProfile- servicePrincipal- user After an item is permanently deleted, it cannot be restored. Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored. * @param DirectoryObjectItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return RequestInformation */ @@ -165,7 +167,7 @@ public function toDeleteRequestInformation(?DirectoryObjectItemRequestBuilderDel } /** - * Recently deleted items. Read-only. Nullable. + * Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- agentIdentityBlueprint- agentIdentity- agentIdentityBlueprintPrincipal- agentUser- certificateBasedAuthPki- certificateAuthorityDetail- externalUserProfile- group- pendingExternalUserProfile- servicePrincipal- user * @param DirectoryObjectItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @return RequestInformation */ diff --git a/src/Generated/Directory/DeletedItems/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php b/src/Generated/Directory/DeletedItems/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php index 5d3eaef3844..43fd9c48cd4 100644 --- a/src/Generated/Directory/DeletedItems/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php +++ b/src/Generated/Directory/DeletedItems/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php @@ -5,7 +5,7 @@ use Microsoft\Kiota\Abstractions\QueryParameter; /** - * Recently deleted items. Read-only. Nullable. + * Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- agentIdentityBlueprint- agentIdentity- agentIdentityBlueprintPrincipal- agentUser- certificateBasedAuthPki- certificateAuthorityDetail- externalUserProfile- group- pendingExternalUserProfile- servicePrincipal- user */ class DirectoryObjectItemRequestBuilderGetQueryParameters { diff --git a/src/Generated/Directory/DirectoryRequestBuilder.php b/src/Generated/Directory/DirectoryRequestBuilder.php index 8922c733d37..5d4eec067d6 100644 --- a/src/Generated/Directory/DirectoryRequestBuilder.php +++ b/src/Generated/Directory/DirectoryRequestBuilder.php @@ -22,11 +22,13 @@ use Microsoft\Graph\Beta\Generated\Directory\PublicKeyInfrastructure\PublicKeyInfrastructureRequestBuilder; use Microsoft\Graph\Beta\Generated\Directory\RecommendationConfiguration\RecommendationConfigurationRequestBuilder; use Microsoft\Graph\Beta\Generated\Directory\Recommendations\RecommendationsRequestBuilder; +use Microsoft\Graph\Beta\Generated\Directory\Recovery\RecoveryRequestBuilder; use Microsoft\Graph\Beta\Generated\Directory\SharedEmailDomains\SharedEmailDomainsRequestBuilder; use Microsoft\Graph\Beta\Generated\Directory\Subscriptions\SubscriptionsRequestBuilder; use Microsoft\Graph\Beta\Generated\Directory\SubscriptionsWithCommerceSubscriptionId\SubscriptionsWithCommerceSubscriptionIdRequestBuilder; use Microsoft\Graph\Beta\Generated\Directory\SubscriptionsWithOcpSubscriptionId\SubscriptionsWithOcpSubscriptionIdRequestBuilder; use Microsoft\Graph\Beta\Generated\Directory\Templates\TemplatesRequestBuilder; +use Microsoft\Graph\Beta\Generated\Directory\TenantGovernance\TenantGovernanceRequestBuilder; use Microsoft\Graph\Beta\Generated\Models\Directory; use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError; use Microsoft\Kiota\Abstractions\BaseRequestBuilder; @@ -165,6 +167,13 @@ public function recommendations(): RecommendationsRequestBuilder { return new RecommendationsRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to manage the recovery property of the microsoft.graph.directory entity. + */ + public function recovery(): RecoveryRequestBuilder { + return new RecoveryRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Provides operations to manage the sharedEmailDomains property of the microsoft.graph.directory entity. */ @@ -186,6 +195,13 @@ public function templates(): TemplatesRequestBuilder { return new TemplatesRequestBuilder($this->pathParameters, $this->requestAdapter); } + /** + * Provides operations to manage the tenantGovernance property of the microsoft.graph.directory entity. + */ + public function tenantGovernance(): TenantGovernanceRequestBuilder { + return new TenantGovernanceRequestBuilder($this->pathParameters, $this->requestAdapter); + } + /** * Instantiates a new DirectoryRequestBuilder 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/Directory/Recovery/Jobs/Count/CountRequestBuilder.php b/src/Generated/Directory/Recovery/Jobs/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..a6ad3d38a15 --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/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}/directory/recovery/jobs/$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/Directory/Recovery/Jobs/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Jobs/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..a51bbdbcafa --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Directory/Recovery/Jobs/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Jobs/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..320b1c0b353 --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/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/Directory/Recovery/Jobs/Item/MicrosoftGraphEntraRecoveryServicesCancel/MicrosoftGraphEntraRecoveryServicesCancelRequestBuilder.php b/src/Generated/Directory/Recovery/Jobs/Item/MicrosoftGraphEntraRecoveryServicesCancel/MicrosoftGraphEntraRecoveryServicesCancelRequestBuilder.php new file mode 100644 index 00000000000..5c3f0751c21 --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/Item/MicrosoftGraphEntraRecoveryServicesCancel/MicrosoftGraphEntraRecoveryServicesCancelRequestBuilder.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}/directory/recovery/jobs/{recoveryJobBase%2Did}/microsoft.graph.entraRecoveryServices.cancel'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Cancel a running recoveryJobBase object (either a preview or recovery job). The job must be in a non-terminal state (initialized, calculating, loadingData, or running). After cancellation, the job status changes to abandoned. + * @param MicrosoftGraphEntraRecoveryServicesCancelRequestBuilderPostRequestConfiguration|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/entrarecoveryservices-recoveryjobbase-cancel?view=graph-rest-beta Find more info here + */ + public function post(?MicrosoftGraphEntraRecoveryServicesCancelRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Cancel a running recoveryJobBase object (either a preview or recovery job). The job must be in a non-terminal state (initialized, calculating, loadingData, or running). After cancellation, the job status changes to abandoned. + * @param MicrosoftGraphEntraRecoveryServicesCancelRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?MicrosoftGraphEntraRecoveryServicesCancelRequestBuilderPostRequestConfiguration $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 MicrosoftGraphEntraRecoveryServicesCancelRequestBuilder + */ + public function withUrl(string $rawUrl): MicrosoftGraphEntraRecoveryServicesCancelRequestBuilder { + return new MicrosoftGraphEntraRecoveryServicesCancelRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/Recovery/Jobs/Item/MicrosoftGraphEntraRecoveryServicesCancel/MicrosoftGraphEntraRecoveryServicesCancelRequestBuilderPostRequestConfiguration.php b/src/Generated/Directory/Recovery/Jobs/Item/MicrosoftGraphEntraRecoveryServicesCancel/MicrosoftGraphEntraRecoveryServicesCancelRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..296f88c25ae --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/Item/MicrosoftGraphEntraRecoveryServicesCancel/MicrosoftGraphEntraRecoveryServicesCancelRequestBuilderPostRequestConfiguration.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/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilder.php b/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilder.php new file mode 100644 index 00000000000..1061b366ebd --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilder.php @@ -0,0 +1,152 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new RecoveryJobBaseItemRequestBuilder 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}/directory/recovery/jobs/{recoveryJobBase%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property jobs for directory + * @param RecoveryJobBaseItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?RecoveryJobBaseItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Collection of all recovery jobs (both preview and recovery) for the tenant. + * @param RecoveryJobBaseItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?RecoveryJobBaseItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RecoveryJobBase::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property jobs in directory + * @param RecoveryJobBase $body The request body + * @param RecoveryJobBaseItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(RecoveryJobBase $body, ?RecoveryJobBaseItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RecoveryJobBase::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property jobs for directory + * @param RecoveryJobBaseItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?RecoveryJobBaseItemRequestBuilderDeleteRequestConfiguration $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; + } + + /** + * Collection of all recovery jobs (both preview and recovery) for the tenant. + * @param RecoveryJobBaseItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RecoveryJobBaseItemRequestBuilderGetRequestConfiguration $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 jobs in directory + * @param RecoveryJobBase $body The request body + * @param RecoveryJobBaseItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(RecoveryJobBase $body, ?RecoveryJobBaseItemRequestBuilderPatchRequestConfiguration $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 RecoveryJobBaseItemRequestBuilder + */ + public function withUrl(string $rawUrl): RecoveryJobBaseItemRequestBuilder { + return new RecoveryJobBaseItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..a2fd142a0f8 --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderDeleteRequestConfiguration.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/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..c0c00ce82c4 --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderGetQueryParameters.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 RecoveryJobBaseItemRequestBuilderGetQueryParameters 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/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..c03991021f2 --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param RecoveryJobBaseItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?RecoveryJobBaseItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new RecoveryJobBaseItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return RecoveryJobBaseItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): RecoveryJobBaseItemRequestBuilderGetQueryParameters { + return new RecoveryJobBaseItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..72c19443f55 --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/Item/RecoveryJobBaseItemRequestBuilderPatchRequestConfiguration.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/Directory/Recovery/Jobs/JobsRequestBuilder.php b/src/Generated/Directory/Recovery/Jobs/JobsRequestBuilder.php new file mode 100644 index 00000000000..0f0ee9616e3 --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/JobsRequestBuilder.php @@ -0,0 +1,134 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the jobs property of the microsoft.graph.entraRecoveryServices.recovery entity. + * @param string $recoveryJobBaseId The unique identifier of recoveryJobBase + * @return RecoveryJobBaseItemRequestBuilder + */ + public function byRecoveryJobBaseId(string $recoveryJobBaseId): RecoveryJobBaseItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['recoveryJobBase%2Did'] = $recoveryJobBaseId; + return new RecoveryJobBaseItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new JobsRequestBuilder 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}/directory/recovery/jobs{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get a list of all recovery recoveryJobBase objects (both preview and recovery jobs) across all snapshots for the tenant. + * @param JobsRequestBuilderGetRequestConfiguration|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/entrarecoveryservices-recovery-list-jobs?view=graph-rest-beta Find more info here + */ + public function get(?JobsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RecoveryJobBaseCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to jobs for directory + * @param RecoveryJobBase $body The request body + * @param JobsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(RecoveryJobBase $body, ?JobsRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RecoveryJobBase::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get a list of all recovery recoveryJobBase objects (both preview and recovery jobs) across all snapshots for the tenant. + * @param JobsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?JobsRequestBuilderGetRequestConfiguration $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 jobs for directory + * @param RecoveryJobBase $body The request body + * @param JobsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(RecoveryJobBase $body, ?JobsRequestBuilderPostRequestConfiguration $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 JobsRequestBuilder + */ + public function withUrl(string $rawUrl): JobsRequestBuilder { + return new JobsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/Recovery/Jobs/JobsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Jobs/JobsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..6e6e95ca376 --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/JobsRequestBuilderGetQueryParameters.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 JobsRequestBuilderGetQueryParameters 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/Directory/Recovery/Jobs/JobsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Jobs/JobsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..157aa77e83e --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/JobsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param JobsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?JobsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new JobsRequestBuilderGetQueryParameters. + * @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 JobsRequestBuilderGetQueryParameters + */ + 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): JobsRequestBuilderGetQueryParameters { + return new JobsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Directory/Recovery/Jobs/JobsRequestBuilderPostRequestConfiguration.php b/src/Generated/Directory/Recovery/Jobs/JobsRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..bcc1cf6f7fa --- /dev/null +++ b/src/Generated/Directory/Recovery/Jobs/JobsRequestBuilderPostRequestConfiguration.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/Directory/Recovery/RecoveryRequestBuilder.php b/src/Generated/Directory/Recovery/RecoveryRequestBuilder.php new file mode 100644 index 00000000000..60acb63d75e --- /dev/null +++ b/src/Generated/Directory/Recovery/RecoveryRequestBuilder.php @@ -0,0 +1,160 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the snapshots property of the microsoft.graph.entraRecoveryServices.recovery entity. + */ + public function snapshots(): SnapshotsRequestBuilder { + return new SnapshotsRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new RecoveryRequestBuilder 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}/directory/recovery{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property recovery for directory + * @param RecoveryRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?RecoveryRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Represents the Entra backup and recovery service for the tenant. + * @param RecoveryRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?RecoveryRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [Recovery::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property recovery in directory + * @param Recovery $body The request body + * @param RecoveryRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(Recovery $body, ?RecoveryRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [Recovery::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property recovery for directory + * @param RecoveryRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?RecoveryRequestBuilderDeleteRequestConfiguration $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; + } + + /** + * Represents the Entra backup and recovery service for the tenant. + * @param RecoveryRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RecoveryRequestBuilderGetRequestConfiguration $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 recovery in directory + * @param Recovery $body The request body + * @param RecoveryRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(Recovery $body, ?RecoveryRequestBuilderPatchRequestConfiguration $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 RecoveryRequestBuilder + */ + public function withUrl(string $rawUrl): RecoveryRequestBuilder { + return new RecoveryRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/Recovery/RecoveryRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Directory/Recovery/RecoveryRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..88b07f4a52d --- /dev/null +++ b/src/Generated/Directory/Recovery/RecoveryRequestBuilderDeleteRequestConfiguration.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/Directory/Recovery/RecoveryRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/RecoveryRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..508badfc20d --- /dev/null +++ b/src/Generated/Directory/Recovery/RecoveryRequestBuilderGetQueryParameters.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 RecoveryRequestBuilderGetQueryParameters 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/Directory/Recovery/RecoveryRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/RecoveryRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..3ebfadacba1 --- /dev/null +++ b/src/Generated/Directory/Recovery/RecoveryRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param RecoveryRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?RecoveryRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new RecoveryRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return RecoveryRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): RecoveryRequestBuilderGetQueryParameters { + return new RecoveryRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/Recovery/RecoveryRequestBuilderPatchRequestConfiguration.php b/src/Generated/Directory/Recovery/RecoveryRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..e99a6e29d76 --- /dev/null +++ b/src/Generated/Directory/Recovery/RecoveryRequestBuilderPatchRequestConfiguration.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/Directory/Recovery/Snapshots/Count/CountRequestBuilder.php b/src/Generated/Directory/Recovery/Snapshots/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..8678c5eb3d8 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/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}/directory/recovery/snapshots/$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/Directory/Recovery/Snapshots/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Snapshots/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..98b6e2805bb --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..1c722532cba --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/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/Directory/Recovery/Snapshots/Item/RecoveryJobs/Count/CountRequestBuilder.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..ed63680e366 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/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}/directory/recovery/snapshots/{snapshot%2Did}/recoveryJobs/$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/Directory/Recovery/Snapshots/Item/RecoveryJobs/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..64251247871 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..5ce3f8da9fb --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/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/Directory/Recovery/Snapshots/Item/RecoveryJobs/Item/RecoveryJobItemRequestBuilder.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Item/RecoveryJobItemRequestBuilder.php new file mode 100644 index 00000000000..f878916f166 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Item/RecoveryJobItemRequestBuilder.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}/directory/recovery/snapshots/{snapshot%2Did}/recoveryJobs/{recoveryJob%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Collection of recovery jobs created for this snapshot. + * @param RecoveryJobItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?RecoveryJobItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RecoveryJob::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Collection of recovery jobs created for this snapshot. + * @param RecoveryJobItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RecoveryJobItemRequestBuilderGetRequestConfiguration $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 RecoveryJobItemRequestBuilder + */ + public function withUrl(string $rawUrl): RecoveryJobItemRequestBuilder { + return new RecoveryJobItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Item/RecoveryJobItemRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Item/RecoveryJobItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..5b40526bb4b --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Item/RecoveryJobItemRequestBuilderGetQueryParameters.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 RecoveryJobItemRequestBuilderGetQueryParameters 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/Directory/Recovery/Snapshots/Item/RecoveryJobs/Item/RecoveryJobItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Item/RecoveryJobItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..bad79cadc6b --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/Item/RecoveryJobItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param RecoveryJobItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?RecoveryJobItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new RecoveryJobItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return RecoveryJobItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): RecoveryJobItemRequestBuilderGetQueryParameters { + return new RecoveryJobItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/RecoveryJobsRequestBuilder.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/RecoveryJobsRequestBuilder.php new file mode 100644 index 00000000000..58d77d4a756 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/RecoveryJobsRequestBuilder.php @@ -0,0 +1,97 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the recoveryJobs property of the microsoft.graph.entraRecoveryServices.snapshot entity. + * @param string $recoveryJobId The unique identifier of recoveryJob + * @return RecoveryJobItemRequestBuilder + */ + public function byRecoveryJobId(string $recoveryJobId): RecoveryJobItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['recoveryJob%2Did'] = $recoveryJobId; + return new RecoveryJobItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new RecoveryJobsRequestBuilder 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}/directory/recovery/snapshots/{snapshot%2Did}/recoveryJobs{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Collection of recovery jobs created for this snapshot. + * @param RecoveryJobsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?RecoveryJobsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RecoveryJobCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Collection of recovery jobs created for this snapshot. + * @param RecoveryJobsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RecoveryJobsRequestBuilderGetRequestConfiguration $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 RecoveryJobsRequestBuilder + */ + public function withUrl(string $rawUrl): RecoveryJobsRequestBuilder { + return new RecoveryJobsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/RecoveryJobsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/RecoveryJobsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..8f580e5a28d --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/RecoveryJobsRequestBuilderGetQueryParameters.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 RecoveryJobsRequestBuilderGetQueryParameters 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/Directory/Recovery/Snapshots/Item/RecoveryJobs/RecoveryJobsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/RecoveryJobsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..5ae6c993904 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryJobs/RecoveryJobsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param RecoveryJobsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?RecoveryJobsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new RecoveryJobsRequestBuilderGetQueryParameters. + * @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 RecoveryJobsRequestBuilderGetQueryParameters + */ + 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): RecoveryJobsRequestBuilderGetQueryParameters { + return new RecoveryJobsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Count/CountRequestBuilder.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..aa28517eb94 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/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}/directory/recovery/snapshots/{snapshot%2Did}/recoveryPreviewJobs/$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/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..40209a647ff --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..ffe0c8101f2 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/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/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Item/RecoveryPreviewJobItemRequestBuilder.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Item/RecoveryPreviewJobItemRequestBuilder.php new file mode 100644 index 00000000000..4791e2e57e5 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Item/RecoveryPreviewJobItemRequestBuilder.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}/directory/recovery/snapshots/{snapshot%2Did}/recoveryPreviewJobs/{recoveryPreviewJob%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Collection of preview jobs created for this snapshot. + * @param RecoveryPreviewJobItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?RecoveryPreviewJobItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RecoveryPreviewJob::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Collection of preview jobs created for this snapshot. + * @param RecoveryPreviewJobItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RecoveryPreviewJobItemRequestBuilderGetRequestConfiguration $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 RecoveryPreviewJobItemRequestBuilder + */ + public function withUrl(string $rawUrl): RecoveryPreviewJobItemRequestBuilder { + return new RecoveryPreviewJobItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Item/RecoveryPreviewJobItemRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Item/RecoveryPreviewJobItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..b59424721aa --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Item/RecoveryPreviewJobItemRequestBuilderGetQueryParameters.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 RecoveryPreviewJobItemRequestBuilderGetQueryParameters 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/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Item/RecoveryPreviewJobItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Item/RecoveryPreviewJobItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..d94f21dc0af --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/Item/RecoveryPreviewJobItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param RecoveryPreviewJobItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?RecoveryPreviewJobItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new RecoveryPreviewJobItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return RecoveryPreviewJobItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): RecoveryPreviewJobItemRequestBuilderGetQueryParameters { + return new RecoveryPreviewJobItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/RecoveryPreviewJobsRequestBuilder.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/RecoveryPreviewJobsRequestBuilder.php new file mode 100644 index 00000000000..a0427e494bf --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/RecoveryPreviewJobsRequestBuilder.php @@ -0,0 +1,97 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the recoveryPreviewJobs property of the microsoft.graph.entraRecoveryServices.snapshot entity. + * @param string $recoveryPreviewJobId The unique identifier of recoveryPreviewJob + * @return RecoveryPreviewJobItemRequestBuilder + */ + public function byRecoveryPreviewJobId(string $recoveryPreviewJobId): RecoveryPreviewJobItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['recoveryPreviewJob%2Did'] = $recoveryPreviewJobId; + return new RecoveryPreviewJobItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new RecoveryPreviewJobsRequestBuilder 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}/directory/recovery/snapshots/{snapshot%2Did}/recoveryPreviewJobs{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Collection of preview jobs created for this snapshot. + * @param RecoveryPreviewJobsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?RecoveryPreviewJobsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RecoveryPreviewJobCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Collection of preview jobs created for this snapshot. + * @param RecoveryPreviewJobsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RecoveryPreviewJobsRequestBuilderGetRequestConfiguration $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 RecoveryPreviewJobsRequestBuilder + */ + public function withUrl(string $rawUrl): RecoveryPreviewJobsRequestBuilder { + return new RecoveryPreviewJobsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/RecoveryPreviewJobsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/RecoveryPreviewJobsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..c10f91c540d --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/RecoveryPreviewJobsRequestBuilderGetQueryParameters.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 RecoveryPreviewJobsRequestBuilderGetQueryParameters 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/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/RecoveryPreviewJobsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/RecoveryPreviewJobsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..8806c3d4b84 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/RecoveryPreviewJobs/RecoveryPreviewJobsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param RecoveryPreviewJobsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?RecoveryPreviewJobsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new RecoveryPreviewJobsRequestBuilderGetQueryParameters. + * @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 RecoveryPreviewJobsRequestBuilderGetQueryParameters + */ + 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): RecoveryPreviewJobsRequestBuilderGetQueryParameters { + return new RecoveryPreviewJobsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilder.php b/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilder.php new file mode 100644 index 00000000000..5e01441c8cf --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilder.php @@ -0,0 +1,160 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the recoveryPreviewJobs property of the microsoft.graph.entraRecoveryServices.snapshot entity. + */ + public function recoveryPreviewJobs(): RecoveryPreviewJobsRequestBuilder { + return new RecoveryPreviewJobsRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new SnapshotItemRequestBuilder 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}/directory/recovery/snapshots/{snapshot%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property snapshots for directory + * @param SnapshotItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?SnapshotItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Collection of backup snapshots available for the tenant. + * @param SnapshotItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?SnapshotItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [Snapshot::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property snapshots in directory + * @param Snapshot $body The request body + * @param SnapshotItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(Snapshot $body, ?SnapshotItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [Snapshot::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property snapshots for directory + * @param SnapshotItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?SnapshotItemRequestBuilderDeleteRequestConfiguration $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; + } + + /** + * Collection of backup snapshots available for the tenant. + * @param SnapshotItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?SnapshotItemRequestBuilderGetRequestConfiguration $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 snapshots in directory + * @param Snapshot $body The request body + * @param SnapshotItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(Snapshot $body, ?SnapshotItemRequestBuilderPatchRequestConfiguration $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 SnapshotItemRequestBuilder + */ + public function withUrl(string $rawUrl): SnapshotItemRequestBuilder { + return new SnapshotItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..1e74a0be729 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderDeleteRequestConfiguration.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/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..7abb4ff376d --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderGetQueryParameters.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 SnapshotItemRequestBuilderGetQueryParameters 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/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..0be64614f4b --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param SnapshotItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?SnapshotItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new SnapshotItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return SnapshotItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): SnapshotItemRequestBuilderGetQueryParameters { + return new SnapshotItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..d3aca3d2975 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/Item/SnapshotItemRequestBuilderPatchRequestConfiguration.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/Directory/Recovery/Snapshots/SnapshotsRequestBuilder.php b/src/Generated/Directory/Recovery/Snapshots/SnapshotsRequestBuilder.php new file mode 100644 index 00000000000..d62e8c411ce --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/SnapshotsRequestBuilder.php @@ -0,0 +1,134 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the snapshots property of the microsoft.graph.entraRecoveryServices.recovery entity. + * @param string $snapshotId The unique identifier of snapshot + * @return SnapshotItemRequestBuilder + */ + public function bySnapshotId(string $snapshotId): SnapshotItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['snapshot%2Did'] = $snapshotId; + return new SnapshotItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new SnapshotsRequestBuilder 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}/directory/recovery/snapshots{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get a list of available backup snapshot objects for the tenant. Snapshots represent points in time to which the tenant can be restored. + * @param SnapshotsRequestBuilderGetRequestConfiguration|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/entrarecoveryservices-recovery-list-snapshots?view=graph-rest-beta Find more info here + */ + public function get(?SnapshotsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [SnapshotCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to snapshots for directory + * @param Snapshot $body The request body + * @param SnapshotsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(Snapshot $body, ?SnapshotsRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [Snapshot::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get a list of available backup snapshot objects for the tenant. Snapshots represent points in time to which the tenant can be restored. + * @param SnapshotsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?SnapshotsRequestBuilderGetRequestConfiguration $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 snapshots for directory + * @param Snapshot $body The request body + * @param SnapshotsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(Snapshot $body, ?SnapshotsRequestBuilderPostRequestConfiguration $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 SnapshotsRequestBuilder + */ + public function withUrl(string $rawUrl): SnapshotsRequestBuilder { + return new SnapshotsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/SnapshotsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/Recovery/Snapshots/SnapshotsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..1f9bfd057fd --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/SnapshotsRequestBuilderGetQueryParameters.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 SnapshotsRequestBuilderGetQueryParameters 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/Directory/Recovery/Snapshots/SnapshotsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/SnapshotsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..187d80223c9 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/SnapshotsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param SnapshotsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?SnapshotsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new SnapshotsRequestBuilderGetQueryParameters. + * @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 SnapshotsRequestBuilderGetQueryParameters + */ + 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): SnapshotsRequestBuilderGetQueryParameters { + return new SnapshotsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Directory/Recovery/Snapshots/SnapshotsRequestBuilderPostRequestConfiguration.php b/src/Generated/Directory/Recovery/Snapshots/SnapshotsRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..ceb08405db3 --- /dev/null +++ b/src/Generated/Directory/Recovery/Snapshots/SnapshotsRequestBuilderPostRequestConfiguration.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/Directory/TenantGovernance/GovernanceInvitations/Count/CountRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..8d53ddeb7a6 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/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}/directory/tenantGovernance/governanceInvitations/$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/Directory/TenantGovernance/GovernanceInvitations/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..bca5e966e41 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..6105ac118b3 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/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/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilder.php new file mode 100644 index 00000000000..8954203d4ac --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilder.php @@ -0,0 +1,135 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the governanceInvitations property of the microsoft.graph.tenantGovernanceServices.tenantGovernance entity. + * @param string $governanceInvitationId The unique identifier of governanceInvitation + * @return GovernanceInvitationItemRequestBuilder + */ + public function byGovernanceInvitationId(string $governanceInvitationId): GovernanceInvitationItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['governanceInvitation%2Did'] = $governanceInvitationId; + return new GovernanceInvitationItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new GovernanceInvitationsRequestBuilder 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}/directory/tenantGovernance/governanceInvitations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get a list of the governanceInvitation objects and their properties. This API method returns all governance invitations where the calling tenant is either the governing tenant or the governed tenant. + * @param GovernanceInvitationsRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-list-governanceinvitations?view=graph-rest-beta Find more info here + */ + public function get(?GovernanceInvitationsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceInvitationCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create a new governanceInvitation to establish a governance relationship with a governed tenant. Invitations provide an alternative mechanism to governance requests for initiating relationships. + * @param GovernanceInvitation $body The request body + * @param GovernanceInvitationsRequestBuilderPostRequestConfiguration|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/tenantgovernanceservices-post-governanceinvitations?view=graph-rest-beta Find more info here + */ + public function post(GovernanceInvitation $body, ?GovernanceInvitationsRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceInvitation::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get a list of the governanceInvitation objects and their properties. This API method returns all governance invitations where the calling tenant is either the governing tenant or the governed tenant. + * @param GovernanceInvitationsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?GovernanceInvitationsRequestBuilderGetRequestConfiguration $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 a new governanceInvitation to establish a governance relationship with a governed tenant. Invitations provide an alternative mechanism to governance requests for initiating relationships. + * @param GovernanceInvitation $body The request body + * @param GovernanceInvitationsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(GovernanceInvitation $body, ?GovernanceInvitationsRequestBuilderPostRequestConfiguration $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 GovernanceInvitationsRequestBuilder + */ + public function withUrl(string $rawUrl): GovernanceInvitationsRequestBuilder { + return new GovernanceInvitationsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..7012a9df07e --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilderGetQueryParameters.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 GovernanceInvitationsRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..97e356eed68 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param GovernanceInvitationsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?GovernanceInvitationsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new GovernanceInvitationsRequestBuilderGetQueryParameters. + * @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 GovernanceInvitationsRequestBuilderGetQueryParameters + */ + 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): GovernanceInvitationsRequestBuilderGetQueryParameters { + return new GovernanceInvitationsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilderPostRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..d8c7aeadfe7 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/GovernanceInvitationsRequestBuilderPostRequestConfiguration.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/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilder.php new file mode 100644 index 00000000000..b476f7d2d57 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilder.php @@ -0,0 +1,146 @@ +|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}/directory/tenantGovernance/governanceInvitations/{governanceInvitation%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete a governanceInvitation object. + * @param GovernanceInvitationItemRequestBuilderDeleteRequestConfiguration|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/tenantgovernanceservices-governanceinvitation-delete?view=graph-rest-beta Find more info here + */ + public function delete(?GovernanceInvitationItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read the properties of a governanceInvitation object. + * @param GovernanceInvitationItemRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-governanceinvitation-get?view=graph-rest-beta Find more info here + */ + public function get(?GovernanceInvitationItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceInvitation::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property governanceInvitations in directory + * @param GovernanceInvitation $body The request body + * @param GovernanceInvitationItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(GovernanceInvitation $body, ?GovernanceInvitationItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceInvitation::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete a governanceInvitation object. + * @param GovernanceInvitationItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?GovernanceInvitationItemRequestBuilderDeleteRequestConfiguration $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 the properties of a governanceInvitation object. + * @param GovernanceInvitationItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?GovernanceInvitationItemRequestBuilderGetRequestConfiguration $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 governanceInvitations in directory + * @param GovernanceInvitation $body The request body + * @param GovernanceInvitationItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(GovernanceInvitation $body, ?GovernanceInvitationItemRequestBuilderPatchRequestConfiguration $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 GovernanceInvitationItemRequestBuilder + */ + public function withUrl(string $rawUrl): GovernanceInvitationItemRequestBuilder { + return new GovernanceInvitationItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..5c662290797 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderDeleteRequestConfiguration.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/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..c2ccb9ad894 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderGetQueryParameters.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 GovernanceInvitationItemRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..894ebd03116 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param GovernanceInvitationItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?GovernanceInvitationItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new GovernanceInvitationItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return GovernanceInvitationItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): GovernanceInvitationItemRequestBuilderGetQueryParameters { + return new GovernanceInvitationItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..e1a439d1aa4 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceInvitations/Item/GovernanceInvitationItemRequestBuilderPatchRequestConfiguration.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/Directory/TenantGovernance/GovernancePolicyTemplates/Count/CountRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..9b0373daa83 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/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}/directory/tenantGovernance/governancePolicyTemplates/$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/Directory/TenantGovernance/GovernancePolicyTemplates/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..5944105f277 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..3040fb3d95a --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/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/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilder.php new file mode 100644 index 00000000000..3ce24e67f2b --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilder.php @@ -0,0 +1,135 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the governancePolicyTemplates property of the microsoft.graph.tenantGovernanceServices.tenantGovernance entity. + * @param string $governancePolicyTemplateId The unique identifier of governancePolicyTemplate + * @return GovernancePolicyTemplateItemRequestBuilder + */ + public function byGovernancePolicyTemplateId(string $governancePolicyTemplateId): GovernancePolicyTemplateItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['governancePolicyTemplate%2Did'] = $governancePolicyTemplateId; + return new GovernancePolicyTemplateItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new GovernancePolicyTemplatesRequestBuilder 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}/directory/tenantGovernance/governancePolicyTemplates{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get a list of the governancePolicyTemplate objects and their properties. Policy templates define the configuration that is applied when establishing governance relationships. + * @param GovernancePolicyTemplatesRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-list-governancepolicytemplates?view=graph-rest-beta Find more info here + */ + public function get(?GovernancePolicyTemplatesRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernancePolicyTemplateCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create a new governancePolicyTemplate that defines the configuration for establishing governance relationships, including role assignments and applications to provision. + * @param GovernancePolicyTemplate $body The request body + * @param GovernancePolicyTemplatesRequestBuilderPostRequestConfiguration|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/tenantgovernanceservices-post-governancepolicytemplates?view=graph-rest-beta Find more info here + */ + public function post(GovernancePolicyTemplate $body, ?GovernancePolicyTemplatesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernancePolicyTemplate::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get a list of the governancePolicyTemplate objects and their properties. Policy templates define the configuration that is applied when establishing governance relationships. + * @param GovernancePolicyTemplatesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?GovernancePolicyTemplatesRequestBuilderGetRequestConfiguration $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 a new governancePolicyTemplate that defines the configuration for establishing governance relationships, including role assignments and applications to provision. + * @param GovernancePolicyTemplate $body The request body + * @param GovernancePolicyTemplatesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(GovernancePolicyTemplate $body, ?GovernancePolicyTemplatesRequestBuilderPostRequestConfiguration $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 GovernancePolicyTemplatesRequestBuilder + */ + public function withUrl(string $rawUrl): GovernancePolicyTemplatesRequestBuilder { + return new GovernancePolicyTemplatesRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..73e00c78591 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilderGetQueryParameters.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 GovernancePolicyTemplatesRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..fbafdded146 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param GovernancePolicyTemplatesRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?GovernancePolicyTemplatesRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new GovernancePolicyTemplatesRequestBuilderGetQueryParameters. + * @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 GovernancePolicyTemplatesRequestBuilderGetQueryParameters + */ + 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): GovernancePolicyTemplatesRequestBuilderGetQueryParameters { + return new GovernancePolicyTemplatesRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilderPostRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..8df032bac94 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/GovernancePolicyTemplatesRequestBuilderPostRequestConfiguration.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/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilder.php new file mode 100644 index 00000000000..489bd666d6c --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilder.php @@ -0,0 +1,147 @@ +|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}/directory/tenantGovernance/governancePolicyTemplates/{governancePolicyTemplate%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete a governancePolicyTemplate object. You can't delete the default template or templates currently used by active relationships. + * @param GovernancePolicyTemplateItemRequestBuilderDeleteRequestConfiguration|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/tenantgovernanceservices-delete-governancepolicytemplates?view=graph-rest-beta Find more info here + */ + public function delete(?GovernancePolicyTemplateItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read the properties of a governancePolicyTemplate object. + * @param GovernancePolicyTemplateItemRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-governancepolicytemplate-get?view=graph-rest-beta Find more info here + */ + public function get(?GovernancePolicyTemplateItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernancePolicyTemplate::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the properties of a governancePolicyTemplate object. + * @param GovernancePolicyTemplate $body The request body + * @param GovernancePolicyTemplateItemRequestBuilderPatchRequestConfiguration|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/tenantgovernanceservices-governancepolicytemplate-update?view=graph-rest-beta Find more info here + */ + public function patch(GovernancePolicyTemplate $body, ?GovernancePolicyTemplateItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernancePolicyTemplate::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete a governancePolicyTemplate object. You can't delete the default template or templates currently used by active relationships. + * @param GovernancePolicyTemplateItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?GovernancePolicyTemplateItemRequestBuilderDeleteRequestConfiguration $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 the properties of a governancePolicyTemplate object. + * @param GovernancePolicyTemplateItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?GovernancePolicyTemplateItemRequestBuilderGetRequestConfiguration $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 properties of a governancePolicyTemplate object. + * @param GovernancePolicyTemplate $body The request body + * @param GovernancePolicyTemplateItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(GovernancePolicyTemplate $body, ?GovernancePolicyTemplateItemRequestBuilderPatchRequestConfiguration $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 GovernancePolicyTemplateItemRequestBuilder + */ + public function withUrl(string $rawUrl): GovernancePolicyTemplateItemRequestBuilder { + return new GovernancePolicyTemplateItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..c02460d85da --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderDeleteRequestConfiguration.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/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..b15a5051829 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderGetQueryParameters.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 GovernancePolicyTemplateItemRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..3e5bcd79343 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param GovernancePolicyTemplateItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?GovernancePolicyTemplateItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new GovernancePolicyTemplateItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return GovernancePolicyTemplateItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): GovernancePolicyTemplateItemRequestBuilderGetQueryParameters { + return new GovernancePolicyTemplateItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..e8d28638b16 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernancePolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilderPatchRequestConfiguration.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/Directory/TenantGovernance/GovernanceRelationships/Count/CountRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..1362e1d9f3e --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/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}/directory/tenantGovernance/governanceRelationships/$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/Directory/TenantGovernance/GovernanceRelationships/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..0930b0a72ae --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..a22c442e96c --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/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/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilder.php new file mode 100644 index 00000000000..0a76fee9783 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilder.php @@ -0,0 +1,134 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the governanceRelationships property of the microsoft.graph.tenantGovernanceServices.tenantGovernance entity. + * @param string $governanceRelationshipId The unique identifier of governanceRelationship + * @return GovernanceRelationshipItemRequestBuilder + */ + public function byGovernanceRelationshipId(string $governanceRelationshipId): GovernanceRelationshipItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['governanceRelationship%2Did'] = $governanceRelationshipId; + return new GovernanceRelationshipItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new GovernanceRelationshipsRequestBuilder 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}/directory/tenantGovernance/governanceRelationships{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get a list of the governanceRelationship objects and their properties. This API method returns all governance relationships where the calling tenant is either the governing tenant or the governed tenant. + * @param GovernanceRelationshipsRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-list-governancerelationships?view=graph-rest-beta Find more info here + */ + public function get(?GovernanceRelationshipsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceRelationshipCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to governanceRelationships for directory + * @param GovernanceRelationship $body The request body + * @param GovernanceRelationshipsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(GovernanceRelationship $body, ?GovernanceRelationshipsRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceRelationship::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get a list of the governanceRelationship objects and their properties. This API method returns all governance relationships where the calling tenant is either the governing tenant or the governed tenant. + * @param GovernanceRelationshipsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?GovernanceRelationshipsRequestBuilderGetRequestConfiguration $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 governanceRelationships for directory + * @param GovernanceRelationship $body The request body + * @param GovernanceRelationshipsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(GovernanceRelationship $body, ?GovernanceRelationshipsRequestBuilderPostRequestConfiguration $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 GovernanceRelationshipsRequestBuilder + */ + public function withUrl(string $rawUrl): GovernanceRelationshipsRequestBuilder { + return new GovernanceRelationshipsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..130bf6ea8ed --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilderGetQueryParameters.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 GovernanceRelationshipsRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..eefdaf683f9 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param GovernanceRelationshipsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?GovernanceRelationshipsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new GovernanceRelationshipsRequestBuilderGetQueryParameters. + * @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 GovernanceRelationshipsRequestBuilderGetQueryParameters + */ + 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): GovernanceRelationshipsRequestBuilderGetQueryParameters { + return new GovernanceRelationshipsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilderPostRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..7ed54a208c9 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/GovernanceRelationshipsRequestBuilderPostRequestConfiguration.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/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilder.php new file mode 100644 index 00000000000..0488bfd6b77 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilder.php @@ -0,0 +1,146 @@ +|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}/directory/tenantGovernance/governanceRelationships/{governanceRelationship%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property governanceRelationships for directory + * @param GovernanceRelationshipItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?GovernanceRelationshipItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read the properties of a governanceRelationship object. + * @param GovernanceRelationshipItemRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-governancerelationship-get?view=graph-rest-beta Find more info here + */ + public function get(?GovernanceRelationshipItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceRelationship::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the status property of a governanceRelationship to initiate the termination process. There are two models for termination:1) Initiated by the governing tenant: After the governing tenant updates the status to terminationRequestedByGoverningTenant, the governed tenant may subsequently update the status to terminated.1) Directly terminated by the governed tenant: The governed tenant updates the status to terminated to immediately terminate the relationship. When the governed tenant updates the status to terminated in either model, the resources that were provisioned in the governed tenant upon relationship creation are deleted. + * @param GovernanceRelationship $body The request body + * @param GovernanceRelationshipItemRequestBuilderPatchRequestConfiguration|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/tenantgovernanceservices-governancerelationship-update?view=graph-rest-beta Find more info here + */ + public function patch(GovernanceRelationship $body, ?GovernanceRelationshipItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceRelationship::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property governanceRelationships for directory + * @param GovernanceRelationshipItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?GovernanceRelationshipItemRequestBuilderDeleteRequestConfiguration $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 the properties of a governanceRelationship object. + * @param GovernanceRelationshipItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?GovernanceRelationshipItemRequestBuilderGetRequestConfiguration $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 status property of a governanceRelationship to initiate the termination process. There are two models for termination:1) Initiated by the governing tenant: After the governing tenant updates the status to terminationRequestedByGoverningTenant, the governed tenant may subsequently update the status to terminated.1) Directly terminated by the governed tenant: The governed tenant updates the status to terminated to immediately terminate the relationship. When the governed tenant updates the status to terminated in either model, the resources that were provisioned in the governed tenant upon relationship creation are deleted. + * @param GovernanceRelationship $body The request body + * @param GovernanceRelationshipItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(GovernanceRelationship $body, ?GovernanceRelationshipItemRequestBuilderPatchRequestConfiguration $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 GovernanceRelationshipItemRequestBuilder + */ + public function withUrl(string $rawUrl): GovernanceRelationshipItemRequestBuilder { + return new GovernanceRelationshipItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..7612d84ad04 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderDeleteRequestConfiguration.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/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..2023f0e7a57 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderGetQueryParameters.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 GovernanceRelationshipItemRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..004da3a459e --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param GovernanceRelationshipItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?GovernanceRelationshipItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new GovernanceRelationshipItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return GovernanceRelationshipItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): GovernanceRelationshipItemRequestBuilderGetQueryParameters { + return new GovernanceRelationshipItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..78d2d5b56bf --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRelationships/Item/GovernanceRelationshipItemRequestBuilderPatchRequestConfiguration.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/Directory/TenantGovernance/GovernanceRequests/Count/CountRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..82625da21a4 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/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}/directory/tenantGovernance/governanceRequests/$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/Directory/TenantGovernance/GovernanceRequests/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..b148ee4f97d --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRequests/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..6da456c729f --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/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/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilder.php new file mode 100644 index 00000000000..2a624089264 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilder.php @@ -0,0 +1,135 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the governanceRequests property of the microsoft.graph.tenantGovernanceServices.tenantGovernance entity. + * @param string $governanceRequestId The unique identifier of governanceRequest + * @return GovernanceRequestItemRequestBuilder + */ + public function byGovernanceRequestId(string $governanceRequestId): GovernanceRequestItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['governanceRequest%2Did'] = $governanceRequestId; + return new GovernanceRequestItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new GovernanceRequestsRequestBuilder 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}/directory/tenantGovernance/governanceRequests{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get a list of the governanceRequest objects and their properties. This API method returns all governance requests where the calling tenant is either the governing tenant or the governed tenant. + * @param GovernanceRequestsRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-list-governancerequests?view=graph-rest-beta Find more info here + */ + public function get(?GovernanceRequestsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceRequestCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create a new governanceRequest to establish a governance relationship with a governed tenant. The governed tenant can then accept or reject the request. + * @param GovernanceRequest $body The request body + * @param GovernanceRequestsRequestBuilderPostRequestConfiguration|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/tenantgovernanceservices-post-governancerequests?view=graph-rest-beta Find more info here + */ + public function post(GovernanceRequest $body, ?GovernanceRequestsRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceRequest::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get a list of the governanceRequest objects and their properties. This API method returns all governance requests where the calling tenant is either the governing tenant or the governed tenant. + * @param GovernanceRequestsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?GovernanceRequestsRequestBuilderGetRequestConfiguration $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 a new governanceRequest to establish a governance relationship with a governed tenant. The governed tenant can then accept or reject the request. + * @param GovernanceRequest $body The request body + * @param GovernanceRequestsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(GovernanceRequest $body, ?GovernanceRequestsRequestBuilderPostRequestConfiguration $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 GovernanceRequestsRequestBuilder + */ + public function withUrl(string $rawUrl): GovernanceRequestsRequestBuilder { + return new GovernanceRequestsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..a0f730a17a9 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilderGetQueryParameters.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 GovernanceRequestsRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..efa9f6e50f0 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param GovernanceRequestsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?GovernanceRequestsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new GovernanceRequestsRequestBuilderGetQueryParameters. + * @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 GovernanceRequestsRequestBuilderGetQueryParameters + */ + 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): GovernanceRequestsRequestBuilderGetQueryParameters { + return new GovernanceRequestsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilderPostRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..df703d067a9 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/GovernanceRequestsRequestBuilderPostRequestConfiguration.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/Directory/TenantGovernance/GovernanceRequests/Item/GovernancePolicyTemplate/GovernancePolicyTemplateRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernancePolicyTemplate/GovernancePolicyTemplateRequestBuilder.php new file mode 100644 index 00000000000..fb287d48815 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernancePolicyTemplate/GovernancePolicyTemplateRequestBuilder.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}/directory/tenantGovernance/governanceRequests/{governanceRequest%2Did}/governancePolicyTemplate{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * The governance policy template associated with this request. + * @param GovernancePolicyTemplateRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?GovernancePolicyTemplateRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernancePolicyTemplate::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * The governance policy template associated with this request. + * @param GovernancePolicyTemplateRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?GovernancePolicyTemplateRequestBuilderGetRequestConfiguration $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 GovernancePolicyTemplateRequestBuilder + */ + public function withUrl(string $rawUrl): GovernancePolicyTemplateRequestBuilder { + return new GovernancePolicyTemplateRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernancePolicyTemplate/GovernancePolicyTemplateRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernancePolicyTemplate/GovernancePolicyTemplateRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..d2d5f8de2ec --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernancePolicyTemplate/GovernancePolicyTemplateRequestBuilderGetQueryParameters.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 GovernancePolicyTemplateRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/GovernanceRequests/Item/GovernancePolicyTemplate/GovernancePolicyTemplateRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernancePolicyTemplate/GovernancePolicyTemplateRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..200b4640149 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernancePolicyTemplate/GovernancePolicyTemplateRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param GovernancePolicyTemplateRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?GovernancePolicyTemplateRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new GovernancePolicyTemplateRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return GovernancePolicyTemplateRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): GovernancePolicyTemplateRequestBuilderGetQueryParameters { + return new GovernancePolicyTemplateRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilder.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilder.php new file mode 100644 index 00000000000..2cf736d93bf --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilder.php @@ -0,0 +1,154 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new GovernanceRequestItemRequestBuilder 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}/directory/tenantGovernance/governanceRequests/{governanceRequest%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property governanceRequests for directory + * @param GovernanceRequestItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?GovernanceRequestItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read the properties of a governanceRequest object. + * @param GovernanceRequestItemRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-governancerequest-get?view=graph-rest-beta Find more info here + */ + public function get(?GovernanceRequestItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceRequest::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the status property of a governanceRequest to accept or reject the governance request. Only the governed tenant can update the request status. + * @param GovernanceRequest $body The request body + * @param GovernanceRequestItemRequestBuilderPatchRequestConfiguration|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/tenantgovernanceservices-governancerequest-update?view=graph-rest-beta Find more info here + */ + public function patch(GovernanceRequest $body, ?GovernanceRequestItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [GovernanceRequest::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property governanceRequests for directory + * @param GovernanceRequestItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?GovernanceRequestItemRequestBuilderDeleteRequestConfiguration $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 the properties of a governanceRequest object. + * @param GovernanceRequestItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?GovernanceRequestItemRequestBuilderGetRequestConfiguration $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 status property of a governanceRequest to accept or reject the governance request. Only the governed tenant can update the request status. + * @param GovernanceRequest $body The request body + * @param GovernanceRequestItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(GovernanceRequest $body, ?GovernanceRequestItemRequestBuilderPatchRequestConfiguration $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 GovernanceRequestItemRequestBuilder + */ + public function withUrl(string $rawUrl): GovernanceRequestItemRequestBuilder { + return new GovernanceRequestItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..9a3d6d85d0d --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderDeleteRequestConfiguration.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/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..c2fe65ef8c5 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderGetQueryParameters.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 GovernanceRequestItemRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..5f73ec61e7b --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param GovernanceRequestItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?GovernanceRequestItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new GovernanceRequestItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return GovernanceRequestItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): GovernanceRequestItemRequestBuilderGetQueryParameters { + return new GovernanceRequestItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..f02f552c5c1 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/GovernanceRequests/Item/GovernanceRequestItemRequestBuilderPatchRequestConfiguration.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/Directory/TenantGovernance/RelatedTenants/Count/CountRequestBuilder.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Count/CountRequestBuilder.php new file mode 100644 index 00000000000..f3b93b68434 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/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}/directory/tenantGovernance/relatedTenants/$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/Directory/TenantGovernance/RelatedTenants/Count/CountRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Count/CountRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..4ce0a416e68 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Count/CountRequestBuilderGetQueryParameters.php @@ -0,0 +1,34 @@ +filter = $filter; + $this->search = $search; + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Count/CountRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Count/CountRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..cc1f8913758 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/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/Directory/TenantGovernance/RelatedTenants/Item/AppB2BSignInActivityMetrics/AppB2BSignInActivityMetricsRequestBuilder.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/AppB2BSignInActivityMetrics/AppB2BSignInActivityMetricsRequestBuilder.php new file mode 100644 index 00000000000..2fd19280c2a --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/AppB2BSignInActivityMetrics/AppB2BSignInActivityMetricsRequestBuilder.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}/directory/tenantGovernance/relatedTenants/{relatedTenant%2Did}/appB2BSignInActivityMetrics{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * B2B sign-in activity metrics for this related tenant. Expanded by default. + * @param AppB2BSignInActivityMetricsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?AppB2BSignInActivityMetricsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [B2BSignInActivityMetrics::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * B2B sign-in activity metrics for this related tenant. Expanded by default. + * @param AppB2BSignInActivityMetricsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?AppB2BSignInActivityMetricsRequestBuilderGetRequestConfiguration $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 AppB2BSignInActivityMetricsRequestBuilder + */ + public function withUrl(string $rawUrl): AppB2BSignInActivityMetricsRequestBuilder { + return new AppB2BSignInActivityMetricsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/AppB2BSignInActivityMetrics/AppB2BSignInActivityMetricsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/AppB2BSignInActivityMetrics/AppB2BSignInActivityMetricsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..a14634d9064 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/AppB2BSignInActivityMetrics/AppB2BSignInActivityMetricsRequestBuilderGetQueryParameters.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 AppB2BSignInActivityMetricsRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/RelatedTenants/Item/AppB2BSignInActivityMetrics/AppB2BSignInActivityMetricsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/AppB2BSignInActivityMetrics/AppB2BSignInActivityMetricsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..3f8c94789c1 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/AppB2BSignInActivityMetrics/AppB2BSignInActivityMetricsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param AppB2BSignInActivityMetricsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?AppB2BSignInActivityMetricsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new AppB2BSignInActivityMetricsRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return AppB2BSignInActivityMetricsRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): AppB2BSignInActivityMetricsRequestBuilderGetQueryParameters { + return new AppB2BSignInActivityMetricsRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BRegistrationMetrics/B2BRegistrationMetricsRequestBuilder.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BRegistrationMetrics/B2BRegistrationMetricsRequestBuilder.php new file mode 100644 index 00000000000..2576553cafe --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BRegistrationMetrics/B2BRegistrationMetricsRequestBuilder.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}/directory/tenantGovernance/relatedTenants/{relatedTenant%2Did}/b2BRegistrationMetrics{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * B2B registration metrics for this related tenant. Expanded by default. + * @param B2BRegistrationMetricsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?B2BRegistrationMetricsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [B2bRegistrationMetrics::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * B2B registration metrics for this related tenant. Expanded by default. + * @param B2BRegistrationMetricsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?B2BRegistrationMetricsRequestBuilderGetRequestConfiguration $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 B2BRegistrationMetricsRequestBuilder + */ + public function withUrl(string $rawUrl): B2BRegistrationMetricsRequestBuilder { + return new B2BRegistrationMetricsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BRegistrationMetrics/B2BRegistrationMetricsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BRegistrationMetrics/B2BRegistrationMetricsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..c1a55bfabde --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BRegistrationMetrics/B2BRegistrationMetricsRequestBuilderGetQueryParameters.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 B2BRegistrationMetricsRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/RelatedTenants/Item/B2BRegistrationMetrics/B2BRegistrationMetricsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BRegistrationMetrics/B2BRegistrationMetricsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..5bd86d25312 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BRegistrationMetrics/B2BRegistrationMetricsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param B2BRegistrationMetricsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?B2BRegistrationMetricsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new B2BRegistrationMetricsRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return B2BRegistrationMetricsRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): B2BRegistrationMetricsRequestBuilderGetQueryParameters { + return new B2BRegistrationMetricsRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BSignInActivityMetrics/B2BSignInActivityMetricsRequestBuilder.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BSignInActivityMetrics/B2BSignInActivityMetricsRequestBuilder.php new file mode 100644 index 00000000000..c2d27b01c65 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BSignInActivityMetrics/B2BSignInActivityMetricsRequestBuilder.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}/directory/tenantGovernance/relatedTenants/{relatedTenant%2Did}/b2BSignInActivityMetrics{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * B2B sign-in activity metrics for this related tenant. Expanded by default. + * @param B2BSignInActivityMetricsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?B2BSignInActivityMetricsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [B2BSignInActivityMetrics::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * B2B sign-in activity metrics for this related tenant. Expanded by default. + * @param B2BSignInActivityMetricsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?B2BSignInActivityMetricsRequestBuilderGetRequestConfiguration $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 B2BSignInActivityMetricsRequestBuilder + */ + public function withUrl(string $rawUrl): B2BSignInActivityMetricsRequestBuilder { + return new B2BSignInActivityMetricsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BSignInActivityMetrics/B2BSignInActivityMetricsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BSignInActivityMetrics/B2BSignInActivityMetricsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..00d31be44b1 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BSignInActivityMetrics/B2BSignInActivityMetricsRequestBuilderGetQueryParameters.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 B2BSignInActivityMetricsRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/RelatedTenants/Item/B2BSignInActivityMetrics/B2BSignInActivityMetricsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BSignInActivityMetrics/B2BSignInActivityMetricsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..fc46cc3c73a --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/B2BSignInActivityMetrics/B2BSignInActivityMetricsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param B2BSignInActivityMetricsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?B2BSignInActivityMetricsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new B2BSignInActivityMetricsRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return B2BSignInActivityMetricsRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): B2BSignInActivityMetricsRequestBuilderGetQueryParameters { + return new B2BSignInActivityMetricsRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/BillingMetrics/BillingMetricsRequestBuilder.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/BillingMetrics/BillingMetricsRequestBuilder.php new file mode 100644 index 00000000000..04eff85a751 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/BillingMetrics/BillingMetricsRequestBuilder.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}/directory/tenantGovernance/relatedTenants/{relatedTenant%2Did}/billingMetrics{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Billing metrics for this related tenant. Expanded by default. + * @param BillingMetricsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?BillingMetricsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [BillingMetrics::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Billing metrics for this related tenant. Expanded by default. + * @param BillingMetricsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?BillingMetricsRequestBuilderGetRequestConfiguration $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 BillingMetricsRequestBuilder + */ + public function withUrl(string $rawUrl): BillingMetricsRequestBuilder { + return new BillingMetricsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/BillingMetrics/BillingMetricsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/BillingMetrics/BillingMetricsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..c55d01ed743 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/BillingMetrics/BillingMetricsRequestBuilderGetQueryParameters.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 BillingMetricsRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/RelatedTenants/Item/BillingMetrics/BillingMetricsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/BillingMetrics/BillingMetricsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..1330de57cce --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/BillingMetrics/BillingMetricsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param BillingMetricsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?BillingMetricsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new BillingMetricsRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return BillingMetricsRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): BillingMetricsRequestBuilderGetQueryParameters { + return new BillingMetricsRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/MultiTenantApplicationMetrics/MultiTenantApplicationMetricsRequestBuilder.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/MultiTenantApplicationMetrics/MultiTenantApplicationMetricsRequestBuilder.php new file mode 100644 index 00000000000..beffd5f0362 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/MultiTenantApplicationMetrics/MultiTenantApplicationMetricsRequestBuilder.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}/directory/tenantGovernance/relatedTenants/{relatedTenant%2Did}/multiTenantApplicationMetrics{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Multi-tenant application usage metrics for this related tenant. Expanded by default. + * @param MultiTenantApplicationMetricsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?MultiTenantApplicationMetricsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [MultiTenantApplicationMetrics::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Multi-tenant application usage metrics for this related tenant. Expanded by default. + * @param MultiTenantApplicationMetricsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?MultiTenantApplicationMetricsRequestBuilderGetRequestConfiguration $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 MultiTenantApplicationMetricsRequestBuilder + */ + public function withUrl(string $rawUrl): MultiTenantApplicationMetricsRequestBuilder { + return new MultiTenantApplicationMetricsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/MultiTenantApplicationMetrics/MultiTenantApplicationMetricsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/MultiTenantApplicationMetrics/MultiTenantApplicationMetricsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..81264f9314a --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/MultiTenantApplicationMetrics/MultiTenantApplicationMetricsRequestBuilderGetQueryParameters.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 MultiTenantApplicationMetricsRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/RelatedTenants/Item/MultiTenantApplicationMetrics/MultiTenantApplicationMetricsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/MultiTenantApplicationMetrics/MultiTenantApplicationMetricsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..cc1119397d9 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/MultiTenantApplicationMetrics/MultiTenantApplicationMetricsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param MultiTenantApplicationMetricsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?MultiTenantApplicationMetricsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new MultiTenantApplicationMetricsRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return MultiTenantApplicationMetricsRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): MultiTenantApplicationMetricsRequestBuilderGetQueryParameters { + return new MultiTenantApplicationMetricsRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilder.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilder.php new file mode 100644 index 00000000000..a950dd44cee --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilder.php @@ -0,0 +1,185 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the b2BRegistrationMetrics property of the microsoft.graph.tenantGovernanceServices.relatedTenant entity. + */ + public function b2BRegistrationMetrics(): B2BRegistrationMetricsRequestBuilder { + return new B2BRegistrationMetricsRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the b2BSignInActivityMetrics property of the microsoft.graph.tenantGovernanceServices.relatedTenant entity. + */ + public function b2BSignInActivityMetrics(): B2BSignInActivityMetricsRequestBuilder { + return new B2BSignInActivityMetricsRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the billingMetrics property of the microsoft.graph.tenantGovernanceServices.relatedTenant entity. + */ + public function billingMetrics(): BillingMetricsRequestBuilder { + return new BillingMetricsRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the multiTenantApplicationMetrics property of the microsoft.graph.tenantGovernanceServices.relatedTenant entity. + */ + public function multiTenantApplicationMetrics(): MultiTenantApplicationMetricsRequestBuilder { + return new MultiTenantApplicationMetricsRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new RelatedTenantItemRequestBuilder 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}/directory/tenantGovernance/relatedTenants/{relatedTenant%2Did}{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property relatedTenants for directory + * @param RelatedTenantItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?RelatedTenantItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read the properties and relationships of microsoft.graph.tenantGovernanceServices.relatedTenant object. + * @param RelatedTenantItemRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-relatedtenant-get?view=graph-rest-beta Find more info here + */ + public function get(?RelatedTenantItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RelatedTenant::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property relatedTenants in directory + * @param RelatedTenant $body The request body + * @param RelatedTenantItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(RelatedTenant $body, ?RelatedTenantItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RelatedTenant::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property relatedTenants for directory + * @param RelatedTenantItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?RelatedTenantItemRequestBuilderDeleteRequestConfiguration $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 the properties and relationships of microsoft.graph.tenantGovernanceServices.relatedTenant object. + * @param RelatedTenantItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RelatedTenantItemRequestBuilderGetRequestConfiguration $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 relatedTenants in directory + * @param RelatedTenant $body The request body + * @param RelatedTenantItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(RelatedTenant $body, ?RelatedTenantItemRequestBuilderPatchRequestConfiguration $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 RelatedTenantItemRequestBuilder + */ + public function withUrl(string $rawUrl): RelatedTenantItemRequestBuilder { + return new RelatedTenantItemRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..85b5e554de0 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderDeleteRequestConfiguration.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/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..237d44ca06d --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderGetQueryParameters.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 RelatedTenantItemRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..c436cc00869 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param RelatedTenantItemRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?RelatedTenantItemRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new RelatedTenantItemRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return RelatedTenantItemRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): RelatedTenantItemRequestBuilderGetQueryParameters { + return new RelatedTenantItemRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderPatchRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..b641e110bd9 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/Item/RelatedTenantItemRequestBuilderPatchRequestConfiguration.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/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefresh/MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilder.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefresh/MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilder.php new file mode 100644 index 00000000000..3429535f2c1 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefresh/MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilder.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}/directory/tenantGovernance/relatedTenants/microsoft.graph.tenantGovernanceServices.refresh'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Manually refresh the list of related tenants. The list is also automatically refreshed daily. + * @param MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilderPostRequestConfiguration|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/tenantgovernanceservices-relatedtenant-refresh?view=graph-rest-beta Find more info here + */ + public function post(?MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Manually refresh the list of related tenants. The list is also automatically refreshed daily. + * @param MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilderPostRequestConfiguration $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 MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilder + */ + public function withUrl(string $rawUrl): MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilder { + return new MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefresh/MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilderPostRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefresh/MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..d8d62dfca20 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefresh/MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilderPostRequestConfiguration.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/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefreshStatus/MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilder.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefreshStatus/MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilder.php new file mode 100644 index 00000000000..350a17e22b4 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefreshStatus/MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilder.php @@ -0,0 +1,75 @@ +|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}/directory/tenantGovernance/relatedTenants/microsoft.graph.tenantGovernanceServices.refreshStatus()'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get the status of the related tenants refresh action. + * @param MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-relatedtenant-refreshstatus?view=graph-rest-beta Find more info here + */ + public function get(?MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RelatedTenantsRefreshStatus::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get the status of the related tenants refresh action. + * @param MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilderGetRequestConfiguration $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 MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilder + */ + public function withUrl(string $rawUrl): MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilder { + return new MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefreshStatus/MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefreshStatus/MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..ef3eb038278 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/MicrosoftGraphTenantGovernanceServicesRefreshStatus/MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilderGetRequestConfiguration.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/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilder.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilder.php new file mode 100644 index 00000000000..9c31d9ae430 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilder.php @@ -0,0 +1,150 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the refresh method. + */ + public function microsoftGraphTenantGovernanceServicesRefresh(): MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilder { + return new MicrosoftGraphTenantGovernanceServicesRefreshRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to call the refreshStatus method. + */ + public function microsoftGraphTenantGovernanceServicesRefreshStatus(): MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilder { + return new MicrosoftGraphTenantGovernanceServicesRefreshStatusRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the relatedTenants property of the microsoft.graph.tenantGovernanceServices.tenantGovernance entity. + * @param string $relatedTenantId The unique identifier of relatedTenant + * @return RelatedTenantItemRequestBuilder + */ + public function byRelatedTenantId(string $relatedTenantId): RelatedTenantItemRequestBuilder { + $urlTplParams = $this->pathParameters; + $urlTplParams['relatedTenant%2Did'] = $relatedTenantId; + return new RelatedTenantItemRequestBuilder($urlTplParams, $this->requestAdapter); + } + + /** + * Instantiates a new RelatedTenantsRequestBuilder 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}/directory/tenantGovernance/relatedTenants{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Get a list of relatedTenant objects and their properties, including relationship metrics. + * @param RelatedTenantsRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-list-relatedtenants?view=graph-rest-beta Find more info here + */ + public function get(?RelatedTenantsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RelatedTenantCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Create new navigation property to relatedTenants for directory + * @param RelatedTenant $body The request body + * @param RelatedTenantsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function post(RelatedTenant $body, ?RelatedTenantsRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [RelatedTenant::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Get a list of relatedTenant objects and their properties, including relationship metrics. + * @param RelatedTenantsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?RelatedTenantsRequestBuilderGetRequestConfiguration $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 relatedTenants for directory + * @param RelatedTenant $body The request body + * @param RelatedTenantsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(RelatedTenant $body, ?RelatedTenantsRequestBuilderPostRequestConfiguration $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 RelatedTenantsRequestBuilder + */ + public function withUrl(string $rawUrl): RelatedTenantsRequestBuilder { + return new RelatedTenantsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..0575a9c06a4 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilderGetQueryParameters.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 RelatedTenantsRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..b1f56089aaf --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,45 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param RelatedTenantsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?RelatedTenantsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new RelatedTenantsRequestBuilderGetQueryParameters. + * @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 RelatedTenantsRequestBuilderGetQueryParameters + */ + 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): RelatedTenantsRequestBuilderGetQueryParameters { + return new RelatedTenantsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilderPostRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..e6fc2d15434 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/RelatedTenants/RelatedTenantsRequestBuilderPostRequestConfiguration.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/Directory/TenantGovernance/Settings/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenants/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilder.php b/src/Generated/Directory/TenantGovernance/Settings/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenants/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilder.php new file mode 100644 index 00000000000..bbfe4624434 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/Settings/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenants/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilder.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}/directory/tenantGovernance/settings/microsoft.graph.tenantGovernanceServices.enableRelatedTenants'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Enable the related tenants feature for tenant discovery. After calling this action, the isRelatedTenantsEnabled property of tenantGovernanceSetting is set to true, which allows the use of related tenant APIs. + * @param MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilderPostRequestConfiguration|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/tenantgovernanceservices-tenantgovernancesetting-enablerelatedtenants?view=graph-rest-beta Find more info here + */ + public function post(?MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPostRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Enable the related tenants feature for tenant discovery. After calling this action, the isRelatedTenantsEnabled property of tenantGovernanceSetting is set to true, which allows the use of related tenant APIs. + * @param MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPostRequestInformation(?MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilderPostRequestConfiguration $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 MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilder + */ + public function withUrl(string $rawUrl): MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilder { + return new MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/Settings/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenants/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilderPostRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/Settings/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenants/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilderPostRequestConfiguration.php new file mode 100644 index 00000000000..0db331b7b97 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/Settings/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenants/MicrosoftGraphTenantGovernanceServicesEnableRelatedTenantsRequestBuilderPostRequestConfiguration.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/Directory/TenantGovernance/Settings/SettingsRequestBuilder.php b/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilder.php new file mode 100644 index 00000000000..9bd08d731b5 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilder.php @@ -0,0 +1,154 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new SettingsRequestBuilder 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}/directory/tenantGovernance/settings{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property settings for directory + * @param SettingsRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?SettingsRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Read the properties of the tenantGovernanceSetting singleton, which controls related tenant discovery and invitation capabilities. + * @param SettingsRequestBuilderGetRequestConfiguration|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/tenantgovernanceservices-tenantgovernancesetting-get?view=graph-rest-beta Find more info here + */ + public function get(?SettingsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [TenantGovernanceSetting::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the canReceiveInvitations property of the tenantGovernanceSetting singleton. This property controls whether the tenant can receive governance invitations. + * @param TenantGovernanceSetting $body The request body + * @param SettingsRequestBuilderPatchRequestConfiguration|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/tenantgovernanceservices-tenantgovernancesetting-update?view=graph-rest-beta Find more info here + */ + public function patch(TenantGovernanceSetting $body, ?SettingsRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [TenantGovernanceSetting::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property settings for directory + * @param SettingsRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?SettingsRequestBuilderDeleteRequestConfiguration $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 the properties of the tenantGovernanceSetting singleton, which controls related tenant discovery and invitation capabilities. + * @param SettingsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?SettingsRequestBuilderGetRequestConfiguration $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 canReceiveInvitations property of the tenantGovernanceSetting singleton. This property controls whether the tenant can receive governance invitations. + * @param TenantGovernanceSetting $body The request body + * @param SettingsRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(TenantGovernanceSetting $body, ?SettingsRequestBuilderPatchRequestConfiguration $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 SettingsRequestBuilder + */ + public function withUrl(string $rawUrl): SettingsRequestBuilder { + return new SettingsRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..ea2907cb5a2 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilderDeleteRequestConfiguration.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/Directory/TenantGovernance/Settings/SettingsRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..17363465754 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilderGetQueryParameters.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 SettingsRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/Settings/SettingsRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..6b0963296e8 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param SettingsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?SettingsRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new SettingsRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return SettingsRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): SettingsRequestBuilderGetQueryParameters { + return new SettingsRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilderPatchRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..591dd9e7420 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/Settings/SettingsRequestBuilderPatchRequestConfiguration.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/Directory/TenantGovernance/TenantGovernanceRequestBuilder.php b/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilder.php new file mode 100644 index 00000000000..f0c2c02e68d --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilder.php @@ -0,0 +1,192 @@ +pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the governancePolicyTemplates property of the microsoft.graph.tenantGovernanceServices.tenantGovernance entity. + */ + public function governancePolicyTemplates(): GovernancePolicyTemplatesRequestBuilder { + return new GovernancePolicyTemplatesRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the governanceRelationships property of the microsoft.graph.tenantGovernanceServices.tenantGovernance entity. + */ + public function governanceRelationships(): GovernanceRelationshipsRequestBuilder { + return new GovernanceRelationshipsRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the governanceRequests property of the microsoft.graph.tenantGovernanceServices.tenantGovernance entity. + */ + public function governanceRequests(): GovernanceRequestsRequestBuilder { + return new GovernanceRequestsRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the relatedTenants property of the microsoft.graph.tenantGovernanceServices.tenantGovernance entity. + */ + public function relatedTenants(): RelatedTenantsRequestBuilder { + return new RelatedTenantsRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Provides operations to manage the settings property of the microsoft.graph.tenantGovernanceServices.tenantGovernance entity. + */ + public function settings(): SettingsRequestBuilder { + return new SettingsRequestBuilder($this->pathParameters, $this->requestAdapter); + } + + /** + * Instantiates a new TenantGovernanceRequestBuilder 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}/directory/tenantGovernance{?%24expand,%24select}'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Delete navigation property tenantGovernance for directory + * @param TenantGovernanceRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function delete(?TenantGovernanceRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); + } + + /** + * Container for Microsoft Entra Tenant Governance capabilities. + * @param TenantGovernanceRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function get(?TenantGovernanceRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toGetRequestInformation($requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [TenantGovernance::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Update the navigation property tenantGovernance in directory + * @param TenantGovernance $body The request body + * @param TenantGovernanceRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return Promise + * @throws Exception + */ + public function patch(TenantGovernance $body, ?TenantGovernanceRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { + $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); + $errorMappings = [ + 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], + ]; + return $this->requestAdapter->sendAsync($requestInfo, [TenantGovernance::class, 'createFromDiscriminatorValue'], $errorMappings); + } + + /** + * Delete navigation property tenantGovernance for directory + * @param TenantGovernanceRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toDeleteRequestInformation(?TenantGovernanceRequestBuilderDeleteRequestConfiguration $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; + } + + /** + * Container for Microsoft Entra Tenant Governance capabilities. + * @param TenantGovernanceRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toGetRequestInformation(?TenantGovernanceRequestBuilderGetRequestConfiguration $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 tenantGovernance in directory + * @param TenantGovernance $body The request body + * @param TenantGovernanceRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @return RequestInformation + */ + public function toPatchRequestInformation(TenantGovernance $body, ?TenantGovernanceRequestBuilderPatchRequestConfiguration $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 TenantGovernanceRequestBuilder + */ + public function withUrl(string $rawUrl): TenantGovernanceRequestBuilder { + return new TenantGovernanceRequestBuilder($rawUrl, $this->requestAdapter); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilderDeleteRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilderDeleteRequestConfiguration.php new file mode 100644 index 00000000000..80eefdc784f --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilderDeleteRequestConfiguration.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/Directory/TenantGovernance/TenantGovernanceRequestBuilderGetQueryParameters.php b/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..5508b0c48a9 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilderGetQueryParameters.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 TenantGovernanceRequestBuilderGetQueryParameters 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/Directory/TenantGovernance/TenantGovernanceRequestBuilderGetRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..b470ab4d7b3 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|string>|null $headers Request headers + * @param array|null $options Request options + * @param TenantGovernanceRequestBuilderGetQueryParameters|null $queryParameters Request query parameters + */ + public function __construct(?array $headers = null, ?array $options = null, ?TenantGovernanceRequestBuilderGetQueryParameters $queryParameters = null) { + parent::__construct($headers ?? [], $options ?? []); + $this->queryParameters = $queryParameters; + } + + /** + * Instantiates a new TenantGovernanceRequestBuilderGetQueryParameters. + * @param array|null $expand Expand related entities + * @param array|null $select Select properties to be returned + * @return TenantGovernanceRequestBuilderGetQueryParameters + */ + public static function createQueryParameters(?array $expand = null, ?array $select = null): TenantGovernanceRequestBuilderGetQueryParameters { + return new TenantGovernanceRequestBuilderGetQueryParameters($expand, $select); + } + +} diff --git a/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilderPatchRequestConfiguration.php b/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilderPatchRequestConfiguration.php new file mode 100644 index 00000000000..aa237204fc7 --- /dev/null +++ b/src/Generated/Directory/TenantGovernance/TenantGovernanceRequestBuilderPatchRequestConfiguration.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/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..2ce1b033a82 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/microsoft.graph.identityGovernance.previewTaskFailures'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Validate the tasks configured in a workflow to check for configuration errors. This action identifies any tasks that would fail during execution, allowing you to fix issues before running the workflow. Returns an empty collection if no task failures are detected. + * @param MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration|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/identitygovernance-workflow-previewtaskfailures?view=graph-rest-beta Find more info here + */ + 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); + } + + /** + * Validate the tasks configured in a workflow to check for configuration errors. This action identifies any tasks that would fail during execution, allowing you to fix issues before running the workflow. Returns an empty collection if no task failures are detected. + * @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..727ee2a153d --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder.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}/microsoft.graph.identityGovernance.previewWorkflow'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Run a workflow in preview mode for selected directory objects without affecting production users. This action triggers workflow processing in preview mode, and results can be retrieved using the List userProcessingResults operation with $filter=workflowExecutionType eq 'previewMode'. + * @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 + * @link https://learn.microsoft.com/graph/api/identitygovernance-workflow-previewworkflow?view=graph-rest-beta Find more info here + */ + 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); + } + + /** + * Run a workflow in preview mode for selected directory objects without affecting production users. This action triggers workflow processing in preview mode, and results can be retrieved using the List userProcessingResults operation with $filter=workflowExecutionType eq 'previewMode'. + * @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..3e7a0bc63b7 --- /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]; + } + } + + /** + * A read-only collection of directory objects that are currently in-scope for the workflow based on its execution conditions. This property helps preview which users would be affected before running the workflow. Nullable. Read-only. Returned only on $expand. Supports $expand. + * @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); + } + + /** + * A read-only collection of directory objects that are currently in-scope for the workflow based on its execution conditions. This property helps preview which users would be affected before running the workflow. Nullable. Read-only. Returned only on $expand. Supports $expand. + * @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/DeletedItems/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php new file mode 100644 index 00000000000..f0c2efe6125 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetRequestConfiguration.php b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetRequestConfiguration.php new file mode 100644 index 00000000000..ece1a1aba39 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetRequestConfiguration.php @@ -0,0 +1,39 @@ +|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..fd2c50a7b64 --- /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]; + } + } + + /** + * A read-only collection of directory objects that are currently in-scope for the workflow based on its execution conditions. This property helps preview which users would be affected before running the workflow. Nullable. Read-only. Returned only on $expand. Supports $expand. + * @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); + } + + /** + * A read-only collection of directory objects that are currently in-scope for the workflow based on its execution conditions. This property helps preview which users would be affected before running the workflow. Nullable. Read-only. Returned only on $expand. Supports $expand. + * @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..bd0f8803b57 --- /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..871f1f65f13 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewTaskFailures/MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilder.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/microsoft.graph.identityGovernance.previewTaskFailures'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Validate the tasks configured in a workflow to check for configuration errors. This action identifies any tasks that would fail during execution, allowing you to fix issues before running the workflow. Returns an empty collection if no task failures are detected. + * @param MicrosoftGraphIdentityGovernancePreviewTaskFailuresRequestBuilderPostRequestConfiguration|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/identitygovernance-workflow-previewtaskfailures?view=graph-rest-beta Find more info here + */ + 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); + } + + /** + * Validate the tasks configured in a workflow to check for configuration errors. This action identifies any tasks that would fail during execution, allowing you to fix issues before running the workflow. Returns an empty collection if no task failures are detected. + * @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..15a842efce9 --- /dev/null +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernancePreviewWorkflow/MicrosoftGraphIdentityGovernancePreviewWorkflowRequestBuilder.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}/microsoft.graph.identityGovernance.previewWorkflow'); + if (is_array($pathParametersOrRawUrl)) { + $this->pathParameters = $pathParametersOrRawUrl; + } else { + $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; + } + } + + /** + * Run a workflow in preview mode for selected directory objects without affecting production users. This action triggers workflow processing in preview mode, and results can be retrieved using the List userProcessingResults operation with $filter=workflowExecutionType eq 'previewMode'. + * @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 + * @link https://learn.microsoft.com/graph/api/identitygovernance-workflow-previewworkflow?view=graph-rest-beta Find more info here + */ + 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); + } + + /** + * Run a workflow in preview mode for selected directory objects without affecting production users. This action triggers workflow processing in preview mode, and results can be retrieved using the List userProcessingResults operation with $filter=workflowExecutionType eq 'previewMode'. + * @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..757eae2b6f2 --- /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]; + } + } + + /** + * A read-only collection of directory objects that are currently in-scope for the workflow based on its execution conditions. This property helps preview which users would be affected before running the workflow. Nullable. Read-only. Returned only on $expand. Supports $expand. + * @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); + } + + /** + * A read-only collection of directory objects that are currently in-scope for the workflow based on its execution conditions. This property helps preview which users would be affected before running the workflow. Nullable. Read-only. Returned only on $expand. Supports $expand. + * @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/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php similarity index 68% rename from src/Generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php rename to src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php index 00e5419ba8d..0c6a2fcb233 100644 --- a/src/Generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php +++ b/src/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/PreviewScope/Item/DirectoryObjectItemRequestBuilderGetQueryParameters.php @@ -1,11 +1,11 @@ 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]; + } + } + + /** + * A read-only collection of directory objects that are currently in-scope for the workflow based on its execution conditions. This property helps preview which users would be affected before running the workflow. Nullable. Read-only. Returned only on $expand. Supports $expand. + * @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); + } + + /** + * A read-only collection of directory objects that are currently in-scope for the workflow based on its execution conditions. This property helps preview which users would be affected before running the workflow. Nullable. Read-only. Returned only on $expand. Supports $expand. + * @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..8dd8a50499b --- /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/ApproverDelegate.php b/src/Generated/Models/ApproverDelegate.php new file mode 100644 index 00000000000..0b875374e2a --- /dev/null +++ b/src/Generated/Models/ApproverDelegate.php @@ -0,0 +1,158 @@ +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 ApproverDelegate + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): ApproverDelegate { + return new ApproverDelegate(); + } + + /** + * 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 delegate property value. The delegate property + * @return SubjectSet|null + */ + public function getDelegate(): ?SubjectSet { + $val = $this->getBackingStore()->get('delegate'); + if (is_null($val) || $val instanceof SubjectSet) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'delegate'"); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'delegate' => fn(ParseNode $n) => $o->setDelegate($n->getObjectValue([SubjectSet::class, 'createFromDiscriminatorValue'])), + '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()), + 'schedule' => fn(ParseNode $n) => $o->setSchedule($n->getObjectValue([RequestSchedule::class, 'createFromDiscriminatorValue'])), + ]; + } + + /** + * 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 schedule property value. The schedule property + * @return RequestSchedule|null + */ + public function getSchedule(): ?RequestSchedule { + $val = $this->getBackingStore()->get('schedule'); + if (is_null($val) || $val instanceof RequestSchedule) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'schedule'"); + } + + /** + * Serializes information the current object + * @param SerializationWriter $writer Serialization writer to use to serialize this model + */ + public function serialize(SerializationWriter $writer): void { + $writer->writeObjectValue('delegate', $this->getDelegate()); + $writer->writeStringValue('@odata.type', $this->getOdataType()); + $writer->writeObjectValue('schedule', $this->getSchedule()); + $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 delegate property value. The delegate property + * @param SubjectSet|null $value Value to set for the delegate property. + */ + public function setDelegate(?SubjectSet $value): void { + $this->getBackingStore()->set('delegate', $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 schedule property value. The schedule property + * @param RequestSchedule|null $value Value to set for the schedule property. + */ + public function setSchedule(?RequestSchedule $value): void { + $this->getBackingStore()->set('schedule', $value); + } + +} 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/BackupPolicyReport.php b/src/Generated/Models/BackupPolicyReport.php new file mode 100644 index 00000000000..aa47a751e64 --- /dev/null +++ b/src/Generated/Models/BackupPolicyReport.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 BackupPolicyReport + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): BackupPolicyReport { + return new BackupPolicyReport(); + } + + /** + * 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 backupPolicyId property value. The backupPolicyId property + * @return string|null + */ + 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 'backupPolicyId'"); + } + + /** + * Gets the countStatistics property value. The countStatistics property + * @return BackupCountStatistics|null + */ + 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 displayName property + * @return string|null + */ + public function getDisplayName(): ?string { + $val = $this->getBackingStore()->get('displayName'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'displayName'"); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + '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()), + '@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->writeStringValue('backupPolicyId', $this->getBackupPolicyId()); + $writer->writeObjectValue('countStatistics', $this->getCountStatistics()); + $writer->writeStringValue('displayName', $this->getDisplayName()); + $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 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 backupPolicyId property value. The backupPolicyId property + * @param string|null $value Value to set for the backupPolicyId property. + */ + public function setBackupPolicyId(?string $value): void { + $this->getBackingStore()->set('backupPolicyId', $value); + } + + /** + * Sets the countStatistics property value. The countStatistics property + * @param BackupCountStatistics|null $value Value to set for the countStatistics property. + */ + public function setCountStatistics(?BackupCountStatistics $value): void { + $this->getBackingStore()->set('countStatistics', $value); + } + + /** + * Sets the displayName property value. The displayName property + * @param string|null $value Value to set for the displayName property. + */ + public function setDisplayName(?string $value): void { + $this->getBackingStore()->set('displayName', $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/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/CloudPcAutomaticDiscoveredAppDetail.php b/src/Generated/Models/CloudPcAutomaticDiscoveredAppDetail.php new file mode 100644 index 00000000000..0f52d8a3e40 --- /dev/null +++ b/src/Generated/Models/CloudPcAutomaticDiscoveredAppDetail.php @@ -0,0 +1,46 @@ +setOdataType('#microsoft.graph.cloudPcAutomaticDiscoveredAppDetail'); + } + + /** + * 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 CloudPcAutomaticDiscoveredAppDetail + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): CloudPcAutomaticDiscoveredAppDetail { + return new CloudPcAutomaticDiscoveredAppDetail(); + } + + /** + * The deserialization information for the current model + * @return array + */ + 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/CloudPcCloudAppActionFailedErrorCode.php b/src/Generated/Models/CloudPcCloudAppActionFailedErrorCode.php index f7a5c36a701..cf6e6e67b7c 100644 --- a/src/Generated/Models/CloudPcCloudAppActionFailedErrorCode.php +++ b/src/Generated/Models/CloudPcCloudAppActionFailedErrorCode.php @@ -10,4 +10,6 @@ class CloudPcCloudAppActionFailedErrorCode extends Enum { public const INTERNAL_SERVER_ERROR = "internalServerError"; public const APP_DISCOVERY_FAILED = "appDiscoveryFailed"; public const UNKNOWN_FUTURE_VALUE = "unknownFutureValue"; + public const ICON_PATH_INVALID = "iconPathInvalid"; + public const FILE_PATH_INVALID = "filePathInvalid"; } diff --git a/src/Generated/Models/CloudPcCloudAppDetail.php b/src/Generated/Models/CloudPcCloudAppDetail.php index bed3f3b8c0c..5431fe9fd59 100644 --- a/src/Generated/Models/CloudPcCloudAppDetail.php +++ b/src/Generated/Models/CloudPcCloudAppDetail.php @@ -31,6 +31,14 @@ public function __construct() { * @return CloudPcCloudAppDetail */ public static function createFromDiscriminatorValue(ParseNode $parseNode): CloudPcCloudAppDetail { + $mappingValueNode = $parseNode->getChildNode("@odata.type"); + if ($mappingValueNode !== null) { + $mappingValue = $mappingValueNode->getStringValue(); + switch ($mappingValue) { + case '#microsoft.graph.cloudPcAutomaticDiscoveredAppDetail': return new CloudPcAutomaticDiscoveredAppDetail(); + case '#microsoft.graph.cloudPcFilePathAppDetail': return new CloudPcFilePathAppDetail(); + } + } return new CloudPcCloudAppDetail(); } diff --git a/src/Generated/Models/CloudPcConnectivityStatus.php b/src/Generated/Models/CloudPcConnectivityStatus.php index a0b949bb509..668122332f9 100644 --- a/src/Generated/Models/CloudPcConnectivityStatus.php +++ b/src/Generated/Models/CloudPcConnectivityStatus.php @@ -10,4 +10,6 @@ class CloudPcConnectivityStatus extends Enum { public const AVAILABLE_WITH_WARNING = "availableWithWarning"; public const UNAVAILABLE = "unavailable"; public const UNKNOWN_FUTURE_VALUE = "unknownFutureValue"; + public const UNDER_SERVICE_MAINTENANCE = "underServiceMaintenance"; + public const IN_USE = "inUse"; } 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 @@ +setOdataType('#microsoft.graph.cloudPcFilePathAppDetail'); + } + + /** + * 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 CloudPcFilePathAppDetail + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): CloudPcFilePathAppDetail { + return new CloudPcFilePathAppDetail(); + } + + /** + * The deserialization information for the current model + * @return array + */ + 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/ConfigurationDrift.php b/src/Generated/Models/ConfigurationDrift.php index b90ba9d78f9..e5d281a31b0 100644 --- a/src/Generated/Models/ConfigurationDrift.php +++ b/src/Generated/Models/ConfigurationDrift.php @@ -27,7 +27,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Confi } /** - * Gets the baselineResourceDisplayName property value. Resource instance for which the drift is detected. + * Gets the baselineResourceDisplayName property value. Resource instance for which the drift is detected. Supports $filter (eq, ne, startsWith) and $orderby. * @return string|null */ public function getBaselineResourceDisplayName(): ?string { @@ -39,7 +39,7 @@ public function getBaselineResourceDisplayName(): ?string { } /** - * Gets the driftedProperties property value. Properties within one or more resource instances in which drift is detected. + * Gets the driftedProperties property value. Properties within one or more resource instances in which drift is detected. Returned only on $select. * @return array|null */ public function getDriftedProperties(): ?array { @@ -71,7 +71,7 @@ public function getFieldDeserializers(): array { } /** - * Gets the firstReportedDateTime property value. The date and time at which drift is first detected. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Gets the firstReportedDateTime property value. The date and time at which drift is first detected. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @return DateTime|null */ public function getFirstReportedDateTime(): ?DateTime { @@ -83,7 +83,7 @@ public function getFirstReportedDateTime(): ?DateTime { } /** - * Gets the monitorId property value. Globally unique identifier (GUID) of the monitor. System-generated. + * Gets the monitorId property value. Globally unique identifier (GUID) of the monitor. System-generated. Supports $filter (eq, ne). * @return string|null */ public function getMonitorId(): ?string { @@ -107,7 +107,7 @@ public function getResourceInstanceIdentifier(): ?OpenComplexDictionaryType { } /** - * Gets the resourceType property value. Resource for which the drift is detected. + * Gets the resourceType property value. Resource for which the drift is detected. Supports $filter (eq, ne, startsWith). * @return string|null */ public function getResourceType(): ?string { @@ -131,7 +131,7 @@ public function getStatus(): ?DriftStatus { } /** - * Gets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. + * Gets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. Supports $filter (eq, ne). * @return string|null */ public function getTenantId(): ?string { @@ -153,7 +153,7 @@ public function serialize(SerializationWriter $writer): void { } /** - * Sets the baselineResourceDisplayName property value. Resource instance for which the drift is detected. + * Sets the baselineResourceDisplayName property value. Resource instance for which the drift is detected. Supports $filter (eq, ne, startsWith) and $orderby. * @param string|null $value Value to set for the baselineResourceDisplayName property. */ public function setBaselineResourceDisplayName(?string $value): void { @@ -161,7 +161,7 @@ public function setBaselineResourceDisplayName(?string $value): void { } /** - * Sets the driftedProperties property value. Properties within one or more resource instances in which drift is detected. + * Sets the driftedProperties property value. Properties within one or more resource instances in which drift is detected. Returned only on $select. * @param array|null $value Value to set for the driftedProperties property. */ public function setDriftedProperties(?array $value): void { @@ -169,7 +169,7 @@ public function setDriftedProperties(?array $value): void { } /** - * Sets the firstReportedDateTime property value. The date and time at which drift is first detected. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Sets the firstReportedDateTime property value. The date and time at which drift is first detected. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @param DateTime|null $value Value to set for the firstReportedDateTime property. */ public function setFirstReportedDateTime(?DateTime $value): void { @@ -177,7 +177,7 @@ public function setFirstReportedDateTime(?DateTime $value): void { } /** - * Sets the monitorId property value. Globally unique identifier (GUID) of the monitor. System-generated. + * Sets the monitorId property value. Globally unique identifier (GUID) of the monitor. System-generated. Supports $filter (eq, ne). * @param string|null $value Value to set for the monitorId property. */ public function setMonitorId(?string $value): void { @@ -193,7 +193,7 @@ public function setResourceInstanceIdentifier(?OpenComplexDictionaryType $value) } /** - * Sets the resourceType property value. Resource for which the drift is detected. + * Sets the resourceType property value. Resource for which the drift is detected. Supports $filter (eq, ne, startsWith). * @param string|null $value Value to set for the resourceType property. */ public function setResourceType(?string $value): void { @@ -209,7 +209,7 @@ public function setStatus(?DriftStatus $value): void { } /** - * Sets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. + * Sets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. Supports $filter (eq, ne). * @param string|null $value Value to set for the tenantId property. */ public function setTenantId(?string $value): void { diff --git a/src/Generated/Models/ConfigurationMonitor.php b/src/Generated/Models/ConfigurationMonitor.php index a4672515064..6c1d02a8d62 100644 --- a/src/Generated/Models/ConfigurationMonitor.php +++ b/src/Generated/Models/ConfigurationMonitor.php @@ -50,7 +50,7 @@ public function getCreatedBy(): ?IdentitySet { } /** - * Gets the createdDateTime property value. The date and time when the monitor was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Gets the createdDateTime property value. The date and time when the monitor was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @return DateTime|null */ public function getCreatedDateTime(): ?DateTime { @@ -62,7 +62,7 @@ public function getCreatedDateTime(): ?DateTime { } /** - * Gets the description property value. User-friendly description of the monitor given by the user. + * Gets the description property value. User-friendly description of the monitor given by the user. Supports $filter (eq, ne, startsWith) and $orderby. * @return string|null */ public function getDescription(): ?string { @@ -74,7 +74,7 @@ public function getDescription(): ?string { } /** - * Gets the displayName property value. User-friendly name given by the user to the monitor. + * Gets the displayName property value. User-friendly name given by the user to the monitor. Supports $filter (eq, ne, startsWith) and $orderby. * @return string|null */ public function getDisplayName(): ?string { @@ -109,7 +109,7 @@ public function getFieldDeserializers(): array { } /** - * Gets the inactivationReason property value. The reason for the monitor's inactivation. + * Gets the inactivationReason property value. The reason for the monitor's inactivation. Returned only on $select. * @return string|null */ public function getInactivationReason(): ?string { @@ -133,7 +133,7 @@ public function getLastModifiedBy(): ?IdentitySet { } /** - * Gets the lastModifiedDateTime property value. The date and time when the monitor was last modified. If no modifications are made to the monitor, it's the same as createdDateTime. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Gets the lastModifiedDateTime property value. The date and time when the monitor was last modified. If no modifications are made to the monitor, it's the same as createdDateTime. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @return DateTime|null */ public function getLastModifiedDateTime(): ?DateTime { @@ -169,7 +169,7 @@ public function getMonitorRunFrequencyInHours(): ?int { } /** - * Gets the parameters property value. Key-value pairs that contain parameter values which might be used in the baseline. + * Gets the parameters property value. Key-value pairs that contain parameter values which might be used in the baseline. Returned only on $select. * @return OpenComplexDictionaryType|null */ public function getParameters(): ?OpenComplexDictionaryType { @@ -193,7 +193,7 @@ public function getStatus(): ?MonitorStatus { } /** - * Gets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. + * Gets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. Supports $filter (eq, ne). * @return string|null */ public function getTenantId(): ?string { @@ -237,7 +237,7 @@ public function setCreatedBy(?IdentitySet $value): void { } /** - * Sets the createdDateTime property value. The date and time when the monitor was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Sets the createdDateTime property value. The date and time when the monitor was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @param DateTime|null $value Value to set for the createdDateTime property. */ public function setCreatedDateTime(?DateTime $value): void { @@ -245,7 +245,7 @@ public function setCreatedDateTime(?DateTime $value): void { } /** - * Sets the description property value. User-friendly description of the monitor given by the user. + * Sets the description property value. User-friendly description of the monitor given by the user. Supports $filter (eq, ne, startsWith) and $orderby. * @param string|null $value Value to set for the description property. */ public function setDescription(?string $value): void { @@ -253,7 +253,7 @@ public function setDescription(?string $value): void { } /** - * Sets the displayName property value. User-friendly name given by the user to the monitor. + * Sets the displayName property value. User-friendly name given by the user to the monitor. Supports $filter (eq, ne, startsWith) and $orderby. * @param string|null $value Value to set for the displayName property. */ public function setDisplayName(?string $value): void { @@ -261,7 +261,7 @@ public function setDisplayName(?string $value): void { } /** - * Sets the inactivationReason property value. The reason for the monitor's inactivation. + * Sets the inactivationReason property value. The reason for the monitor's inactivation. Returned only on $select. * @param string|null $value Value to set for the inactivationReason property. */ public function setInactivationReason(?string $value): void { @@ -277,7 +277,7 @@ public function setLastModifiedBy(?IdentitySet $value): void { } /** - * Sets the lastModifiedDateTime property value. The date and time when the monitor was last modified. If no modifications are made to the monitor, it's the same as createdDateTime. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Sets the lastModifiedDateTime property value. The date and time when the monitor was last modified. If no modifications are made to the monitor, it's the same as createdDateTime. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @param DateTime|null $value Value to set for the lastModifiedDateTime property. */ public function setLastModifiedDateTime(?DateTime $value): void { @@ -301,7 +301,7 @@ public function setMonitorRunFrequencyInHours(?int $value): void { } /** - * Sets the parameters property value. Key-value pairs that contain parameter values which might be used in the baseline. + * Sets the parameters property value. Key-value pairs that contain parameter values which might be used in the baseline. Returned only on $select. * @param OpenComplexDictionaryType|null $value Value to set for the parameters property. */ public function setParameters(?OpenComplexDictionaryType $value): void { @@ -317,7 +317,7 @@ public function setStatus(?MonitorStatus $value): void { } /** - * Sets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. + * Sets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. Supports $filter (eq, ne). * @param string|null $value Value to set for the tenantId property. */ public function setTenantId(?string $value): void { diff --git a/src/Generated/Models/ConfigurationMonitoringResult.php b/src/Generated/Models/ConfigurationMonitoringResult.php index 5e42c23fa95..e457ab053ee 100644 --- a/src/Generated/Models/ConfigurationMonitoringResult.php +++ b/src/Generated/Models/ConfigurationMonitoringResult.php @@ -27,7 +27,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Confi } /** - * Gets the driftsCount property value. Number of drifts observed during a monitor run. + * Gets the driftsCount property value. Number of drifts observed during a monitor run. Supports $filter (eq, ne, ge, le) and $orderby. * @return int|null */ public function getDriftsCount(): ?int { @@ -39,7 +39,7 @@ public function getDriftsCount(): ?int { } /** - * Gets the errorDetails property value. All the error details that prevent the monitor from running successfully. The error details are a contained entity. + * Gets the errorDetails property value. All the error details that prevent the monitor from running successfully. The error details are a contained entity. Returned only on $select. * @return array|null */ public function getErrorDetails(): ?array { @@ -70,7 +70,7 @@ public function getFieldDeserializers(): array { } /** - * Gets the monitorId property value. Globally unique identifier (GUID) of the monitor. System-generated. + * Gets the monitorId property value. Globally unique identifier (GUID) of the monitor. System-generated. Supports $filter (eq, ne). * @return string|null */ public function getMonitorId(): ?string { @@ -82,7 +82,7 @@ public function getMonitorId(): ?string { } /** - * Gets the runCompletionDateTime property value. Date and time at which the monitor run completed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Gets the runCompletionDateTime property value. Date and time at which the monitor run completed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @return DateTime|null */ public function getRunCompletionDateTime(): ?DateTime { @@ -94,7 +94,7 @@ public function getRunCompletionDateTime(): ?DateTime { } /** - * Gets the runInitiationDateTime property value. Date and time at which the monitor run initiated. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Gets the runInitiationDateTime property value. Date and time at which the monitor run initiated. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @return DateTime|null */ public function getRunInitiationDateTime(): ?DateTime { @@ -118,7 +118,7 @@ public function getRunStatus(): ?MonitorRunStatus { } /** - * Gets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. + * Gets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. Supports $filter (eq, ne). * @return string|null */ public function getTenantId(): ?string { @@ -139,7 +139,7 @@ public function serialize(SerializationWriter $writer): void { } /** - * Sets the driftsCount property value. Number of drifts observed during a monitor run. + * Sets the driftsCount property value. Number of drifts observed during a monitor run. Supports $filter (eq, ne, ge, le) and $orderby. * @param int|null $value Value to set for the driftsCount property. */ public function setDriftsCount(?int $value): void { @@ -147,7 +147,7 @@ public function setDriftsCount(?int $value): void { } /** - * Sets the errorDetails property value. All the error details that prevent the monitor from running successfully. The error details are a contained entity. + * Sets the errorDetails property value. All the error details that prevent the monitor from running successfully. The error details are a contained entity. Returned only on $select. * @param array|null $value Value to set for the errorDetails property. */ public function setErrorDetails(?array $value): void { @@ -155,7 +155,7 @@ public function setErrorDetails(?array $value): void { } /** - * Sets the monitorId property value. Globally unique identifier (GUID) of the monitor. System-generated. + * Sets the monitorId property value. Globally unique identifier (GUID) of the monitor. System-generated. Supports $filter (eq, ne). * @param string|null $value Value to set for the monitorId property. */ public function setMonitorId(?string $value): void { @@ -163,7 +163,7 @@ public function setMonitorId(?string $value): void { } /** - * Sets the runCompletionDateTime property value. Date and time at which the monitor run completed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Sets the runCompletionDateTime property value. Date and time at which the monitor run completed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @param DateTime|null $value Value to set for the runCompletionDateTime property. */ public function setRunCompletionDateTime(?DateTime $value): void { @@ -171,7 +171,7 @@ public function setRunCompletionDateTime(?DateTime $value): void { } /** - * Sets the runInitiationDateTime property value. Date and time at which the monitor run initiated. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Sets the runInitiationDateTime property value. Date and time at which the monitor run initiated. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @param DateTime|null $value Value to set for the runInitiationDateTime property. */ public function setRunInitiationDateTime(?DateTime $value): void { @@ -187,7 +187,7 @@ public function setRunStatus(?MonitorRunStatus $value): void { } /** - * Sets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. + * Sets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the monitor runs. Fetched automatically by the system. Supports $filter (eq, ne). * @param string|null $value Value to set for the tenantId property. */ public function setTenantId(?string $value): void { diff --git a/src/Generated/Models/ConfigurationSnapshotJob.php b/src/Generated/Models/ConfigurationSnapshotJob.php index a8f94e096b0..e040f465f84 100644 --- a/src/Generated/Models/ConfigurationSnapshotJob.php +++ b/src/Generated/Models/ConfigurationSnapshotJob.php @@ -27,7 +27,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Confi } /** - * Gets the completedDateTime property value. The date and time when the snapshot job was completed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Gets the completedDateTime property value. The date and time when the snapshot job was completed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @return DateTime|null */ public function getCompletedDateTime(): ?DateTime { @@ -51,7 +51,7 @@ public function getCreatedBy(): ?IdentitySet { } /** - * Gets the createdDateTime property value. The date and time when the snapshot job was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Gets the createdDateTime property value. The date and time when the snapshot job was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @return DateTime|null */ public function getCreatedDateTime(): ?DateTime { @@ -63,7 +63,7 @@ public function getCreatedDateTime(): ?DateTime { } /** - * Gets the description property value. User-friendly description of the snapshot given by the user. + * Gets the description property value. User-friendly description of the snapshot given by the user. Supports $filter (eq, ne, startsWith) and $orderby. * @return string|null */ public function getDescription(): ?string { @@ -75,7 +75,7 @@ public function getDescription(): ?string { } /** - * Gets the displayName property value. User-friendly name provided by the user during snapshot creation. + * Gets the displayName property value. User-friendly name provided by the user during snapshot creation. Supports $filter (eq, ne, startsWith) and $orderby. * @return string|null */ public function getDisplayName(): ?string { @@ -87,7 +87,7 @@ public function getDisplayName(): ?string { } /** - * Gets the errorDetails property value. Details of errors related to the reasons why the snapshot can't complete. + * Gets the errorDetails property value. Details of errors related to the reasons why the snapshot can't complete. Returned only on $select. * @return array|null */ public function getErrorDetails(): ?array { @@ -135,7 +135,7 @@ public function getFieldDeserializers(): array { } /** - * Gets the resourceLocation property value. The URL at which the snapshot file resides. + * Gets the resourceLocation property value. The URL at which the snapshot file resides. Returned only on $select. * @return string|null */ public function getResourceLocation(): ?string { @@ -147,7 +147,7 @@ public function getResourceLocation(): ?string { } /** - * Gets the resources property value. The names of all resources included in the request body by the user who created the snapshot. Fetched by the system. + * Gets the resources property value. The names of all resources included in the request body by the user who created the snapshot. Fetched by the system. Returned only on $select. * @return array|null */ public function getResources(): ?array { @@ -173,7 +173,7 @@ public function getStatus(): ?SnapshotJobStatus { } /** - * Gets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the snapshot is created. + * Gets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the snapshot is created. Supports $filter (eq, ne). * @return string|null */ public function getTenantId(): ?string { @@ -198,7 +198,7 @@ public function serialize(SerializationWriter $writer): void { } /** - * Sets the completedDateTime property value. The date and time when the snapshot job was completed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Sets the completedDateTime property value. The date and time when the snapshot job was completed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @param DateTime|null $value Value to set for the completedDateTime property. */ public function setCompletedDateTime(?DateTime $value): void { @@ -214,7 +214,7 @@ public function setCreatedBy(?IdentitySet $value): void { } /** - * Sets the createdDateTime property value. The date and time when the snapshot job was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + * Sets the createdDateTime property value. The date and time when the snapshot job was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, ge, le) and $orderby. * @param DateTime|null $value Value to set for the createdDateTime property. */ public function setCreatedDateTime(?DateTime $value): void { @@ -222,7 +222,7 @@ public function setCreatedDateTime(?DateTime $value): void { } /** - * Sets the description property value. User-friendly description of the snapshot given by the user. + * Sets the description property value. User-friendly description of the snapshot given by the user. Supports $filter (eq, ne, startsWith) and $orderby. * @param string|null $value Value to set for the description property. */ public function setDescription(?string $value): void { @@ -230,7 +230,7 @@ public function setDescription(?string $value): void { } /** - * Sets the displayName property value. User-friendly name provided by the user during snapshot creation. + * Sets the displayName property value. User-friendly name provided by the user during snapshot creation. Supports $filter (eq, ne, startsWith) and $orderby. * @param string|null $value Value to set for the displayName property. */ public function setDisplayName(?string $value): void { @@ -238,7 +238,7 @@ public function setDisplayName(?string $value): void { } /** - * Sets the errorDetails property value. Details of errors related to the reasons why the snapshot can't complete. + * Sets the errorDetails property value. Details of errors related to the reasons why the snapshot can't complete. Returned only on $select. * @param array|null $value Value to set for the errorDetails property. */ public function setErrorDetails(?array $value): void { @@ -246,7 +246,7 @@ public function setErrorDetails(?array $value): void { } /** - * Sets the resourceLocation property value. The URL at which the snapshot file resides. + * Sets the resourceLocation property value. The URL at which the snapshot file resides. Returned only on $select. * @param string|null $value Value to set for the resourceLocation property. */ public function setResourceLocation(?string $value): void { @@ -254,7 +254,7 @@ public function setResourceLocation(?string $value): void { } /** - * Sets the resources property value. The names of all resources included in the request body by the user who created the snapshot. Fetched by the system. + * Sets the resources property value. The names of all resources included in the request body by the user who created the snapshot. Fetched by the system. Returned only on $select. * @param array|null $value Value to set for the resources property. */ public function setResources(?array $value): void { @@ -270,7 +270,7 @@ public function setStatus(?SnapshotJobStatus $value): void { } /** - * Sets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the snapshot is created. + * Sets the tenantId property value. Globally unique identifier (GUID) of the tenant for which the snapshot is created. Supports $filter (eq, ne). * @param string|null $value Value to set for the tenantId property. */ public function setTenantId(?string $value): void { diff --git a/src/Generated/Models/ContentCategory.php b/src/Generated/Models/ContentCategory.php new file mode 100644 index 00000000000..7b4ea4799a2 --- /dev/null +++ b/src/Generated/Models/ContentCategory.php @@ -0,0 +1,11 @@ +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/CrossTenantAccessPolicyAppServiceConnectSetting.php b/src/Generated/Models/CrossTenantAccessPolicyAppServiceConnectSetting.php new file mode 100644 index 00000000000..9dcc4dd6975 --- /dev/null +++ b/src/Generated/Models/CrossTenantAccessPolicyAppServiceConnectSetting.php @@ -0,0 +1,136 @@ +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 CrossTenantAccessPolicyAppServiceConnectSetting + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): CrossTenantAccessPolicyAppServiceConnectSetting { + return new CrossTenantAccessPolicyAppServiceConnectSetting(); + } + + /** + * 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 applications property value. The applications property + * @return CrossTenantAccessPolicyTargetConfiguration|null + */ + public function getApplications(): ?CrossTenantAccessPolicyTargetConfiguration { + $val = $this->getBackingStore()->get('applications'); + if (is_null($val) || $val instanceof CrossTenantAccessPolicyTargetConfiguration) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'applications'"); + } + + /** + * 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 [ + 'applications' => fn(ParseNode $n) => $o->setApplications($n->getObjectValue([CrossTenantAccessPolicyTargetConfiguration::class, 'createFromDiscriminatorValue'])), + '@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->writeObjectValue('applications', $this->getApplications()); + $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 applications property value. The applications property + * @param CrossTenantAccessPolicyTargetConfiguration|null $value Value to set for the applications property. + */ + public function setApplications(?CrossTenantAccessPolicyTargetConfiguration $value): void { + $this->getBackingStore()->set('applications', $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); + } + +} diff --git a/src/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.php b/src/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.php index 5ec0521ba36..cad743f7e9d 100644 --- a/src/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.php +++ b/src/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.php @@ -24,6 +24,18 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Cross return new CrossTenantAccessPolicyConfigurationDefault(); } + /** + * Gets the appServiceConnectInbound property value. The appServiceConnectInbound property + * @return CrossTenantAccessPolicyAppServiceConnectSetting|null + */ + public function getAppServiceConnectInbound(): ?CrossTenantAccessPolicyAppServiceConnectSetting { + $val = $this->getBackingStore()->get('appServiceConnectInbound'); + if (is_null($val) || $val instanceof CrossTenantAccessPolicyAppServiceConnectSetting) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'appServiceConnectInbound'"); + } + /** * Gets the automaticUserConsentSettings property value. Determines the default configuration for automatic user consent settings. The inboundAllowed and outboundAllowed properties are always false and can't be updated in the default configuration. Read-only. * @return InboundOutboundPolicyConfiguration|null @@ -84,6 +96,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 @@ -91,14 +115,18 @@ public function getB2bDirectConnectOutbound(): ?CrossTenantAccessPolicyB2BSettin public function getFieldDeserializers(): array { $o = $this; return array_merge(parent::getFieldDeserializers(), [ + 'appServiceConnectInbound' => fn(ParseNode $n) => $o->setAppServiceConnectInbound($n->getObjectValue([CrossTenantAccessPolicyAppServiceConnectSetting::class, 'createFromDiscriminatorValue'])), 'automaticUserConsentSettings' => fn(ParseNode $n) => $o->setAutomaticUserConsentSettings($n->getObjectValue([InboundOutboundPolicyConfiguration::class, 'createFromDiscriminatorValue'])), 'b2bCollaborationInbound' => fn(ParseNode $n) => $o->setB2bCollaborationInbound($n->getObjectValue([CrossTenantAccessPolicyB2BSetting::class, 'createFromDiscriminatorValue'])), '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()), + 'm365CollaborationInbound' => fn(ParseNode $n) => $o->setM365CollaborationInbound($n->getObjectValue([CrossTenantAccessPolicyM365CollaborationInboundSetting::class, 'createFromDiscriminatorValue'])), + 'm365CollaborationOutbound' => fn(ParseNode $n) => $o->setM365CollaborationOutbound($n->getObjectValue([CrossTenantAccessPolicyM365CollaborationOutboundSetting::class, 'createFromDiscriminatorValue'])), 'tenantRestrictions' => fn(ParseNode $n) => $o->setTenantRestrictions($n->getObjectValue([CrossTenantAccessPolicyTenantRestrictions::class, 'createFromDiscriminatorValue'])), ]); } @@ -139,6 +167,30 @@ public function getIsServiceDefault(): ?bool { throw new \UnexpectedValueException("Invalid type found in backing store for 'isServiceDefault'"); } + /** + * Gets the m365CollaborationInbound property value. The m365CollaborationInbound property + * @return CrossTenantAccessPolicyM365CollaborationInboundSetting|null + */ + public function getM365CollaborationInbound(): ?CrossTenantAccessPolicyM365CollaborationInboundSetting { + $val = $this->getBackingStore()->get('m365CollaborationInbound'); + if (is_null($val) || $val instanceof CrossTenantAccessPolicyM365CollaborationInboundSetting) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'm365CollaborationInbound'"); + } + + /** + * Gets the m365CollaborationOutbound property value. The m365CollaborationOutbound property + * @return CrossTenantAccessPolicyM365CollaborationOutboundSetting|null + */ + public function getM365CollaborationOutbound(): ?CrossTenantAccessPolicyM365CollaborationOutboundSetting { + $val = $this->getBackingStore()->get('m365CollaborationOutbound'); + if (is_null($val) || $val instanceof CrossTenantAccessPolicyM365CollaborationOutboundSetting) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'm365CollaborationOutbound'"); + } + /** * Gets the tenantRestrictions property value. Defines the default tenant restrictions configuration for users in your organization who access an external organization on your network or devices. * @return CrossTenantAccessPolicyTenantRestrictions|null @@ -157,17 +209,29 @@ public function getTenantRestrictions(): ?CrossTenantAccessPolicyTenantRestricti */ public function serialize(SerializationWriter $writer): void { parent::serialize($writer); + $writer->writeObjectValue('appServiceConnectInbound', $this->getAppServiceConnectInbound()); $writer->writeObjectValue('automaticUserConsentSettings', $this->getAutomaticUserConsentSettings()); $writer->writeObjectValue('b2bCollaborationInbound', $this->getB2bCollaborationInbound()); $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()); + $writer->writeObjectValue('m365CollaborationInbound', $this->getM365CollaborationInbound()); + $writer->writeObjectValue('m365CollaborationOutbound', $this->getM365CollaborationOutbound()); $writer->writeObjectValue('tenantRestrictions', $this->getTenantRestrictions()); } + /** + * Sets the appServiceConnectInbound property value. The appServiceConnectInbound property + * @param CrossTenantAccessPolicyAppServiceConnectSetting|null $value Value to set for the appServiceConnectInbound property. + */ + public function setAppServiceConnectInbound(?CrossTenantAccessPolicyAppServiceConnectSetting $value): void { + $this->getBackingStore()->set('appServiceConnectInbound', $value); + } + /** * Sets the automaticUserConsentSettings property value. Determines the default configuration for automatic user consent settings. The inboundAllowed and outboundAllowed properties are always false and can't be updated in the default configuration. Read-only. * @param InboundOutboundPolicyConfiguration|null $value Value to set for the automaticUserConsentSettings property. @@ -208,6 +272,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. @@ -232,6 +304,22 @@ public function setIsServiceDefault(?bool $value): void { $this->getBackingStore()->set('isServiceDefault', $value); } + /** + * Sets the m365CollaborationInbound property value. The m365CollaborationInbound property + * @param CrossTenantAccessPolicyM365CollaborationInboundSetting|null $value Value to set for the m365CollaborationInbound property. + */ + public function setM365CollaborationInbound(?CrossTenantAccessPolicyM365CollaborationInboundSetting $value): void { + $this->getBackingStore()->set('m365CollaborationInbound', $value); + } + + /** + * Sets the m365CollaborationOutbound property value. The m365CollaborationOutbound property + * @param CrossTenantAccessPolicyM365CollaborationOutboundSetting|null $value Value to set for the m365CollaborationOutbound property. + */ + public function setM365CollaborationOutbound(?CrossTenantAccessPolicyM365CollaborationOutboundSetting $value): void { + $this->getBackingStore()->set('m365CollaborationOutbound', $value); + } + /** * Sets the tenantRestrictions property value. Defines the default tenant restrictions configuration for users in your organization who access an external organization on your network or devices. * @param CrossTenantAccessPolicyTenantRestrictions|null $value Value to set for the tenantRestrictions property. diff --git a/src/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.php b/src/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.php index ab1a628a549..1f4509506d4 100644 --- a/src/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.php +++ b/src/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.php @@ -25,6 +25,18 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Cross return new CrossTenantAccessPolicyConfigurationPartner(); } + /** + * Gets the appServiceConnectInbound property value. The appServiceConnectInbound property + * @return CrossTenantAccessPolicyAppServiceConnectSetting|null + */ + public function getAppServiceConnectInbound(): ?CrossTenantAccessPolicyAppServiceConnectSetting { + $val = $this->getBackingStore()->get('appServiceConnectInbound'); + if (is_null($val) || $val instanceof CrossTenantAccessPolicyAppServiceConnectSetting) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'appServiceConnectInbound'"); + } + /** * Gets the automaticUserConsentSettings property value. Determines the partner-specific configuration for automatic user consent settings. Unless configured, the inboundAllowed and outboundAllowed properties are null and inherit from the default settings, which is always false. * @return InboundOutboundPolicyConfiguration|null @@ -85,6 +97,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 @@ -92,15 +116,19 @@ public function getB2bDirectConnectOutbound(): ?CrossTenantAccessPolicyB2BSettin public function getFieldDeserializers(): array { $o = $this; return array_merge(parent::getFieldDeserializers(), [ + 'appServiceConnectInbound' => fn(ParseNode $n) => $o->setAppServiceConnectInbound($n->getObjectValue([CrossTenantAccessPolicyAppServiceConnectSetting::class, 'createFromDiscriminatorValue'])), 'automaticUserConsentSettings' => fn(ParseNode $n) => $o->setAutomaticUserConsentSettings($n->getObjectValue([InboundOutboundPolicyConfiguration::class, 'createFromDiscriminatorValue'])), 'b2bCollaborationInbound' => fn(ParseNode $n) => $o->setB2bCollaborationInbound($n->getObjectValue([CrossTenantAccessPolicyB2BSetting::class, 'createFromDiscriminatorValue'])), '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()), 'isServiceProvider' => fn(ParseNode $n) => $o->setIsServiceProvider($n->getBooleanValue()), + 'm365CollaborationInbound' => fn(ParseNode $n) => $o->setM365CollaborationInbound($n->getObjectValue([CrossTenantAccessPolicyM365CollaborationInboundSetting::class, 'createFromDiscriminatorValue'])), + 'm365CollaborationOutbound' => fn(ParseNode $n) => $o->setM365CollaborationOutbound($n->getObjectValue([CrossTenantAccessPolicyM365CollaborationOutboundSetting::class, 'createFromDiscriminatorValue'])), 'tenantId' => fn(ParseNode $n) => $o->setTenantId($n->getStringValue()), 'tenantRestrictions' => fn(ParseNode $n) => $o->setTenantRestrictions($n->getObjectValue([CrossTenantAccessPolicyTenantRestrictions::class, 'createFromDiscriminatorValue'])), ]); @@ -154,6 +182,30 @@ public function getIsServiceProvider(): ?bool { throw new \UnexpectedValueException("Invalid type found in backing store for 'isServiceProvider'"); } + /** + * Gets the m365CollaborationInbound property value. The m365CollaborationInbound property + * @return CrossTenantAccessPolicyM365CollaborationInboundSetting|null + */ + public function getM365CollaborationInbound(): ?CrossTenantAccessPolicyM365CollaborationInboundSetting { + $val = $this->getBackingStore()->get('m365CollaborationInbound'); + if (is_null($val) || $val instanceof CrossTenantAccessPolicyM365CollaborationInboundSetting) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'm365CollaborationInbound'"); + } + + /** + * Gets the m365CollaborationOutbound property value. The m365CollaborationOutbound property + * @return CrossTenantAccessPolicyM365CollaborationOutboundSetting|null + */ + public function getM365CollaborationOutbound(): ?CrossTenantAccessPolicyM365CollaborationOutboundSetting { + $val = $this->getBackingStore()->get('m365CollaborationOutbound'); + if (is_null($val) || $val instanceof CrossTenantAccessPolicyM365CollaborationOutboundSetting) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'm365CollaborationOutbound'"); + } + /** * Gets the tenantId property value. The tenant identifier for the partner Microsoft Entra organization. Read-only. Key. * @return string|null @@ -184,19 +236,31 @@ public function getTenantRestrictions(): ?CrossTenantAccessPolicyTenantRestricti */ public function serialize(SerializationWriter $writer): void { parent::serialize($writer); + $writer->writeObjectValue('appServiceConnectInbound', $this->getAppServiceConnectInbound()); $writer->writeObjectValue('automaticUserConsentSettings', $this->getAutomaticUserConsentSettings()); $writer->writeObjectValue('b2bCollaborationInbound', $this->getB2bCollaborationInbound()); $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()); $writer->writeBooleanValue('isServiceProvider', $this->getIsServiceProvider()); + $writer->writeObjectValue('m365CollaborationInbound', $this->getM365CollaborationInbound()); + $writer->writeObjectValue('m365CollaborationOutbound', $this->getM365CollaborationOutbound()); $writer->writeStringValue('tenantId', $this->getTenantId()); $writer->writeObjectValue('tenantRestrictions', $this->getTenantRestrictions()); } + /** + * Sets the appServiceConnectInbound property value. The appServiceConnectInbound property + * @param CrossTenantAccessPolicyAppServiceConnectSetting|null $value Value to set for the appServiceConnectInbound property. + */ + public function setAppServiceConnectInbound(?CrossTenantAccessPolicyAppServiceConnectSetting $value): void { + $this->getBackingStore()->set('appServiceConnectInbound', $value); + } + /** * Sets the automaticUserConsentSettings property value. Determines the partner-specific configuration for automatic user consent settings. Unless configured, the inboundAllowed and outboundAllowed properties are null and inherit from the default settings, which is always false. * @param InboundOutboundPolicyConfiguration|null $value Value to set for the automaticUserConsentSettings property. @@ -237,6 +301,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. @@ -269,6 +341,22 @@ public function setIsServiceProvider(?bool $value): void { $this->getBackingStore()->set('isServiceProvider', $value); } + /** + * Sets the m365CollaborationInbound property value. The m365CollaborationInbound property + * @param CrossTenantAccessPolicyM365CollaborationInboundSetting|null $value Value to set for the m365CollaborationInbound property. + */ + public function setM365CollaborationInbound(?CrossTenantAccessPolicyM365CollaborationInboundSetting $value): void { + $this->getBackingStore()->set('m365CollaborationInbound', $value); + } + + /** + * Sets the m365CollaborationOutbound property value. The m365CollaborationOutbound property + * @param CrossTenantAccessPolicyM365CollaborationOutboundSetting|null $value Value to set for the m365CollaborationOutbound property. + */ + public function setM365CollaborationOutbound(?CrossTenantAccessPolicyM365CollaborationOutboundSetting $value): void { + $this->getBackingStore()->set('m365CollaborationOutbound', $value); + } + /** * Sets the tenantId property value. The tenant identifier for the partner Microsoft Entra organization. Read-only. Key. * @param string|null $value Value to set for the tenantId property. diff --git a/src/Generated/Models/CrossTenantAccessPolicyM365CollaborationInboundSetting.php b/src/Generated/Models/CrossTenantAccessPolicyM365CollaborationInboundSetting.php new file mode 100644 index 00000000000..1cc69150b1d --- /dev/null +++ b/src/Generated/Models/CrossTenantAccessPolicyM365CollaborationInboundSetting.php @@ -0,0 +1,136 @@ +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 CrossTenantAccessPolicyM365CollaborationInboundSetting + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): CrossTenantAccessPolicyM365CollaborationInboundSetting { + return new CrossTenantAccessPolicyM365CollaborationInboundSetting(); + } + + /** + * 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()), + 'users' => fn(ParseNode $n) => $o->setUsers($n->getObjectValue([CrossTenantAccessPolicyTargetConfiguration::class, 'createFromDiscriminatorValue'])), + ]; + } + + /** + * 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 users property value. The users property + * @return CrossTenantAccessPolicyTargetConfiguration|null + */ + public function getUsers(): ?CrossTenantAccessPolicyTargetConfiguration { + $val = $this->getBackingStore()->get('users'); + if (is_null($val) || $val instanceof CrossTenantAccessPolicyTargetConfiguration) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'users'"); + } + + /** + * 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->writeObjectValue('users', $this->getUsers()); + $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 users property value. The users property + * @param CrossTenantAccessPolicyTargetConfiguration|null $value Value to set for the users property. + */ + public function setUsers(?CrossTenantAccessPolicyTargetConfiguration $value): void { + $this->getBackingStore()->set('users', $value); + } + +} diff --git a/src/Generated/Models/CrossTenantAccessPolicyM365CollaborationOutboundSetting.php b/src/Generated/Models/CrossTenantAccessPolicyM365CollaborationOutboundSetting.php new file mode 100644 index 00000000000..fe2d2f621b3 --- /dev/null +++ b/src/Generated/Models/CrossTenantAccessPolicyM365CollaborationOutboundSetting.php @@ -0,0 +1,136 @@ +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 CrossTenantAccessPolicyM365CollaborationOutboundSetting + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): CrossTenantAccessPolicyM365CollaborationOutboundSetting { + return new CrossTenantAccessPolicyM365CollaborationOutboundSetting(); + } + + /** + * 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()), + 'usersAndGroups' => fn(ParseNode $n) => $o->setUsersAndGroups($n->getObjectValue([CrossTenantAccessPolicyTargetConfiguration::class, 'createFromDiscriminatorValue'])), + ]; + } + + /** + * 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 usersAndGroups property value. The usersAndGroups property + * @return CrossTenantAccessPolicyTargetConfiguration|null + */ + public function getUsersAndGroups(): ?CrossTenantAccessPolicyTargetConfiguration { + $val = $this->getBackingStore()->get('usersAndGroups'); + if (is_null($val) || $val instanceof CrossTenantAccessPolicyTargetConfiguration) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'usersAndGroups'"); + } + + /** + * 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->writeObjectValue('usersAndGroups', $this->getUsersAndGroups()); + $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 usersAndGroups property value. The usersAndGroups property + * @param CrossTenantAccessPolicyTargetConfiguration|null $value Value to set for the usersAndGroups property. + */ + public function setUsersAndGroups(?CrossTenantAccessPolicyTargetConfiguration $value): void { + $this->getBackingStore()->set('usersAndGroups', $value); + } + +} diff --git a/src/Generated/Models/CrossTenantIdentitySyncPolicyPartner.php b/src/Generated/Models/CrossTenantIdentitySyncPolicyPartner.php index 220cbb80499..3dd37ac988a 100644 --- a/src/Generated/Models/CrossTenantIdentitySyncPolicyPartner.php +++ b/src/Generated/Models/CrossTenantIdentitySyncPolicyPartner.php @@ -26,7 +26,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Cross } /** - * Gets the displayName property value. Display name for the cross-tenant user synchronization policy. Use the name of the partner Microsoft Entra tenant to easily identify the policy. Optional. + * Gets the displayName property value. Display name for the cross-tenant user and group synchronization policy. Use the name of the partner Microsoft Entra tenant to easily identify the policy. Optional. * @return string|null */ public function getDisplayName(): ?string { @@ -65,7 +65,7 @@ public function getFieldDeserializers(): array { } /** - * Gets the groupSyncInbound property value. Defines whether groups can be synchronized from a partner tenant. Key. + * Gets the groupSyncInbound property value. Defines whether groups can be synchronized from a partner tenant. * @return CrossTenantGroupSyncInbound|null */ public function getGroupSyncInbound(): ?CrossTenantGroupSyncInbound { @@ -77,7 +77,7 @@ public function getGroupSyncInbound(): ?CrossTenantGroupSyncInbound { } /** - * Gets the tenantId property value. Tenant identifier for the partner Microsoft Entra organization. Read-only. + * Gets the tenantId property value. Tenant identifier for the partner Microsoft Entra organization. Key. Read-only. * @return string|null */ public function getTenantId(): ?string { @@ -89,7 +89,7 @@ public function getTenantId(): ?string { } /** - * Gets the userSyncInbound property value. Defines whether users can be synchronized from the partner tenant. Key. + * Gets the userSyncInbound property value. Defines whether users can be synchronized from the partner tenant. * @return CrossTenantUserSyncInbound|null */ public function getUserSyncInbound(): ?CrossTenantUserSyncInbound { @@ -114,7 +114,7 @@ public function serialize(SerializationWriter $writer): void { } /** - * Sets the displayName property value. Display name for the cross-tenant user synchronization policy. Use the name of the partner Microsoft Entra tenant to easily identify the policy. Optional. + * Sets the displayName property value. Display name for the cross-tenant user and group synchronization policy. Use the name of the partner Microsoft Entra tenant to easily identify the policy. Optional. * @param string|null $value Value to set for the displayName property. */ public function setDisplayName(?string $value): void { @@ -130,7 +130,7 @@ public function setExternalCloudAuthorizedApplicationId(?string $value): void { } /** - * Sets the groupSyncInbound property value. Defines whether groups can be synchronized from a partner tenant. Key. + * Sets the groupSyncInbound property value. Defines whether groups can be synchronized from a partner tenant. * @param CrossTenantGroupSyncInbound|null $value Value to set for the groupSyncInbound property. */ public function setGroupSyncInbound(?CrossTenantGroupSyncInbound $value): void { @@ -138,7 +138,7 @@ public function setGroupSyncInbound(?CrossTenantGroupSyncInbound $value): void { } /** - * Sets the tenantId property value. Tenant identifier for the partner Microsoft Entra organization. Read-only. + * Sets the tenantId property value. Tenant identifier for the partner Microsoft Entra organization. Key. Read-only. * @param string|null $value Value to set for the tenantId property. */ public function setTenantId(?string $value): void { @@ -146,7 +146,7 @@ public function setTenantId(?string $value): void { } /** - * Sets the userSyncInbound property value. Defines whether users can be synchronized from the partner tenant. Key. + * Sets the userSyncInbound property value. Defines whether users can be synchronized from the partner tenant. * @param CrossTenantUserSyncInbound|null $value Value to set for the userSyncInbound property. */ public function setUserSyncInbound(?CrossTenantUserSyncInbound $value): void { 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/Directory.php b/src/Generated/Models/Directory.php index 1dae9e18d39..3e27aa7c643 100644 --- a/src/Generated/Models/Directory.php +++ b/src/Generated/Models/Directory.php @@ -2,6 +2,8 @@ namespace Microsoft\Graph\Beta\Generated\Models; +use Microsoft\Graph\Beta\Generated\Models\EntraRecoveryServices\Recovery; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\TenantGovernance; use Microsoft\Kiota\Abstractions\Serialization\Parsable; use Microsoft\Kiota\Abstractions\Serialization\ParseNode; use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter; @@ -186,9 +188,11 @@ public function getFieldDeserializers(): array { 'publicKeyInfrastructure' => fn(ParseNode $n) => $o->setPublicKeyInfrastructure($n->getObjectValue([PublicKeyInfrastructureRoot::class, 'createFromDiscriminatorValue'])), 'recommendationConfiguration' => fn(ParseNode $n) => $o->setRecommendationConfiguration($n->getObjectValue([RecommendationConfiguration::class, 'createFromDiscriminatorValue'])), 'recommendations' => fn(ParseNode $n) => $o->setRecommendations($n->getCollectionOfObjectValues([Recommendation::class, 'createFromDiscriminatorValue'])), + 'recovery' => fn(ParseNode $n) => $o->setRecovery($n->getObjectValue([Recovery::class, 'createFromDiscriminatorValue'])), 'sharedEmailDomains' => fn(ParseNode $n) => $o->setSharedEmailDomains($n->getCollectionOfObjectValues([SharedEmailDomain::class, 'createFromDiscriminatorValue'])), 'subscriptions' => fn(ParseNode $n) => $o->setSubscriptions($n->getCollectionOfObjectValues([CompanySubscription::class, 'createFromDiscriminatorValue'])), 'templates' => fn(ParseNode $n) => $o->setTemplates($n->getObjectValue([Template::class, 'createFromDiscriminatorValue'])), + 'tenantGovernance' => fn(ParseNode $n) => $o->setTenantGovernance($n->getObjectValue([TenantGovernance::class, 'createFromDiscriminatorValue'])), ]); } @@ -300,6 +304,18 @@ public function getRecommendations(): ?array { throw new \UnexpectedValueException("Invalid type found in backing store for 'recommendations'"); } + /** + * Gets the recovery property value. Represents the Entra backup and recovery service for the tenant. + * @return Recovery|null + */ + public function getRecovery(): ?Recovery { + $val = $this->getBackingStore()->get('recovery'); + if (is_null($val) || $val instanceof Recovery) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'recovery'"); + } + /** * Gets the sharedEmailDomains property value. The sharedEmailDomains property * @return array|null @@ -340,6 +356,18 @@ public function getTemplates(): ?Template { throw new \UnexpectedValueException("Invalid type found in backing store for 'templates'"); } + /** + * Gets the tenantGovernance property value. Container for Microsoft Entra Tenant Governance capabilities. + * @return TenantGovernance|null + */ + public function getTenantGovernance(): ?TenantGovernance { + $val = $this->getBackingStore()->get('tenantGovernance'); + if (is_null($val) || $val instanceof TenantGovernance) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'tenantGovernance'"); + } + /** * Serializes information the current object * @param SerializationWriter $writer Serialization writer to use to serialize this model @@ -364,9 +392,11 @@ public function serialize(SerializationWriter $writer): void { $writer->writeObjectValue('publicKeyInfrastructure', $this->getPublicKeyInfrastructure()); $writer->writeObjectValue('recommendationConfiguration', $this->getRecommendationConfiguration()); $writer->writeCollectionOfObjectValues('recommendations', $this->getRecommendations()); + $writer->writeObjectValue('recovery', $this->getRecovery()); $writer->writeCollectionOfObjectValues('sharedEmailDomains', $this->getSharedEmailDomains()); $writer->writeCollectionOfObjectValues('subscriptions', $this->getSubscriptions()); $writer->writeObjectValue('templates', $this->getTemplates()); + $writer->writeObjectValue('tenantGovernance', $this->getTenantGovernance()); } /** @@ -513,6 +543,14 @@ public function setRecommendations(?array $value): void { $this->getBackingStore()->set('recommendations', $value); } + /** + * Sets the recovery property value. Represents the Entra backup and recovery service for the tenant. + * @param Recovery|null $value Value to set for the recovery property. + */ + public function setRecovery(?Recovery $value): void { + $this->getBackingStore()->set('recovery', $value); + } + /** * Sets the sharedEmailDomains property value. The sharedEmailDomains property * @param array|null $value Value to set for the sharedEmailDomains property. @@ -537,4 +575,12 @@ public function setTemplates(?Template $value): void { $this->getBackingStore()->set('templates', $value); } + /** + * Sets the tenantGovernance property value. Container for Microsoft Entra Tenant Governance capabilities. + * @param TenantGovernance|null $value Value to set for the tenantGovernance property. + */ + public function setTenantGovernance(?TenantGovernance $value): void { + $this->getBackingStore()->set('tenantGovernance', $value); + } + } 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..8012a3a5aaf --- /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 content of the notification email in plain text format. + * @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 email address of the sender for notification emails. Shared mailboxes aren't supported. + * @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 line of the notification email. + * @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 content of the notification email in plain text format. + * @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 email address of the sender for notification emails. Shared mailboxes aren't supported. + * @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 line of the notification email. + * @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..8520952d8a9 100644 --- a/src/Generated/Models/Entity.php +++ b/src/Generated/Models/Entity.php @@ -32,6 +32,12 @@ use Microsoft\Graph\Beta\Generated\Models\Ediscovery\ReviewSetQuery; use Microsoft\Graph\Beta\Generated\Models\Ediscovery\SourceCollection; use Microsoft\Graph\Beta\Generated\Models\Ediscovery\TagOperation; +use Microsoft\Graph\Beta\Generated\Models\EntraRecoveryServices\Recovery; +use Microsoft\Graph\Beta\Generated\Models\EntraRecoveryServices\RecoveryChangeObjectBase; +use Microsoft\Graph\Beta\Generated\Models\EntraRecoveryServices\RecoveryJob; +use Microsoft\Graph\Beta\Generated\Models\EntraRecoveryServices\RecoveryJobBase; +use Microsoft\Graph\Beta\Generated\Models\EntraRecoveryServices\RecoveryPreviewJob; +use Microsoft\Graph\Beta\Generated\Models\EntraRecoveryServices\Snapshot; use Microsoft\Graph\Beta\Generated\Models\ExternalConnectors\ConnectionOperation; use Microsoft\Graph\Beta\Generated\Models\ExternalConnectors\ConnectionQuota; use Microsoft\Graph\Beta\Generated\Models\ExternalConnectors\ExternalActivity; @@ -120,6 +126,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 +218,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; @@ -306,7 +321,31 @@ use Microsoft\Graph\Beta\Generated\Models\TeamsAdministration\TeamsUserConfiguration; use Microsoft\Graph\Beta\Generated\Models\TeamsAdministration\TelephoneNumberLongRunningOperation; use Microsoft\Graph\Beta\Generated\Models\TeamsAdministration\TelephoneNumberManagementRoot; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\B2bRegistrationMetrics; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\B2BRegistrationMetricsBase; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\B2BRegistrationMetricsInitial; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\B2BRegistrationMetricsRecent; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\B2BSignInActivityMetrics; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\B2BSignInActivityMetricsBase; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\B2BSignInActivityMetricsInitial; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\B2BSignInActivityMetricsRecent; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\BillingMetrics; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\BillingMetricsBase; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\BillingMetricsInitial; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\BillingMetricsRecent; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\GovernanceInvitation; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\GovernancePolicyTemplate; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\GovernanceRelationship; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\GovernanceRequest; use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\LongRunningOperation; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\MultiTenantApplicationMetrics; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\MultiTenantApplicationMetricsBase; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\MultiTenantApplicationMetricsInitial; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\MultiTenantApplicationMetricsRecent; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\RelatedTenant; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\RelatedTenantsRefreshRequest; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\TenantGovernance; +use Microsoft\Graph\Beta\Generated\Models\TenantGovernanceServices\TenantGovernanceSetting; use Microsoft\Graph\Beta\Generated\Models\TermStore\Group; use Microsoft\Graph\Beta\Generated\Models\TermStore\Relation; use Microsoft\Graph\Beta\Generated\Models\TermStore\Set; @@ -404,6 +443,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 +671,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 +856,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 +1051,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(); @@ -1094,6 +1138,12 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.entitlementManagementSettings': return new EntitlementManagementSettings(); case '#microsoft.graph.entra': return new Entra(); case '#microsoft.graph.entraIdProtectionRiskyUserApproval': return new EntraIdProtectionRiskyUserApproval(); + case '#microsoft.graph.entraRecoveryServices.recovery': return new Recovery(); + case '#microsoft.graph.entraRecoveryServices.recoveryChangeObjectBase': return new RecoveryChangeObjectBase(); + case '#microsoft.graph.entraRecoveryServices.recoveryJob': return new RecoveryJob(); + case '#microsoft.graph.entraRecoveryServices.recoveryJobBase': return new RecoveryJobBase(); + case '#microsoft.graph.entraRecoveryServices.recoveryPreviewJob': return new RecoveryPreviewJob(); + case '#microsoft.graph.entraRecoveryServices.snapshot': return new Snapshot(); case '#microsoft.graph.evaluateLabelJobResponse': return new EvaluateLabelJobResponse(); case '#microsoft.graph.event': return new Event(); case '#microsoft.graph.eventMessage': return new EventMessage(); @@ -1579,6 +1629,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 +1682,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 +1761,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 +1839,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 +1957,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 +2032,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 +2237,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 +2261,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(); @@ -2240,7 +2307,31 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit case '#microsoft.graph.tenantAppManagementPolicy': return new TenantAppManagementPolicy(); case '#microsoft.graph.tenantAttachRBAC': return new TenantAttachRBAC(); case '#microsoft.graph.tenantDataSecurityAndGovernance': return new TenantDataSecurityAndGovernance(); + case '#microsoft.graph.tenantGovernanceServices.b2bRegistrationMetrics': return new B2bRegistrationMetrics(); + case '#microsoft.graph.tenantGovernanceServices.b2BRegistrationMetricsBase': return new B2BRegistrationMetricsBase(); + case '#microsoft.graph.tenantGovernanceServices.b2BRegistrationMetricsInitial': return new B2BRegistrationMetricsInitial(); + case '#microsoft.graph.tenantGovernanceServices.b2BRegistrationMetricsRecent': return new B2BRegistrationMetricsRecent(); + case '#microsoft.graph.tenantGovernanceServices.b2BSignInActivityMetrics': return new B2BSignInActivityMetrics(); + case '#microsoft.graph.tenantGovernanceServices.b2BSignInActivityMetricsBase': return new B2BSignInActivityMetricsBase(); + case '#microsoft.graph.tenantGovernanceServices.b2BSignInActivityMetricsInitial': return new B2BSignInActivityMetricsInitial(); + case '#microsoft.graph.tenantGovernanceServices.b2BSignInActivityMetricsRecent': return new B2BSignInActivityMetricsRecent(); + case '#microsoft.graph.tenantGovernanceServices.billingMetrics': return new BillingMetrics(); + case '#microsoft.graph.tenantGovernanceServices.billingMetricsBase': return new BillingMetricsBase(); + case '#microsoft.graph.tenantGovernanceServices.billingMetricsInitial': return new BillingMetricsInitial(); + case '#microsoft.graph.tenantGovernanceServices.billingMetricsRecent': return new BillingMetricsRecent(); + case '#microsoft.graph.tenantGovernanceServices.governanceInvitation': return new GovernanceInvitation(); + case '#microsoft.graph.tenantGovernanceServices.governancePolicyTemplate': return new GovernancePolicyTemplate(); + case '#microsoft.graph.tenantGovernanceServices.governanceRelationship': return new GovernanceRelationship(); + case '#microsoft.graph.tenantGovernanceServices.governanceRequest': return new GovernanceRequest(); case '#microsoft.graph.tenantGovernanceServices.longRunningOperation': return new LongRunningOperation(); + case '#microsoft.graph.tenantGovernanceServices.multiTenantApplicationMetrics': return new MultiTenantApplicationMetrics(); + case '#microsoft.graph.tenantGovernanceServices.multiTenantApplicationMetricsBase': return new MultiTenantApplicationMetricsBase(); + case '#microsoft.graph.tenantGovernanceServices.multiTenantApplicationMetricsInitial': return new MultiTenantApplicationMetricsInitial(); + case '#microsoft.graph.tenantGovernanceServices.multiTenantApplicationMetricsRecent': return new MultiTenantApplicationMetricsRecent(); + case '#microsoft.graph.tenantGovernanceServices.relatedTenant': return new RelatedTenant(); + case '#microsoft.graph.tenantGovernanceServices.relatedTenantsRefreshRequest': return new RelatedTenantsRefreshRequest(); + case '#microsoft.graph.tenantGovernanceServices.tenantGovernance': return new TenantGovernance(); + case '#microsoft.graph.tenantGovernanceServices.tenantGovernanceSetting': return new TenantGovernanceSetting(); case '#microsoft.graph.tenantProtectionScopeContainer': return new TenantProtectionScopeContainer(); case '#microsoft.graph.tenantRelationshipAccessPolicyBase': return new TenantRelationshipAccessPolicyBase(); case '#microsoft.graph.tenantSetupInfo': return new TenantSetupInfo(); @@ -2471,6 +2562,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/EntraRecoveryServices/EntityTypeAndIds.php b/src/Generated/Models/EntraRecoveryServices/EntityTypeAndIds.php new file mode 100644 index 00000000000..138dc8adde0 --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/EntityTypeAndIds.php @@ -0,0 +1,168 @@ +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 EntityTypeAndIds + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): EntityTypeAndIds { + return new EntityTypeAndIds(); + } + + /** + * 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 entityIds property value. The list of entity IDs for the specified entity type. + * @return array|null + */ + public function getEntityIds(): ?array { + $val = $this->getBackingStore()->get('entityIds'); + 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 'entityIds'"); + } + + /** + * Gets the entityType property value. The entityType property + * @return ResourceTypeName|null + */ + public function getEntityType(): ?ResourceTypeName { + $val = $this->getBackingStore()->get('entityType'); + if (is_null($val) || $val instanceof ResourceTypeName) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'entityType'"); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return [ + 'entityIds' => function (ParseNode $n) { + $val = $n->getCollectionOfPrimitiveValues(); + if (is_array($val)) { + TypeUtils::validateCollectionValues($val, 'string'); + } + /** @var array|null $val */ + $this->setEntityIds($val); + }, + 'entityType' => fn(ParseNode $n) => $o->setEntityType($n->getEnumValue(ResourceTypeName::class)), + '@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->writeCollectionOfPrimitiveValues('entityIds', $this->getEntityIds()); + $writer->writeEnumValue('entityType', $this->getEntityType()); + $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 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 entityIds property value. The list of entity IDs for the specified entity type. + * @param array|null $value Value to set for the entityIds property. + */ + public function setEntityIds(?array $value): void { + $this->getBackingStore()->set('entityIds', $value); + } + + /** + * Sets the entityType property value. The entityType property + * @param ResourceTypeName|null $value Value to set for the entityType property. + */ + public function setEntityType(?ResourceTypeName $value): void { + $this->getBackingStore()->set('entityType', $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/EntraRecoveryServices/Recovery.php b/src/Generated/Models/EntraRecoveryServices/Recovery.php new file mode 100644 index 00000000000..828166d95cd --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/Recovery.php @@ -0,0 +1,95 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'jobs' => fn(ParseNode $n) => $o->setJobs($n->getCollectionOfObjectValues([RecoveryJobBase::class, 'createFromDiscriminatorValue'])), + 'snapshots' => fn(ParseNode $n) => $o->setSnapshots($n->getCollectionOfObjectValues([Snapshot::class, 'createFromDiscriminatorValue'])), + ]); + } + + /** + * Gets the jobs property value. Collection of all recovery jobs (both preview and recovery) for the tenant. + * @return array|null + */ + public function getJobs(): ?array { + $val = $this->getBackingStore()->get('jobs'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, RecoveryJobBase::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'jobs'"); + } + + /** + * Gets the snapshots property value. Collection of backup snapshots available for the tenant. + * @return array|null + */ + public function getSnapshots(): ?array { + $val = $this->getBackingStore()->get('snapshots'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, Snapshot::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'snapshots'"); + } + + /** + * 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('jobs', $this->getJobs()); + $writer->writeCollectionOfObjectValues('snapshots', $this->getSnapshots()); + } + + /** + * Sets the jobs property value. Collection of all recovery jobs (both preview and recovery) for the tenant. + * @param array|null $value Value to set for the jobs property. + */ + public function setJobs(?array $value): void { + $this->getBackingStore()->set('jobs', $value); + } + + /** + * Sets the snapshots property value. Collection of backup snapshots available for the tenant. + * @param array|null $value Value to set for the snapshots property. + */ + public function setSnapshots(?array $value): void { + $this->getBackingStore()->set('snapshots', $value); + } + +} diff --git a/src/Generated/Models/EntraRecoveryServices/RecoveryAction.php b/src/Generated/Models/EntraRecoveryServices/RecoveryAction.php new file mode 100644 index 00000000000..a9b4db59f3c --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/RecoveryAction.php @@ -0,0 +1,12 @@ +getBackingStore()->get('displayName'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'displayName'"); + } + + /** + * Gets the entityTypeName property value. The entityTypeName property + * @return ResourceTypeName|null + */ + public function getEntityTypeName(): ?ResourceTypeName { + $val = $this->getBackingStore()->get('entityTypeName'); + if (is_null($val) || $val instanceof ResourceTypeName) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'entityTypeName'"); + } + + /** + * Gets the failureMessage property value. The error message if the change failed to apply. Only populated in getFailedChanges responses. null otherwise. + * @return string|null + */ + public function getFailureMessage(): ?string { + $val = $this->getBackingStore()->get('failureMessage'); + if (is_null($val) || is_string($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'failureMessage'"); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()), + 'entityTypeName' => fn(ParseNode $n) => $o->setEntityTypeName($n->getEnumValue(ResourceTypeName::class)), + 'failureMessage' => fn(ParseNode $n) => $o->setFailureMessage($n->getStringValue()), + 'recoveryAction' => fn(ParseNode $n) => $o->setRecoveryAction($n->getEnumValue(RecoveryAction::class)), + ]); + } + + /** + * Gets the recoveryAction property value. The recoveryAction property + * @return RecoveryAction|null + */ + public function getRecoveryAction(): ?RecoveryAction { + $val = $this->getBackingStore()->get('recoveryAction'); + if (is_null($val) || $val instanceof RecoveryAction) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'recoveryAction'"); + } + + /** + * 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('displayName', $this->getDisplayName()); + $writer->writeEnumValue('entityTypeName', $this->getEntityTypeName()); + $writer->writeStringValue('failureMessage', $this->getFailureMessage()); + $writer->writeEnumValue('recoveryAction', $this->getRecoveryAction()); + } + + /** + * Sets the displayName property value. The display name of the changed object in its current state, used to uniquely identify the object. Supports $filter (eq, ne, startswith). + * @param string|null $value Value to set for the displayName property. + */ + public function setDisplayName(?string $value): void { + $this->getBackingStore()->set('displayName', $value); + } + + /** + * Sets the entityTypeName property value. The entityTypeName property + * @param ResourceTypeName|null $value Value to set for the entityTypeName property. + */ + public function setEntityTypeName(?ResourceTypeName $value): void { + $this->getBackingStore()->set('entityTypeName', $value); + } + + /** + * Sets the failureMessage property value. The error message if the change failed to apply. Only populated in getFailedChanges responses. null otherwise. + * @param string|null $value Value to set for the failureMessage property. + */ + public function setFailureMessage(?string $value): void { + $this->getBackingStore()->set('failureMessage', $value); + } + + /** + * Sets the recoveryAction property value. The recoveryAction property + * @param RecoveryAction|null $value Value to set for the recoveryAction property. + */ + public function setRecoveryAction(?RecoveryAction $value): void { + $this->getBackingStore()->set('recoveryAction', $value); + } + +} diff --git a/src/Generated/Models/EntraRecoveryServices/RecoveryJob.php b/src/Generated/Models/EntraRecoveryServices/RecoveryJob.php new file mode 100644 index 00000000000..8517f2feff2 --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/RecoveryJob.php @@ -0,0 +1,112 @@ +setOdataType('#microsoft.graph.entraRecoveryServices.recoveryJob'); + } + + /** + * 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 RecoveryJob + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): RecoveryJob { + return new RecoveryJob(); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'totalFailedChanges' => fn(ParseNode $n) => $o->setTotalFailedChanges($n->getIntegerValue()), + 'totalLinksModified' => fn(ParseNode $n) => $o->setTotalLinksModified($n->getIntegerValue()), + 'totalObjectsModified' => fn(ParseNode $n) => $o->setTotalObjectsModified($n->getIntegerValue()), + ]); + } + + /** + * Gets the totalFailedChanges property value. The count of changes (including both objects and links) that failed to apply during recovery. + * @return int|null + */ + public function getTotalFailedChanges(): ?int { + $val = $this->getBackingStore()->get('totalFailedChanges'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'totalFailedChanges'"); + } + + /** + * Gets the totalLinksModified property value. The count of directory object links (relationships) that were successfully modified during recovery. This value may be less than totalChangedLinksCalculated if some link changes failed. + * @return int|null + */ + public function getTotalLinksModified(): ?int { + $val = $this->getBackingStore()->get('totalLinksModified'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'totalLinksModified'"); + } + + /** + * Gets the totalObjectsModified property value. The count of directory objects that were successfully modified during recovery. This value may be less than totalChangedObjectsCalculated if some object changes failed. + * @return int|null + */ + public function getTotalObjectsModified(): ?int { + $val = $this->getBackingStore()->get('totalObjectsModified'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'totalObjectsModified'"); + } + + /** + * 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->writeIntegerValue('totalFailedChanges', $this->getTotalFailedChanges()); + $writer->writeIntegerValue('totalLinksModified', $this->getTotalLinksModified()); + $writer->writeIntegerValue('totalObjectsModified', $this->getTotalObjectsModified()); + } + + /** + * Sets the totalFailedChanges property value. The count of changes (including both objects and links) that failed to apply during recovery. + * @param int|null $value Value to set for the totalFailedChanges property. + */ + public function setTotalFailedChanges(?int $value): void { + $this->getBackingStore()->set('totalFailedChanges', $value); + } + + /** + * Sets the totalLinksModified property value. The count of directory object links (relationships) that were successfully modified during recovery. This value may be less than totalChangedLinksCalculated if some link changes failed. + * @param int|null $value Value to set for the totalLinksModified property. + */ + public function setTotalLinksModified(?int $value): void { + $this->getBackingStore()->set('totalLinksModified', $value); + } + + /** + * Sets the totalObjectsModified property value. The count of directory objects that were successfully modified during recovery. This value may be less than totalChangedObjectsCalculated if some object changes failed. + * @param int|null $value Value to set for the totalObjectsModified property. + */ + public function setTotalObjectsModified(?int $value): void { + $this->getBackingStore()->set('totalObjectsModified', $value); + } + +} diff --git a/src/Generated/Models/EntraRecoveryServices/RecoveryJobBase.php b/src/Generated/Models/EntraRecoveryServices/RecoveryJobBase.php new file mode 100644 index 00000000000..deb3d896acc --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/RecoveryJobBase.php @@ -0,0 +1,209 @@ +getChildNode("@odata.type"); + if ($mappingValueNode !== null) { + $mappingValue = $mappingValueNode->getStringValue(); + switch ($mappingValue) { + case '#microsoft.graph.entraRecoveryServices.recoveryJob': return new RecoveryJob(); + case '#microsoft.graph.entraRecoveryServices.recoveryPreviewJob': return new RecoveryPreviewJob(); + } + } + return new RecoveryJobBase(); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'filteringCriteria' => fn(ParseNode $n) => $o->setFilteringCriteria($n->getObjectValue([RecoveryJobFilteringCriteriaBase::class, 'createFromDiscriminatorValue'])), + 'jobCompletionDateTime' => fn(ParseNode $n) => $o->setJobCompletionDateTime($n->getDateTimeValue()), + 'jobStartDateTime' => fn(ParseNode $n) => $o->setJobStartDateTime($n->getDateTimeValue()), + 'status' => fn(ParseNode $n) => $o->setStatus($n->getEnumValue(RecoveryStatus::class)), + 'targetStateDateTime' => fn(ParseNode $n) => $o->setTargetStateDateTime($n->getDateTimeValue()), + 'totalChangedLinksCalculated' => fn(ParseNode $n) => $o->setTotalChangedLinksCalculated($n->getIntegerValue()), + 'totalChangedObjectsCalculated' => fn(ParseNode $n) => $o->setTotalChangedObjectsCalculated($n->getIntegerValue()), + ]); + } + + /** + * Gets the filteringCriteria property value. Optional filtering criteria used to scope the job to specific entity types or entity IDs. + * @return RecoveryJobFilteringCriteriaBase|null + */ + public function getFilteringCriteria(): ?RecoveryJobFilteringCriteriaBase { + $val = $this->getBackingStore()->get('filteringCriteria'); + if (is_null($val) || $val instanceof RecoveryJobFilteringCriteriaBase) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'filteringCriteria'"); + } + + /** + * Gets the jobCompletionDateTime property value. The date and time when the job completed. Null if the job is still running. + * @return DateTime|null + */ + public function getJobCompletionDateTime(): ?DateTime { + $val = $this->getBackingStore()->get('jobCompletionDateTime'); + if (is_null($val) || $val instanceof DateTime) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'jobCompletionDateTime'"); + } + + /** + * Gets the jobStartDateTime property value. The date and time when the job started. + * @return DateTime|null + */ + public function getJobStartDateTime(): ?DateTime { + $val = $this->getBackingStore()->get('jobStartDateTime'); + if (is_null($val) || $val instanceof DateTime) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'jobStartDateTime'"); + } + + /** + * Gets the status property value. The status property + * @return RecoveryStatus|null + */ + public function getStatus(): ?RecoveryStatus { + $val = $this->getBackingStore()->get('status'); + if (is_null($val) || $val instanceof RecoveryStatus) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'status'"); + } + + /** + * Gets the targetStateDateTime property value. The target snapshot timestamp to which the tenant is being restored. Supports $filter (eq, ne). + * @return DateTime|null + */ + public function getTargetStateDateTime(): ?DateTime { + $val = $this->getBackingStore()->get('targetStateDateTime'); + if (is_null($val) || $val instanceof DateTime) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'targetStateDateTime'"); + } + + /** + * Gets the totalChangedLinksCalculated property value. The total count of changed directory object links (relationships) calculated by the job. null until the job completes calculation. Not all calculated link changes may be successfully applied; see totalLinksModified on derived types for the count of links that were actually modified. + * @return int|null + */ + public function getTotalChangedLinksCalculated(): ?int { + $val = $this->getBackingStore()->get('totalChangedLinksCalculated'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'totalChangedLinksCalculated'"); + } + + /** + * Gets the totalChangedObjectsCalculated property value. The total count of changed directory objects calculated by the job. null until the job completes calculation. Not all calculated object changes may be successfully applied; see totalObjectsModified on derived types for the count of objects that were actually modified. + * @return int|null + */ + public function getTotalChangedObjectsCalculated(): ?int { + $val = $this->getBackingStore()->get('totalChangedObjectsCalculated'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'totalChangedObjectsCalculated'"); + } + + /** + * 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->writeObjectValue('filteringCriteria', $this->getFilteringCriteria()); + $writer->writeDateTimeValue('jobCompletionDateTime', $this->getJobCompletionDateTime()); + $writer->writeDateTimeValue('jobStartDateTime', $this->getJobStartDateTime()); + $writer->writeEnumValue('status', $this->getStatus()); + $writer->writeDateTimeValue('targetStateDateTime', $this->getTargetStateDateTime()); + $writer->writeIntegerValue('totalChangedLinksCalculated', $this->getTotalChangedLinksCalculated()); + $writer->writeIntegerValue('totalChangedObjectsCalculated', $this->getTotalChangedObjectsCalculated()); + } + + /** + * Sets the filteringCriteria property value. Optional filtering criteria used to scope the job to specific entity types or entity IDs. + * @param RecoveryJobFilteringCriteriaBase|null $value Value to set for the filteringCriteria property. + */ + public function setFilteringCriteria(?RecoveryJobFilteringCriteriaBase $value): void { + $this->getBackingStore()->set('filteringCriteria', $value); + } + + /** + * Sets the jobCompletionDateTime property value. The date and time when the job completed. Null if the job is still running. + * @param DateTime|null $value Value to set for the jobCompletionDateTime property. + */ + public function setJobCompletionDateTime(?DateTime $value): void { + $this->getBackingStore()->set('jobCompletionDateTime', $value); + } + + /** + * Sets the jobStartDateTime property value. The date and time when the job started. + * @param DateTime|null $value Value to set for the jobStartDateTime property. + */ + public function setJobStartDateTime(?DateTime $value): void { + $this->getBackingStore()->set('jobStartDateTime', $value); + } + + /** + * Sets the status property value. The status property + * @param RecoveryStatus|null $value Value to set for the status property. + */ + public function setStatus(?RecoveryStatus $value): void { + $this->getBackingStore()->set('status', $value); + } + + /** + * Sets the targetStateDateTime property value. The target snapshot timestamp to which the tenant is being restored. Supports $filter (eq, ne). + * @param DateTime|null $value Value to set for the targetStateDateTime property. + */ + public function setTargetStateDateTime(?DateTime $value): void { + $this->getBackingStore()->set('targetStateDateTime', $value); + } + + /** + * Sets the totalChangedLinksCalculated property value. The total count of changed directory object links (relationships) calculated by the job. null until the job completes calculation. Not all calculated link changes may be successfully applied; see totalLinksModified on derived types for the count of links that were actually modified. + * @param int|null $value Value to set for the totalChangedLinksCalculated property. + */ + public function setTotalChangedLinksCalculated(?int $value): void { + $this->getBackingStore()->set('totalChangedLinksCalculated', $value); + } + + /** + * Sets the totalChangedObjectsCalculated property value. The total count of changed directory objects calculated by the job. null until the job completes calculation. Not all calculated object changes may be successfully applied; see totalObjectsModified on derived types for the count of objects that were actually modified. + * @param int|null $value Value to set for the totalChangedObjectsCalculated property. + */ + public function setTotalChangedObjectsCalculated(?int $value): void { + $this->getBackingStore()->set('totalChangedObjectsCalculated', $value); + } + +} diff --git a/src/Generated/Models/EntraRecoveryServices/RecoveryJobBaseCollectionResponse.php b/src/Generated/Models/EntraRecoveryServices/RecoveryJobBaseCollectionResponse.php new file mode 100644 index 00000000000..1ec2e7fc0fd --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/RecoveryJobBaseCollectionResponse.php @@ -0,0 +1,71 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([RecoveryJobBase::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, RecoveryJobBase::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/EntraRecoveryServices/RecoveryJobCollectionResponse.php b/src/Generated/Models/EntraRecoveryServices/RecoveryJobCollectionResponse.php new file mode 100644 index 00000000000..19b7d816888 --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/RecoveryJobCollectionResponse.php @@ -0,0 +1,71 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([RecoveryJob::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, RecoveryJob::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/EntraRecoveryServices/RecoveryJobEntityNameAndIdsFilter.php b/src/Generated/Models/EntraRecoveryServices/RecoveryJobEntityNameAndIdsFilter.php new file mode 100644 index 00000000000..bab915bff7f --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/RecoveryJobEntityNameAndIdsFilter.php @@ -0,0 +1,71 @@ +setOdataType('#microsoft.graph.entraRecoveryServices.recoveryJobEntityNameAndIdsFilter'); + } + + /** + * 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 RecoveryJobEntityNameAndIdsFilter + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): RecoveryJobEntityNameAndIdsFilter { + return new RecoveryJobEntityNameAndIdsFilter(); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'filterValues' => fn(ParseNode $n) => $o->setFilterValues($n->getCollectionOfObjectValues([EntityTypeAndIds::class, 'createFromDiscriminatorValue'])), + ]); + } + + /** + * Gets the filterValues property value. The list of entity type and ID pairs to include in the recovery job. Duplicate entity types are not allowed and return a 400 Bad Request error. + * @return array|null + */ + public function getFilterValues(): ?array { + $val = $this->getBackingStore()->get('filterValues'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, EntityTypeAndIds::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'filterValues'"); + } + + /** + * 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('filterValues', $this->getFilterValues()); + } + + /** + * Sets the filterValues property value. The list of entity type and ID pairs to include in the recovery job. Duplicate entity types are not allowed and return a 400 Bad Request error. + * @param array|null $value Value to set for the filterValues property. + */ + public function setFilterValues(?array $value): void { + $this->getBackingStore()->set('filterValues', $value); + } + +} diff --git a/src/Generated/Models/EntraRecoveryServices/RecoveryJobEntityNamesFilter.php b/src/Generated/Models/EntraRecoveryServices/RecoveryJobEntityNamesFilter.php new file mode 100644 index 00000000000..7a404cc2b81 --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/RecoveryJobEntityNamesFilter.php @@ -0,0 +1,71 @@ +setOdataType('#microsoft.graph.entraRecoveryServices.recoveryJobEntityNamesFilter'); + } + + /** + * 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 RecoveryJobEntityNamesFilter + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): RecoveryJobEntityNamesFilter { + return new RecoveryJobEntityNamesFilter(); + } + + /** + * Gets the entityTypes property value. The list of entity types to include in the recovery job. + * @return array|null + */ + public function getEntityTypes(): ?array { + $val = $this->getBackingStore()->get('entityTypes'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, ResourceTypeName::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'entityTypes'"); + } + + /** + * The deserialization information for the current model + * @return array + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'entityTypes' => fn(ParseNode $n) => $o->setEntityTypes($n->getCollectionOfEnumValues(ResourceTypeName::class)), + ]); + } + + /** + * 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->writeCollectionOfEnumValues('entityTypes', $this->getEntityTypes()); + } + + /** + * Sets the entityTypes property value. The list of entity types to include in the recovery job. + * @param array|null $value Value to set for the entityTypes property. + */ + public function setEntityTypes(?array $value): void { + $this->getBackingStore()->set('entityTypes', $value); + } + +} diff --git a/src/Generated/Models/EntraRecoveryServices/RecoveryJobFilteringCriteriaBase.php b/src/Generated/Models/EntraRecoveryServices/RecoveryJobFilteringCriteriaBase.php new file mode 100644 index 00000000000..d3698767aa6 --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/RecoveryJobFilteringCriteriaBase.php @@ -0,0 +1,122 @@ +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 RecoveryJobFilteringCriteriaBase + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): RecoveryJobFilteringCriteriaBase { + $mappingValueNode = $parseNode->getChildNode("@odata.type"); + if ($mappingValueNode !== null) { + $mappingValue = $mappingValueNode->getStringValue(); + switch ($mappingValue) { + case '#microsoft.graph.entraRecoveryServices.recoveryJobEntityNameAndIdsFilter': return new RecoveryJobEntityNameAndIdsFilter(); + case '#microsoft.graph.entraRecoveryServices.recoveryJobEntityNamesFilter': return new RecoveryJobEntityNamesFilter(); + } + } + return new RecoveryJobFilteringCriteriaBase(); + } + + /** + * 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()), + ]; + } + + /** + * 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('@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 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); + } + +} diff --git a/src/Generated/Models/EntraRecoveryServices/RecoveryPreviewJob.php b/src/Generated/Models/EntraRecoveryServices/RecoveryPreviewJob.php new file mode 100644 index 00000000000..85474c26aa9 --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/RecoveryPreviewJob.php @@ -0,0 +1,46 @@ +setOdataType('#microsoft.graph.entraRecoveryServices.recoveryPreviewJob'); + } + + /** + * 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 RecoveryPreviewJob + */ + public static function createFromDiscriminatorValue(ParseNode $parseNode): RecoveryPreviewJob { + return new RecoveryPreviewJob(); + } + + /** + * The deserialization information for the current model + * @return array + */ + 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/EntraRecoveryServices/RecoveryPreviewJobCollectionResponse.php b/src/Generated/Models/EntraRecoveryServices/RecoveryPreviewJobCollectionResponse.php new file mode 100644 index 00000000000..e0697de5cd6 --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/RecoveryPreviewJobCollectionResponse.php @@ -0,0 +1,71 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([RecoveryPreviewJob::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, RecoveryPreviewJob::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/EntraRecoveryServices/RecoveryStatus.php b/src/Generated/Models/EntraRecoveryServices/RecoveryStatus.php new file mode 100644 index 00000000000..6122eccd1d4 --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/RecoveryStatus.php @@ -0,0 +1,16 @@ +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 array_merge(parent::getFieldDeserializers(), [ + 'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()), + 'recoveryJobs' => fn(ParseNode $n) => $o->setRecoveryJobs($n->getCollectionOfObjectValues([RecoveryJob::class, 'createFromDiscriminatorValue'])), + 'recoveryPreviewJobs' => fn(ParseNode $n) => $o->setRecoveryPreviewJobs($n->getCollectionOfObjectValues([RecoveryPreviewJob::class, 'createFromDiscriminatorValue'])), + 'totalChangedObjects' => fn(ParseNode $n) => $o->setTotalChangedObjects($n->getIntegerValue()), + ]); + } + + /** + * Gets the recoveryJobs property value. Collection of recovery jobs created for this snapshot. + * @return array|null + */ + public function getRecoveryJobs(): ?array { + $val = $this->getBackingStore()->get('recoveryJobs'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, RecoveryJob::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'recoveryJobs'"); + } + + /** + * Gets the recoveryPreviewJobs property value. Collection of preview jobs created for this snapshot. + * @return array|null + */ + public function getRecoveryPreviewJobs(): ?array { + $val = $this->getBackingStore()->get('recoveryPreviewJobs'); + if (is_array($val) || is_null($val)) { + TypeUtils::validateCollectionValues($val, RecoveryPreviewJob::class); + /** @var array|null $val */ + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'recoveryPreviewJobs'"); + } + + /** + * Gets the totalChangedObjects property value. The total number of changed objects identified in this snapshot. + * @return int|null + */ + public function getTotalChangedObjects(): ?int { + $val = $this->getBackingStore()->get('totalChangedObjects'); + if (is_null($val) || is_int($val)) { + return $val; + } + throw new \UnexpectedValueException("Invalid type found in backing store for 'totalChangedObjects'"); + } + + /** + * 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->writeDateTimeValue('createdDateTime', $this->getCreatedDateTime()); + $writer->writeCollectionOfObjectValues('recoveryJobs', $this->getRecoveryJobs()); + $writer->writeCollectionOfObjectValues('recoveryPreviewJobs', $this->getRecoveryPreviewJobs()); + $writer->writeIntegerValue('totalChangedObjects', $this->getTotalChangedObjects()); + } + + /** + * Sets the createdDateTime property value. The date and time when the snapshot was created. + * @param DateTime|null $value Value to set for the createdDateTime property. + */ + public function setCreatedDateTime(?DateTime $value): void { + $this->getBackingStore()->set('createdDateTime', $value); + } + + /** + * Sets the recoveryJobs property value. Collection of recovery jobs created for this snapshot. + * @param array|null $value Value to set for the recoveryJobs property. + */ + public function setRecoveryJobs(?array $value): void { + $this->getBackingStore()->set('recoveryJobs', $value); + } + + /** + * Sets the recoveryPreviewJobs property value. Collection of preview jobs created for this snapshot. + * @param array|null $value Value to set for the recoveryPreviewJobs property. + */ + public function setRecoveryPreviewJobs(?array $value): void { + $this->getBackingStore()->set('recoveryPreviewJobs', $value); + } + + /** + * Sets the totalChangedObjects property value. The total number of changed objects identified in this snapshot. + * @param int|null $value Value to set for the totalChangedObjects property. + */ + public function setTotalChangedObjects(?int $value): void { + $this->getBackingStore()->set('totalChangedObjects', $value); + } + +} diff --git a/src/Generated/Models/EntraRecoveryServices/SnapshotCollectionResponse.php b/src/Generated/Models/EntraRecoveryServices/SnapshotCollectionResponse.php new file mode 100644 index 00000000000..6fa69619b71 --- /dev/null +++ b/src/Generated/Models/EntraRecoveryServices/SnapshotCollectionResponse.php @@ -0,0 +1,71 @@ + + */ + public function getFieldDeserializers(): array { + $o = $this; + return array_merge(parent::getFieldDeserializers(), [ + 'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([Snapshot::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, Snapshot::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/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