Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.microsoft.graph.devices.getavailableextensionproperties.GetAvailableExtensionPropertiesRequestBuilder;
import com.microsoft.graph.devices.getbyids.GetByIdsRequestBuilder;
import com.microsoft.graph.devices.item.DeviceItemRequestBuilder;
import com.microsoft.graph.devices.provision.ProvisionRequestBuilder;
import com.microsoft.graph.devices.validateproperties.ValidatePropertiesRequestBuilder;
import com.microsoft.graph.models.Device;
import com.microsoft.graph.models.DeviceCollectionResponse;
Expand Down Expand Up @@ -59,6 +60,14 @@ public GetAvailableExtensionPropertiesRequestBuilder getAvailableExtensionProper
public GetByIdsRequestBuilder getByIds() {
return new GetByIdsRequestBuilder(pathParameters, requestAdapter);
}
/**
* Provides operations to call the provision method.
* @return a {@link ProvisionRequestBuilder}
*/
@jakarta.annotation.Nonnull
public ProvisionRequestBuilder provision() {
return new ProvisionRequestBuilder(pathParameters, requestAdapter);
}
/**
* Provides operations to call the validateProperties method.
* @return a {@link ValidatePropertiesRequestBuilder}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
package com.microsoft.graph.devices.provision;

import com.microsoft.kiota.serialization.AdditionalDataHolder;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import com.microsoft.kiota.store.BackedModel;
import com.microsoft.kiota.store.BackingStore;
import com.microsoft.kiota.store.BackingStoreFactorySingleton;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class ProvisionPostRequestBody implements AdditionalDataHolder, BackedModel, Parsable {
/**
* Stores model information.
*/
@jakarta.annotation.Nonnull
protected BackingStore backingStore;
/**
* Instantiates a new {@link ProvisionPostRequestBody} and sets the default values.
*/
public ProvisionPostRequestBody() {
this.backingStore = BackingStoreFactorySingleton.instance.createBackingStore();
this.setAdditionalData(new HashMap<>());
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a {@link ProvisionPostRequestBody}
*/
@jakarta.annotation.Nonnull
public static ProvisionPostRequestBody createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new ProvisionPostRequestBody();
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> getAdditionalData() {
Map<String, Object> value = this.backingStore.get("additionalData");
if(value == null) {
value = new HashMap<>();
this.setAdditionalData(value);
}
return value;
}
/**
* Gets the backingStore property value. Stores model information.
* @return a {@link BackingStore}
*/
@jakarta.annotation.Nonnull
public BackingStore getBackingStore() {
return this.backingStore;
}
/**
* The deserialization information for the current model
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
final HashMap<String, java.util.function.Consumer<ParseNode>> deserializerMap = new HashMap<String, java.util.function.Consumer<ParseNode>>(1);
deserializerMap.put("provisioningBlob", (n) -> { this.setProvisioningBlob(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the provisioningBlob property value. The provisioningBlob property
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getProvisioningBlob() {
return this.backingStore.get("provisioningBlob");
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeStringValue("provisioningBlob", this.getProvisioningBlob());
writer.writeAdditionalData(this.getAdditionalData());
}
/**
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param value Value to set for the AdditionalData property.
*/
public void setAdditionalData(@jakarta.annotation.Nullable final Map<String, Object> value) {
this.backingStore.set("additionalData", value);
}
/**
* Sets the backingStore property value. Stores model information.
* @param value Value to set for the backingStore property.
*/
public void setBackingStore(@jakarta.annotation.Nonnull final BackingStore value) {
Objects.requireNonNull(value);
this.backingStore = value;
}
/**
* Sets the provisioningBlob property value. The provisioningBlob property
* @param value Value to set for the provisioningBlob property.
*/
public void setProvisioningBlob(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("provisioningBlob", value);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
package com.microsoft.graph.devices.provision;

import com.microsoft.graph.models.odataerrors.ODataError;
import com.microsoft.graph.models.ProvisionResponse;
import com.microsoft.kiota.BaseRequestBuilder;
import com.microsoft.kiota.BaseRequestConfiguration;
import com.microsoft.kiota.HttpMethod;
import com.microsoft.kiota.RequestAdapter;
import com.microsoft.kiota.RequestInformation;
import com.microsoft.kiota.RequestOption;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParsableFactory;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* Provides operations to call the provision method.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class ProvisionRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new {@link ProvisionRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
public ProvisionRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
super(requestAdapter, "{+baseurl}/devices/provision", pathParameters);
}
/**
* Instantiates a new {@link ProvisionRequestBuilder} and sets the default values.
* @param rawUrl The raw URL to use for the request builder.
* @param requestAdapter The request adapter to use to execute the requests.
*/
public ProvisionRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
super(requestAdapter, "{+baseurl}/devices/provision", rawUrl);
}
/**
* 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.
* @param body The request body
* @return a {@link ProvisionResponse}
* @throws ODataError When receiving a 4XX or 5XX status code
* @see <a href="https://learn.microsoft.com/graph/api/device-provision?view=graph-rest-1.0">Find more info here</a>
*/
@jakarta.annotation.Nullable
public ProvisionResponse post(@jakarta.annotation.Nonnull final ProvisionPostRequestBody body) {
return post(body, null);
}
/**
* 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.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link ProvisionResponse}
* @throws ODataError When receiving a 4XX or 5XX status code
* @see <a href="https://learn.microsoft.com/graph/api/device-provision?view=graph-rest-1.0">Find more info here</a>
*/
@jakarta.annotation.Nullable
public ProvisionResponse post(@jakarta.annotation.Nonnull final ProvisionPostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
Objects.requireNonNull(body);
final RequestInformation requestInfo = toPostRequestInformation(body, requestConfiguration);
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
return this.requestAdapter.send(requestInfo, errorMapping, ProvisionResponse::createFromDiscriminatorValue);
}
/**
* 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.
* @param body The request body
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final ProvisionPostRequestBody body) {
return toPostRequestInformation(body, null);
}
/**
* 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.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final ProvisionPostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
Objects.requireNonNull(body);
final RequestInformation requestInfo = new RequestInformation(HttpMethod.POST, urlTemplate, pathParameters);
requestInfo.configure(requestConfiguration, PostRequestConfiguration::new);
requestInfo.headers.tryAdd("Accept", "application/json");
requestInfo.setContentFromParsable(requestAdapter, "application/json", body);
return requestInfo;
}
/**
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
* @param rawUrl The raw URL to use for the request builder.
* @return a {@link ProvisionRequestBuilder}
*/
@jakarta.annotation.Nonnull
public ProvisionRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
Objects.requireNonNull(rawUrl);
return new ProvisionRequestBuilder(rawUrl, requestAdapter);
}
/**
* Configuration for the request such as headers, query parameters, and middleware options.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class PostRequestConfiguration extends BaseRequestConfiguration {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.microsoft.graph.directory.tenantgovernance.relatedtenants.count.CountRequestBuilder;
import com.microsoft.graph.directory.tenantgovernance.relatedtenants.item.RelatedTenantItemRequestBuilder;
import com.microsoft.graph.directory.tenantgovernance.relatedtenants.refresh.RefreshRequestBuilder;
import com.microsoft.graph.directory.tenantgovernance.relatedtenants.refreshstatus.RefreshStatusRequestBuilder;
import com.microsoft.graph.models.odataerrors.ODataError;
import com.microsoft.graph.models.RelatedTenant;
import com.microsoft.graph.models.RelatedTenantCollectionResponse;
Expand Down Expand Up @@ -40,6 +41,14 @@ public CountRequestBuilder count() {
public RefreshRequestBuilder refresh() {
return new RefreshRequestBuilder(pathParameters, requestAdapter);
}
/**
* Provides operations to call the refreshStatus method.
* @return a {@link RefreshStatusRequestBuilder}
*/
@jakarta.annotation.Nonnull
public RefreshStatusRequestBuilder refreshStatus() {
return new RefreshStatusRequestBuilder(pathParameters, requestAdapter);
}
/**
* Provides operations to manage the relatedTenants property of the microsoft.graph.tenantGovernance entity.
* @param relatedTenantId The unique identifier of relatedTenant
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
package com.microsoft.graph.directory.tenantgovernance.relatedtenants.refreshstatus;

import com.microsoft.graph.models.odataerrors.ODataError;
import com.microsoft.graph.models.RelatedTenantsRefreshStatus;
import com.microsoft.kiota.BaseRequestBuilder;
import com.microsoft.kiota.BaseRequestConfiguration;
import com.microsoft.kiota.HttpMethod;
import com.microsoft.kiota.RequestAdapter;
import com.microsoft.kiota.RequestInformation;
import com.microsoft.kiota.RequestOption;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParsableFactory;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* Provides operations to call the refreshStatus method.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class RefreshStatusRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new {@link RefreshStatusRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
public RefreshStatusRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
super(requestAdapter, "{+baseurl}/directory/tenantGovernance/relatedTenants/refreshStatus()", pathParameters);
}
/**
* Instantiates a new {@link RefreshStatusRequestBuilder} and sets the default values.
* @param rawUrl The raw URL to use for the request builder.
* @param requestAdapter The request adapter to use to execute the requests.
*/
public RefreshStatusRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
super(requestAdapter, "{+baseurl}/directory/tenantGovernance/relatedTenants/refreshStatus()", rawUrl);
}
/**
* Invoke function refreshStatus
* @return a {@link RelatedTenantsRefreshStatus}
* @throws ODataError When receiving a 4XX or 5XX status code
*/
@jakarta.annotation.Nullable
public RelatedTenantsRefreshStatus get() {
return get(null);
}
/**
* Invoke function refreshStatus
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link RelatedTenantsRefreshStatus}
* @throws ODataError When receiving a 4XX or 5XX status code
*/
@jakarta.annotation.Nullable
public RelatedTenantsRefreshStatus get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
final RequestInformation requestInfo = toGetRequestInformation(requestConfiguration);
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
return this.requestAdapter.send(requestInfo, errorMapping, RelatedTenantsRefreshStatus::createFromDiscriminatorValue);
}
/**
* Invoke function refreshStatus
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation() {
return toGetRequestInformation(null);
}
/**
* Invoke function refreshStatus
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
final RequestInformation requestInfo = new RequestInformation(HttpMethod.GET, urlTemplate, pathParameters);
requestInfo.configure(requestConfiguration, GetRequestConfiguration::new);
requestInfo.headers.tryAdd("Accept", "application/json");
return requestInfo;
}
/**
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
* @param rawUrl The raw URL to use for the request builder.
* @return a {@link RefreshStatusRequestBuilder}
*/
@jakarta.annotation.Nonnull
public RefreshStatusRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
Objects.requireNonNull(rawUrl);
return new RefreshStatusRequestBuilder(rawUrl, requestAdapter);
}
/**
* Configuration for the request such as headers, query parameters, and middleware options.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class GetRequestConfiguration extends BaseRequestConfiguration {
}
}
Loading
Loading