Skip to content

Commit 6ecaf4e

Browse files
feat(generation): update request builders and models (#2679)
Update generated files with build 251993. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 380ba4d9-c690-4da5-a384-5263d2f0cdf1
1 parent 2b9157e commit 6ecaf4e

85 files changed

Lines changed: 5361 additions & 87 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/main/java/com/microsoft/graph/generated/devices/DevicesRequestBuilder.java‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.microsoft.graph.devices.getavailableextensionproperties.GetAvailableExtensionPropertiesRequestBuilder;
66
import com.microsoft.graph.devices.getbyids.GetByIdsRequestBuilder;
77
import com.microsoft.graph.devices.item.DeviceItemRequestBuilder;
8+
import com.microsoft.graph.devices.provision.ProvisionRequestBuilder;
89
import com.microsoft.graph.devices.validateproperties.ValidatePropertiesRequestBuilder;
910
import com.microsoft.graph.models.Device;
1011
import com.microsoft.graph.models.DeviceCollectionResponse;
@@ -59,6 +60,14 @@ public GetAvailableExtensionPropertiesRequestBuilder getAvailableExtensionProper
5960
public GetByIdsRequestBuilder getByIds() {
6061
return new GetByIdsRequestBuilder(pathParameters, requestAdapter);
6162
}
63+
/**
64+
* Provides operations to call the provision method.
65+
* @return a {@link ProvisionRequestBuilder}
66+
*/
67+
@jakarta.annotation.Nonnull
68+
public ProvisionRequestBuilder provision() {
69+
return new ProvisionRequestBuilder(pathParameters, requestAdapter);
70+
}
6271
/**
6372
* Provides operations to call the validateProperties method.
6473
* @return a {@link ValidatePropertiesRequestBuilder}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
package com.microsoft.graph.devices.provision;
2+
3+
import com.microsoft.kiota.serialization.AdditionalDataHolder;
4+
import com.microsoft.kiota.serialization.Parsable;
5+
import com.microsoft.kiota.serialization.ParseNode;
6+
import com.microsoft.kiota.serialization.SerializationWriter;
7+
import com.microsoft.kiota.store.BackedModel;
8+
import com.microsoft.kiota.store.BackingStore;
9+
import com.microsoft.kiota.store.BackingStoreFactorySingleton;
10+
import java.util.HashMap;
11+
import java.util.Map;
12+
import java.util.Objects;
13+
@jakarta.annotation.Generated("com.microsoft.kiota")
14+
public class ProvisionPostRequestBody implements AdditionalDataHolder, BackedModel, Parsable {
15+
/**
16+
* Stores model information.
17+
*/
18+
@jakarta.annotation.Nonnull
19+
protected BackingStore backingStore;
20+
/**
21+
* Instantiates a new {@link ProvisionPostRequestBody} and sets the default values.
22+
*/
23+
public ProvisionPostRequestBody() {
24+
this.backingStore = BackingStoreFactorySingleton.instance.createBackingStore();
25+
this.setAdditionalData(new HashMap<>());
26+
}
27+
/**
28+
* Creates a new instance of the appropriate class based on discriminator value
29+
* @param parseNode The parse node to use to read the discriminator value and create the object
30+
* @return a {@link ProvisionPostRequestBody}
31+
*/
32+
@jakarta.annotation.Nonnull
33+
public static ProvisionPostRequestBody createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
34+
Objects.requireNonNull(parseNode);
35+
return new ProvisionPostRequestBody();
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 a {@link Map<String, Object>}
40+
*/
41+
@jakarta.annotation.Nonnull
42+
public Map<String, Object> getAdditionalData() {
43+
Map<String, Object> value = this.backingStore.get("additionalData");
44+
if(value == null) {
45+
value = new HashMap<>();
46+
this.setAdditionalData(value);
47+
}
48+
return value;
49+
}
50+
/**
51+
* Gets the backingStore property value. Stores model information.
52+
* @return a {@link BackingStore}
53+
*/
54+
@jakarta.annotation.Nonnull
55+
public BackingStore getBackingStore() {
56+
return this.backingStore;
57+
}
58+
/**
59+
* The deserialization information for the current model
60+
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
61+
*/
62+
@jakarta.annotation.Nonnull
63+
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
64+
final HashMap<String, java.util.function.Consumer<ParseNode>> deserializerMap = new HashMap<String, java.util.function.Consumer<ParseNode>>(1);
65+
deserializerMap.put("provisioningBlob", (n) -> { this.setProvisioningBlob(n.getStringValue()); });
66+
return deserializerMap;
67+
}
68+
/**
69+
* Gets the provisioningBlob property value. The provisioningBlob property
70+
* @return a {@link String}
71+
*/
72+
@jakarta.annotation.Nullable
73+
public String getProvisioningBlob() {
74+
return this.backingStore.get("provisioningBlob");
75+
}
76+
/**
77+
* Serializes information the current object
78+
* @param writer Serialization writer to use to serialize this model
79+
*/
80+
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
81+
Objects.requireNonNull(writer);
82+
writer.writeStringValue("provisioningBlob", this.getProvisioningBlob());
83+
writer.writeAdditionalData(this.getAdditionalData());
84+
}
85+
/**
86+
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
87+
* @param value Value to set for the AdditionalData property.
88+
*/
89+
public void setAdditionalData(@jakarta.annotation.Nullable final Map<String, Object> value) {
90+
this.backingStore.set("additionalData", value);
91+
}
92+
/**
93+
* Sets the backingStore property value. Stores model information.
94+
* @param value Value to set for the backingStore property.
95+
*/
96+
public void setBackingStore(@jakarta.annotation.Nonnull final BackingStore value) {
97+
Objects.requireNonNull(value);
98+
this.backingStore = value;
99+
}
100+
/**
101+
* Sets the provisioningBlob property value. The provisioningBlob property
102+
* @param value Value to set for the provisioningBlob property.
103+
*/
104+
public void setProvisioningBlob(@jakarta.annotation.Nullable final String value) {
105+
this.backingStore.set("provisioningBlob", value);
106+
}
107+
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
package com.microsoft.graph.devices.provision;
2+
3+
import com.microsoft.graph.models.odataerrors.ODataError;
4+
import com.microsoft.graph.models.ProvisionResponse;
5+
import com.microsoft.kiota.BaseRequestBuilder;
6+
import com.microsoft.kiota.BaseRequestConfiguration;
7+
import com.microsoft.kiota.HttpMethod;
8+
import com.microsoft.kiota.RequestAdapter;
9+
import com.microsoft.kiota.RequestInformation;
10+
import com.microsoft.kiota.RequestOption;
11+
import com.microsoft.kiota.serialization.Parsable;
12+
import com.microsoft.kiota.serialization.ParsableFactory;
13+
import java.util.Collection;
14+
import java.util.HashMap;
15+
import java.util.Map;
16+
import java.util.Objects;
17+
/**
18+
* Provides operations to call the provision method.
19+
*/
20+
@jakarta.annotation.Generated("com.microsoft.kiota")
21+
public class ProvisionRequestBuilder extends BaseRequestBuilder {
22+
/**
23+
* Instantiates a new {@link ProvisionRequestBuilder} and sets the default values.
24+
* @param pathParameters Path parameters for the request
25+
* @param requestAdapter The request adapter to use to execute the requests.
26+
*/
27+
public ProvisionRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
28+
super(requestAdapter, "{+baseurl}/devices/provision", pathParameters);
29+
}
30+
/**
31+
* Instantiates a new {@link ProvisionRequestBuilder} and sets the default values.
32+
* @param rawUrl The raw URL to use for the request builder.
33+
* @param requestAdapter The request adapter to use to execute the requests.
34+
*/
35+
public ProvisionRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
36+
super(requestAdapter, "{+baseurl}/devices/provision", rawUrl);
37+
}
38+
/**
39+
* Provision a device on behalf of an approved Virtual Desktop Infrastructure (VDI) provider. This action wraps the Zero Touch Deployment (ZTD) protocol to create a device in a pending state in the customer&apos;s directory. The device can&apos;t be used for authentication until it completes its registration. The created device is stamped with a system label that identifies the approved VDI provider. Only VDI applications on Microsoft&apos;s approved list of VDI providers can successfully call this action. Calls from other applications are blocked even when the application is granted the required permission.
40+
* @param body The request body
41+
* @return a {@link ProvisionResponse}
42+
* @throws ODataError When receiving a 4XX or 5XX status code
43+
* @see <a href="https://learn.microsoft.com/graph/api/device-provision?view=graph-rest-1.0">Find more info here</a>
44+
*/
45+
@jakarta.annotation.Nullable
46+
public ProvisionResponse post(@jakarta.annotation.Nonnull final ProvisionPostRequestBody body) {
47+
return post(body, null);
48+
}
49+
/**
50+
* Provision a device on behalf of an approved Virtual Desktop Infrastructure (VDI) provider. This action wraps the Zero Touch Deployment (ZTD) protocol to create a device in a pending state in the customer&apos;s directory. The device can&apos;t be used for authentication until it completes its registration. The created device is stamped with a system label that identifies the approved VDI provider. Only VDI applications on Microsoft&apos;s approved list of VDI providers can successfully call this action. Calls from other applications are blocked even when the application is granted the required permission.
51+
* @param body The request body
52+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
53+
* @return a {@link ProvisionResponse}
54+
* @throws ODataError When receiving a 4XX or 5XX status code
55+
* @see <a href="https://learn.microsoft.com/graph/api/device-provision?view=graph-rest-1.0">Find more info here</a>
56+
*/
57+
@jakarta.annotation.Nullable
58+
public ProvisionResponse post(@jakarta.annotation.Nonnull final ProvisionPostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
59+
Objects.requireNonNull(body);
60+
final RequestInformation requestInfo = toPostRequestInformation(body, requestConfiguration);
61+
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
62+
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
63+
return this.requestAdapter.send(requestInfo, errorMapping, ProvisionResponse::createFromDiscriminatorValue);
64+
}
65+
/**
66+
* Provision a device on behalf of an approved Virtual Desktop Infrastructure (VDI) provider. This action wraps the Zero Touch Deployment (ZTD) protocol to create a device in a pending state in the customer&apos;s directory. The device can&apos;t be used for authentication until it completes its registration. The created device is stamped with a system label that identifies the approved VDI provider. Only VDI applications on Microsoft&apos;s approved list of VDI providers can successfully call this action. Calls from other applications are blocked even when the application is granted the required permission.
67+
* @param body The request body
68+
* @return a {@link RequestInformation}
69+
*/
70+
@jakarta.annotation.Nonnull
71+
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final ProvisionPostRequestBody body) {
72+
return toPostRequestInformation(body, null);
73+
}
74+
/**
75+
* Provision a device on behalf of an approved Virtual Desktop Infrastructure (VDI) provider. This action wraps the Zero Touch Deployment (ZTD) protocol to create a device in a pending state in the customer&apos;s directory. The device can&apos;t be used for authentication until it completes its registration. The created device is stamped with a system label that identifies the approved VDI provider. Only VDI applications on Microsoft&apos;s approved list of VDI providers can successfully call this action. Calls from other applications are blocked even when the application is granted the required permission.
76+
* @param body The request body
77+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
78+
* @return a {@link RequestInformation}
79+
*/
80+
@jakarta.annotation.Nonnull
81+
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final ProvisionPostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
82+
Objects.requireNonNull(body);
83+
final RequestInformation requestInfo = new RequestInformation(HttpMethod.POST, urlTemplate, pathParameters);
84+
requestInfo.configure(requestConfiguration, PostRequestConfiguration::new);
85+
requestInfo.headers.tryAdd("Accept", "application/json");
86+
requestInfo.setContentFromParsable(requestAdapter, "application/json", body);
87+
return requestInfo;
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 rawUrl The raw URL to use for the request builder.
92+
* @return a {@link ProvisionRequestBuilder}
93+
*/
94+
@jakarta.annotation.Nonnull
95+
public ProvisionRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
96+
Objects.requireNonNull(rawUrl);
97+
return new ProvisionRequestBuilder(rawUrl, requestAdapter);
98+
}
99+
/**
100+
* Configuration for the request such as headers, query parameters, and middleware options.
101+
*/
102+
@jakarta.annotation.Generated("com.microsoft.kiota")
103+
public class PostRequestConfiguration extends BaseRequestConfiguration {
104+
}
105+
}

‎src/main/java/com/microsoft/graph/generated/directory/tenantgovernance/relatedtenants/RelatedTenantsRequestBuilder.java‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.microsoft.graph.directory.tenantgovernance.relatedtenants.count.CountRequestBuilder;
44
import com.microsoft.graph.directory.tenantgovernance.relatedtenants.item.RelatedTenantItemRequestBuilder;
55
import com.microsoft.graph.directory.tenantgovernance.relatedtenants.refresh.RefreshRequestBuilder;
6+
import com.microsoft.graph.directory.tenantgovernance.relatedtenants.refreshstatus.RefreshStatusRequestBuilder;
67
import com.microsoft.graph.models.odataerrors.ODataError;
78
import com.microsoft.graph.models.RelatedTenant;
89
import com.microsoft.graph.models.RelatedTenantCollectionResponse;
@@ -40,6 +41,14 @@ public CountRequestBuilder count() {
4041
public RefreshRequestBuilder refresh() {
4142
return new RefreshRequestBuilder(pathParameters, requestAdapter);
4243
}
44+
/**
45+
* Provides operations to call the refreshStatus method.
46+
* @return a {@link RefreshStatusRequestBuilder}
47+
*/
48+
@jakarta.annotation.Nonnull
49+
public RefreshStatusRequestBuilder refreshStatus() {
50+
return new RefreshStatusRequestBuilder(pathParameters, requestAdapter);
51+
}
4352
/**
4453
* Provides operations to manage the relatedTenants property of the microsoft.graph.tenantGovernance entity.
4554
* @param relatedTenantId The unique identifier of relatedTenant
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
package com.microsoft.graph.directory.tenantgovernance.relatedtenants.refreshstatus;
2+
3+
import com.microsoft.graph.models.odataerrors.ODataError;
4+
import com.microsoft.graph.models.RelatedTenantsRefreshStatus;
5+
import com.microsoft.kiota.BaseRequestBuilder;
6+
import com.microsoft.kiota.BaseRequestConfiguration;
7+
import com.microsoft.kiota.HttpMethod;
8+
import com.microsoft.kiota.RequestAdapter;
9+
import com.microsoft.kiota.RequestInformation;
10+
import com.microsoft.kiota.RequestOption;
11+
import com.microsoft.kiota.serialization.Parsable;
12+
import com.microsoft.kiota.serialization.ParsableFactory;
13+
import java.util.Collection;
14+
import java.util.HashMap;
15+
import java.util.Map;
16+
import java.util.Objects;
17+
/**
18+
* Provides operations to call the refreshStatus method.
19+
*/
20+
@jakarta.annotation.Generated("com.microsoft.kiota")
21+
public class RefreshStatusRequestBuilder extends BaseRequestBuilder {
22+
/**
23+
* Instantiates a new {@link RefreshStatusRequestBuilder} and sets the default values.
24+
* @param pathParameters Path parameters for the request
25+
* @param requestAdapter The request adapter to use to execute the requests.
26+
*/
27+
public RefreshStatusRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
28+
super(requestAdapter, "{+baseurl}/directory/tenantGovernance/relatedTenants/refreshStatus()", pathParameters);
29+
}
30+
/**
31+
* Instantiates a new {@link RefreshStatusRequestBuilder} and sets the default values.
32+
* @param rawUrl The raw URL to use for the request builder.
33+
* @param requestAdapter The request adapter to use to execute the requests.
34+
*/
35+
public RefreshStatusRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
36+
super(requestAdapter, "{+baseurl}/directory/tenantGovernance/relatedTenants/refreshStatus()", rawUrl);
37+
}
38+
/**
39+
* Invoke function refreshStatus
40+
* @return a {@link RelatedTenantsRefreshStatus}
41+
* @throws ODataError When receiving a 4XX or 5XX status code
42+
*/
43+
@jakarta.annotation.Nullable
44+
public RelatedTenantsRefreshStatus get() {
45+
return get(null);
46+
}
47+
/**
48+
* Invoke function refreshStatus
49+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
50+
* @return a {@link RelatedTenantsRefreshStatus}
51+
* @throws ODataError When receiving a 4XX or 5XX status code
52+
*/
53+
@jakarta.annotation.Nullable
54+
public RelatedTenantsRefreshStatus get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
55+
final RequestInformation requestInfo = toGetRequestInformation(requestConfiguration);
56+
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
57+
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
58+
return this.requestAdapter.send(requestInfo, errorMapping, RelatedTenantsRefreshStatus::createFromDiscriminatorValue);
59+
}
60+
/**
61+
* Invoke function refreshStatus
62+
* @return a {@link RequestInformation}
63+
*/
64+
@jakarta.annotation.Nonnull
65+
public RequestInformation toGetRequestInformation() {
66+
return toGetRequestInformation(null);
67+
}
68+
/**
69+
* Invoke function refreshStatus
70+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
71+
* @return a {@link RequestInformation}
72+
*/
73+
@jakarta.annotation.Nonnull
74+
public RequestInformation toGetRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
75+
final RequestInformation requestInfo = new RequestInformation(HttpMethod.GET, urlTemplate, pathParameters);
76+
requestInfo.configure(requestConfiguration, GetRequestConfiguration::new);
77+
requestInfo.headers.tryAdd("Accept", "application/json");
78+
return requestInfo;
79+
}
80+
/**
81+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
82+
* @param rawUrl The raw URL to use for the request builder.
83+
* @return a {@link RefreshStatusRequestBuilder}
84+
*/
85+
@jakarta.annotation.Nonnull
86+
public RefreshStatusRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
87+
Objects.requireNonNull(rawUrl);
88+
return new RefreshStatusRequestBuilder(rawUrl, requestAdapter);
89+
}
90+
/**
91+
* Configuration for the request such as headers, query parameters, and middleware options.
92+
*/
93+
@jakarta.annotation.Generated("com.microsoft.kiota")
94+
public class GetRequestConfiguration extends BaseRequestConfiguration {
95+
}
96+
}

0 commit comments

Comments
 (0)