Skip to content

Commit d4b951b

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 269961
1 parent 7e05181 commit d4b951b

440 files changed

Lines changed: 28429 additions & 25 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/EscapedPrint/PrintRequestBuilder.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Microsoft\Graph\Generated\EscapedPrint\Connectors\ConnectorsRequestBuilder;
88
use Microsoft\Graph\Generated\EscapedPrint\Operations\OperationsRequestBuilder;
99
use Microsoft\Graph\Generated\EscapedPrint\Printers\PrintersRequestBuilder;
10+
use Microsoft\Graph\Generated\EscapedPrint\PullPrintPrinters\PullPrintPrintersRequestBuilder;
1011
use Microsoft\Graph\Generated\EscapedPrint\Services\ServicesRequestBuilder;
1112
use Microsoft\Graph\Generated\EscapedPrint\Shares\SharesRequestBuilder;
1213
use Microsoft\Graph\Generated\EscapedPrint\TaskDefinitions\TaskDefinitionsRequestBuilder;
@@ -43,6 +44,13 @@ public function printers(): PrintersRequestBuilder {
4344
return new PrintersRequestBuilder($this->pathParameters, $this->requestAdapter);
4445
}
4546

47+
/**
48+
* Provides operations to manage the pullPrintPrinters property of the microsoft.graph.print entity.
49+
*/
50+
public function pullPrintPrinters(): PullPrintPrintersRequestBuilder {
51+
return new PullPrintPrintersRequestBuilder($this->pathParameters, $this->requestAdapter);
52+
}
53+
4654
/**
4755
* Provides operations to manage the services property of the microsoft.graph.print entity.
4856
*/

‎src/Generated/EscapedPrint/Printers/Item/Jobs/JobsRequestBuilder.php‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
use Http\Promise\Promise;
77
use Microsoft\Graph\Generated\EscapedPrint\Printers\Item\Jobs\Count\CountRequestBuilder;
88
use Microsoft\Graph\Generated\EscapedPrint\Printers\Item\Jobs\Item\PrintJobItemRequestBuilder;
9+
use Microsoft\Graph\Generated\EscapedPrint\Printers\Item\Jobs\Release\ReleaseRequestBuilder;
10+
use Microsoft\Graph\Generated\EscapedPrint\Printers\Item\Jobs\ReleaseWait\ReleaseWaitRequestBuilder;
911
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
1012
use Microsoft\Graph\Generated\Models\PrintJob;
1113
use Microsoft\Graph\Generated\Models\PrintJobCollectionResponse;
@@ -26,6 +28,20 @@ public function count(): CountRequestBuilder {
2628
return new CountRequestBuilder($this->pathParameters, $this->requestAdapter);
2729
}
2830

31+
/**
32+
* Provides operations to call the release method.
33+
*/
34+
public function release(): ReleaseRequestBuilder {
35+
return new ReleaseRequestBuilder($this->pathParameters, $this->requestAdapter);
36+
}
37+
38+
/**
39+
* Provides operations to call the releaseWait method.
40+
*/
41+
public function releaseWait(): ReleaseWaitRequestBuilder {
42+
return new ReleaseWaitRequestBuilder($this->pathParameters, $this->requestAdapter);
43+
}
44+
2945
/**
3046
* Provides operations to manage the jobs property of the microsoft.graph.printerBase entity.
3147
* @param string $printJobId The unique identifier of printJob
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\EscapedPrint\Printers\Item\Jobs\Release;
4+
5+
use Microsoft\Kiota\Abstractions\Serialization\AdditionalDataHolder;
6+
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
7+
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
8+
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
9+
use Microsoft\Kiota\Abstractions\Store\BackedModel;
10+
use Microsoft\Kiota\Abstractions\Store\BackingStore;
11+
use Microsoft\Kiota\Abstractions\Store\BackingStoreFactorySingleton;
12+
13+
class ReleasePostRequestBody implements AdditionalDataHolder, BackedModel, Parsable
14+
{
15+
/**
16+
* @var BackingStore $backingStore Stores model information.
17+
*/
18+
private BackingStore $backingStore;
19+
20+
/**
21+
* Instantiates a new ReleasePostRequestBody and sets the default values.
22+
*/
23+
public function __construct() {
24+
$this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();
25+
$this->setAdditionalData([]);
26+
}
27+
28+
/**
29+
* Creates a new instance of the appropriate class based on discriminator value
30+
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object
31+
* @return ReleasePostRequestBody
32+
*/
33+
public static function createFromDiscriminatorValue(ParseNode $parseNode): ReleasePostRequestBody {
34+
return new ReleasePostRequestBody();
35+
}
36+
37+
/**
38+
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
39+
* @return array<string, mixed>|null
40+
*/
41+
public function getAdditionalData(): ?array {
42+
$val = $this->getBackingStore()->get('additionalData');
43+
if (is_null($val) || is_array($val)) {
44+
/** @var array<string, mixed>|null $val */
45+
return $val;
46+
}
47+
throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'");
48+
}
49+
50+
/**
51+
* Gets the BackingStore property value. Stores model information.
52+
* @return BackingStore
53+
*/
54+
public function getBackingStore(): BackingStore {
55+
return $this->backingStore;
56+
}
57+
58+
/**
59+
* The deserialization information for the current model
60+
* @return array<string, callable(ParseNode): void>
61+
*/
62+
public function getFieldDeserializers(): array {
63+
$o = $this;
64+
return [
65+
'jobId' => fn(ParseNode $n) => $o->setJobId($n->getStringValue()),
66+
];
67+
}
68+
69+
/**
70+
* Gets the jobId property value. The jobId property
71+
* @return string|null
72+
*/
73+
public function getJobId(): ?string {
74+
$val = $this->getBackingStore()->get('jobId');
75+
if (is_null($val) || is_string($val)) {
76+
return $val;
77+
}
78+
throw new \UnexpectedValueException("Invalid type found in backing store for 'jobId'");
79+
}
80+
81+
/**
82+
* Serializes information the current object
83+
* @param SerializationWriter $writer Serialization writer to use to serialize this model
84+
*/
85+
public function serialize(SerializationWriter $writer): void {
86+
$writer->writeStringValue('jobId', $this->getJobId());
87+
$writer->writeAdditionalData($this->getAdditionalData());
88+
}
89+
90+
/**
91+
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
92+
* @param array<string,mixed> $value Value to set for the AdditionalData property.
93+
*/
94+
public function setAdditionalData(?array $value): void {
95+
$this->getBackingStore()->set('additionalData', $value);
96+
}
97+
98+
/**
99+
* Sets the BackingStore property value. Stores model information.
100+
* @param BackingStore $value Value to set for the BackingStore property.
101+
*/
102+
public function setBackingStore(BackingStore $value): void {
103+
$this->backingStore = $value;
104+
}
105+
106+
/**
107+
* Sets the jobId property value. The jobId property
108+
* @param string|null $value Value to set for the jobId property.
109+
*/
110+
public function setJobId(?string $value): void {
111+
$this->getBackingStore()->set('jobId', $value);
112+
}
113+
114+
}
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\EscapedPrint\Printers\Item\Jobs\Release;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
8+
use Microsoft\Graph\Generated\Models\PrintJob;
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 call the release method.
16+
*/
17+
class ReleaseRequestBuilder extends BaseRequestBuilder
18+
{
19+
/**
20+
* Instantiates a new ReleaseRequestBuilder 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}/print/printers/{printer%2Did}/jobs/release');
26+
if (is_array($pathParametersOrRawUrl)) {
27+
$this->pathParameters = $pathParametersOrRawUrl;
28+
} else {
29+
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
30+
}
31+
}
32+
33+
/**
34+
* Release a printJob held in the cloud for secure release to print it at the target printer.
35+
* @param ReleasePostRequestBody $body The request body
36+
* @param ReleaseRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
37+
* @return Promise<PrintJob|null>
38+
* @throws Exception
39+
* @link https://learn.microsoft.com/graph/api/printjob-release?view=graph-rest-1.0 Find more info here
40+
*/
41+
public function post(ReleasePostRequestBody $body, ?ReleaseRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise {
42+
$requestInfo = $this->toPostRequestInformation($body, $requestConfiguration);
43+
$errorMappings = [
44+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
45+
];
46+
return $this->requestAdapter->sendAsync($requestInfo, [PrintJob::class, 'createFromDiscriminatorValue'], $errorMappings);
47+
}
48+
49+
/**
50+
* Release a printJob held in the cloud for secure release to print it at the target printer.
51+
* @param ReleasePostRequestBody $body The request body
52+
* @param ReleaseRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
53+
* @return RequestInformation
54+
*/
55+
public function toPostRequestInformation(ReleasePostRequestBody $body, ?ReleaseRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation {
56+
$requestInfo = new RequestInformation();
57+
$requestInfo->urlTemplate = $this->urlTemplate;
58+
$requestInfo->pathParameters = $this->pathParameters;
59+
$requestInfo->httpMethod = HttpMethod::POST;
60+
if ($requestConfiguration !== null) {
61+
$requestInfo->addHeaders($requestConfiguration->headers);
62+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
63+
}
64+
$requestInfo->tryAddHeader('Accept', "application/json");
65+
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
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 ReleaseRequestBuilder
73+
*/
74+
public function withUrl(string $rawUrl): ReleaseRequestBuilder {
75+
return new ReleaseRequestBuilder($rawUrl, $this->requestAdapter);
76+
}
77+
78+
}
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\EscapedPrint\Printers\Item\Jobs\Release;
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 ReleaseRequestBuilderPostRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* Instantiates a new ReleaseRequestBuilderPostRequestConfiguration 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: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\EscapedPrint\Printers\Item\Jobs\ReleaseWait;
4+
5+
use Microsoft\Graph\Generated\Models\BaseCollectionPaginationCountResponse;
6+
use Microsoft\Graph\Generated\Models\PrintJob;
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 ReleaseWaitGetResponse extends BaseCollectionPaginationCountResponse implements Parsable
13+
{
14+
/**
15+
* Instantiates a new ReleaseWaitGetResponse 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 ReleaseWaitGetResponse
25+
*/
26+
public static function createFromDiscriminatorValue(ParseNode $parseNode): ReleaseWaitGetResponse {
27+
return new ReleaseWaitGetResponse();
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([PrintJob::class, 'createFromDiscriminatorValue'])),
38+
]);
39+
}
40+
41+
/**
42+
* Gets the value property value. The value property
43+
* @return array<PrintJob>|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, PrintJob::class);
49+
/** @var array<PrintJob>|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<PrintJob>|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+
}

0 commit comments

Comments
 (0)