Skip to content

Commit 99b331e

Browse files
microsoft-graph-devx-bot[bot]Microsoft Graph DevX Tooling
andauthored
feat(generation): update request builders and models (#438)
Update generated files with build 204842 Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com>
1 parent a60a365 commit 99b331e

File tree

2,126 files changed

+133120
-967
lines changed

Some content is hidden

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

2,126 files changed

+133120
-967
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\AgentRegistry\AgentCardManifests;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\Beta\Generated\AgentRegistry\AgentCardManifests\Count\CountRequestBuilder;
8+
use Microsoft\Graph\Beta\Generated\AgentRegistry\AgentCardManifests\Item\AgentCardManifestItemRequestBuilder;
9+
use Microsoft\Graph\Beta\Generated\Models\AgentCardManifestCollectionResponse;
10+
use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError;
11+
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
12+
use Microsoft\Kiota\Abstractions\HttpMethod;
13+
use Microsoft\Kiota\Abstractions\RequestAdapter;
14+
use Microsoft\Kiota\Abstractions\RequestInformation;
15+
16+
/**
17+
* Provides operations to manage the agentCardManifests property of the microsoft.graph.agentRegistry entity.
18+
*/
19+
class AgentCardManifestsRequestBuilder extends BaseRequestBuilder
20+
{
21+
/**
22+
* Provides operations to count the resources in the collection.
23+
*/
24+
public function count(): CountRequestBuilder {
25+
return new CountRequestBuilder($this->pathParameters, $this->requestAdapter);
26+
}
27+
28+
/**
29+
* Provides operations to manage the agentCardManifests property of the microsoft.graph.agentRegistry entity.
30+
* @param string $agentCardManifestId The unique identifier of agentCardManifest
31+
* @return AgentCardManifestItemRequestBuilder
32+
*/
33+
public function byAgentCardManifestId(string $agentCardManifestId): AgentCardManifestItemRequestBuilder {
34+
$urlTplParams = $this->pathParameters;
35+
$urlTplParams['agentCardManifest%2Did'] = $agentCardManifestId;
36+
return new AgentCardManifestItemRequestBuilder($urlTplParams, $this->requestAdapter);
37+
}
38+
39+
/**
40+
* Instantiates a new AgentCardManifestsRequestBuilder and sets the default values.
41+
* @param array<string, mixed>|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL.
42+
* @param RequestAdapter $requestAdapter The request adapter to use to execute the requests.
43+
*/
44+
public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) {
45+
parent::__construct($requestAdapter, [], '{+baseurl}/agentRegistry/agentCardManifests{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}');
46+
if (is_array($pathParametersOrRawUrl)) {
47+
$this->pathParameters = $pathParametersOrRawUrl;
48+
} else {
49+
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
50+
}
51+
}
52+
53+
/**
54+
* Retrieve all agent card manifests for the tenant.
55+
* @param AgentCardManifestsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
56+
* @return Promise<AgentCardManifestCollectionResponse|null>
57+
* @throws Exception
58+
* @link https://learn.microsoft.com/graph/api/agentregistry-list-agentcardmanifests?view=graph-rest-beta Find more info here
59+
*/
60+
public function get(?AgentCardManifestsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
61+
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
62+
$errorMappings = [
63+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
64+
];
65+
return $this->requestAdapter->sendAsync($requestInfo, [AgentCardManifestCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings);
66+
}
67+
68+
/**
69+
* Retrieve all agent card manifests for the tenant.
70+
* @param AgentCardManifestsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
71+
* @return RequestInformation
72+
*/
73+
public function toGetRequestInformation(?AgentCardManifestsRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation {
74+
$requestInfo = new RequestInformation();
75+
$requestInfo->urlTemplate = $this->urlTemplate;
76+
$requestInfo->pathParameters = $this->pathParameters;
77+
$requestInfo->httpMethod = HttpMethod::GET;
78+
if ($requestConfiguration !== null) {
79+
$requestInfo->addHeaders($requestConfiguration->headers);
80+
if ($requestConfiguration->queryParameters !== null) {
81+
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
82+
}
83+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
84+
}
85+
$requestInfo->tryAddHeader('Accept', "application/json");
86+
return $requestInfo;
87+
}
88+
89+
/**
90+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
91+
* @param string $rawUrl The raw URL to use for the request builder.
92+
* @return AgentCardManifestsRequestBuilder
93+
*/
94+
public function withUrl(string $rawUrl): AgentCardManifestsRequestBuilder {
95+
return new AgentCardManifestsRequestBuilder($rawUrl, $this->requestAdapter);
96+
}
97+
98+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\AgentRegistry\AgentCardManifests;
4+
5+
use Microsoft\Kiota\Abstractions\QueryParameter;
6+
7+
/**
8+
* Retrieve all agent card manifests for the tenant.
9+
*/
10+
class AgentCardManifestsRequestBuilderGetQueryParameters
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 AgentCardManifestsRequestBuilderGetQueryParameters 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+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\AgentRegistry\AgentCardManifests;
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 AgentCardManifestsRequestBuilderGetRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* @var AgentCardManifestsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
15+
*/
16+
public ?AgentCardManifestsRequestBuilderGetQueryParameters $queryParameters = null;
17+
18+
/**
19+
* Instantiates a new AgentCardManifestsRequestBuilderGetRequestConfiguration 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 AgentCardManifestsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
23+
*/
24+
public function __construct(?array $headers = null, ?array $options = null, ?AgentCardManifestsRequestBuilderGetQueryParameters $queryParameters = null) {
25+
parent::__construct($headers ?? [], $options ?? []);
26+
$this->queryParameters = $queryParameters;
27+
}
28+
29+
/**
30+
* Instantiates a new AgentCardManifestsRequestBuilderGetQueryParameters.
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 AgentCardManifestsRequestBuilderGetQueryParameters
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): AgentCardManifestsRequestBuilderGetQueryParameters {
42+
return new AgentCardManifestsRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top);
43+
}
44+
45+
}
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\Beta\Generated\AgentRegistry\AgentCardManifests\Count;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\Beta\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}/agentRegistry/agentCardManifests/$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\Beta\Generated\AgentRegistry\AgentCardManifests\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\Beta\Generated\AgentRegistry\AgentCardManifests\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+
}

0 commit comments

Comments
 (0)