Skip to content

Commit 34f52b2

Browse files
microsoft-graph-devx-bot[bot]Microsoft Graph DevX Tooling
andauthored
feat(generation): update request builders and models (#432)
Update generated files with build 203454 Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com>
1 parent 4b17caa commit 34f52b2

File tree

1,493 files changed

+76876
-12902
lines changed

Some content is hidden

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

1,493 files changed

+76876
-12902
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\Admin\Teams\Policy\MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName;
4+
5+
use Microsoft\Graph\Beta\Generated\Models\BaseCollectionPaginationCountResponse;
6+
use Microsoft\Graph\Beta\Generated\Models\TeamsAdministration\PolicyIdentifierDetail;
7+
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
8+
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
9+
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
10+
use Microsoft\Kiota\Abstractions\Types\TypeUtils;
11+
12+
class GetPolicyIdWithTypeWithNameGetResponse extends BaseCollectionPaginationCountResponse implements Parsable
13+
{
14+
/**
15+
* Instantiates a new GetPolicyIdWithTypeWithNameGetResponse and sets the default values.
16+
*/
17+
public function __construct() {
18+
parent::__construct();
19+
}
20+
21+
/**
22+
* Creates a new instance of the appropriate class based on discriminator value
23+
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object
24+
* @return GetPolicyIdWithTypeWithNameGetResponse
25+
*/
26+
public static function createFromDiscriminatorValue(ParseNode $parseNode): GetPolicyIdWithTypeWithNameGetResponse {
27+
return new GetPolicyIdWithTypeWithNameGetResponse();
28+
}
29+
30+
/**
31+
* The deserialization information for the current model
32+
* @return array<string, callable(ParseNode): void>
33+
*/
34+
public function getFieldDeserializers(): array {
35+
$o = $this;
36+
return array_merge(parent::getFieldDeserializers(), [
37+
'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([PolicyIdentifierDetail::class, 'createFromDiscriminatorValue'])),
38+
]);
39+
}
40+
41+
/**
42+
* Gets the value property value. The value property
43+
* @return array<PolicyIdentifierDetail>|null
44+
*/
45+
public function getValue(): ?array {
46+
$val = $this->getBackingStore()->get('value');
47+
if (is_array($val) || is_null($val)) {
48+
TypeUtils::validateCollectionValues($val, PolicyIdentifierDetail::class);
49+
/** @var array<PolicyIdentifierDetail>|null $val */
50+
return $val;
51+
}
52+
throw new \UnexpectedValueException("Invalid type found in backing store for 'value'");
53+
}
54+
55+
/**
56+
* Serializes information the current object
57+
* @param SerializationWriter $writer Serialization writer to use to serialize this model
58+
*/
59+
public function serialize(SerializationWriter $writer): void {
60+
parent::serialize($writer);
61+
$writer->writeCollectionOfObjectValues('value', $this->getValue());
62+
}
63+
64+
/**
65+
* Sets the value property value. The value property
66+
* @param array<PolicyIdentifierDetail>|null $value Value to set for the value property.
67+
*/
68+
public function setValue(?array $value): void {
69+
$this->getBackingStore()->set('value', $value);
70+
}
71+
72+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\Admin\Teams\Policy\MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName;
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 call the getPolicyId method.
15+
*/
16+
class MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder extends BaseRequestBuilder
17+
{
18+
/**
19+
* Instantiates a new MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder 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+
* @param string|null $name Usage: name='{name}'
23+
* @param string|null $type Usage: type='{type}'
24+
*/
25+
public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter, ?string $name = null, ?string $type = null) {
26+
parent::__construct($requestAdapter, [], '{+baseurl}/admin/teams/policy/microsoft.graph.teamsAdministration.getPolicyId(type=\'{type}\',name=\'{name}\'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}');
27+
if (is_array($pathParametersOrRawUrl)) {
28+
$urlTplParams = $pathParametersOrRawUrl;
29+
$urlTplParams['name'] = $name;
30+
$urlTplParams['type'] = $type;
31+
$this->pathParameters = $urlTplParams;
32+
} else {
33+
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
34+
}
35+
}
36+
37+
/**
38+
* Get the policy ID for a given policy name and policy type within Teams administration.
39+
* @param MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
40+
* @return Promise<GetPolicyIdWithTypeWithNameGetResponse|null>
41+
* @throws Exception
42+
* @link https://learn.microsoft.com/graph/api/teamsadministration-teamspolicyassignment-getpolicyid?view=graph-rest-beta Find more info here
43+
*/
44+
public function get(?MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
45+
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
46+
$errorMappings = [
47+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
48+
];
49+
return $this->requestAdapter->sendAsync($requestInfo, [GetPolicyIdWithTypeWithNameGetResponse::class, 'createFromDiscriminatorValue'], $errorMappings);
50+
}
51+
52+
/**
53+
* Get the policy ID for a given policy name and policy type within Teams administration.
54+
* @param MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
55+
* @return RequestInformation
56+
*/
57+
public function toGetRequestInformation(?MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation {
58+
$requestInfo = new RequestInformation();
59+
$requestInfo->urlTemplate = $this->urlTemplate;
60+
$requestInfo->pathParameters = $this->pathParameters;
61+
$requestInfo->httpMethod = HttpMethod::GET;
62+
if ($requestConfiguration !== null) {
63+
$requestInfo->addHeaders($requestConfiguration->headers);
64+
if ($requestConfiguration->queryParameters !== null) {
65+
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
66+
}
67+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
68+
}
69+
$requestInfo->tryAddHeader('Accept', "application/json");
70+
return $requestInfo;
71+
}
72+
73+
/**
74+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
75+
* @param string $rawUrl The raw URL to use for the request builder.
76+
* @return MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder
77+
*/
78+
public function withUrl(string $rawUrl): MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder {
79+
return new MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder($rawUrl, $this->requestAdapter);
80+
}
81+
82+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\Admin\Teams\Policy\MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName;
4+
5+
use Microsoft\Kiota\Abstractions\QueryParameter;
6+
7+
/**
8+
* Get the policy ID for a given policy name and policy type within Teams administration.
9+
*/
10+
class MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters
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 MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters 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\Beta\Generated\Admin\Teams\Policy\MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName;
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 MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* @var MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
15+
*/
16+
public ?MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters $queryParameters = null;
17+
18+
/**
19+
* Instantiates a new MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetRequestConfiguration 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 MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
23+
*/
24+
public function __construct(?array $headers = null, ?array $options = null, ?MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters $queryParameters = null) {
25+
parent::__construct($headers ?? [], $options ?? []);
26+
$this->queryParameters = $queryParameters;
27+
}
28+
29+
/**
30+
* Instantiates a new MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters.
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 MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters
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): MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters {
42+
return new MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderGetQueryParameters($count, $expand, $filter, $orderby, $search, $select, $skip, $top);
43+
}
44+
45+
}

src/Generated/Admin/Teams/Policy/PolicyRequestBuilder.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use Exception;
66
use Http\Promise\Promise;
7+
use Microsoft\Graph\Beta\Generated\Admin\Teams\Policy\MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName\MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder;
8+
use Microsoft\Graph\Beta\Generated\Admin\Teams\Policy\UserAssignments\UserAssignmentsRequestBuilder;
79
use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError;
810
use Microsoft\Graph\Beta\Generated\Models\TeamsAdministration\TeamsPolicyAssignment;
911
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
@@ -16,6 +18,13 @@
1618
*/
1719
class PolicyRequestBuilder extends BaseRequestBuilder
1820
{
21+
/**
22+
* Provides operations to manage the userAssignments property of the microsoft.graph.teamsAdministration.teamsPolicyAssignment entity.
23+
*/
24+
public function userAssignments(): UserAssignmentsRequestBuilder {
25+
return new UserAssignmentsRequestBuilder($this->pathParameters, $this->requestAdapter);
26+
}
27+
1928
/**
2029
* Instantiates a new PolicyRequestBuilder and sets the default values.
2130
* @param array<string, mixed>|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL.
@@ -58,6 +67,16 @@ public function get(?PolicyRequestBuilderGetRequestConfiguration $requestConfigu
5867
return $this->requestAdapter->sendAsync($requestInfo, [TeamsPolicyAssignment::class, 'createFromDiscriminatorValue'], $errorMappings);
5968
}
6069

70+
/**
71+
* Provides operations to call the getPolicyId method.
72+
* @param string $name Usage: name='{name}'
73+
* @param string $type Usage: type='{type}'
74+
* @return MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder
75+
*/
76+
public function microsoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName(string $name, string $type): MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder {
77+
return new MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder($this->pathParameters, $this->requestAdapter, $name, $type);
78+
}
79+
6180
/**
6281
* Update the navigation property policy in admin
6382
* @param TeamsPolicyAssignment $body The request body

0 commit comments

Comments
 (0)