Skip to content

Commit 4b247ed

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
Microsoft Graph DevX Tooling
authored and
Microsoft Graph DevX Tooling
committed
feat(generation): update request builders and models
Update generated files with build 178264
1 parent ea80b01 commit 4b247ed

File tree

147 files changed

+3945
-240
lines changed

Some content is hidden

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

147 files changed

+3945
-240
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\AppRoleAssignments;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\Generated\AppRoleAssignments\Count\CountRequestBuilder;
8+
use Microsoft\Graph\Generated\AppRoleAssignments\Delta\DeltaRequestBuilder;
9+
use Microsoft\Graph\Generated\AppRoleAssignments\GetAvailableExtensionProperties\GetAvailableExtensionPropertiesRequestBuilder;
10+
use Microsoft\Graph\Generated\AppRoleAssignments\GetByIds\GetByIdsRequestBuilder;
11+
use Microsoft\Graph\Generated\AppRoleAssignments\Item\AppRoleAssignmentItemRequestBuilder;
12+
use Microsoft\Graph\Generated\AppRoleAssignments\ValidateProperties\ValidatePropertiesRequestBuilder;
13+
use Microsoft\Graph\Generated\Models\AppRoleAssignment;
14+
use Microsoft\Graph\Generated\Models\AppRoleAssignmentCollectionResponse;
15+
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
16+
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
17+
use Microsoft\Kiota\Abstractions\HttpMethod;
18+
use Microsoft\Kiota\Abstractions\RequestAdapter;
19+
use Microsoft\Kiota\Abstractions\RequestInformation;
20+
21+
/**
22+
* Provides operations to manage the collection of appRoleAssignment entities.
23+
*/
24+
class AppRoleAssignmentsRequestBuilder extends BaseRequestBuilder
25+
{
26+
/**
27+
* Provides operations to count the resources in the collection.
28+
*/
29+
public function count(): CountRequestBuilder {
30+
return new CountRequestBuilder($this->pathParameters, $this->requestAdapter);
31+
}
32+
33+
/**
34+
* Provides operations to call the delta method.
35+
*/
36+
public function delta(): DeltaRequestBuilder {
37+
return new DeltaRequestBuilder($this->pathParameters, $this->requestAdapter);
38+
}
39+
40+
/**
41+
* Provides operations to call the getAvailableExtensionProperties method.
42+
*/
43+
public function getAvailableExtensionProperties(): GetAvailableExtensionPropertiesRequestBuilder {
44+
return new GetAvailableExtensionPropertiesRequestBuilder($this->pathParameters, $this->requestAdapter);
45+
}
46+
47+
/**
48+
* Provides operations to call the getByIds method.
49+
*/
50+
public function getByIds(): GetByIdsRequestBuilder {
51+
return new GetByIdsRequestBuilder($this->pathParameters, $this->requestAdapter);
52+
}
53+
54+
/**
55+
* Provides operations to call the validateProperties method.
56+
*/
57+
public function validateProperties(): ValidatePropertiesRequestBuilder {
58+
return new ValidatePropertiesRequestBuilder($this->pathParameters, $this->requestAdapter);
59+
}
60+
61+
/**
62+
* Provides operations to manage the collection of appRoleAssignment entities.
63+
* @param string $appRoleAssignmentId The unique identifier of appRoleAssignment
64+
* @return AppRoleAssignmentItemRequestBuilder
65+
*/
66+
public function byAppRoleAssignmentId(string $appRoleAssignmentId): AppRoleAssignmentItemRequestBuilder {
67+
$urlTplParams = $this->pathParameters;
68+
$urlTplParams['appRoleAssignment%2Did'] = $appRoleAssignmentId;
69+
return new AppRoleAssignmentItemRequestBuilder($urlTplParams, $this->requestAdapter);
70+
}
71+
72+
/**
73+
* Instantiates a new AppRoleAssignmentsRequestBuilder and sets the default values.
74+
* @param array<string, mixed>|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL.
75+
* @param RequestAdapter $requestAdapter The request adapter to use to execute the requests.
76+
*/
77+
public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) {
78+
parent::__construct($requestAdapter, [], '{+baseurl}/appRoleAssignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}');
79+
if (is_array($pathParametersOrRawUrl)) {
80+
$this->pathParameters = $pathParametersOrRawUrl;
81+
} else {
82+
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
83+
}
84+
}
85+
86+
/**
87+
* Get entities from appRoleAssignments
88+
* @param AppRoleAssignmentsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
89+
* @return Promise<AppRoleAssignmentCollectionResponse|null>
90+
* @throws Exception
91+
*/
92+
public function get(?AppRoleAssignmentsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
93+
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
94+
$errorMappings = [
95+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
96+
];
97+
return $this->requestAdapter->sendAsync($requestInfo, [AppRoleAssignmentCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings);
98+
}
99+
100+
/**
101+
* Add new entity to appRoleAssignments
102+
* @param AppRoleAssignment $body The request body
103+
* @param AppRoleAssignmentsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
104+
* @return Promise<AppRoleAssignment|null>
105+
* @throws Exception
106+
*/
107+
public function post(AppRoleAssignment $body, ?AppRoleAssignmentsRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise {
108+
$requestInfo = $this->toPostRequestInformation($body, $requestConfiguration);
109+
$errorMappings = [
110+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
111+
];
112+
return $this->requestAdapter->sendAsync($requestInfo, [AppRoleAssignment::class, 'createFromDiscriminatorValue'], $errorMappings);
113+
}
114+
115+
/**
116+
* Get entities from appRoleAssignments
117+
* @param AppRoleAssignmentsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
118+
* @return RequestInformation
119+
*/
120+
public function toGetRequestInformation(?AppRoleAssignmentsRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation {
121+
$requestInfo = new RequestInformation();
122+
$requestInfo->urlTemplate = $this->urlTemplate;
123+
$requestInfo->pathParameters = $this->pathParameters;
124+
$requestInfo->httpMethod = HttpMethod::GET;
125+
if ($requestConfiguration !== null) {
126+
$requestInfo->addHeaders($requestConfiguration->headers);
127+
if ($requestConfiguration->queryParameters !== null) {
128+
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
129+
}
130+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
131+
}
132+
$requestInfo->tryAddHeader('Accept', "application/json");
133+
return $requestInfo;
134+
}
135+
136+
/**
137+
* Add new entity to appRoleAssignments
138+
* @param AppRoleAssignment $body The request body
139+
* @param AppRoleAssignmentsRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
140+
* @return RequestInformation
141+
*/
142+
public function toPostRequestInformation(AppRoleAssignment $body, ?AppRoleAssignmentsRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation {
143+
$requestInfo = new RequestInformation();
144+
$requestInfo->urlTemplate = $this->urlTemplate;
145+
$requestInfo->pathParameters = $this->pathParameters;
146+
$requestInfo->httpMethod = HttpMethod::POST;
147+
if ($requestConfiguration !== null) {
148+
$requestInfo->addHeaders($requestConfiguration->headers);
149+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
150+
}
151+
$requestInfo->tryAddHeader('Accept', "application/json");
152+
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
153+
return $requestInfo;
154+
}
155+
156+
/**
157+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
158+
* @param string $rawUrl The raw URL to use for the request builder.
159+
* @return AppRoleAssignmentsRequestBuilder
160+
*/
161+
public function withUrl(string $rawUrl): AppRoleAssignmentsRequestBuilder {
162+
return new AppRoleAssignmentsRequestBuilder($rawUrl, $this->requestAdapter);
163+
}
164+
165+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\AppRoleAssignments;
4+
5+
use Microsoft\Kiota\Abstractions\QueryParameter;
6+
7+
/**
8+
* Get entities from appRoleAssignments
9+
*/
10+
class AppRoleAssignmentsRequestBuilderGetQueryParameters
11+
{
12+
/**
13+
* @QueryParameter("%24count")
14+
* @var bool|null $count Include count of items
15+
*/
16+
public ?bool $count = null;
17+
18+
/**
19+
* @QueryParameter("%24expand")
20+
* @var array<string>|null $expand Expand related entities
21+
*/
22+
public ?array $expand = null;
23+
24+
/**
25+
* @QueryParameter("%24filter")
26+
* @var string|null $filter Filter items by property values
27+
*/
28+
public ?string $filter = null;
29+
30+
/**
31+
* @QueryParameter("%24orderby")
32+
* @var array<string>|null $orderby Order items by property values
33+
*/
34+
public ?array $orderby = null;
35+
36+
/**
37+
* @QueryParameter("%24search")
38+
* @var string|null $search Search items by search phrases
39+
*/
40+
public ?string $search = null;
41+
42+
/**
43+
* @QueryParameter("%24select")
44+
* @var array<string>|null $select Select properties to be returned
45+
*/
46+
public ?array $select = null;
47+
48+
/**
49+
* @QueryParameter("%24skip")
50+
* @var int|null $skip Skip the first n items
51+
*/
52+
public ?int $skip = null;
53+
54+
/**
55+
* @QueryParameter("%24top")
56+
* @var int|null $top Show only the first n items
57+
*/
58+
public ?int $top = null;
59+
60+
/**
61+
* Instantiates a new AppRoleAssignmentsRequestBuilderGetQueryParameters and sets the default values.
62+
* @param bool|null $count Include count of items
63+
* @param array<string>|null $expand Expand related entities
64+
* @param string|null $filter Filter items by property values
65+
* @param array<string>|null $orderby Order items by property values
66+
* @param string|null $search Search items by search phrases
67+
* @param array<string>|null $select Select properties to be returned
68+
* @param int|null $skip Skip the first n items
69+
* @param int|null $top Show only the first n items
70+
*/
71+
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) {
72+
$this->count = $count;
73+
$this->expand = $expand;
74+
$this->filter = $filter;
75+
$this->orderby = $orderby;
76+
$this->search = $search;
77+
$this->select = $select;
78+
$this->skip = $skip;
79+
$this->top = $top;
80+
}
81+
82+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\AppRoleAssignments;
4+
5+
use Microsoft\Kiota\Abstractions\BaseRequestConfiguration;
6+
use Microsoft\Kiota\Abstractions\RequestOption;
7+
8+
/**
9+
* Configuration for the request such as headers, query parameters, and middleware options.
10+
*/
11+
class AppRoleAssignmentsRequestBuilderGetRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* @var AppRoleAssignmentsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
15+
*/
16+
public ?AppRoleAssignmentsRequestBuilderGetQueryParameters $queryParameters = null;
17+
18+
/**
19+
* Instantiates a new AppRoleAssignmentsRequestBuilderGetRequestConfiguration and sets the default values.
20+
* @param array<string, array<string>|string>|null $headers Request headers
21+
* @param array<RequestOption>|null $options Request options
22+
* @param AppRoleAssignmentsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
23+
*/
24+
public function __construct(?array $headers = null, ?array $options = null, ?AppRoleAssignmentsRequestBuilderGetQueryParameters $queryParameters = null) {
25+
parent::__construct($headers ?? [], $options ?? []);
26+
$this->queryParameters = $queryParameters;
27+
}
28+
29+
/**
30+
* Instantiates a new AppRoleAssignmentsRequestBuilderGetQueryParameters.
31+
* @param bool|null $count Include count of items
32+
* @param array<string>|null $expand Expand related entities
33+
* @param string|null $filter Filter items by property values
34+
* @param array<string>|null $orderby Order items by property values
35+
* @param string|null $search Search items by search phrases
36+
* @param array<string>|null $select Select properties to be returned
37+
* @param int|null $skip Skip the first n items
38+
* @param int|null $top Show only the first n items
39+
* @return AppRoleAssignmentsRequestBuilderGetQueryParameters
40+
*/
41+
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 {
42+
return new AppRoleAssignmentsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top);
43+
}
44+
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\AppRoleAssignments;
4+
5+
use Microsoft\Kiota\Abstractions\BaseRequestConfiguration;
6+
use Microsoft\Kiota\Abstractions\RequestOption;
7+
8+
/**
9+
* Configuration for the request such as headers, query parameters, and middleware options.
10+
*/
11+
class AppRoleAssignmentsRequestBuilderPostRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* Instantiates a new AppRoleAssignmentsRequestBuilderPostRequestConfiguration and sets the default values.
15+
* @param array<string, array<string>|string>|null $headers Request headers
16+
* @param array<RequestOption>|null $options Request options
17+
*/
18+
public function __construct(?array $headers = null, ?array $options = null) {
19+
parent::__construct($headers ?? [], $options ?? []);
20+
}
21+
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\AppRoleAssignments\Count;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
8+
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
9+
use Microsoft\Kiota\Abstractions\HttpMethod;
10+
use Microsoft\Kiota\Abstractions\RequestAdapter;
11+
use Microsoft\Kiota\Abstractions\RequestInformation;
12+
13+
/**
14+
* Provides operations to count the resources in the collection.
15+
*/
16+
class CountRequestBuilder extends BaseRequestBuilder
17+
{
18+
/**
19+
* Instantiates a new CountRequestBuilder and sets the default values.
20+
* @param array<string, mixed>|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL.
21+
* @param RequestAdapter $requestAdapter The request adapter to use to execute the requests.
22+
*/
23+
public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) {
24+
parent::__construct($requestAdapter, [], '{+baseurl}/appRoleAssignments/$count{?%24filter,%24search}');
25+
if (is_array($pathParametersOrRawUrl)) {
26+
$this->pathParameters = $pathParametersOrRawUrl;
27+
} else {
28+
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
29+
}
30+
}
31+
32+
/**
33+
* Get the number of the resource
34+
* @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
35+
* @return Promise<int|null>
36+
* @throws Exception
37+
*/
38+
public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
39+
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
40+
$errorMappings = [
41+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
42+
];
43+
/** @var Promise<int|null> $result */
44+
$result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings);
45+
return $result;
46+
}
47+
48+
/**
49+
* Get the number of the resource
50+
* @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
51+
* @return RequestInformation
52+
*/
53+
public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation {
54+
$requestInfo = new RequestInformation();
55+
$requestInfo->urlTemplate = $this->urlTemplate;
56+
$requestInfo->pathParameters = $this->pathParameters;
57+
$requestInfo->httpMethod = HttpMethod::GET;
58+
if ($requestConfiguration !== null) {
59+
$requestInfo->addHeaders($requestConfiguration->headers);
60+
if ($requestConfiguration->queryParameters !== null) {
61+
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
62+
}
63+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
64+
}
65+
$requestInfo->tryAddHeader('Accept', "text/plain;q=0.9");
66+
return $requestInfo;
67+
}
68+
69+
/**
70+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
71+
* @param string $rawUrl The raw URL to use for the request builder.
72+
* @return CountRequestBuilder
73+
*/
74+
public function withUrl(string $rawUrl): CountRequestBuilder {
75+
return new CountRequestBuilder($rawUrl, $this->requestAdapter);
76+
}
77+
78+
}

0 commit comments

Comments
 (0)