Skip to content

Commit a17898f

Browse files
authored
Merge pull request #1797 from microsoftgraph/kiota/v1.0/pipelinebuild/230403
Generated models and request builders
2 parents 0a21e99 + a00ce20 commit a17898f

1,844 files changed

Lines changed: 110700 additions & 124 deletions

File tree

Some content is hidden

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

‎src/Generated/Directory/DirectoryRequestBuilder.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Microsoft\Graph\Generated\Directory\OnPremisesSynchronization\OnPremisesSynchronizationRequestBuilder;
1414
use Microsoft\Graph\Generated\Directory\PublicKeyInfrastructure\PublicKeyInfrastructureRequestBuilder;
1515
use Microsoft\Graph\Generated\Directory\Recovery\RecoveryRequestBuilder;
16+
use Microsoft\Graph\Generated\Directory\RemoteTenantGroups\RemoteTenantGroupsRequestBuilder;
1617
use Microsoft\Graph\Generated\Directory\Subscriptions\SubscriptionsRequestBuilder;
1718
use Microsoft\Graph\Generated\Directory\SubscriptionsWithCommerceSubscriptionId\SubscriptionsWithCommerceSubscriptionIdRequestBuilder;
1819
use Microsoft\Graph\Generated\Models\Directory;
@@ -90,6 +91,13 @@ public function recovery(): RecoveryRequestBuilder {
9091
return new RecoveryRequestBuilder($this->pathParameters, $this->requestAdapter);
9192
}
9293

94+
/**
95+
* Provides operations to manage the remoteTenantGroups property of the microsoft.graph.directory entity.
96+
*/
97+
public function remoteTenantGroups(): RemoteTenantGroupsRequestBuilder {
98+
return new RemoteTenantGroupsRequestBuilder($this->pathParameters, $this->requestAdapter);
99+
}
100+
93101
/**
94102
* Provides operations to manage the subscriptions property of the microsoft.graph.directory entity.
95103
*/
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Directory\RemoteTenantGroups\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}/directory/remoteTenantGroups/$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+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Directory\RemoteTenantGroups\Count;
4+
5+
use Microsoft\Kiota\Abstractions\QueryParameter;
6+
7+
/**
8+
* Get the number of the resource
9+
*/
10+
class CountRequestBuilderGetQueryParameters
11+
{
12+
/**
13+
* @QueryParameter("%24filter")
14+
* @var string|null $filter Filter items by property values
15+
*/
16+
public ?string $filter = null;
17+
18+
/**
19+
* @QueryParameter("%24search")
20+
* @var string|null $search Search items by search phrases
21+
*/
22+
public ?string $search = null;
23+
24+
/**
25+
* Instantiates a new CountRequestBuilderGetQueryParameters and sets the default values.
26+
* @param string|null $filter Filter items by property values
27+
* @param string|null $search Search items by search phrases
28+
*/
29+
public function __construct(?string $filter = null, ?string $search = null) {
30+
$this->filter = $filter;
31+
$this->search = $search;
32+
}
33+
34+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Directory\RemoteTenantGroups\Count;
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 CountRequestBuilderGetRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* @var CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
15+
*/
16+
public ?CountRequestBuilderGetQueryParameters $queryParameters = null;
17+
18+
/**
19+
* Instantiates a new CountRequestBuilderGetRequestConfiguration 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 CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
23+
*/
24+
public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) {
25+
parent::__construct($headers ?? [], $options ?? []);
26+
$this->queryParameters = $queryParameters;
27+
}
28+
29+
/**
30+
* Instantiates a new CountRequestBuilderGetQueryParameters.
31+
* @param string|null $filter Filter items by property values
32+
* @param string|null $search Search items by search phrases
33+
* @return CountRequestBuilderGetQueryParameters
34+
*/
35+
public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters {
36+
return new CountRequestBuilderGetQueryParameters($filter, $search);
37+
}
38+
39+
}
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Directory\RemoteTenantGroups\Item;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
8+
use Microsoft\Graph\Generated\Models\RemoteTenantGroup;
9+
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
10+
use Microsoft\Kiota\Abstractions\HttpMethod;
11+
use Microsoft\Kiota\Abstractions\RequestAdapter;
12+
use Microsoft\Kiota\Abstractions\RequestInformation;
13+
14+
/**
15+
* Provides operations to manage the remoteTenantGroups property of the microsoft.graph.directory entity.
16+
*/
17+
class RemoteTenantGroupItemRequestBuilder extends BaseRequestBuilder
18+
{
19+
/**
20+
* Instantiates a new RemoteTenantGroupItemRequestBuilder and sets the default values.
21+
* @param array<string, mixed>|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL.
22+
* @param RequestAdapter $requestAdapter The request adapter to use to execute the requests.
23+
*/
24+
public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) {
25+
parent::__construct($requestAdapter, [], '{+baseurl}/directory/remoteTenantGroups/{remoteTenantGroup%2Did}{?%24expand,%24select}');
26+
if (is_array($pathParametersOrRawUrl)) {
27+
$this->pathParameters = $pathParametersOrRawUrl;
28+
} else {
29+
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
30+
}
31+
}
32+
33+
/**
34+
* Delete navigation property remoteTenantGroups for directory
35+
* @param RemoteTenantGroupItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
36+
* @return Promise<void|null>
37+
* @throws Exception
38+
*/
39+
public function delete(?RemoteTenantGroupItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
40+
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
41+
$errorMappings = [
42+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
43+
];
44+
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);
45+
}
46+
47+
/**
48+
* Read the properties and relationships of a remoteTenantGroup object.
49+
* @param RemoteTenantGroupItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
50+
* @return Promise<RemoteTenantGroup|null>
51+
* @throws Exception
52+
* @link https://learn.microsoft.com/graph/api/remotetenantgroup-get?view=graph-rest-1.0 Find more info here
53+
*/
54+
public function get(?RemoteTenantGroupItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
55+
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
56+
$errorMappings = [
57+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
58+
];
59+
return $this->requestAdapter->sendAsync($requestInfo, [RemoteTenantGroup::class, 'createFromDiscriminatorValue'], $errorMappings);
60+
}
61+
62+
/**
63+
* Update the navigation property remoteTenantGroups in directory
64+
* @param RemoteTenantGroup $body The request body
65+
* @param RemoteTenantGroupItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
66+
* @return Promise<RemoteTenantGroup|null>
67+
* @throws Exception
68+
*/
69+
public function patch(RemoteTenantGroup $body, ?RemoteTenantGroupItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
70+
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
71+
$errorMappings = [
72+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
73+
];
74+
return $this->requestAdapter->sendAsync($requestInfo, [RemoteTenantGroup::class, 'createFromDiscriminatorValue'], $errorMappings);
75+
}
76+
77+
/**
78+
* Delete navigation property remoteTenantGroups for directory
79+
* @param RemoteTenantGroupItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
80+
* @return RequestInformation
81+
*/
82+
public function toDeleteRequestInformation(?RemoteTenantGroupItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation {
83+
$requestInfo = new RequestInformation();
84+
$requestInfo->urlTemplate = $this->urlTemplate;
85+
$requestInfo->pathParameters = $this->pathParameters;
86+
$requestInfo->httpMethod = HttpMethod::DELETE;
87+
if ($requestConfiguration !== null) {
88+
$requestInfo->addHeaders($requestConfiguration->headers);
89+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
90+
}
91+
$requestInfo->tryAddHeader('Accept', "application/json");
92+
return $requestInfo;
93+
}
94+
95+
/**
96+
* Read the properties and relationships of a remoteTenantGroup object.
97+
* @param RemoteTenantGroupItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
98+
* @return RequestInformation
99+
*/
100+
public function toGetRequestInformation(?RemoteTenantGroupItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation {
101+
$requestInfo = new RequestInformation();
102+
$requestInfo->urlTemplate = $this->urlTemplate;
103+
$requestInfo->pathParameters = $this->pathParameters;
104+
$requestInfo->httpMethod = HttpMethod::GET;
105+
if ($requestConfiguration !== null) {
106+
$requestInfo->addHeaders($requestConfiguration->headers);
107+
if ($requestConfiguration->queryParameters !== null) {
108+
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
109+
}
110+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
111+
}
112+
$requestInfo->tryAddHeader('Accept', "application/json");
113+
return $requestInfo;
114+
}
115+
116+
/**
117+
* Update the navigation property remoteTenantGroups in directory
118+
* @param RemoteTenantGroup $body The request body
119+
* @param RemoteTenantGroupItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
120+
* @return RequestInformation
121+
*/
122+
public function toPatchRequestInformation(RemoteTenantGroup $body, ?RemoteTenantGroupItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation {
123+
$requestInfo = new RequestInformation();
124+
$requestInfo->urlTemplate = $this->urlTemplate;
125+
$requestInfo->pathParameters = $this->pathParameters;
126+
$requestInfo->httpMethod = HttpMethod::PATCH;
127+
if ($requestConfiguration !== null) {
128+
$requestInfo->addHeaders($requestConfiguration->headers);
129+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
130+
}
131+
$requestInfo->tryAddHeader('Accept', "application/json");
132+
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
133+
return $requestInfo;
134+
}
135+
136+
/**
137+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
138+
* @param string $rawUrl The raw URL to use for the request builder.
139+
* @return RemoteTenantGroupItemRequestBuilder
140+
*/
141+
public function withUrl(string $rawUrl): RemoteTenantGroupItemRequestBuilder {
142+
return new RemoteTenantGroupItemRequestBuilder($rawUrl, $this->requestAdapter);
143+
}
144+
145+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Directory\RemoteTenantGroups\Item;
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 RemoteTenantGroupItemRequestBuilderDeleteRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* Instantiates a new RemoteTenantGroupItemRequestBuilderDeleteRequestConfiguration 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+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Directory\RemoteTenantGroups\Item;
4+
5+
use Microsoft\Kiota\Abstractions\QueryParameter;
6+
7+
/**
8+
* Read the properties and relationships of a remoteTenantGroup object.
9+
*/
10+
class RemoteTenantGroupItemRequestBuilderGetQueryParameters
11+
{
12+
/**
13+
* @QueryParameter("%24expand")
14+
* @var array<string>|null $expand Expand related entities
15+
*/
16+
public ?array $expand = null;
17+
18+
/**
19+
* @QueryParameter("%24select")
20+
* @var array<string>|null $select Select properties to be returned
21+
*/
22+
public ?array $select = null;
23+
24+
/**
25+
* Instantiates a new RemoteTenantGroupItemRequestBuilderGetQueryParameters and sets the default values.
26+
* @param array<string>|null $expand Expand related entities
27+
* @param array<string>|null $select Select properties to be returned
28+
*/
29+
public function __construct(?array $expand = null, ?array $select = null) {
30+
$this->expand = $expand;
31+
$this->select = $select;
32+
}
33+
34+
}

0 commit comments

Comments
 (0)