-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(generation): update request builders and models
Update generated files with build 178264
- Loading branch information
Microsoft Graph DevX Tooling
authored and
Microsoft Graph DevX Tooling
committed
Jan 28, 2025
1 parent
ea80b01
commit 4b247ed
Showing
147 changed files
with
3,945 additions
and
240 deletions.
There are no files selected for viewing
165 changes: 165 additions & 0 deletions
165
src/Generated/AppRoleAssignments/AppRoleAssignmentsRequestBuilder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\AppRoleAssignments; | ||
|
||
use Exception; | ||
use Http\Promise\Promise; | ||
use Microsoft\Graph\Generated\AppRoleAssignments\Count\CountRequestBuilder; | ||
use Microsoft\Graph\Generated\AppRoleAssignments\Delta\DeltaRequestBuilder; | ||
use Microsoft\Graph\Generated\AppRoleAssignments\GetAvailableExtensionProperties\GetAvailableExtensionPropertiesRequestBuilder; | ||
use Microsoft\Graph\Generated\AppRoleAssignments\GetByIds\GetByIdsRequestBuilder; | ||
use Microsoft\Graph\Generated\AppRoleAssignments\Item\AppRoleAssignmentItemRequestBuilder; | ||
use Microsoft\Graph\Generated\AppRoleAssignments\ValidateProperties\ValidatePropertiesRequestBuilder; | ||
use Microsoft\Graph\Generated\Models\AppRoleAssignment; | ||
use Microsoft\Graph\Generated\Models\AppRoleAssignmentCollectionResponse; | ||
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError; | ||
use Microsoft\Kiota\Abstractions\BaseRequestBuilder; | ||
use Microsoft\Kiota\Abstractions\HttpMethod; | ||
use Microsoft\Kiota\Abstractions\RequestAdapter; | ||
use Microsoft\Kiota\Abstractions\RequestInformation; | ||
|
||
/** | ||
* Provides operations to manage the collection of appRoleAssignment entities. | ||
*/ | ||
class AppRoleAssignmentsRequestBuilder extends BaseRequestBuilder | ||
{ | ||
/** | ||
* Provides operations to count the resources in the collection. | ||
*/ | ||
public function count(): CountRequestBuilder { | ||
return new CountRequestBuilder($this->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 getAvailableExtensionProperties method. | ||
*/ | ||
public function getAvailableExtensionProperties(): GetAvailableExtensionPropertiesRequestBuilder { | ||
return new GetAvailableExtensionPropertiesRequestBuilder($this->pathParameters, $this->requestAdapter); | ||
} | ||
|
||
/** | ||
* Provides operations to call the getByIds method. | ||
*/ | ||
public function getByIds(): GetByIdsRequestBuilder { | ||
return new GetByIdsRequestBuilder($this->pathParameters, $this->requestAdapter); | ||
} | ||
|
||
/** | ||
* Provides operations to call the validateProperties method. | ||
*/ | ||
public function validateProperties(): ValidatePropertiesRequestBuilder { | ||
return new ValidatePropertiesRequestBuilder($this->pathParameters, $this->requestAdapter); | ||
} | ||
|
||
/** | ||
* Provides operations to manage the collection of appRoleAssignment entities. | ||
* @param string $appRoleAssignmentId The unique identifier of appRoleAssignment | ||
* @return AppRoleAssignmentItemRequestBuilder | ||
*/ | ||
public function byAppRoleAssignmentId(string $appRoleAssignmentId): AppRoleAssignmentItemRequestBuilder { | ||
$urlTplParams = $this->pathParameters; | ||
$urlTplParams['appRoleAssignment%2Did'] = $appRoleAssignmentId; | ||
return new AppRoleAssignmentItemRequestBuilder($urlTplParams, $this->requestAdapter); | ||
} | ||
|
||
/** | ||
* Instantiates a new AppRoleAssignmentsRequestBuilder and sets the default values. | ||
* @param array<string, mixed>|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}/appRoleAssignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}'); | ||
if (is_array($pathParametersOrRawUrl)) { | ||
$this->pathParameters = $pathParametersOrRawUrl; | ||
} else { | ||
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; | ||
} | ||
} | ||
|
||
/** | ||
* Get entities from appRoleAssignments | ||
* @param AppRoleAssignmentsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return Promise<AppRoleAssignmentCollectionResponse|null> | ||
* @throws Exception | ||
*/ | ||
public function get(?AppRoleAssignmentsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { | ||
$requestInfo = $this->toGetRequestInformation($requestConfiguration); | ||
$errorMappings = [ | ||
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], | ||
]; | ||
return $this->requestAdapter->sendAsync($requestInfo, [AppRoleAssignmentCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings); | ||
} | ||
|
||
/** | ||
* Add new entity to appRoleAssignments | ||
* @param AppRoleAssignment $body The request body | ||
* @param AppRoleAssignmentsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return Promise<AppRoleAssignment|null> | ||
* @throws Exception | ||
*/ | ||
public function post(AppRoleAssignment $body, ?AppRoleAssignmentsRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { | ||
$requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); | ||
$errorMappings = [ | ||
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], | ||
]; | ||
return $this->requestAdapter->sendAsync($requestInfo, [AppRoleAssignment::class, 'createFromDiscriminatorValue'], $errorMappings); | ||
} | ||
|
||
/** | ||
* Get entities from appRoleAssignments | ||
* @param AppRoleAssignmentsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return RequestInformation | ||
*/ | ||
public function toGetRequestInformation(?AppRoleAssignmentsRequestBuilderGetRequestConfiguration $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; | ||
} | ||
|
||
/** | ||
* Add new entity to appRoleAssignments | ||
* @param AppRoleAssignment $body The request body | ||
* @param AppRoleAssignmentsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return RequestInformation | ||
*/ | ||
public function toPostRequestInformation(AppRoleAssignment $body, ?AppRoleAssignmentsRequestBuilderPostRequestConfiguration $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 AppRoleAssignmentsRequestBuilder | ||
*/ | ||
public function withUrl(string $rawUrl): AppRoleAssignmentsRequestBuilder { | ||
return new AppRoleAssignmentsRequestBuilder($rawUrl, $this->requestAdapter); | ||
} | ||
|
||
} |
82 changes: 82 additions & 0 deletions
82
src/Generated/AppRoleAssignments/AppRoleAssignmentsRequestBuilderGetQueryParameters.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\AppRoleAssignments; | ||
|
||
use Microsoft\Kiota\Abstractions\QueryParameter; | ||
|
||
/** | ||
* Get entities from appRoleAssignments | ||
*/ | ||
class AppRoleAssignmentsRequestBuilderGetQueryParameters | ||
{ | ||
/** | ||
* @QueryParameter("%24count") | ||
* @var bool|null $count Include count of items | ||
*/ | ||
public ?bool $count = null; | ||
|
||
/** | ||
* @QueryParameter("%24expand") | ||
* @var array<string>|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<string>|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<string>|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 AppRoleAssignmentsRequestBuilderGetQueryParameters and sets the default values. | ||
* @param bool|null $count Include count of items | ||
* @param array<string>|null $expand Expand related entities | ||
* @param string|null $filter Filter items by property values | ||
* @param array<string>|null $orderby Order items by property values | ||
* @param string|null $search Search items by search phrases | ||
* @param array<string>|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; | ||
} | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
src/Generated/AppRoleAssignments/AppRoleAssignmentsRequestBuilderGetRequestConfiguration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\AppRoleAssignments; | ||
|
||
use Microsoft\Kiota\Abstractions\BaseRequestConfiguration; | ||
use Microsoft\Kiota\Abstractions\RequestOption; | ||
|
||
/** | ||
* Configuration for the request such as headers, query parameters, and middleware options. | ||
*/ | ||
class AppRoleAssignmentsRequestBuilderGetRequestConfiguration extends BaseRequestConfiguration | ||
{ | ||
/** | ||
* @var AppRoleAssignmentsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters | ||
*/ | ||
public ?AppRoleAssignmentsRequestBuilderGetQueryParameters $queryParameters = null; | ||
|
||
/** | ||
* Instantiates a new AppRoleAssignmentsRequestBuilderGetRequestConfiguration and sets the default values. | ||
* @param array<string, array<string>|string>|null $headers Request headers | ||
* @param array<RequestOption>|null $options Request options | ||
* @param AppRoleAssignmentsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters | ||
*/ | ||
public function __construct(?array $headers = null, ?array $options = null, ?AppRoleAssignmentsRequestBuilderGetQueryParameters $queryParameters = null) { | ||
parent::__construct($headers ?? [], $options ?? []); | ||
$this->queryParameters = $queryParameters; | ||
} | ||
|
||
/** | ||
* Instantiates a new AppRoleAssignmentsRequestBuilderGetQueryParameters. | ||
* @param bool|null $count Include count of items | ||
* @param array<string>|null $expand Expand related entities | ||
* @param string|null $filter Filter items by property values | ||
* @param array<string>|null $orderby Order items by property values | ||
* @param string|null $search Search items by search phrases | ||
* @param array<string>|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 AppRoleAssignmentsRequestBuilderGetQueryParameters | ||
*/ | ||
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): AppRoleAssignmentsRequestBuilderGetQueryParameters { | ||
return new AppRoleAssignmentsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top); | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
...Generated/AppRoleAssignments/AppRoleAssignmentsRequestBuilderPostRequestConfiguration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\AppRoleAssignments; | ||
|
||
use Microsoft\Kiota\Abstractions\BaseRequestConfiguration; | ||
use Microsoft\Kiota\Abstractions\RequestOption; | ||
|
||
/** | ||
* Configuration for the request such as headers, query parameters, and middleware options. | ||
*/ | ||
class AppRoleAssignmentsRequestBuilderPostRequestConfiguration extends BaseRequestConfiguration | ||
{ | ||
/** | ||
* Instantiates a new AppRoleAssignmentsRequestBuilderPostRequestConfiguration and sets the default values. | ||
* @param array<string, array<string>|string>|null $headers Request headers | ||
* @param array<RequestOption>|null $options Request options | ||
*/ | ||
public function __construct(?array $headers = null, ?array $options = null) { | ||
parent::__construct($headers ?? [], $options ?? []); | ||
} | ||
|
||
} |
78 changes: 78 additions & 0 deletions
78
src/Generated/AppRoleAssignments/Count/CountRequestBuilder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\AppRoleAssignments\Count; | ||
|
||
use Exception; | ||
use Http\Promise\Promise; | ||
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError; | ||
use Microsoft\Kiota\Abstractions\BaseRequestBuilder; | ||
use Microsoft\Kiota\Abstractions\HttpMethod; | ||
use Microsoft\Kiota\Abstractions\RequestAdapter; | ||
use Microsoft\Kiota\Abstractions\RequestInformation; | ||
|
||
/** | ||
* Provides operations to count the resources in the collection. | ||
*/ | ||
class CountRequestBuilder extends BaseRequestBuilder | ||
{ | ||
/** | ||
* Instantiates a new CountRequestBuilder and sets the default values. | ||
* @param array<string, mixed>|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}/appRoleAssignments/$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<int|null> | ||
* @throws Exception | ||
*/ | ||
public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { | ||
$requestInfo = $this->toGetRequestInformation($requestConfiguration); | ||
$errorMappings = [ | ||
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], | ||
]; | ||
/** @var Promise<int|null> $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); | ||
} | ||
|
||
} |
Oops, something went wrong.