diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/CHANGELOG.md b/sdk/databoxedge/azure-resourcemanager-databoxedge/CHANGELOG.md index 0ed4046c5a0ea..0a0c8151a8afb 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/CHANGELOG.md +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-09-30) +- Azure Resource Manager DataBoxEdge client library for Java. This package contains Microsoft Azure SDK for DataBoxEdge Management SDK. Package tag package-2021-06-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-04-09) diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/README.md b/sdk/databoxedge/azure-resourcemanager-databoxedge/README.md index 1fbf18e47484e..405dbd6095f55 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/README.md +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/README.md @@ -2,7 +2,7 @@ Azure Resource Manager DataBoxEdge client library for Java. -This package contains Microsoft Azure SDK for DataBoxEdge Management SDK. Package tag package-2019-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for DataBoxEdge Management SDK. Package tag package-2021-06-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-databoxedge - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,8 @@ See [API design][design] for general introduction on design and key concepts on ## Examples + + ## Troubleshooting ## Next steps diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml b/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml index e93ad9bd94378..7f894cfb0f191 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml @@ -1,67 +1,86 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-databoxedge - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-databoxedge + 1.0.0-beta.2 + jar - Microsoft Azure SDK for DataBoxEdge Management - This package contains Microsoft Azure SDK for DataBoxEdge Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2019-08. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for DataBoxEdge Management + This package contains Microsoft Azure SDK for DataBoxEdge Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2021-06-01. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - - - - - com.azure - azure-core - 1.20.0 - - - com.azure - azure-core-management - 1.4.1 - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.7 - - true - - - - + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + + + + + com.azure + azure-core + 1.20.0 + + + com.azure + azure-core-management + 1.4.1 + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.7 + + true + + + + org.revapi + revapi-maven-plugin + 0.11.2 + + + + + java.method.addedToInterface + + + true + .* + com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)* + + + + + + + diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/DataBoxEdgeManager.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/DataBoxEdgeManager.java index 0ddbb150ce2d0..45b3c4f833ede 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/DataBoxEdgeManager.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/DataBoxEdgeManager.java @@ -9,7 +9,6 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -17,41 +16,50 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.fluent.DataBoxEdgeManagementClient; +import com.azure.resourcemanager.databoxedge.implementation.AddonsImpl; import com.azure.resourcemanager.databoxedge.implementation.AlertsImpl; +import com.azure.resourcemanager.databoxedge.implementation.AvailableSkusImpl; import com.azure.resourcemanager.databoxedge.implementation.BandwidthSchedulesImpl; import com.azure.resourcemanager.databoxedge.implementation.ContainersImpl; import com.azure.resourcemanager.databoxedge.implementation.DataBoxEdgeManagementClientBuilder; import com.azure.resourcemanager.databoxedge.implementation.DevicesImpl; +import com.azure.resourcemanager.databoxedge.implementation.DiagnosticSettingsImpl; import com.azure.resourcemanager.databoxedge.implementation.JobsImpl; +import com.azure.resourcemanager.databoxedge.implementation.MonitoringConfigsImpl; import com.azure.resourcemanager.databoxedge.implementation.NodesImpl; import com.azure.resourcemanager.databoxedge.implementation.OperationsImpl; import com.azure.resourcemanager.databoxedge.implementation.OperationsStatusImpl; import com.azure.resourcemanager.databoxedge.implementation.OrdersImpl; import com.azure.resourcemanager.databoxedge.implementation.RolesImpl; import com.azure.resourcemanager.databoxedge.implementation.SharesImpl; -import com.azure.resourcemanager.databoxedge.implementation.SkusImpl; import com.azure.resourcemanager.databoxedge.implementation.StorageAccountCredentialsImpl; import com.azure.resourcemanager.databoxedge.implementation.StorageAccountsImpl; +import com.azure.resourcemanager.databoxedge.implementation.SupportPackagesImpl; import com.azure.resourcemanager.databoxedge.implementation.TriggersImpl; import com.azure.resourcemanager.databoxedge.implementation.UsersImpl; +import com.azure.resourcemanager.databoxedge.models.Addons; import com.azure.resourcemanager.databoxedge.models.Alerts; +import com.azure.resourcemanager.databoxedge.models.AvailableSkus; import com.azure.resourcemanager.databoxedge.models.BandwidthSchedules; import com.azure.resourcemanager.databoxedge.models.Containers; import com.azure.resourcemanager.databoxedge.models.Devices; +import com.azure.resourcemanager.databoxedge.models.DiagnosticSettings; import com.azure.resourcemanager.databoxedge.models.Jobs; +import com.azure.resourcemanager.databoxedge.models.MonitoringConfigs; import com.azure.resourcemanager.databoxedge.models.Nodes; import com.azure.resourcemanager.databoxedge.models.Operations; import com.azure.resourcemanager.databoxedge.models.OperationsStatus; import com.azure.resourcemanager.databoxedge.models.Orders; import com.azure.resourcemanager.databoxedge.models.Roles; import com.azure.resourcemanager.databoxedge.models.Shares; -import com.azure.resourcemanager.databoxedge.models.Skus; import com.azure.resourcemanager.databoxedge.models.StorageAccountCredentials; import com.azure.resourcemanager.databoxedge.models.StorageAccounts; +import com.azure.resourcemanager.databoxedge.models.SupportPackages; import com.azure.resourcemanager.databoxedge.models.Triggers; import com.azure.resourcemanager.databoxedge.models.Users; import java.time.Duration; @@ -64,12 +72,16 @@ public final class DataBoxEdgeManager { private Operations operations; + private AvailableSkus availableSkus; + private Devices devices; private Alerts alerts; private BandwidthSchedules bandwidthSchedules; + private DiagnosticSettings diagnosticSettings; + private Jobs jobs; private Nodes nodes; @@ -80,6 +92,10 @@ public final class DataBoxEdgeManager { private Roles roles; + private Addons addons; + + private MonitoringConfigs monitoringConfigs; + private Shares shares; private StorageAccountCredentials storageAccountCredentials; @@ -90,9 +106,9 @@ public final class DataBoxEdgeManager { private Triggers triggers; - private Users users; + private SupportPackages supportPackages; - private Skus skus; + private Users users; private final DataBoxEdgeManagementClient clientObject; @@ -137,6 +153,7 @@ public static final class Configurable { private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -176,6 +193,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -232,6 +260,9 @@ public DataBoxEdgeManager authenticate(TokenCredential credential, AzureProfile userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } @@ -241,10 +272,7 @@ public DataBoxEdgeManager authenticate(TokenCredential credential, AzureProfile HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); @@ -265,6 +293,14 @@ public Operations operations() { return operations; } + /** @return Resource collection API of AvailableSkus. */ + public AvailableSkus availableSkus() { + if (this.availableSkus == null) { + this.availableSkus = new AvailableSkusImpl(clientObject.getAvailableSkus(), this); + } + return availableSkus; + } + /** @return Resource collection API of Devices. */ public Devices devices() { if (this.devices == null) { @@ -289,6 +325,14 @@ public BandwidthSchedules bandwidthSchedules() { return bandwidthSchedules; } + /** @return Resource collection API of DiagnosticSettings. */ + public DiagnosticSettings diagnosticSettings() { + if (this.diagnosticSettings == null) { + this.diagnosticSettings = new DiagnosticSettingsImpl(clientObject.getDiagnosticSettings(), this); + } + return diagnosticSettings; + } + /** @return Resource collection API of Jobs. */ public Jobs jobs() { if (this.jobs == null) { @@ -329,6 +373,22 @@ public Roles roles() { return roles; } + /** @return Resource collection API of Addons. */ + public Addons addons() { + if (this.addons == null) { + this.addons = new AddonsImpl(clientObject.getAddons(), this); + } + return addons; + } + + /** @return Resource collection API of MonitoringConfigs. */ + public MonitoringConfigs monitoringConfigs() { + if (this.monitoringConfigs == null) { + this.monitoringConfigs = new MonitoringConfigsImpl(clientObject.getMonitoringConfigs(), this); + } + return monitoringConfigs; + } + /** @return Resource collection API of Shares. */ public Shares shares() { if (this.shares == null) { @@ -370,6 +430,14 @@ public Triggers triggers() { return triggers; } + /** @return Resource collection API of SupportPackages. */ + public SupportPackages supportPackages() { + if (this.supportPackages == null) { + this.supportPackages = new SupportPackagesImpl(clientObject.getSupportPackages(), this); + } + return supportPackages; + } + /** @return Resource collection API of Users. */ public Users users() { if (this.users == null) { @@ -378,14 +446,6 @@ public Users users() { return users; } - /** @return Resource collection API of Skus. */ - public Skus skus() { - if (this.skus == null) { - this.skus = new SkusImpl(clientObject.getSkus(), this); - } - return skus; - } - /** * @return Wrapped service client DataBoxEdgeManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/AddonsClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/AddonsClient.java new file mode 100644 index 0000000000000..a40d2ce71aa34 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/AddonsClient.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.databoxedge.fluent.models.AddonInner; + +/** An instance of this class provides access to all the operations defined in AddonsClient. */ +public interface AddonsClient { + /** + * Lists all the addons configured in the role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByRole(String deviceName, String roleName, String resourceGroupName); + + /** + * Lists all the addons configured in the role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByRole(String deviceName, String roleName, String resourceGroupName, Context context); + + /** + * Gets a specific addon by name. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific addon by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AddonInner get(String deviceName, String roleName, String addonName, String resourceGroupName); + + /** + * Gets a specific addon by name. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific addon by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context); + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, AddonInner> beginCreateOrUpdate( + String deviceName, String roleName, String addonName, String resourceGroupName, AddonInner addon); + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, AddonInner> beginCreateOrUpdate( + String deviceName, + String roleName, + String addonName, + String resourceGroupName, + AddonInner addon, + Context context); + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AddonInner createOrUpdate( + String deviceName, String roleName, String addonName, String resourceGroupName, AddonInner addon); + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AddonInner createOrUpdate( + String deviceName, + String roleName, + String addonName, + String resourceGroupName, + AddonInner addon, + Context context); + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String deviceName, String roleName, String addonName, String resourceGroupName); + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context); + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String deviceName, String roleName, String addonName, String resourceGroupName); + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String deviceName, String roleName, String addonName, String resourceGroupName, Context context); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SkusClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/AvailableSkusClient.java similarity index 71% rename from sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SkusClient.java rename to sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/AvailableSkusClient.java index 73dc0b3417259..314c73577ffc6 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SkusClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/AvailableSkusClient.java @@ -8,24 +8,23 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.databoxedge.fluent.models.ResourceTypeSkuInner; +import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeSkuInner; -/** An instance of this class provides access to all the operations defined in SkusClient. */ -public interface SkusClient { +/** An instance of this class provides access to all the operations defined in AvailableSkusClient. */ +public interface AvailableSkusClient { /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of SKU Information objects. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable list(); /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * - * @param filter Specify $filter='location eq <location>' to filter on location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,5 +32,5 @@ public interface SkusClient { * @return list of SKU Information objects. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, Context context); + PagedIterable list(Context context); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DataBoxEdgeManagementClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DataBoxEdgeManagementClient.java index d3ea0cb32538e..ea94df01e9838 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DataBoxEdgeManagementClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DataBoxEdgeManagementClient.java @@ -51,6 +51,13 @@ public interface DataBoxEdgeManagementClient { */ OperationsClient getOperations(); + /** + * Gets the AvailableSkusClient object to access its operations. + * + * @return the AvailableSkusClient object. + */ + AvailableSkusClient getAvailableSkus(); + /** * Gets the DevicesClient object to access its operations. * @@ -72,6 +79,13 @@ public interface DataBoxEdgeManagementClient { */ BandwidthSchedulesClient getBandwidthSchedules(); + /** + * Gets the DiagnosticSettingsClient object to access its operations. + * + * @return the DiagnosticSettingsClient object. + */ + DiagnosticSettingsClient getDiagnosticSettings(); + /** * Gets the JobsClient object to access its operations. * @@ -107,6 +121,20 @@ public interface DataBoxEdgeManagementClient { */ RolesClient getRoles(); + /** + * Gets the AddonsClient object to access its operations. + * + * @return the AddonsClient object. + */ + AddonsClient getAddons(); + + /** + * Gets the MonitoringConfigsClient object to access its operations. + * + * @return the MonitoringConfigsClient object. + */ + MonitoringConfigsClient getMonitoringConfigs(); + /** * Gets the SharesClient object to access its operations. * @@ -143,16 +171,16 @@ public interface DataBoxEdgeManagementClient { TriggersClient getTriggers(); /** - * Gets the UsersClient object to access its operations. + * Gets the SupportPackagesClient object to access its operations. * - * @return the UsersClient object. + * @return the SupportPackagesClient object. */ - UsersClient getUsers(); + SupportPackagesClient getSupportPackages(); /** - * Gets the SkusClient object to access its operations. + * Gets the UsersClient object to access its operations. * - * @return the SkusClient object. + * @return the UsersClient object. */ - SkusClient getSkus(); + UsersClient getUsers(); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DevicesClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DevicesClient.java index 44aa91941334e..d0359a11b7b98 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DevicesClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DevicesClient.java @@ -13,9 +13,11 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceExtendedInfoInner; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceInner; +import com.azure.resourcemanager.databoxedge.fluent.models.GenerateCertResponseInner; import com.azure.resourcemanager.databoxedge.fluent.models.NetworkSettingsInner; import com.azure.resourcemanager.databoxedge.fluent.models.UpdateSummaryInner; import com.azure.resourcemanager.databoxedge.fluent.models.UploadCertificateResponseInner; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevicePatch; import com.azure.resourcemanager.databoxedge.models.SecuritySettings; import com.azure.resourcemanager.databoxedge.models.UploadCertificateRequest; @@ -101,37 +103,6 @@ public interface DevicesClient { Response getByResourceGroupWithResponse( String resourceGroupName, String deviceName, Context context); - /** - * Creates or updates a Data Box Edge/Data Box Gateway resource. - * - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param dataBoxEdgeDevice The resource object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, DataBoxEdgeDeviceInner> beginCreateOrUpdate( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice); - - /** - * Creates or updates a Data Box Edge/Data Box Gateway resource. - * - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param dataBoxEdgeDevice The resource object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, DataBoxEdgeDeviceInner> beginCreateOrUpdate( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context); - /** * Creates or updates a Data Box Edge/Data Box Gateway resource. * @@ -160,7 +131,7 @@ DataBoxEdgeDeviceInner createOrUpdate( * @return the Data Box Edge/Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataBoxEdgeDeviceInner createOrUpdate( + Response createOrUpdateWithResponse( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context); /** @@ -299,20 +270,48 @@ SyncPoller, Void> beginDownloadUpdates( void downloadUpdates(String deviceName, String resourceGroupName, Context context); /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Generates certificate for activation key. * * @param deviceName The device name. * @param resourceGroupName The resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return used in activation key generation flow. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GenerateCertResponseInner generateCertificate(String deviceName, String resourceGroupName); + + /** + * Generates certificate for activation key. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used in activation key generation flow. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response generateCertificateWithResponse( + String deviceName, String resourceGroupName, Context context); + + /** + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceName, String resourceGroupName); /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -320,7 +319,7 @@ SyncPoller, Void> beginDownloadUpdates( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getExtendedInformationWithResponse( @@ -519,6 +518,37 @@ SyncPoller, Void> beginCreateOrUpdateSecuritySettings( void createOrUpdateSecuritySettings( String deviceName, String resourceGroupName, SecuritySettings securitySettings, Context context); + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The patch object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataBoxEdgeDeviceExtendedInfoInner updateExtendedInformation( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters); + + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The patch object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateExtendedInformationWithResponse( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters, Context context); + /** * Gets information about the availability of updates based on the last scan of the device. It also gets information * about any ongoing download or install jobs on the device. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DiagnosticSettingsClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DiagnosticSettingsClient.java new file mode 100644 index 0000000000000..27fcede0a663d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DiagnosticSettingsClient.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticProactiveLogCollectionSettingsInner; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticRemoteSupportSettingsInner; + +/** An instance of this class provides access to all the operations defined in DiagnosticSettingsClient. */ +public interface DiagnosticSettingsClient { + /** + * Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticProactiveLogCollectionSettingsInner getDiagnosticProactiveLogCollectionSettings( + String deviceName, String resourceGroupName); + + /** + * Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDiagnosticProactiveLogCollectionSettingsWithResponse( + String deviceName, String resourceGroupName, Context context); + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DiagnosticProactiveLogCollectionSettingsInner> + beginUpdateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings); + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DiagnosticProactiveLogCollectionSettingsInner> + beginUpdateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings, + Context context); + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticProactiveLogCollectionSettingsInner updateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings); + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticProactiveLogCollectionSettingsInner updateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings, + Context context); + + /** + * Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticRemoteSupportSettingsInner getDiagnosticRemoteSupportSettings( + String deviceName, String resourceGroupName); + + /** + * Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDiagnosticRemoteSupportSettingsWithResponse( + String deviceName, String resourceGroupName, Context context); + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DiagnosticRemoteSupportSettingsInner> + beginUpdateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings); + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DiagnosticRemoteSupportSettingsInner> + beginUpdateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings, + Context context); + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticRemoteSupportSettingsInner updateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings); + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticRemoteSupportSettingsInner updateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings, + Context context); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/MonitoringConfigsClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/MonitoringConfigsClient.java new file mode 100644 index 0000000000000..0c14c11080dac --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/MonitoringConfigsClient.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.databoxedge.fluent.models.MonitoringMetricConfigurationInner; + +/** An instance of this class provides access to all the operations defined in MonitoringConfigsClient. */ +public interface MonitoringConfigsClient { + /** + * Lists metric configurations in a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String deviceName, String roleName, String resourceGroupName); + + /** + * Lists metric configurations in a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String deviceName, String roleName, String resourceGroupName, Context context); + + /** + * Gets a metric configuration of a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a metric configuration of a role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MonitoringMetricConfigurationInner get(String deviceName, String roleName, String resourceGroupName); + + /** + * Gets a metric configuration of a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a metric configuration of a role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String deviceName, String roleName, String resourceGroupName, Context context); + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, MonitoringMetricConfigurationInner> beginCreateOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration); + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, MonitoringMetricConfigurationInner> beginCreateOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration, + Context context); + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MonitoringMetricConfigurationInner createOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration); + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MonitoringMetricConfigurationInner createOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration, + Context context); + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete(String deviceName, String roleName, String resourceGroupName); + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String deviceName, String roleName, String resourceGroupName, Context context); + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String deviceName, String roleName, String resourceGroupName); + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String deviceName, String roleName, String resourceGroupName, Context context); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OrdersClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OrdersClient.java index 6f7bc753adbd0..e7f60834d4495 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OrdersClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OrdersClient.java @@ -11,6 +11,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.databoxedge.fluent.models.DCAccessCodeInner; import com.azure.resourcemanager.databoxedge.fluent.models.OrderInner; /** An instance of this class provides access to all the operations defined in OrdersClient. */ @@ -180,4 +181,32 @@ SyncPoller, OrderInner> beginCreateOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String deviceName, String resourceGroupName, Context context); + + /** + * Gets the DCAccess Code. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DCAccess Code. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DCAccessCodeInner listDCAccessCode(String deviceName, String resourceGroupName); + + /** + * Gets the DCAccess Code. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DCAccess Code. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listDCAccessCodeWithResponse( + String deviceName, String resourceGroupName, Context context); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/StorageAccountsClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/StorageAccountsClient.java index 9badd639ba648..53d3df684f7b5 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/StorageAccountsClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/StorageAccountsClient.java @@ -16,7 +16,7 @@ /** An instance of this class provides access to all the operations defined in StorageAccountsClient. */ public interface StorageAccountsClient { /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -29,7 +29,7 @@ public interface StorageAccountsClient { PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SupportPackagesClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SupportPackagesClient.java new file mode 100644 index 0000000000000..101d1116cd40d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SupportPackagesClient.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.databoxedge.models.TriggerSupportPackageRequest; + +/** An instance of this class provides access to all the operations defined in SupportPackagesClient. */ +public interface SupportPackagesClient { + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginTriggerSupportPackage( + String deviceName, String resourceGroupName, TriggerSupportPackageRequest triggerSupportPackageRequest); + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginTriggerSupportPackage( + String deviceName, + String resourceGroupName, + TriggerSupportPackageRequest triggerSupportPackageRequest, + Context context); + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void triggerSupportPackage( + String deviceName, String resourceGroupName, TriggerSupportPackageRequest triggerSupportPackageRequest); + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void triggerSupportPackage( + String deviceName, + String resourceGroupName, + TriggerSupportPackageRequest triggerSupportPackageRequest, + Context context); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/UsersClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/UsersClient.java index 6fc2a24cfbdc3..c97bb6d56428e 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/UsersClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/UsersClient.java @@ -33,7 +33,7 @@ public interface UsersClient { * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AddonInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AddonInner.java new file mode 100644 index 0000000000000..f50c696381201 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AddonInner.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.ArcAddon; +import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; +import com.azure.resourcemanager.databoxedge.models.IoTAddon; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Role Addon. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "kind", + defaultImpl = AddonInner.class) +@JsonTypeName("Addon") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ArcForKubernetes", value = ArcAddon.class), + @JsonSubTypes.Type(name = "IotEdge", value = IoTAddon.class) +}) +@Immutable +public class AddonInner extends ArmBaseModel { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AddonInner.class); + + /* + * Addon type + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the systemData property: Addon type. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AlertInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AlertInner.java index 1cf1a3fc5eccc..dfb9f9ee7c3cf 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AlertInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AlertInner.java @@ -6,11 +6,13 @@ import com.azure.core.annotation.Immutable; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.AlertErrorDetails; import com.azure.resourcemanager.databoxedge.models.AlertSeverity; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; @@ -21,6 +23,12 @@ public class AlertInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertInner.class); + /* + * Alert generated in the resource + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * Alert title. */ @@ -61,8 +69,18 @@ public class AlertInner extends ArmBaseModel { * Alert details. */ @JsonProperty(value = "properties.detailedInformation", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map detailedInformation; + /** + * Get the systemData property: Alert generated in the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the title property: Alert title. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/BandwidthScheduleInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/BandwidthScheduleInner.java index 3bd2fdf8f7c6e..74133bcb850ae 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/BandwidthScheduleInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/BandwidthScheduleInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.DayOfWeek; @@ -19,6 +20,12 @@ public class BandwidthScheduleInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(BandwidthScheduleInner.class); + /* + * Bandwidth object related to ASE resource + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * The start time of the schedule in UTC. */ @@ -43,6 +50,15 @@ public class BandwidthScheduleInner extends ArmBaseModel { @JsonProperty(value = "properties.days", required = true) private List days; + /** + * Get the systemData property: Bandwidth object related to ASE resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the start property: The start time of the schedule in UTC. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ContainerInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ContainerInner.java index d4c2952aa00fd..961a002451149 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ContainerInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ContainerInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; @@ -21,6 +22,12 @@ public class ContainerInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerInner.class); + /* + * Container in DataBoxEdge Resource + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * Current status of the container. */ @@ -45,6 +52,15 @@ public class ContainerInner extends ArmBaseModel { @JsonProperty(value = "properties.createdDateTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime createdDateTime; + /** + * Get the systemData property: Container in DataBoxEdge Resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the containerStatus property: Current status of the container. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DCAccessCodeInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DCAccessCodeInner.java new file mode 100644 index 0000000000000..d4c1045c90881 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DCAccessCodeInner.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DC Access code in the case of Self Managed Shipping. */ +@JsonFlatten +@Fluent +public class DCAccessCodeInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DCAccessCodeInner.class); + + /* + * DCAccess Code for the Self Managed shipment. + */ + @JsonProperty(value = "properties.authCode") + private String authCode; + + /** + * Get the authCode property: DCAccess Code for the Self Managed shipment. + * + * @return the authCode value. + */ + public String authCode() { + return this.authCode; + } + + /** + * Set the authCode property: DCAccess Code for the Self Managed shipment. + * + * @param authCode the authCode value to set. + * @return the DCAccessCodeInner object itself. + */ + public DCAccessCodeInner withAuthCode(String authCode) { + this.authCode = authCode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceExtendedInfoInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceExtendedInfoInner.java index e748fb08dbf44..e44ab7acc583e 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceExtendedInfoInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceExtendedInfoInner.java @@ -8,8 +8,12 @@ import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; +import com.azure.resourcemanager.databoxedge.models.KeyVaultSyncStatus; +import com.azure.resourcemanager.databoxedge.models.Secret; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; /** The extended Info of the Data Box Edge/Gateway device. */ @JsonFlatten @@ -36,6 +40,44 @@ public class DataBoxEdgeDeviceExtendedInfoInner extends ArmBaseModel { @JsonProperty(value = "properties.resourceKey", access = JsonProperty.Access.WRITE_ONLY) private String resourceKey; + /* + * The Key Vault ARM Id for client secrets + */ + @JsonProperty(value = "properties.clientSecretStoreId") + private String clientSecretStoreId; + + /* + * The url to access the Client Key Vault + */ + @JsonProperty(value = "properties.clientSecretStoreUrl") + private String clientSecretStoreUrl; + + /* + * The name of Channel Integrity Key stored in the Client Key Vault + */ + @JsonProperty(value = "properties.channelIntegrityKeyName") + private String channelIntegrityKeyName; + + /* + * The version of Channel Integrity Key stored in the Client Key Vault + */ + @JsonProperty(value = "properties.channelIntegrityKeyVersion") + private String channelIntegrityKeyVersion; + + /* + * Key vault sync status + */ + @JsonProperty(value = "properties.keyVaultSyncStatus") + private KeyVaultSyncStatus keyVaultSyncStatus; + + /* + * Device secrets, will be returned only with ODataFilter + * $expand=deviceSecrets + */ + @JsonProperty(value = "properties.deviceSecrets", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map deviceSecrets; + /** * Get the encryptionKeyThumbprint property: The digital signature of encrypted certificate. * @@ -87,6 +129,115 @@ public String resourceKey() { return this.resourceKey; } + /** + * Get the clientSecretStoreId property: The Key Vault ARM Id for client secrets. + * + * @return the clientSecretStoreId value. + */ + public String clientSecretStoreId() { + return this.clientSecretStoreId; + } + + /** + * Set the clientSecretStoreId property: The Key Vault ARM Id for client secrets. + * + * @param clientSecretStoreId the clientSecretStoreId value to set. + * @return the DataBoxEdgeDeviceExtendedInfoInner object itself. + */ + public DataBoxEdgeDeviceExtendedInfoInner withClientSecretStoreId(String clientSecretStoreId) { + this.clientSecretStoreId = clientSecretStoreId; + return this; + } + + /** + * Get the clientSecretStoreUrl property: The url to access the Client Key Vault. + * + * @return the clientSecretStoreUrl value. + */ + public String clientSecretStoreUrl() { + return this.clientSecretStoreUrl; + } + + /** + * Set the clientSecretStoreUrl property: The url to access the Client Key Vault. + * + * @param clientSecretStoreUrl the clientSecretStoreUrl value to set. + * @return the DataBoxEdgeDeviceExtendedInfoInner object itself. + */ + public DataBoxEdgeDeviceExtendedInfoInner withClientSecretStoreUrl(String clientSecretStoreUrl) { + this.clientSecretStoreUrl = clientSecretStoreUrl; + return this; + } + + /** + * Get the channelIntegrityKeyName property: The name of Channel Integrity Key stored in the Client Key Vault. + * + * @return the channelIntegrityKeyName value. + */ + public String channelIntegrityKeyName() { + return this.channelIntegrityKeyName; + } + + /** + * Set the channelIntegrityKeyName property: The name of Channel Integrity Key stored in the Client Key Vault. + * + * @param channelIntegrityKeyName the channelIntegrityKeyName value to set. + * @return the DataBoxEdgeDeviceExtendedInfoInner object itself. + */ + public DataBoxEdgeDeviceExtendedInfoInner withChannelIntegrityKeyName(String channelIntegrityKeyName) { + this.channelIntegrityKeyName = channelIntegrityKeyName; + return this; + } + + /** + * Get the channelIntegrityKeyVersion property: The version of Channel Integrity Key stored in the Client Key Vault. + * + * @return the channelIntegrityKeyVersion value. + */ + public String channelIntegrityKeyVersion() { + return this.channelIntegrityKeyVersion; + } + + /** + * Set the channelIntegrityKeyVersion property: The version of Channel Integrity Key stored in the Client Key Vault. + * + * @param channelIntegrityKeyVersion the channelIntegrityKeyVersion value to set. + * @return the DataBoxEdgeDeviceExtendedInfoInner object itself. + */ + public DataBoxEdgeDeviceExtendedInfoInner withChannelIntegrityKeyVersion(String channelIntegrityKeyVersion) { + this.channelIntegrityKeyVersion = channelIntegrityKeyVersion; + return this; + } + + /** + * Get the keyVaultSyncStatus property: Key vault sync status. + * + * @return the keyVaultSyncStatus value. + */ + public KeyVaultSyncStatus keyVaultSyncStatus() { + return this.keyVaultSyncStatus; + } + + /** + * Set the keyVaultSyncStatus property: Key vault sync status. + * + * @param keyVaultSyncStatus the keyVaultSyncStatus value to set. + * @return the DataBoxEdgeDeviceExtendedInfoInner object itself. + */ + public DataBoxEdgeDeviceExtendedInfoInner withKeyVaultSyncStatus(KeyVaultSyncStatus keyVaultSyncStatus) { + this.keyVaultSyncStatus = keyVaultSyncStatus; + return this; + } + + /** + * Get the deviceSecrets property: Device secrets, will be returned only with ODataFilter $expand=deviceSecrets. + * + * @return the deviceSecrets value. + */ + public Map deviceSecrets() { + return this.deviceSecrets; + } + /** * Validates the instance. * @@ -95,5 +246,15 @@ public String resourceKey() { @Override public void validate() { super.validate(); + if (deviceSecrets() != null) { + deviceSecrets() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceInner.java index 37f660791285d..e803fb87bdb23 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceInner.java @@ -6,13 +6,20 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceKind; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceStatus; +import com.azure.resourcemanager.databoxedge.models.DataResidency; import com.azure.resourcemanager.databoxedge.models.DeviceType; +import com.azure.resourcemanager.databoxedge.models.EdgeProfile; +import com.azure.resourcemanager.databoxedge.models.ResourceIdentity; +import com.azure.resourcemanager.databoxedge.models.ResourceMoveDetails; import com.azure.resourcemanager.databoxedge.models.RoleTypes; import com.azure.resourcemanager.databoxedge.models.Sku; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -38,6 +45,7 @@ public class DataBoxEdgeDeviceInner extends ArmBaseModel { * view and group this device (across resource groups). */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* @@ -52,6 +60,30 @@ public class DataBoxEdgeDeviceInner extends ArmBaseModel { @JsonProperty(value = "etag") private String etag; + /* + * Msi identity of the resource + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /* + * The kind of the device. + */ + @JsonProperty(value = "kind") + private DataBoxEdgeDeviceKind kind; + + /* + * DataBoxEdge Resource + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * DataBoxEdge Device Properties + */ + @JsonProperty(value = "properties.systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemDataPropertiesSystemData; + /* * The status of the Data Box Edge/Gateway device. */ @@ -67,13 +99,13 @@ public class DataBoxEdgeDeviceInner extends ArmBaseModel { /* * The Description of the Data Box Edge/Gateway device. */ - @JsonProperty(value = "properties.description") + @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) private String description; /* * The description of the Data Box Edge/Gateway device model. */ - @JsonProperty(value = "properties.modelDescription") + @JsonProperty(value = "properties.modelDescription", access = JsonProperty.Access.WRITE_ONLY) private String modelDescription; /* @@ -85,7 +117,7 @@ public class DataBoxEdgeDeviceInner extends ArmBaseModel { /* * The Data Box Edge/Gateway device name. */ - @JsonProperty(value = "properties.friendlyName") + @JsonProperty(value = "properties.friendlyName", access = JsonProperty.Access.WRITE_ONLY) private String friendlyName; /* @@ -136,6 +168,24 @@ public class DataBoxEdgeDeviceInner extends ArmBaseModel { @JsonProperty(value = "properties.nodeCount", access = JsonProperty.Access.WRITE_ONLY) private Integer nodeCount; + /* + * The details of the move operation on this resource. + */ + @JsonProperty(value = "properties.resourceMoveDetails", access = JsonProperty.Access.WRITE_ONLY) + private ResourceMoveDetails resourceMoveDetails; + + /* + * The details of Edge Profile for this resource + */ + @JsonProperty(value = "properties.edgeProfile", access = JsonProperty.Access.WRITE_ONLY) + private EdgeProfile edgeProfile; + + /* + * The details of data-residency related properties for this resource + */ + @JsonProperty(value = "properties.dataResidency") + private DataResidency dataResidency; + /** * Get the location property: The location of the device. This is a supported and registered Azure geographical * region (for example, West US, East US, or Southeast Asia). The geographical region of a device cannot be changed @@ -222,6 +272,64 @@ public DataBoxEdgeDeviceInner withEtag(String etag) { return this; } + /** + * Get the identity property: Msi identity of the resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Msi identity of the resource. + * + * @param identity the identity value to set. + * @return the DataBoxEdgeDeviceInner object itself. + */ + public DataBoxEdgeDeviceInner withIdentity(ResourceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the kind property: The kind of the device. + * + * @return the kind value. + */ + public DataBoxEdgeDeviceKind kind() { + return this.kind; + } + + /** + * Set the kind property: The kind of the device. + * + * @param kind the kind value to set. + * @return the DataBoxEdgeDeviceInner object itself. + */ + public DataBoxEdgeDeviceInner withKind(DataBoxEdgeDeviceKind kind) { + this.kind = kind; + return this; + } + + /** + * Get the systemData property: DataBoxEdge Resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the systemDataPropertiesSystemData property: DataBoxEdge Device Properties. + * + * @return the systemDataPropertiesSystemData value. + */ + public SystemData systemDataPropertiesSystemData() { + return this.systemDataPropertiesSystemData; + } + /** * Get the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. * @@ -260,17 +368,6 @@ public String description() { return this.description; } - /** - * Set the description property: The Description of the Data Box Edge/Gateway device. - * - * @param description the description value to set. - * @return the DataBoxEdgeDeviceInner object itself. - */ - public DataBoxEdgeDeviceInner withDescription(String description) { - this.description = description; - return this; - } - /** * Get the modelDescription property: The description of the Data Box Edge/Gateway device model. * @@ -280,17 +377,6 @@ public String modelDescription() { return this.modelDescription; } - /** - * Set the modelDescription property: The description of the Data Box Edge/Gateway device model. - * - * @param modelDescription the modelDescription value to set. - * @return the DataBoxEdgeDeviceInner object itself. - */ - public DataBoxEdgeDeviceInner withModelDescription(String modelDescription) { - this.modelDescription = modelDescription; - return this; - } - /** * Get the deviceType property: The type of the Data Box Edge/Gateway device. * @@ -309,17 +395,6 @@ public String friendlyName() { return this.friendlyName; } - /** - * Set the friendlyName property: The Data Box Edge/Gateway device name. - * - * @param friendlyName the friendlyName value to set. - * @return the DataBoxEdgeDeviceInner object itself. - */ - public DataBoxEdgeDeviceInner withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - /** * Get the culture property: The Data Box Edge/Gateway device culture. * @@ -392,6 +467,44 @@ public Integer nodeCount() { return this.nodeCount; } + /** + * Get the resourceMoveDetails property: The details of the move operation on this resource. + * + * @return the resourceMoveDetails value. + */ + public ResourceMoveDetails resourceMoveDetails() { + return this.resourceMoveDetails; + } + + /** + * Get the edgeProfile property: The details of Edge Profile for this resource. + * + * @return the edgeProfile value. + */ + public EdgeProfile edgeProfile() { + return this.edgeProfile; + } + + /** + * Get the dataResidency property: The details of data-residency related properties for this resource. + * + * @return the dataResidency value. + */ + public DataResidency dataResidency() { + return this.dataResidency; + } + + /** + * Set the dataResidency property: The details of data-residency related properties for this resource. + * + * @param dataResidency the dataResidency value to set. + * @return the DataBoxEdgeDeviceInner object itself. + */ + public DataBoxEdgeDeviceInner withDataResidency(DataResidency dataResidency) { + this.dataResidency = dataResidency; + return this; + } + /** * Validates the instance. * @@ -408,5 +521,17 @@ public void validate() { if (sku() != null) { sku().validate(); } + if (identity() != null) { + identity().validate(); + } + if (resourceMoveDetails() != null) { + resourceMoveDetails().validate(); + } + if (edgeProfile() != null) { + edgeProfile().validate(); + } + if (dataResidency() != null) { + dataResidency().validate(); + } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ResourceTypeSkuInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeSkuInner.java similarity index 54% rename from sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ResourceTypeSkuInner.java rename to sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeSkuInner.java index 7cdc781fa7801..09fc5aaa45a13 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ResourceTypeSkuInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeSkuInner.java @@ -6,64 +6,74 @@ import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.ShipmentType; +import com.azure.resourcemanager.databoxedge.models.SkuAvailability; +import com.azure.resourcemanager.databoxedge.models.SkuCapability; import com.azure.resourcemanager.databoxedge.models.SkuCost; import com.azure.resourcemanager.databoxedge.models.SkuLocationInfo; import com.azure.resourcemanager.databoxedge.models.SkuName; -import com.azure.resourcemanager.databoxedge.models.SkuRestriction; +import com.azure.resourcemanager.databoxedge.models.SkuSignupOption; import com.azure.resourcemanager.databoxedge.models.SkuTier; +import com.azure.resourcemanager.databoxedge.models.SkuVersion; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** SkuInformation object. */ +/** The Sku information. */ @Immutable -public final class ResourceTypeSkuInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceTypeSkuInner.class); +public final class DataBoxEdgeSkuInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxEdgeSkuInner.class); /* - * The type of the resource + * The type of the resource. */ @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) private String resourceType; /* - * The Sku name + * The Sku name. */ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private SkuName name; /* - * The Sku kind + * The Sku kind. */ @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* - * The Sku tier + * The Sku tier. */ @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) private SkuTier tier; /* - * The Sku family + * The Sku kind. + */ + @JsonProperty(value = "size", access = JsonProperty.Access.WRITE_ONLY) + private String size; + + /* + * The Sku family. */ @JsonProperty(value = "family", access = JsonProperty.Access.WRITE_ONLY) private String family; /* - * Availability of the SKU for the region + * Availability of the Sku for the region. */ @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) private List locations; /* - * The API versions in which SKU is available + * The API versions in which Sku is available. */ @JsonProperty(value = "apiVersions", access = JsonProperty.Access.WRITE_ONLY) private List apiVersions; /* - * Availability of the SKU for the location/zone + * Availability of the Sku for the location/zone/site. */ @JsonProperty(value = "locationInfo", access = JsonProperty.Access.WRITE_ONLY) private List locationInfo; @@ -75,10 +85,34 @@ public final class ResourceTypeSkuInner { private List costs; /* - * Restrictions of the SKU availability. + * Sku can be signed up by customer or not. + */ + @JsonProperty(value = "signupOption", access = JsonProperty.Access.WRITE_ONLY) + private SkuSignupOption signupOption; + + /* + * Availability of the Sku as preview/stable. + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private SkuVersion version; + + /* + * Links to the next set of results + */ + @JsonProperty(value = "availability", access = JsonProperty.Access.WRITE_ONLY) + private SkuAvailability availability; + + /* + * List of Shipment Types supported by this SKU + */ + @JsonProperty(value = "shipmentTypes", access = JsonProperty.Access.WRITE_ONLY) + private List shipmentTypes; + + /* + * The capability info of the SKU. */ - @JsonProperty(value = "restrictions", access = JsonProperty.Access.WRITE_ONLY) - private List restrictions; + @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) + private List capabilities; /** * Get the resourceType property: The type of the resource. @@ -116,6 +150,15 @@ public SkuTier tier() { return this.tier; } + /** + * Get the size property: The Sku kind. + * + * @return the size value. + */ + public String size() { + return this.size; + } + /** * Get the family property: The Sku family. * @@ -126,7 +169,7 @@ public String family() { } /** - * Get the locations property: Availability of the SKU for the region. + * Get the locations property: Availability of the Sku for the region. * * @return the locations value. */ @@ -135,7 +178,7 @@ public List locations() { } /** - * Get the apiVersions property: The API versions in which SKU is available. + * Get the apiVersions property: The API versions in which Sku is available. * * @return the apiVersions value. */ @@ -144,7 +187,7 @@ public List apiVersions() { } /** - * Get the locationInfo property: Availability of the SKU for the location/zone. + * Get the locationInfo property: Availability of the Sku for the location/zone/site. * * @return the locationInfo value. */ @@ -162,12 +205,48 @@ public List costs() { } /** - * Get the restrictions property: Restrictions of the SKU availability. + * Get the signupOption property: Sku can be signed up by customer or not. + * + * @return the signupOption value. + */ + public SkuSignupOption signupOption() { + return this.signupOption; + } + + /** + * Get the version property: Availability of the Sku as preview/stable. + * + * @return the version value. + */ + public SkuVersion version() { + return this.version; + } + + /** + * Get the availability property: Links to the next set of results. + * + * @return the availability value. + */ + public SkuAvailability availability() { + return this.availability; + } + + /** + * Get the shipmentTypes property: List of Shipment Types supported by this SKU. + * + * @return the shipmentTypes value. + */ + public List shipmentTypes() { + return this.shipmentTypes; + } + + /** + * Get the capabilities property: The capability info of the SKU. * - * @return the restrictions value. + * @return the capabilities value. */ - public List restrictions() { - return this.restrictions; + public List capabilities() { + return this.capabilities; } /** @@ -182,8 +261,8 @@ public void validate() { if (costs() != null) { costs().forEach(e -> e.validate()); } - if (restrictions() != null) { - restrictions().forEach(e -> e.validate()); + if (capabilities() != null) { + capabilities().forEach(e -> e.validate()); } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DiagnosticProactiveLogCollectionSettingsInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DiagnosticProactiveLogCollectionSettingsInner.java new file mode 100644 index 0000000000000..f69b766643e6e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DiagnosticProactiveLogCollectionSettingsInner.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; +import com.azure.resourcemanager.databoxedge.models.ProactiveDiagnosticsConsent; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The diagnostic proactive log collection settings of a device. */ +@JsonFlatten +@Fluent +public class DiagnosticProactiveLogCollectionSettingsInner extends ArmBaseModel { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(DiagnosticProactiveLogCollectionSettingsInner.class); + + /* + * DiagnosticProactiveLogCollectionSettings + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Proactive diagnostic collection consent flag + */ + @JsonProperty(value = "properties.userConsent", required = true) + private ProactiveDiagnosticsConsent userConsent; + + /** + * Get the systemData property: DiagnosticProactiveLogCollectionSettings. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the userConsent property: Proactive diagnostic collection consent flag. + * + * @return the userConsent value. + */ + public ProactiveDiagnosticsConsent userConsent() { + return this.userConsent; + } + + /** + * Set the userConsent property: Proactive diagnostic collection consent flag. + * + * @param userConsent the userConsent value to set. + * @return the DiagnosticProactiveLogCollectionSettingsInner object itself. + */ + public DiagnosticProactiveLogCollectionSettingsInner withUserConsent(ProactiveDiagnosticsConsent userConsent) { + this.userConsent = userConsent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (userConsent() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property userConsent in model" + + " DiagnosticProactiveLogCollectionSettingsInner")); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DiagnosticRemoteSupportSettingsInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DiagnosticRemoteSupportSettingsInner.java new file mode 100644 index 0000000000000..0cf6dcb034dc5 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DiagnosticRemoteSupportSettingsInner.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; +import com.azure.resourcemanager.databoxedge.models.RemoteSupportSettings; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The remote support settings of a device. */ +@JsonFlatten +@Fluent +public class DiagnosticRemoteSupportSettingsInner extends ArmBaseModel { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticRemoteSupportSettingsInner.class); + + /* + * DiagnosticRemoteSupportSettings + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Remote support settings list according to the RemoteApplicationType + */ + @JsonProperty(value = "properties.remoteSupportSettingsList") + private List remoteSupportSettingsList; + + /** + * Get the systemData property: DiagnosticRemoteSupportSettings. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the remoteSupportSettingsList property: Remote support settings list according to the RemoteApplicationType. + * + * @return the remoteSupportSettingsList value. + */ + public List remoteSupportSettingsList() { + return this.remoteSupportSettingsList; + } + + /** + * Set the remoteSupportSettingsList property: Remote support settings list according to the RemoteApplicationType. + * + * @param remoteSupportSettingsList the remoteSupportSettingsList value to set. + * @return the DiagnosticRemoteSupportSettingsInner object itself. + */ + public DiagnosticRemoteSupportSettingsInner withRemoteSupportSettingsList( + List remoteSupportSettingsList) { + this.remoteSupportSettingsList = remoteSupportSettingsList; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (remoteSupportSettingsList() != null) { + remoteSupportSettingsList().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/GenerateCertResponseInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/GenerateCertResponseInner.java new file mode 100644 index 0000000000000..104677e036039 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/GenerateCertResponseInner.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Used in activation key generation flow. */ +@Fluent +public final class GenerateCertResponseInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GenerateCertResponseInner.class); + + /* + * Gets or sets base64 encoded certificate raw data, + * this is the public part needed to be uploaded to cert vault + */ + @JsonProperty(value = "publicKey") + private String publicKey; + + /* + * Gets or sets base64 encoded private part of the certificate, + * needed to form the activation key + */ + @JsonProperty(value = "privateKey") + private String privateKey; + + /* + * Gets or sets expiry time in UTC + */ + @JsonProperty(value = "expiryTimeInUTC") + private String expiryTimeInUtc; + + /** + * Get the publicKey property: Gets or sets base64 encoded certificate raw data, this is the public part needed to + * be uploaded to cert vault. + * + * @return the publicKey value. + */ + public String publicKey() { + return this.publicKey; + } + + /** + * Set the publicKey property: Gets or sets base64 encoded certificate raw data, this is the public part needed to + * be uploaded to cert vault. + * + * @param publicKey the publicKey value to set. + * @return the GenerateCertResponseInner object itself. + */ + public GenerateCertResponseInner withPublicKey(String publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * Get the privateKey property: Gets or sets base64 encoded private part of the certificate, needed to form the + * activation key. + * + * @return the privateKey value. + */ + public String privateKey() { + return this.privateKey; + } + + /** + * Set the privateKey property: Gets or sets base64 encoded private part of the certificate, needed to form the + * activation key. + * + * @param privateKey the privateKey value to set. + * @return the GenerateCertResponseInner object itself. + */ + public GenerateCertResponseInner withPrivateKey(String privateKey) { + this.privateKey = privateKey; + return this; + } + + /** + * Get the expiryTimeInUtc property: Gets or sets expiry time in UTC. + * + * @return the expiryTimeInUtc value. + */ + public String expiryTimeInUtc() { + return this.expiryTimeInUtc; + } + + /** + * Set the expiryTimeInUtc property: Gets or sets expiry time in UTC. + * + * @param expiryTimeInUtc the expiryTimeInUtc value to set. + * @return the GenerateCertResponseInner object itself. + */ + public GenerateCertResponseInner withExpiryTimeInUtc(String expiryTimeInUtc) { + this.expiryTimeInUtc = expiryTimeInUtc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/MonitoringMetricConfigurationInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/MonitoringMetricConfigurationInner.java new file mode 100644 index 0000000000000..8d71ec14c83a0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/MonitoringMetricConfigurationInner.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; +import com.azure.resourcemanager.databoxedge.models.MetricConfiguration; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The metric setting details for the role. */ +@JsonFlatten +@Fluent +public class MonitoringMetricConfigurationInner extends ArmBaseModel { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitoringMetricConfigurationInner.class); + + /* + * MonitoringConfiguration on ASE device + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * The metrics configuration details + */ + @JsonProperty(value = "properties.metricConfigurations", required = true) + private List metricConfigurations; + + /** + * Get the systemData property: MonitoringConfiguration on ASE device. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the metricConfigurations property: The metrics configuration details. + * + * @return the metricConfigurations value. + */ + public List metricConfigurations() { + return this.metricConfigurations; + } + + /** + * Set the metricConfigurations property: The metrics configuration details. + * + * @param metricConfigurations the metricConfigurations value to set. + * @return the MonitoringMetricConfigurationInner object itself. + */ + public MonitoringMetricConfigurationInner withMetricConfigurations(List metricConfigurations) { + this.metricConfigurations = metricConfigurations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (metricConfigurations() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metricConfigurations in model MonitoringMetricConfigurationInner")); + } else { + metricConfigurations().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NetworkSettingsInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NetworkSettingsInner.java index 3812339ecb2ab..849977af67197 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NetworkSettingsInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NetworkSettingsInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Immutable; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.NetworkAdapter; @@ -19,12 +20,27 @@ public class NetworkSettingsInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkSettingsInner.class); + /* + * NetworkSettings on ASE device + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * The network adapter list on the device. */ @JsonProperty(value = "properties.networkAdapters", access = JsonProperty.Access.WRITE_ONLY) private List networkAdapters; + /** + * Get the systemData property: NetworkSettings on ASE device. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the networkAdapters property: The network adapter list on the device. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OperationInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OperationInner.java index e534c0cf2f7ae..18cac2fdbc306 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OperationInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OperationInner.java @@ -24,6 +24,12 @@ public class OperationInner { @JsonProperty(value = "name") private String name; + /* + * Is data action. + */ + @JsonProperty(value = "isDataAction") + private Boolean isDataAction; + /* * Properties displayed for the operation. */ @@ -62,6 +68,26 @@ public OperationInner withName(String name) { return this; } + /** + * Get the isDataAction property: Is data action. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Set the isDataAction property: Is data action. + * + * @param isDataAction the isDataAction value to set. + * @return the OperationInner object itself. + */ + public OperationInner withIsDataAction(Boolean isDataAction) { + this.isDataAction = isDataAction; + return this; + } + /** * Get the display property: Properties displayed for the operation. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OrderInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OrderInner.java index 34ff53e2c15fd..872835b19bdad 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OrderInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OrderInner.java @@ -6,11 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.Address; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.ContactDetails; import com.azure.resourcemanager.databoxedge.models.OrderStatus; +import com.azure.resourcemanager.databoxedge.models.ShipmentType; import com.azure.resourcemanager.databoxedge.models.TrackingInfo; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -22,6 +24,12 @@ public class OrderInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(OrderInner.class); + /* + * Order configured on ASE resource + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * The contact details. */ @@ -37,7 +45,7 @@ public class OrderInner extends ArmBaseModel { /* * Current status of the order. */ - @JsonProperty(value = "properties.currentStatus") + @JsonProperty(value = "properties.currentStatus", access = JsonProperty.Access.WRITE_ONLY) private OrderStatus currentStatus; /* @@ -66,6 +74,21 @@ public class OrderInner extends ArmBaseModel { @JsonProperty(value = "properties.returnTrackingInfo", access = JsonProperty.Access.WRITE_ONLY) private List returnTrackingInfo; + /* + * ShipmentType of the order + */ + @JsonProperty(value = "properties.shipmentType") + private ShipmentType shipmentType; + + /** + * Get the systemData property: Order configured on ASE resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the contactInformation property: The contact details. * @@ -115,17 +138,6 @@ public OrderStatus currentStatus() { return this.currentStatus; } - /** - * Set the currentStatus property: Current status of the order. - * - * @param currentStatus the currentStatus value to set. - * @return the OrderInner object itself. - */ - public OrderInner withCurrentStatus(OrderStatus currentStatus) { - this.currentStatus = currentStatus; - return this; - } - /** * Get the orderHistory property: List of status changes in the order. * @@ -164,6 +176,26 @@ public List returnTrackingInfo() { return this.returnTrackingInfo; } + /** + * Get the shipmentType property: ShipmentType of the order. + * + * @return the shipmentType value. + */ + public ShipmentType shipmentType() { + return this.shipmentType; + } + + /** + * Set the shipmentType property: ShipmentType of the order. + * + * @param shipmentType the shipmentType value to set. + * @return the OrderInner object itself. + */ + public OrderInner withShipmentType(ShipmentType shipmentType) { + this.shipmentType = shipmentType; + return this; + } + /** * Validates the instance. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/RoleInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/RoleInner.java index 06f52481c0a6a..5ddb23e9d9a1c 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/RoleInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/RoleInner.java @@ -5,10 +5,15 @@ package com.azure.resourcemanager.databoxedge.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; +import com.azure.resourcemanager.databoxedge.models.CloudEdgeManagementRole; import com.azure.resourcemanager.databoxedge.models.IoTRole; +import com.azure.resourcemanager.databoxedge.models.KubernetesRole; +import com.azure.resourcemanager.databoxedge.models.MecRole; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,11 +25,31 @@ property = "kind", defaultImpl = RoleInner.class) @JsonTypeName("Role") -@JsonSubTypes({@JsonSubTypes.Type(name = "IOT", value = IoTRole.class)}) +@JsonSubTypes({ + @JsonSubTypes.Type(name = "CloudEdgeManagement", value = CloudEdgeManagementRole.class), + @JsonSubTypes.Type(name = "IOT", value = IoTRole.class), + @JsonSubTypes.Type(name = "Kubernetes", value = KubernetesRole.class), + @JsonSubTypes.Type(name = "MEC", value = MecRole.class) +}) @Immutable public class RoleInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(RoleInner.class); + /* + * Role configured on ASE resource + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the systemData property: Role configured on ASE resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ShareInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ShareInner.java index 280d6bc637031..2f60f12b46cfc 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ShareInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ShareInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.AzureContainerInfo; @@ -27,6 +28,12 @@ public class ShareInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(ShareInner.class); + /* + * Share on ASE device + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * Description for the share. */ @@ -89,6 +96,15 @@ public class ShareInner extends ArmBaseModel { @JsonProperty(value = "properties.dataPolicy") private DataPolicy dataPolicy; + /** + * Get the systemData property: Share on ASE device. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the description property: Description for the share. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountCredentialInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountCredentialInner.java index 734b0483e59f4..f23683cc2fbf0 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountCredentialInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountCredentialInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.AccountType; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; @@ -20,6 +21,12 @@ public class StorageAccountCredentialInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountCredentialInner.class); + /* + * StorageAccountCredential object + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * Alias for the storage account. */ @@ -69,6 +76,15 @@ public class StorageAccountCredentialInner extends ArmBaseModel { @JsonProperty(value = "properties.storageAccountId") private String storageAccountId; + /** + * Get the systemData property: StorageAccountCredential object. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the alias property: Alias for the storage account. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountInner.java index dabe5c653d0fa..5ff1de14452a1 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.DataPolicy; @@ -19,6 +20,12 @@ public class StorageAccountInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountInner.class); + /* + * StorageAccount object on ASE device + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * Description for the storage Account. */ @@ -34,7 +41,7 @@ public class StorageAccountInner extends ArmBaseModel { /* * Data policy of the storage Account. */ - @JsonProperty(value = "properties.dataPolicy") + @JsonProperty(value = "properties.dataPolicy", required = true) private DataPolicy dataPolicy; /* @@ -56,6 +63,15 @@ public class StorageAccountInner extends ArmBaseModel { @JsonProperty(value = "properties.containerCount", access = JsonProperty.Access.WRITE_ONLY) private Integer containerCount; + /** + * Get the systemData property: StorageAccount object on ASE device. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the description property: Description for the storage Account. * @@ -163,5 +179,10 @@ public Integer containerCount() { @Override public void validate() { super.validate(); + if (dataPolicy() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property dataPolicy in model StorageAccountInner")); + } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/TriggerInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/TriggerInner.java index 6104763e1583c..21dd9ff3fc49a 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/TriggerInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/TriggerInner.java @@ -5,11 +5,13 @@ package com.azure.resourcemanager.databoxedge.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.FileEventTrigger; import com.azure.resourcemanager.databoxedge.models.PeriodicTimerEventTrigger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -29,6 +31,21 @@ public class TriggerInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggerInner.class); + /* + * Trigger in DataBoxEdge Resource + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the systemData property: Trigger in DataBoxEdge Resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UpdateSummaryInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UpdateSummaryInner.java index b5be1f31758cf..0ca97685e3328 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UpdateSummaryInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UpdateSummaryInner.java @@ -6,9 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.InstallRebootBehavior; +import com.azure.resourcemanager.databoxedge.models.JobStatus; +import com.azure.resourcemanager.databoxedge.models.UpdateDetails; import com.azure.resourcemanager.databoxedge.models.UpdateOperation; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -21,6 +24,12 @@ public class UpdateSummaryInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateSummaryInner.class); + /* + * UpdateSummary Result + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * The current version of the device in format: 1.2.17312.13.", */ @@ -46,6 +55,12 @@ public class UpdateSummaryInner extends ArmBaseModel { @JsonProperty(value = "properties.lastCompletedScanJobDateTime") private OffsetDateTime lastCompletedScanJobDateTime; + /* + * Time when the last scan job is successfully completed. + */ + @JsonProperty(value = "properties.lastSuccessfulScanJobTime") + private OffsetDateTime lastSuccessfulScanJobTime; + /* * The time when the last Download job was completed * (success/cancelled/failed) on the appliance. @@ -53,6 +68,25 @@ public class UpdateSummaryInner extends ArmBaseModel { @JsonProperty(value = "properties.lastCompletedDownloadJobDateTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastCompletedDownloadJobDateTime; + /* + * JobId of the last ran download job.(Can be success/cancelled/failed) + */ + @JsonProperty(value = "properties.lastCompletedDownloadJobId", access = JsonProperty.Access.WRITE_ONLY) + private String lastCompletedDownloadJobId; + + /* + * JobStatus of the last ran download job. + */ + @JsonProperty(value = "properties.lastDownloadJobStatus", access = JsonProperty.Access.WRITE_ONLY) + private JobStatus lastDownloadJobStatus; + + /* + * The time when the Last Install job was completed successfully on the + * appliance + */ + @JsonProperty(value = "properties.lastSuccessfulInstallJobDateTime") + private OffsetDateTime lastSuccessfulInstallJobDateTime; + /* * The time when the last Install job was completed * (success/cancelled/failed) on the appliance. @@ -60,6 +94,18 @@ public class UpdateSummaryInner extends ArmBaseModel { @JsonProperty(value = "properties.lastCompletedInstallJobDateTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastCompletedInstallJobDateTime; + /* + * JobId of the last ran install job.(Can be success/cancelled/failed) + */ + @JsonProperty(value = "properties.lastCompletedInstallJobId", access = JsonProperty.Access.WRITE_ONLY) + private String lastCompletedInstallJobId; + + /* + * JobStatus of the last ran install job. + */ + @JsonProperty(value = "properties.lastInstallJobStatus", access = JsonProperty.Access.WRITE_ONLY) + private JobStatus lastInstallJobStatus; + /* * The number of updates available for the current device version as per * the last device scan. @@ -122,12 +168,33 @@ public class UpdateSummaryInner extends ArmBaseModel { @JsonProperty(value = "properties.updateTitles", access = JsonProperty.Access.WRITE_ONLY) private List updateTitles; + /* + * The list of updates available for install. + */ + @JsonProperty(value = "properties.updates", access = JsonProperty.Access.WRITE_ONLY) + private List updates; + /* * The total size of updates available for download in bytes. */ @JsonProperty(value = "properties.totalUpdateSizeInBytes", access = JsonProperty.Access.WRITE_ONLY) private Double totalUpdateSizeInBytes; + /* + * The total time in Minutes + */ + @JsonProperty(value = "properties.totalTimeInMinutes", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalTimeInMinutes; + + /** + * Get the systemData property: UpdateSummary Result. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the deviceVersionNumber property: The current version of the device in format: 1.2.17312.13.",. * @@ -210,6 +277,26 @@ public UpdateSummaryInner withLastCompletedScanJobDateTime(OffsetDateTime lastCo return this; } + /** + * Get the lastSuccessfulScanJobTime property: Time when the last scan job is successfully completed. + * + * @return the lastSuccessfulScanJobTime value. + */ + public OffsetDateTime lastSuccessfulScanJobTime() { + return this.lastSuccessfulScanJobTime; + } + + /** + * Set the lastSuccessfulScanJobTime property: Time when the last scan job is successfully completed. + * + * @param lastSuccessfulScanJobTime the lastSuccessfulScanJobTime value to set. + * @return the UpdateSummaryInner object itself. + */ + public UpdateSummaryInner withLastSuccessfulScanJobTime(OffsetDateTime lastSuccessfulScanJobTime) { + this.lastSuccessfulScanJobTime = lastSuccessfulScanJobTime; + return this; + } + /** * Get the lastCompletedDownloadJobDateTime property: The time when the last Download job was completed * (success/cancelled/failed) on the appliance. @@ -220,6 +307,47 @@ public OffsetDateTime lastCompletedDownloadJobDateTime() { return this.lastCompletedDownloadJobDateTime; } + /** + * Get the lastCompletedDownloadJobId property: JobId of the last ran download job.(Can be + * success/cancelled/failed). + * + * @return the lastCompletedDownloadJobId value. + */ + public String lastCompletedDownloadJobId() { + return this.lastCompletedDownloadJobId; + } + + /** + * Get the lastDownloadJobStatus property: JobStatus of the last ran download job. + * + * @return the lastDownloadJobStatus value. + */ + public JobStatus lastDownloadJobStatus() { + return this.lastDownloadJobStatus; + } + + /** + * Get the lastSuccessfulInstallJobDateTime property: The time when the Last Install job was completed successfully + * on the appliance. + * + * @return the lastSuccessfulInstallJobDateTime value. + */ + public OffsetDateTime lastSuccessfulInstallJobDateTime() { + return this.lastSuccessfulInstallJobDateTime; + } + + /** + * Set the lastSuccessfulInstallJobDateTime property: The time when the Last Install job was completed successfully + * on the appliance. + * + * @param lastSuccessfulInstallJobDateTime the lastSuccessfulInstallJobDateTime value to set. + * @return the UpdateSummaryInner object itself. + */ + public UpdateSummaryInner withLastSuccessfulInstallJobDateTime(OffsetDateTime lastSuccessfulInstallJobDateTime) { + this.lastSuccessfulInstallJobDateTime = lastSuccessfulInstallJobDateTime; + return this; + } + /** * Get the lastCompletedInstallJobDateTime property: The time when the last Install job was completed * (success/cancelled/failed) on the appliance. @@ -230,6 +358,24 @@ public OffsetDateTime lastCompletedInstallJobDateTime() { return this.lastCompletedInstallJobDateTime; } + /** + * Get the lastCompletedInstallJobId property: JobId of the last ran install job.(Can be success/cancelled/failed). + * + * @return the lastCompletedInstallJobId value. + */ + public String lastCompletedInstallJobId() { + return this.lastCompletedInstallJobId; + } + + /** + * Get the lastInstallJobStatus property: JobStatus of the last ran install job. + * + * @return the lastInstallJobStatus value. + */ + public JobStatus lastInstallJobStatus() { + return this.lastInstallJobStatus; + } + /** * Get the totalNumberOfUpdatesAvailable property: The number of updates available for the current device version as * per the last device scan. @@ -324,6 +470,15 @@ public List updateTitles() { return this.updateTitles; } + /** + * Get the updates property: The list of updates available for install. + * + * @return the updates value. + */ + public List updates() { + return this.updates; + } + /** * Get the totalUpdateSizeInBytes property: The total size of updates available for download in bytes. * @@ -333,6 +488,15 @@ public Double totalUpdateSizeInBytes() { return this.totalUpdateSizeInBytes; } + /** + * Get the totalTimeInMinutes property: The total time in Minutes. + * + * @return the totalTimeInMinutes value. + */ + public Integer totalTimeInMinutes() { + return this.totalTimeInMinutes; + } + /** * Validates the instance. * @@ -341,5 +505,8 @@ public Double totalUpdateSizeInBytes() { @Override public void validate() { super.validate(); + if (updates() != null) { + updates().forEach(e -> e.validate()); + } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UserInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UserInner.java index 13a4f25dbe378..282b22e817aea 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UserInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UserInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; @@ -21,6 +22,12 @@ public class UserInner extends ArmBaseModel { @JsonIgnore private final ClientLogger logger = new ClientLogger(UserInner.class); + /* + * User in DataBoxEdge Resource + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * The password details. */ @@ -31,7 +38,7 @@ public class UserInner extends ArmBaseModel { * List of shares that the user has rights on. This field should not be * specified during user creation. */ - @JsonProperty(value = "properties.shareAccessRights") + @JsonProperty(value = "properties.shareAccessRights", access = JsonProperty.Access.WRITE_ONLY) private List shareAccessRights; /* @@ -40,6 +47,15 @@ public class UserInner extends ArmBaseModel { @JsonProperty(value = "properties.userType", required = true) private UserType userType; + /** + * Get the systemData property: User in DataBoxEdge Resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the encryptedPassword property: The password details. * @@ -70,18 +86,6 @@ public List shareAccessRights() { return this.shareAccessRights; } - /** - * Set the shareAccessRights property: List of shares that the user has rights on. This field should not be - * specified during user creation. - * - * @param shareAccessRights the shareAccessRights value to set. - * @return the UserInner object itself. - */ - public UserInner withShareAccessRights(List shareAccessRights) { - this.shareAccessRights = shareAccessRights; - return this; - } - /** * Get the userType property: Type of the user. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonImpl.java new file mode 100644 index 0000000000000..afa11163d9eea --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.databoxedge.fluent.models.AddonInner; +import com.azure.resourcemanager.databoxedge.models.Addon; + +public final class AddonImpl implements Addon { + private AddonInner innerObject; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + AddonImpl(AddonInner innerObject, com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AddonInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonsClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonsClientImpl.java new file mode 100644 index 0000000000000..a0bf68aa5dc4b --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonsClientImpl.java @@ -0,0 +1,1183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.databoxedge.fluent.AddonsClient; +import com.azure.resourcemanager.databoxedge.fluent.models.AddonInner; +import com.azure.resourcemanager.databoxedge.models.AddonList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in AddonsClient. */ +public final class AddonsClientImpl implements AddonsClient { + private final ClientLogger logger = new ClientLogger(AddonsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final AddonsService service; + + /** The service client containing this operation class. */ + private final DataBoxEdgeManagementClientImpl client; + + /** + * Initializes an instance of AddonsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AddonsClientImpl(DataBoxEdgeManagementClientImpl client) { + this.service = RestProxy.create(AddonsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataBoxEdgeManagementClientAddons to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataBoxEdgeManagemen") + private interface AddonsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByRole( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("roleName") String roleName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("roleName") String roleName, + @PathParam("addonName") String addonName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("roleName") String roleName, + @PathParam("addonName") String addonName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AddonInner addon, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("roleName") String roleName, + @PathParam("addonName") String addonName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByRoleNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Lists all the addons configured in the role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByRoleSinglePageAsync( + String deviceName, String roleName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByRole( + this.client.getEndpoint(), + deviceName, + roleName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the addons configured in the role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByRoleSinglePageAsync( + String deviceName, String roleName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByRole( + this.client.getEndpoint(), + deviceName, + roleName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists all the addons configured in the role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByRoleAsync(String deviceName, String roleName, String resourceGroupName) { + return new PagedFlux<>( + () -> listByRoleSinglePageAsync(deviceName, roleName, resourceGroupName), + nextLink -> listByRoleNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the addons configured in the role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByRoleAsync( + String deviceName, String roleName, String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByRoleSinglePageAsync(deviceName, roleName, resourceGroupName, context), + nextLink -> listByRoleNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the addons configured in the role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByRole(String deviceName, String roleName, String resourceGroupName) { + return new PagedIterable<>(listByRoleAsync(deviceName, roleName, resourceGroupName)); + } + + /** + * Lists all the addons configured in the role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByRole( + String deviceName, String roleName, String resourceGroupName, Context context) { + return new PagedIterable<>(listByRoleAsync(deviceName, roleName, resourceGroupName, context)); + } + + /** + * Gets a specific addon by name. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific addon by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String deviceName, String roleName, String addonName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (addonName == null) { + return Mono.error(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + deviceName, + roleName, + addonName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a specific addon by name. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific addon by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (addonName == null) { + return Mono.error(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + deviceName, + roleName, + addonName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets a specific addon by name. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific addon by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String deviceName, String roleName, String addonName, String resourceGroupName) { + return getWithResponseAsync(deviceName, roleName, addonName, resourceGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a specific addon by name. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific addon by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddonInner get(String deviceName, String roleName, String addonName, String resourceGroupName) { + return getAsync(deviceName, roleName, addonName, resourceGroupName).block(); + } + + /** + * Gets a specific addon by name. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific addon by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, roleName, addonName, resourceGroupName, context).block(); + } + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String deviceName, String roleName, String addonName, String resourceGroupName, AddonInner addon) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (addonName == null) { + return Mono.error(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (addon == null) { + return Mono.error(new IllegalArgumentException("Parameter addon is required and cannot be null.")); + } else { + addon.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + deviceName, + roleName, + addonName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + addon, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String deviceName, + String roleName, + String addonName, + String resourceGroupName, + AddonInner addon, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (addonName == null) { + return Mono.error(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (addon == null) { + return Mono.error(new IllegalArgumentException("Parameter addon is required and cannot be null.")); + } else { + addon.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + deviceName, + roleName, + addonName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + addon, + accept, + context); + } + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, AddonInner> beginCreateOrUpdateAsync( + String deviceName, String roleName, String addonName, String resourceGroupName, AddonInner addon) { + Mono>> mono = + createOrUpdateWithResponseAsync(deviceName, roleName, addonName, resourceGroupName, addon); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), AddonInner.class, AddonInner.class, Context.NONE); + } + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, AddonInner> beginCreateOrUpdateAsync( + String deviceName, + String roleName, + String addonName, + String resourceGroupName, + AddonInner addon, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(deviceName, roleName, addonName, resourceGroupName, addon, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), AddonInner.class, AddonInner.class, context); + } + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AddonInner> beginCreateOrUpdate( + String deviceName, String roleName, String addonName, String resourceGroupName, AddonInner addon) { + return beginCreateOrUpdateAsync(deviceName, roleName, addonName, resourceGroupName, addon).getSyncPoller(); + } + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AddonInner> beginCreateOrUpdate( + String deviceName, + String roleName, + String addonName, + String resourceGroupName, + AddonInner addon, + Context context) { + return beginCreateOrUpdateAsync(deviceName, roleName, addonName, resourceGroupName, addon, context) + .getSyncPoller(); + } + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String deviceName, String roleName, String addonName, String resourceGroupName, AddonInner addon) { + return beginCreateOrUpdateAsync(deviceName, roleName, addonName, resourceGroupName, addon) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String deviceName, + String roleName, + String addonName, + String resourceGroupName, + AddonInner addon, + Context context) { + return beginCreateOrUpdateAsync(deviceName, roleName, addonName, resourceGroupName, addon, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddonInner createOrUpdate( + String deviceName, String roleName, String addonName, String resourceGroupName, AddonInner addon) { + return createOrUpdateAsync(deviceName, roleName, addonName, resourceGroupName, addon).block(); + } + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddonInner createOrUpdate( + String deviceName, + String roleName, + String addonName, + String resourceGroupName, + AddonInner addon, + Context context) { + return createOrUpdateAsync(deviceName, roleName, addonName, resourceGroupName, addon, context).block(); + } + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String deviceName, String roleName, String addonName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (addonName == null) { + return Mono.error(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + deviceName, + roleName, + addonName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (addonName == null) { + return Mono.error(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + deviceName, + roleName, + addonName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String deviceName, String roleName, String addonName, String resourceGroupName) { + Mono>> mono = + deleteWithResponseAsync(deviceName, roleName, addonName, resourceGroupName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(deviceName, roleName, addonName, resourceGroupName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String deviceName, String roleName, String addonName, String resourceGroupName) { + return beginDeleteAsync(deviceName, roleName, addonName, resourceGroupName).getSyncPoller(); + } + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context) { + return beginDeleteAsync(deviceName, roleName, addonName, resourceGroupName, context).getSyncPoller(); + } + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String deviceName, String roleName, String addonName, String resourceGroupName) { + return beginDeleteAsync(deviceName, roleName, addonName, resourceGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context) { + return beginDeleteAsync(deviceName, roleName, addonName, resourceGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String deviceName, String roleName, String addonName, String resourceGroupName) { + deleteAsync(deviceName, roleName, addonName, resourceGroupName).block(); + } + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context) { + deleteAsync(deviceName, roleName, addonName, resourceGroupName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByRoleNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByRoleNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByRoleNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByRoleNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonsImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonsImpl.java new file mode 100644 index 0000000000000..706978d0d167e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonsImpl.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.AddonsClient; +import com.azure.resourcemanager.databoxedge.fluent.models.AddonInner; +import com.azure.resourcemanager.databoxedge.models.Addon; +import com.azure.resourcemanager.databoxedge.models.Addons; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class AddonsImpl implements Addons { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AddonsImpl.class); + + private final AddonsClient innerClient; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + public AddonsImpl( + AddonsClient innerClient, com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByRole(String deviceName, String roleName, String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByRole(deviceName, roleName, resourceGroupName); + return Utils.mapPage(inner, inner1 -> new AddonImpl(inner1, this.manager())); + } + + public PagedIterable listByRole( + String deviceName, String roleName, String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByRole(deviceName, roleName, resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new AddonImpl(inner1, this.manager())); + } + + public Addon get(String deviceName, String roleName, String addonName, String resourceGroupName) { + AddonInner inner = this.serviceClient().get(deviceName, roleName, addonName, resourceGroupName); + if (inner != null) { + return new AddonImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context) { + Response inner = + this.serviceClient().getWithResponse(deviceName, roleName, addonName, resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AddonImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Addon createOrUpdate( + String deviceName, String roleName, String addonName, String resourceGroupName, AddonInner addon) { + AddonInner inner = + this.serviceClient().createOrUpdate(deviceName, roleName, addonName, resourceGroupName, addon); + if (inner != null) { + return new AddonImpl(inner, this.manager()); + } else { + return null; + } + } + + public Addon createOrUpdate( + String deviceName, + String roleName, + String addonName, + String resourceGroupName, + AddonInner addon, + Context context) { + AddonInner inner = + this.serviceClient().createOrUpdate(deviceName, roleName, addonName, resourceGroupName, addon, context); + if (inner != null) { + return new AddonImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String deviceName, String roleName, String addonName, String resourceGroupName) { + this.serviceClient().delete(deviceName, roleName, addonName, resourceGroupName); + } + + public void delete( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context) { + this.serviceClient().delete(deviceName, roleName, addonName, resourceGroupName, context); + } + + private AddonsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AlertImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AlertImpl.java index a2a300d707507..5a72fc29ea838 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AlertImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AlertImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.AlertInner; import com.azure.resourcemanager.databoxedge.models.Alert; import com.azure.resourcemanager.databoxedge.models.AlertErrorDetails; @@ -34,6 +35,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String title() { return this.innerModel().title(); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SkusClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusClientImpl.java similarity index 54% rename from sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SkusClientImpl.java rename to sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusClientImpl.java index fab5218a57090..0768b78f8a0ec 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SkusClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusClientImpl.java @@ -26,62 +26,70 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databoxedge.fluent.SkusClient; -import com.azure.resourcemanager.databoxedge.fluent.models.ResourceTypeSkuInner; -import com.azure.resourcemanager.databoxedge.models.SkuInformationList; +import com.azure.resourcemanager.databoxedge.fluent.AvailableSkusClient; +import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeSkuInner; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeSkuList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SkusClient. */ -public final class SkusClientImpl implements SkusClient { - private final ClientLogger logger = new ClientLogger(SkusClientImpl.class); +/** An instance of this class provides access to all the operations defined in AvailableSkusClient. */ +public final class AvailableSkusClientImpl implements AvailableSkusClient { + private final ClientLogger logger = new ClientLogger(AvailableSkusClientImpl.class); /** The proxy service used to perform REST calls. */ - private final SkusService service; + private final AvailableSkusService service; /** The service client containing this operation class. */ private final DataBoxEdgeManagementClientImpl client; /** - * Initializes an instance of SkusClientImpl. + * Initializes an instance of AvailableSkusClientImpl. * * @param client the instance of the service client containing this operation class. */ - SkusClientImpl(DataBoxEdgeManagementClientImpl client) { - this.service = RestProxy.create(SkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + AvailableSkusClientImpl(DataBoxEdgeManagementClientImpl client) { + this.service = + RestProxy.create(AvailableSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for DataBoxEdgeManagementClientSkus to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for DataBoxEdgeManagementClientAvailableSkus to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface SkusService { + private interface AvailableSkusService { @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/skus") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/availableSkus") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> list( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * - * @param filter Specify $filter='location eq <location>' to filter on location. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of SKU Information objects. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter) { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono .error( @@ -103,20 +111,23 @@ private Mono> listSinglePageAsync(String fil this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), - filter, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * - * @param filter Specify $filter='location eq <location>' to filter on location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -124,7 +135,7 @@ private Mono> listSinglePageAsync(String fil * @return list of SKU Information objects. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Context context) { + private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -144,46 +155,61 @@ private Mono> listSinglePageAsync(String fil this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), - filter, accept, context) .map( res -> new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all the available Skus and information related to them. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SKU Information objects. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * - * @param filter Specify $filter='location eq <location>' to filter on location. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of SKU Information objects. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(filter)); + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of SKU Information objects. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter)); + public PagedIterable list() { + return new PagedIterable<>(listAsync()); } /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * - * @param filter Specify $filter='location eq <location>' to filter on location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -191,35 +217,78 @@ private PagedFlux listAsync() { * @return list of SKU Information objects. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, context)); + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** - * List all the available Skus in the region and information related to them. + * Get the next page of items. * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of SKU Information objects. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String filter = null; - return new PagedIterable<>(listAsync(filter)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the available Skus in the region and information related to them. + * Get the next page of items. * - * @param filter Specify $filter='location eq <location>' to filter on location. + * @param nextLink The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of SKU Information objects. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Context context) { - return new PagedIterable<>(listAsync(filter, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusImpl.java new file mode 100644 index 0000000000000..ab03b8a6468d9 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.AvailableSkusClient; +import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeSkuInner; +import com.azure.resourcemanager.databoxedge.models.AvailableSkus; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeSku; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class AvailableSkusImpl implements AvailableSkus { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableSkusImpl.class); + + private final AvailableSkusClient innerClient; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + public AvailableSkusImpl( + AvailableSkusClient innerClient, com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new DataBoxEdgeSkuImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new DataBoxEdgeSkuImpl(inner1, this.manager())); + } + + private AvailableSkusClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthScheduleImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthScheduleImpl.java index b59183a98d06f..3badd7891eb79 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthScheduleImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthScheduleImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.BandwidthScheduleInner; import com.azure.resourcemanager.databoxedge.models.BandwidthSchedule; @@ -29,6 +30,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String start() { return this.innerModel().start(); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainerImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainerImpl.java index 62a6d67316a57..fea24e0a39ede 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainerImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainerImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.ContainerInner; import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; @@ -29,6 +30,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public ContainerStatus containerStatus() { return this.innerModel().containerStatus(); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DCAccessCodeImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DCAccessCodeImpl.java new file mode 100644 index 0000000000000..4f1fe48962974 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DCAccessCodeImpl.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.resourcemanager.databoxedge.fluent.models.DCAccessCodeInner; +import com.azure.resourcemanager.databoxedge.models.DCAccessCode; + +public final class DCAccessCodeImpl implements DCAccessCode { + private DCAccessCodeInner innerObject; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + DCAccessCodeImpl( + DCAccessCodeInner innerObject, com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String authCode() { + return this.innerModel().authCode(); + } + + public DCAccessCodeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeDeviceExtendedInfoImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeDeviceExtendedInfoImpl.java index 9951f5372aee9..ec2c524a1993a 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeDeviceExtendedInfoImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeDeviceExtendedInfoImpl.java @@ -6,6 +6,10 @@ import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceExtendedInfoInner; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfo; +import com.azure.resourcemanager.databoxedge.models.KeyVaultSyncStatus; +import com.azure.resourcemanager.databoxedge.models.Secret; +import java.util.Collections; +import java.util.Map; public final class DataBoxEdgeDeviceExtendedInfoImpl implements DataBoxEdgeDeviceExtendedInfo { private DataBoxEdgeDeviceExtendedInfoInner innerObject; @@ -43,6 +47,35 @@ public String resourceKey() { return this.innerModel().resourceKey(); } + public String clientSecretStoreId() { + return this.innerModel().clientSecretStoreId(); + } + + public String clientSecretStoreUrl() { + return this.innerModel().clientSecretStoreUrl(); + } + + public String channelIntegrityKeyName() { + return this.innerModel().channelIntegrityKeyName(); + } + + public String channelIntegrityKeyVersion() { + return this.innerModel().channelIntegrityKeyVersion(); + } + + public KeyVaultSyncStatus keyVaultSyncStatus() { + return this.innerModel().keyVaultSyncStatus(); + } + + public Map deviceSecrets() { + Map inner = this.innerModel().deviceSecrets(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + public DataBoxEdgeDeviceExtendedInfoInner innerModel() { return this.innerObject; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeDeviceImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeDeviceImpl.java index 0788a103b05c3..13b3a2a04f0d2 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeDeviceImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeDeviceImpl.java @@ -6,13 +6,22 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceInner; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevice; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfo; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceKind; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevicePatch; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceStatus; +import com.azure.resourcemanager.databoxedge.models.DataResidency; import com.azure.resourcemanager.databoxedge.models.DeviceType; +import com.azure.resourcemanager.databoxedge.models.EdgeProfile; +import com.azure.resourcemanager.databoxedge.models.EdgeProfilePatch; +import com.azure.resourcemanager.databoxedge.models.GenerateCertResponse; +import com.azure.resourcemanager.databoxedge.models.ResourceIdentity; +import com.azure.resourcemanager.databoxedge.models.ResourceMoveDetails; import com.azure.resourcemanager.databoxedge.models.RoleTypes; import com.azure.resourcemanager.databoxedge.models.Sku; import com.azure.resourcemanager.databoxedge.models.UploadCertificateRequest; @@ -60,6 +69,22 @@ public String etag() { return this.innerModel().etag(); } + public ResourceIdentity identity() { + return this.innerModel().identity(); + } + + public DataBoxEdgeDeviceKind kind() { + return this.innerModel().kind(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public SystemData systemDataPropertiesSystemData() { + return this.innerModel().systemDataPropertiesSystemData(); + } + public DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus() { return this.innerModel().dataBoxEdgeDeviceStatus(); } @@ -121,6 +146,18 @@ public Integer nodeCount() { return this.innerModel().nodeCount(); } + public ResourceMoveDetails resourceMoveDetails() { + return this.innerModel().resourceMoveDetails(); + } + + public EdgeProfile edgeProfile() { + return this.innerModel().edgeProfile(); + } + + public DataResidency dataResidency() { + return this.innerModel().dataResidency(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -153,7 +190,8 @@ public DataBoxEdgeDevice create() { serviceManager .serviceClient() .getDevices() - .createOrUpdate(deviceName, resourceGroupName, this.innerModel(), Context.NONE); + .createOrUpdateWithResponse(deviceName, resourceGroupName, this.innerModel(), Context.NONE) + .getValue(); return this; } @@ -162,7 +200,8 @@ public DataBoxEdgeDevice create(Context context) { serviceManager .serviceClient() .getDevices() - .createOrUpdate(deviceName, resourceGroupName, this.innerModel(), context); + .createOrUpdateWithResponse(deviceName, resourceGroupName, this.innerModel(), context) + .getValue(); return this; } @@ -233,6 +272,14 @@ public void downloadUpdates(Context context) { serviceManager.devices().downloadUpdates(deviceName, resourceGroupName, context); } + public GenerateCertResponse generateCertificate() { + return serviceManager.devices().generateCertificate(deviceName, resourceGroupName); + } + + public Response generateCertificateWithResponse(Context context) { + return serviceManager.devices().generateCertificateWithResponse(deviceName, resourceGroupName, context); + } + public DataBoxEdgeDeviceExtendedInfo getExtendedInformation() { return serviceManager.devices().getExtendedInformation(deviceName, resourceGroupName); } @@ -257,6 +304,17 @@ public void scanForUpdates(Context context) { serviceManager.devices().scanForUpdates(deviceName, resourceGroupName, context); } + public DataBoxEdgeDeviceExtendedInfo updateExtendedInformation(DataBoxEdgeDeviceExtendedInfoPatch parameters) { + return serviceManager.devices().updateExtendedInformation(deviceName, resourceGroupName, parameters); + } + + public Response updateExtendedInformationWithResponse( + DataBoxEdgeDeviceExtendedInfoPatch parameters, Context context) { + return serviceManager + .devices() + .updateExtendedInformationWithResponse(deviceName, resourceGroupName, parameters, context); + } + public UploadCertificateResponse uploadCertificate(UploadCertificateRequest parameters) { return serviceManager.devices().uploadCertificate(deviceName, resourceGroupName, parameters); } @@ -298,23 +356,33 @@ public DataBoxEdgeDeviceImpl withEtag(String etag) { return this; } - public DataBoxEdgeDeviceImpl withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus) { - this.innerModel().withDataBoxEdgeDeviceStatus(dataBoxEdgeDeviceStatus); + public DataBoxEdgeDeviceImpl withIdentity(ResourceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateParameters.withIdentity(identity); + return this; + } + } + + public DataBoxEdgeDeviceImpl withKind(DataBoxEdgeDeviceKind kind) { + this.innerModel().withKind(kind); return this; } - public DataBoxEdgeDeviceImpl withDescription(String description) { - this.innerModel().withDescription(description); + public DataBoxEdgeDeviceImpl withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus) { + this.innerModel().withDataBoxEdgeDeviceStatus(dataBoxEdgeDeviceStatus); return this; } - public DataBoxEdgeDeviceImpl withModelDescription(String modelDescription) { - this.innerModel().withModelDescription(modelDescription); + public DataBoxEdgeDeviceImpl withDataResidency(DataResidency dataResidency) { + this.innerModel().withDataResidency(dataResidency); return this; } - public DataBoxEdgeDeviceImpl withFriendlyName(String friendlyName) { - this.innerModel().withFriendlyName(friendlyName); + public DataBoxEdgeDeviceImpl withEdgeProfile(EdgeProfilePatch edgeProfile) { + this.updateParameters.withEdgeProfile(edgeProfile); return this; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeManagementClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeManagementClientImpl.java index 0bd69b360138d..e2055c7c62b50 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeManagementClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeManagementClientImpl.java @@ -21,21 +21,25 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.databoxedge.fluent.AddonsClient; import com.azure.resourcemanager.databoxedge.fluent.AlertsClient; +import com.azure.resourcemanager.databoxedge.fluent.AvailableSkusClient; import com.azure.resourcemanager.databoxedge.fluent.BandwidthSchedulesClient; import com.azure.resourcemanager.databoxedge.fluent.ContainersClient; import com.azure.resourcemanager.databoxedge.fluent.DataBoxEdgeManagementClient; import com.azure.resourcemanager.databoxedge.fluent.DevicesClient; +import com.azure.resourcemanager.databoxedge.fluent.DiagnosticSettingsClient; import com.azure.resourcemanager.databoxedge.fluent.JobsClient; +import com.azure.resourcemanager.databoxedge.fluent.MonitoringConfigsClient; import com.azure.resourcemanager.databoxedge.fluent.NodesClient; import com.azure.resourcemanager.databoxedge.fluent.OperationsClient; import com.azure.resourcemanager.databoxedge.fluent.OperationsStatusClient; import com.azure.resourcemanager.databoxedge.fluent.OrdersClient; import com.azure.resourcemanager.databoxedge.fluent.RolesClient; import com.azure.resourcemanager.databoxedge.fluent.SharesClient; -import com.azure.resourcemanager.databoxedge.fluent.SkusClient; import com.azure.resourcemanager.databoxedge.fluent.StorageAccountCredentialsClient; import com.azure.resourcemanager.databoxedge.fluent.StorageAccountsClient; +import com.azure.resourcemanager.databoxedge.fluent.SupportPackagesClient; import com.azure.resourcemanager.databoxedge.fluent.TriggersClient; import com.azure.resourcemanager.databoxedge.fluent.UsersClient; import java.io.IOException; @@ -137,6 +141,18 @@ public OperationsClient getOperations() { return this.operations; } + /** The AvailableSkusClient object to access its operations. */ + private final AvailableSkusClient availableSkus; + + /** + * Gets the AvailableSkusClient object to access its operations. + * + * @return the AvailableSkusClient object. + */ + public AvailableSkusClient getAvailableSkus() { + return this.availableSkus; + } + /** The DevicesClient object to access its operations. */ private final DevicesClient devices; @@ -173,6 +189,18 @@ public BandwidthSchedulesClient getBandwidthSchedules() { return this.bandwidthSchedules; } + /** The DiagnosticSettingsClient object to access its operations. */ + private final DiagnosticSettingsClient diagnosticSettings; + + /** + * Gets the DiagnosticSettingsClient object to access its operations. + * + * @return the DiagnosticSettingsClient object. + */ + public DiagnosticSettingsClient getDiagnosticSettings() { + return this.diagnosticSettings; + } + /** The JobsClient object to access its operations. */ private final JobsClient jobs; @@ -233,6 +261,30 @@ public RolesClient getRoles() { return this.roles; } + /** The AddonsClient object to access its operations. */ + private final AddonsClient addons; + + /** + * Gets the AddonsClient object to access its operations. + * + * @return the AddonsClient object. + */ + public AddonsClient getAddons() { + return this.addons; + } + + /** The MonitoringConfigsClient object to access its operations. */ + private final MonitoringConfigsClient monitoringConfigs; + + /** + * Gets the MonitoringConfigsClient object to access its operations. + * + * @return the MonitoringConfigsClient object. + */ + public MonitoringConfigsClient getMonitoringConfigs() { + return this.monitoringConfigs; + } + /** The SharesClient object to access its operations. */ private final SharesClient shares; @@ -293,28 +345,28 @@ public TriggersClient getTriggers() { return this.triggers; } - /** The UsersClient object to access its operations. */ - private final UsersClient users; + /** The SupportPackagesClient object to access its operations. */ + private final SupportPackagesClient supportPackages; /** - * Gets the UsersClient object to access its operations. + * Gets the SupportPackagesClient object to access its operations. * - * @return the UsersClient object. + * @return the SupportPackagesClient object. */ - public UsersClient getUsers() { - return this.users; + public SupportPackagesClient getSupportPackages() { + return this.supportPackages; } - /** The SkusClient object to access its operations. */ - private final SkusClient skus; + /** The UsersClient object to access its operations. */ + private final UsersClient users; /** - * Gets the SkusClient object to access its operations. + * Gets the UsersClient object to access its operations. * - * @return the SkusClient object. + * @return the UsersClient object. */ - public SkusClient getSkus() { - return this.skus; + public UsersClient getUsers() { + return this.users; } /** @@ -339,23 +391,27 @@ public SkusClient getSkus() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2019-08-01"; + this.apiVersion = "2021-06-01"; this.operations = new OperationsClientImpl(this); + this.availableSkus = new AvailableSkusClientImpl(this); this.devices = new DevicesClientImpl(this); this.alerts = new AlertsClientImpl(this); this.bandwidthSchedules = new BandwidthSchedulesClientImpl(this); + this.diagnosticSettings = new DiagnosticSettingsClientImpl(this); this.jobs = new JobsClientImpl(this); this.nodes = new NodesClientImpl(this); this.operationsStatus = new OperationsStatusClientImpl(this); this.orders = new OrdersClientImpl(this); this.roles = new RolesClientImpl(this); + this.addons = new AddonsClientImpl(this); + this.monitoringConfigs = new MonitoringConfigsClientImpl(this); this.shares = new SharesClientImpl(this); this.storageAccountCredentials = new StorageAccountCredentialsClientImpl(this); this.storageAccounts = new StorageAccountsClientImpl(this); this.containers = new ContainersClientImpl(this); this.triggers = new TriggersClientImpl(this); + this.supportPackages = new SupportPackagesClientImpl(this); this.users = new UsersClientImpl(this); - this.skus = new SkusClientImpl(this); } /** diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ResourceTypeSkuImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeSkuImpl.java similarity index 61% rename from sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ResourceTypeSkuImpl.java rename to sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeSkuImpl.java index 52a889e6252be..052366788c0b4 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ResourceTypeSkuImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeSkuImpl.java @@ -4,23 +4,27 @@ package com.azure.resourcemanager.databoxedge.implementation; -import com.azure.resourcemanager.databoxedge.fluent.models.ResourceTypeSkuInner; -import com.azure.resourcemanager.databoxedge.models.ResourceTypeSku; +import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeSkuInner; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeSku; +import com.azure.resourcemanager.databoxedge.models.ShipmentType; +import com.azure.resourcemanager.databoxedge.models.SkuAvailability; +import com.azure.resourcemanager.databoxedge.models.SkuCapability; import com.azure.resourcemanager.databoxedge.models.SkuCost; import com.azure.resourcemanager.databoxedge.models.SkuLocationInfo; import com.azure.resourcemanager.databoxedge.models.SkuName; -import com.azure.resourcemanager.databoxedge.models.SkuRestriction; +import com.azure.resourcemanager.databoxedge.models.SkuSignupOption; import com.azure.resourcemanager.databoxedge.models.SkuTier; +import com.azure.resourcemanager.databoxedge.models.SkuVersion; import java.util.Collections; import java.util.List; -public final class ResourceTypeSkuImpl implements ResourceTypeSku { - private ResourceTypeSkuInner innerObject; +public final class DataBoxEdgeSkuImpl implements DataBoxEdgeSku { + private DataBoxEdgeSkuInner innerObject; private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; - ResourceTypeSkuImpl( - ResourceTypeSkuInner innerObject, com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + DataBoxEdgeSkuImpl( + DataBoxEdgeSkuInner innerObject, com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -41,6 +45,10 @@ public SkuTier tier() { return this.innerModel().tier(); } + public String size() { + return this.innerModel().size(); + } + public String family() { return this.innerModel().family(); } @@ -81,8 +89,29 @@ public List costs() { } } - public List restrictions() { - List inner = this.innerModel().restrictions(); + public SkuSignupOption signupOption() { + return this.innerModel().signupOption(); + } + + public SkuVersion version() { + return this.innerModel().version(); + } + + public SkuAvailability availability() { + return this.innerModel().availability(); + } + + public List shipmentTypes() { + List inner = this.innerModel().shipmentTypes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List capabilities() { + List inner = this.innerModel().capabilities(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -90,7 +119,7 @@ public List restrictions() { } } - public ResourceTypeSkuInner innerModel() { + public DataBoxEdgeSkuInner innerModel() { return this.innerObject; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DevicesClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DevicesClientImpl.java index e5634b63af14d..70361c41a71be 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DevicesClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DevicesClientImpl.java @@ -37,9 +37,11 @@ import com.azure.resourcemanager.databoxedge.fluent.DevicesClient; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceExtendedInfoInner; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceInner; +import com.azure.resourcemanager.databoxedge.fluent.models.GenerateCertResponseInner; import com.azure.resourcemanager.databoxedge.fluent.models.NetworkSettingsInner; import com.azure.resourcemanager.databoxedge.fluent.models.UpdateSummaryInner; import com.azure.resourcemanager.databoxedge.fluent.models.UploadCertificateResponseInner; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceList; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevicePatch; import com.azure.resourcemanager.databoxedge.models.SecuritySettings; @@ -123,7 +125,7 @@ Mono> getByResourceGroup( + "/dataBoxEdgeDevices/{deviceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("deviceName") String deviceName, @PathParam("subscriptionId") String subscriptionId, @@ -179,6 +181,21 @@ Mono>> downloadUpdates( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/generateCertificate") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generateCertificate( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -255,6 +272,22 @@ Mono>> createOrUpdateSecuritySettings( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/updateExtendedInformation") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateExtendedInformation( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DataBoxEdgeDeviceExtendedInfoPatch parameters, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -835,7 +868,7 @@ public Response getByResourceGroupWithResponse( * @return the Data Box Edge/Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice) { if (this.client.getEndpoint() == null) { return Mono @@ -892,7 +925,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the Data Box Edge/Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -933,95 +966,6 @@ private Mono>> createOrUpdateWithResponseAsync( context); } - /** - * Creates or updates a Data Box Edge/Data Box Gateway resource. - * - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param dataBoxEdgeDevice The resource object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, DataBoxEdgeDeviceInner> beginCreateOrUpdateAsync( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice) { - Mono>> mono = - createOrUpdateWithResponseAsync(deviceName, resourceGroupName, dataBoxEdgeDevice); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DataBoxEdgeDeviceInner.class, - DataBoxEdgeDeviceInner.class, - Context.NONE); - } - - /** - * Creates or updates a Data Box Edge/Data Box Gateway resource. - * - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param dataBoxEdgeDevice The resource object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, DataBoxEdgeDeviceInner> beginCreateOrUpdateAsync( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(deviceName, resourceGroupName, dataBoxEdgeDevice, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DataBoxEdgeDeviceInner.class, - DataBoxEdgeDeviceInner.class, - context); - } - - /** - * Creates or updates a Data Box Edge/Data Box Gateway resource. - * - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param dataBoxEdgeDevice The resource object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, DataBoxEdgeDeviceInner> beginCreateOrUpdate( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice) { - return beginCreateOrUpdateAsync(deviceName, resourceGroupName, dataBoxEdgeDevice).getSyncPoller(); - } - - /** - * Creates or updates a Data Box Edge/Data Box Gateway resource. - * - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param dataBoxEdgeDevice The resource object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, DataBoxEdgeDeviceInner> beginCreateOrUpdate( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context) { - return beginCreateOrUpdateAsync(deviceName, resourceGroupName, dataBoxEdgeDevice, context).getSyncPoller(); - } - /** * Creates or updates a Data Box Edge/Data Box Gateway resource. * @@ -1036,29 +980,15 @@ public SyncPoller, DataBoxEdgeDeviceInner> be @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice) { - return beginCreateOrUpdateAsync(deviceName, resourceGroupName, dataBoxEdgeDevice) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a Data Box Edge/Data Box Gateway resource. - * - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param dataBoxEdgeDevice The resource object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context) { - return beginCreateOrUpdateAsync(deviceName, resourceGroupName, dataBoxEdgeDevice, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return createOrUpdateWithResponseAsync(deviceName, resourceGroupName, dataBoxEdgeDevice) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); } /** @@ -1091,9 +1021,9 @@ public DataBoxEdgeDeviceInner createOrUpdate( * @return the Data Box Edge/Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataBoxEdgeDeviceInner createOrUpdate( + public Response createOrUpdateWithResponse( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context) { - return createOrUpdateAsync(deviceName, resourceGroupName, dataBoxEdgeDevice, context).block(); + return createOrUpdateWithResponseAsync(deviceName, resourceGroupName, dataBoxEdgeDevice, context).block(); } /** @@ -1721,14 +1651,163 @@ public void downloadUpdates(String deviceName, String resourceGroupName, Context } /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Generates certificate for activation key. * * @param deviceName The device name. * @param resourceGroupName The resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return used in activation key generation flow. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateCertificateWithResponseAsync( + String deviceName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .generateCertificate( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generates certificate for activation key. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used in activation key generation flow. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateCertificateWithResponseAsync( + String deviceName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .generateCertificate( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Generates certificate for activation key. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used in activation key generation flow. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generateCertificateAsync(String deviceName, String resourceGroupName) { + return generateCertificateWithResponseAsync(deviceName, resourceGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Generates certificate for activation key. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used in activation key generation flow. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GenerateCertResponseInner generateCertificate(String deviceName, String resourceGroupName) { + return generateCertificateAsync(deviceName, resourceGroupName).block(); + } + + /** + * Generates certificate for activation key. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used in activation key generation flow. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response generateCertificateWithResponse( + String deviceName, String resourceGroupName, Context context) { + return generateCertificateWithResponseAsync(deviceName, resourceGroupName, context).block(); + } + + /** + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getExtendedInformationWithResponseAsync( @@ -1769,7 +1848,7 @@ private Mono> getExtendedInformatio } /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -1777,7 +1856,7 @@ private Mono> getExtendedInformatio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getExtendedInformationWithResponseAsync( @@ -1815,14 +1894,14 @@ private Mono> getExtendedInformatio } /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getExtendedInformationAsync( @@ -1839,14 +1918,14 @@ private Mono getExtendedInformationAsync( } /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) public DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceName, String resourceGroupName) { @@ -1854,7 +1933,7 @@ public DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceNa } /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -1862,7 +1941,7 @@ public DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getExtendedInformationWithResponse( @@ -2740,6 +2819,174 @@ public void createOrUpdateSecuritySettings( createOrUpdateSecuritySettingsAsync(deviceName, resourceGroupName, securitySettings, context).block(); } + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The patch object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateExtendedInformationWithResponseAsync( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateExtendedInformation( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The patch object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateExtendedInformationWithResponseAsync( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateExtendedInformation( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The patch object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateExtendedInformationAsync( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters) { + return updateExtendedInformationWithResponseAsync(deviceName, resourceGroupName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The patch object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataBoxEdgeDeviceExtendedInfoInner updateExtendedInformation( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters) { + return updateExtendedInformationAsync(deviceName, resourceGroupName, parameters).block(); + } + + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The patch object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateExtendedInformationWithResponse( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters, Context context) { + return updateExtendedInformationWithResponseAsync(deviceName, resourceGroupName, parameters, context).block(); + } + /** * Gets information about the availability of updates based on the last scan of the device. It also gets information * about any ongoing download or install jobs on the device. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DevicesImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DevicesImpl.java index 4cef08e00fdf3..59c8779693e77 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DevicesImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DevicesImpl.java @@ -12,12 +12,15 @@ import com.azure.resourcemanager.databoxedge.fluent.DevicesClient; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceExtendedInfoInner; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceInner; +import com.azure.resourcemanager.databoxedge.fluent.models.GenerateCertResponseInner; import com.azure.resourcemanager.databoxedge.fluent.models.NetworkSettingsInner; import com.azure.resourcemanager.databoxedge.fluent.models.UpdateSummaryInner; import com.azure.resourcemanager.databoxedge.fluent.models.UploadCertificateResponseInner; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevice; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfo; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch; import com.azure.resourcemanager.databoxedge.models.Devices; +import com.azure.resourcemanager.databoxedge.models.GenerateCertResponse; import com.azure.resourcemanager.databoxedge.models.NetworkSettings; import com.azure.resourcemanager.databoxedge.models.SecuritySettings; import com.azure.resourcemanager.databoxedge.models.UpdateSummary; @@ -100,6 +103,30 @@ public void downloadUpdates(String deviceName, String resourceGroupName, Context this.serviceClient().downloadUpdates(deviceName, resourceGroupName, context); } + public GenerateCertResponse generateCertificate(String deviceName, String resourceGroupName) { + GenerateCertResponseInner inner = this.serviceClient().generateCertificate(deviceName, resourceGroupName); + if (inner != null) { + return new GenerateCertResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response generateCertificateWithResponse( + String deviceName, String resourceGroupName, Context context) { + Response inner = + this.serviceClient().generateCertificateWithResponse(deviceName, resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new GenerateCertResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + public DataBoxEdgeDeviceExtendedInfo getExtendedInformation(String deviceName, String resourceGroupName) { DataBoxEdgeDeviceExtendedInfoInner inner = this.serviceClient().getExtendedInformation(deviceName, resourceGroupName); @@ -175,6 +202,34 @@ public void createOrUpdateSecuritySettings( this.serviceClient().createOrUpdateSecuritySettings(deviceName, resourceGroupName, securitySettings, context); } + public DataBoxEdgeDeviceExtendedInfo updateExtendedInformation( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters) { + DataBoxEdgeDeviceExtendedInfoInner inner = + this.serviceClient().updateExtendedInformation(deviceName, resourceGroupName, parameters); + if (inner != null) { + return new DataBoxEdgeDeviceExtendedInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateExtendedInformationWithResponse( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters, Context context) { + Response inner = + this + .serviceClient() + .updateExtendedInformationWithResponse(deviceName, resourceGroupName, parameters, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataBoxEdgeDeviceExtendedInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + public UpdateSummary getUpdateSummary(String deviceName, String resourceGroupName) { UpdateSummaryInner inner = this.serviceClient().getUpdateSummary(deviceName, resourceGroupName); if (inner != null) { diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticProactiveLogCollectionSettingsImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticProactiveLogCollectionSettingsImpl.java new file mode 100644 index 0000000000000..e614ef59309aa --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticProactiveLogCollectionSettingsImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticProactiveLogCollectionSettingsInner; +import com.azure.resourcemanager.databoxedge.models.DiagnosticProactiveLogCollectionSettings; +import com.azure.resourcemanager.databoxedge.models.ProactiveDiagnosticsConsent; + +public final class DiagnosticProactiveLogCollectionSettingsImpl implements DiagnosticProactiveLogCollectionSettings { + private DiagnosticProactiveLogCollectionSettingsInner innerObject; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + DiagnosticProactiveLogCollectionSettingsImpl( + DiagnosticProactiveLogCollectionSettingsInner innerObject, + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProactiveDiagnosticsConsent userConsent() { + return this.innerModel().userConsent(); + } + + public DiagnosticProactiveLogCollectionSettingsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticRemoteSupportSettingsImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticRemoteSupportSettingsImpl.java new file mode 100644 index 0000000000000..23718621ded59 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticRemoteSupportSettingsImpl.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticRemoteSupportSettingsInner; +import com.azure.resourcemanager.databoxedge.models.DiagnosticRemoteSupportSettings; +import com.azure.resourcemanager.databoxedge.models.RemoteSupportSettings; +import java.util.Collections; +import java.util.List; + +public final class DiagnosticRemoteSupportSettingsImpl implements DiagnosticRemoteSupportSettings { + private DiagnosticRemoteSupportSettingsInner innerObject; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + DiagnosticRemoteSupportSettingsImpl( + DiagnosticRemoteSupportSettingsInner innerObject, + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public List remoteSupportSettingsList() { + List inner = this.innerModel().remoteSupportSettingsList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public DiagnosticRemoteSupportSettingsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticSettingsClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticSettingsClientImpl.java new file mode 100644 index 0000000000000..2adece08db92c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticSettingsClientImpl.java @@ -0,0 +1,1072 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.databoxedge.fluent.DiagnosticSettingsClient; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticProactiveLogCollectionSettingsInner; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticRemoteSupportSettingsInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in DiagnosticSettingsClient. */ +public final class DiagnosticSettingsClientImpl implements DiagnosticSettingsClient { + private final ClientLogger logger = new ClientLogger(DiagnosticSettingsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final DiagnosticSettingsService service; + + /** The service client containing this operation class. */ + private final DataBoxEdgeManagementClientImpl client; + + /** + * Initializes an instance of DiagnosticSettingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DiagnosticSettingsClientImpl(DataBoxEdgeManagementClientImpl client) { + this.service = + RestProxy.create(DiagnosticSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataBoxEdgeManagementClientDiagnosticSettings to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataBoxEdgeManagemen") + private interface DiagnosticSettingsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/diagnosticProactiveLogCollectionSettings/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDiagnosticProactiveLogCollectionSettings( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/diagnosticProactiveLogCollectionSettings/default") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateDiagnosticProactiveLogCollectionSettings( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/diagnosticRemoteSupportSettings/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDiagnosticRemoteSupportSettings( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/diagnosticRemoteSupportSettings/default") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateDiagnosticRemoteSupportSettings( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getDiagnosticProactiveLogCollectionSettingsWithResponseAsync(String deviceName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getDiagnosticProactiveLogCollectionSettings( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getDiagnosticProactiveLogCollectionSettingsWithResponseAsync( + String deviceName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getDiagnosticProactiveLogCollectionSettings( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDiagnosticProactiveLogCollectionSettingsAsync( + String deviceName, String resourceGroupName) { + return getDiagnosticProactiveLogCollectionSettingsWithResponseAsync(deviceName, resourceGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticProactiveLogCollectionSettingsInner getDiagnosticProactiveLogCollectionSettings( + String deviceName, String resourceGroupName) { + return getDiagnosticProactiveLogCollectionSettingsAsync(deviceName, resourceGroupName).block(); + } + + /** + * Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + getDiagnosticProactiveLogCollectionSettingsWithResponse( + String deviceName, String resourceGroupName, Context context) { + return getDiagnosticProactiveLogCollectionSettingsWithResponseAsync(deviceName, resourceGroupName, context) + .block(); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateDiagnosticProactiveLogCollectionSettingsWithResponseAsync( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (proactiveLogCollectionSettings == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter proactiveLogCollectionSettings is required and cannot be null.")); + } else { + proactiveLogCollectionSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateDiagnosticProactiveLogCollectionSettings( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + proactiveLogCollectionSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateDiagnosticProactiveLogCollectionSettingsWithResponseAsync( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (proactiveLogCollectionSettings == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter proactiveLogCollectionSettings is required and cannot be null.")); + } else { + proactiveLogCollectionSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateDiagnosticProactiveLogCollectionSettings( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + proactiveLogCollectionSettings, + accept, + context); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux< + PollResult, DiagnosticProactiveLogCollectionSettingsInner> + beginUpdateDiagnosticProactiveLogCollectionSettingsAsync( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings) { + Mono>> mono = + updateDiagnosticProactiveLogCollectionSettingsWithResponseAsync( + deviceName, resourceGroupName, proactiveLogCollectionSettings); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DiagnosticProactiveLogCollectionSettingsInner.class, + DiagnosticProactiveLogCollectionSettingsInner.class, + Context.NONE); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux< + PollResult, DiagnosticProactiveLogCollectionSettingsInner> + beginUpdateDiagnosticProactiveLogCollectionSettingsAsync( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateDiagnosticProactiveLogCollectionSettingsWithResponseAsync( + deviceName, resourceGroupName, proactiveLogCollectionSettings, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DiagnosticProactiveLogCollectionSettingsInner.class, + DiagnosticProactiveLogCollectionSettingsInner.class, + context); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller< + PollResult, DiagnosticProactiveLogCollectionSettingsInner> + beginUpdateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings) { + return beginUpdateDiagnosticProactiveLogCollectionSettingsAsync( + deviceName, resourceGroupName, proactiveLogCollectionSettings) + .getSyncPoller(); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller< + PollResult, DiagnosticProactiveLogCollectionSettingsInner> + beginUpdateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings, + Context context) { + return beginUpdateDiagnosticProactiveLogCollectionSettingsAsync( + deviceName, resourceGroupName, proactiveLogCollectionSettings, context) + .getSyncPoller(); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDiagnosticProactiveLogCollectionSettingsAsync( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings) { + return beginUpdateDiagnosticProactiveLogCollectionSettingsAsync( + deviceName, resourceGroupName, proactiveLogCollectionSettings) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDiagnosticProactiveLogCollectionSettingsAsync( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings, + Context context) { + return beginUpdateDiagnosticProactiveLogCollectionSettingsAsync( + deviceName, resourceGroupName, proactiveLogCollectionSettings, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticProactiveLogCollectionSettingsInner updateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings) { + return updateDiagnosticProactiveLogCollectionSettingsAsync( + deviceName, resourceGroupName, proactiveLogCollectionSettings) + .block(); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticProactiveLogCollectionSettingsInner updateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings, + Context context) { + return updateDiagnosticProactiveLogCollectionSettingsAsync( + deviceName, resourceGroupName, proactiveLogCollectionSettings, context) + .block(); + } + + /** + * Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDiagnosticRemoteSupportSettingsWithResponseAsync( + String deviceName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getDiagnosticRemoteSupportSettings( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDiagnosticRemoteSupportSettingsWithResponseAsync( + String deviceName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getDiagnosticRemoteSupportSettings( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDiagnosticRemoteSupportSettingsAsync( + String deviceName, String resourceGroupName) { + return getDiagnosticRemoteSupportSettingsWithResponseAsync(deviceName, resourceGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticRemoteSupportSettingsInner getDiagnosticRemoteSupportSettings( + String deviceName, String resourceGroupName) { + return getDiagnosticRemoteSupportSettingsAsync(deviceName, resourceGroupName).block(); + } + + /** + * Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDiagnosticRemoteSupportSettingsWithResponse( + String deviceName, String resourceGroupName, Context context) { + return getDiagnosticRemoteSupportSettingsWithResponseAsync(deviceName, resourceGroupName, context).block(); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateDiagnosticRemoteSupportSettingsWithResponseAsync( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (diagnosticRemoteSupportSettings == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter diagnosticRemoteSupportSettings is required and cannot be null.")); + } else { + diagnosticRemoteSupportSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateDiagnosticRemoteSupportSettings( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + diagnosticRemoteSupportSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateDiagnosticRemoteSupportSettingsWithResponseAsync( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (diagnosticRemoteSupportSettings == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter diagnosticRemoteSupportSettings is required and cannot be null.")); + } else { + diagnosticRemoteSupportSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateDiagnosticRemoteSupportSettings( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + diagnosticRemoteSupportSettings, + accept, + context); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DiagnosticRemoteSupportSettingsInner> + beginUpdateDiagnosticRemoteSupportSettingsAsync( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings) { + Mono>> mono = + updateDiagnosticRemoteSupportSettingsWithResponseAsync( + deviceName, resourceGroupName, diagnosticRemoteSupportSettings); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DiagnosticRemoteSupportSettingsInner.class, + DiagnosticRemoteSupportSettingsInner.class, + Context.NONE); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DiagnosticRemoteSupportSettingsInner> + beginUpdateDiagnosticRemoteSupportSettingsAsync( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateDiagnosticRemoteSupportSettingsWithResponseAsync( + deviceName, resourceGroupName, diagnosticRemoteSupportSettings, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DiagnosticRemoteSupportSettingsInner.class, + DiagnosticRemoteSupportSettingsInner.class, + context); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DiagnosticRemoteSupportSettingsInner> + beginUpdateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings) { + return beginUpdateDiagnosticRemoteSupportSettingsAsync( + deviceName, resourceGroupName, diagnosticRemoteSupportSettings) + .getSyncPoller(); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DiagnosticRemoteSupportSettingsInner> + beginUpdateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings, + Context context) { + return beginUpdateDiagnosticRemoteSupportSettingsAsync( + deviceName, resourceGroupName, diagnosticRemoteSupportSettings, context) + .getSyncPoller(); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDiagnosticRemoteSupportSettingsAsync( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings) { + return beginUpdateDiagnosticRemoteSupportSettingsAsync( + deviceName, resourceGroupName, diagnosticRemoteSupportSettings) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDiagnosticRemoteSupportSettingsAsync( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings, + Context context) { + return beginUpdateDiagnosticRemoteSupportSettingsAsync( + deviceName, resourceGroupName, diagnosticRemoteSupportSettings, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticRemoteSupportSettingsInner updateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings) { + return updateDiagnosticRemoteSupportSettingsAsync( + deviceName, resourceGroupName, diagnosticRemoteSupportSettings) + .block(); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticRemoteSupportSettingsInner updateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings, + Context context) { + return updateDiagnosticRemoteSupportSettingsAsync( + deviceName, resourceGroupName, diagnosticRemoteSupportSettings, context) + .block(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticSettingsImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticSettingsImpl.java new file mode 100644 index 0000000000000..9cbbc927a6f54 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticSettingsImpl.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.DiagnosticSettingsClient; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticProactiveLogCollectionSettingsInner; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticRemoteSupportSettingsInner; +import com.azure.resourcemanager.databoxedge.models.DiagnosticProactiveLogCollectionSettings; +import com.azure.resourcemanager.databoxedge.models.DiagnosticRemoteSupportSettings; +import com.azure.resourcemanager.databoxedge.models.DiagnosticSettings; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class DiagnosticSettingsImpl implements DiagnosticSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticSettingsImpl.class); + + private final DiagnosticSettingsClient innerClient; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + public DiagnosticSettingsImpl( + DiagnosticSettingsClient innerClient, com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public DiagnosticProactiveLogCollectionSettings getDiagnosticProactiveLogCollectionSettings( + String deviceName, String resourceGroupName) { + DiagnosticProactiveLogCollectionSettingsInner inner = + this.serviceClient().getDiagnosticProactiveLogCollectionSettings(deviceName, resourceGroupName); + if (inner != null) { + return new DiagnosticProactiveLogCollectionSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDiagnosticProactiveLogCollectionSettingsWithResponse( + String deviceName, String resourceGroupName, Context context) { + Response inner = + this + .serviceClient() + .getDiagnosticProactiveLogCollectionSettingsWithResponse(deviceName, resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DiagnosticProactiveLogCollectionSettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DiagnosticProactiveLogCollectionSettings updateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings) { + DiagnosticProactiveLogCollectionSettingsInner inner = + this + .serviceClient() + .updateDiagnosticProactiveLogCollectionSettings( + deviceName, resourceGroupName, proactiveLogCollectionSettings); + if (inner != null) { + return new DiagnosticProactiveLogCollectionSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public DiagnosticProactiveLogCollectionSettings updateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings, + Context context) { + DiagnosticProactiveLogCollectionSettingsInner inner = + this + .serviceClient() + .updateDiagnosticProactiveLogCollectionSettings( + deviceName, resourceGroupName, proactiveLogCollectionSettings, context); + if (inner != null) { + return new DiagnosticProactiveLogCollectionSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public DiagnosticRemoteSupportSettings getDiagnosticRemoteSupportSettings( + String deviceName, String resourceGroupName) { + DiagnosticRemoteSupportSettingsInner inner = + this.serviceClient().getDiagnosticRemoteSupportSettings(deviceName, resourceGroupName); + if (inner != null) { + return new DiagnosticRemoteSupportSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDiagnosticRemoteSupportSettingsWithResponse( + String deviceName, String resourceGroupName, Context context) { + Response inner = + this.serviceClient().getDiagnosticRemoteSupportSettingsWithResponse(deviceName, resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DiagnosticRemoteSupportSettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DiagnosticRemoteSupportSettings updateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings) { + DiagnosticRemoteSupportSettingsInner inner = + this + .serviceClient() + .updateDiagnosticRemoteSupportSettings(deviceName, resourceGroupName, diagnosticRemoteSupportSettings); + if (inner != null) { + return new DiagnosticRemoteSupportSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public DiagnosticRemoteSupportSettings updateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings, + Context context) { + DiagnosticRemoteSupportSettingsInner inner = + this + .serviceClient() + .updateDiagnosticRemoteSupportSettings( + deviceName, resourceGroupName, diagnosticRemoteSupportSettings, context); + if (inner != null) { + return new DiagnosticRemoteSupportSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + private DiagnosticSettingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/GenerateCertResponseImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/GenerateCertResponseImpl.java new file mode 100644 index 0000000000000..8e14440f13e71 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/GenerateCertResponseImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.resourcemanager.databoxedge.fluent.models.GenerateCertResponseInner; +import com.azure.resourcemanager.databoxedge.models.GenerateCertResponse; + +public final class GenerateCertResponseImpl implements GenerateCertResponse { + private GenerateCertResponseInner innerObject; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + GenerateCertResponseImpl( + GenerateCertResponseInner innerObject, + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String publicKey() { + return this.innerModel().publicKey(); + } + + public String privateKey() { + return this.innerModel().privateKey(); + } + + public String expiryTimeInUtc() { + return this.innerModel().expiryTimeInUtc(); + } + + public GenerateCertResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringConfigsClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringConfigsClientImpl.java new file mode 100644 index 0000000000000..4e7bca4c6b865 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringConfigsClientImpl.java @@ -0,0 +1,1164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.databoxedge.fluent.MonitoringConfigsClient; +import com.azure.resourcemanager.databoxedge.fluent.models.MonitoringMetricConfigurationInner; +import com.azure.resourcemanager.databoxedge.models.MonitoringMetricConfigurationList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in MonitoringConfigsClient. */ +public final class MonitoringConfigsClientImpl implements MonitoringConfigsClient { + private final ClientLogger logger = new ClientLogger(MonitoringConfigsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final MonitoringConfigsService service; + + /** The service client containing this operation class. */ + private final DataBoxEdgeManagementClientImpl client; + + /** + * Initializes an instance of MonitoringConfigsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MonitoringConfigsClientImpl(DataBoxEdgeManagementClientImpl client) { + this.service = + RestProxy.create(MonitoringConfigsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataBoxEdgeManagementClientMonitoringConfigs to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataBoxEdgeManagemen") + private interface MonitoringConfigsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("roleName") String roleName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("roleName") String roleName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("roleName") String roleName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") MonitoringMetricConfigurationInner monitoringMetricConfiguration, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("roleName") String roleName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Lists metric configurations in a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String deviceName, String roleName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + deviceName, + roleName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists metric configurations in a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String deviceName, String roleName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + deviceName, + roleName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists metric configurations in a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String deviceName, String roleName, String resourceGroupName) { + return new PagedFlux<>( + () -> listSinglePageAsync(deviceName, roleName, resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists metric configurations in a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String deviceName, String roleName, String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(deviceName, roleName, resourceGroupName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists metric configurations in a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String deviceName, String roleName, String resourceGroupName) { + return new PagedIterable<>(listAsync(deviceName, roleName, resourceGroupName)); + } + + /** + * Lists metric configurations in a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String deviceName, String roleName, String resourceGroupName, Context context) { + return new PagedIterable<>(listAsync(deviceName, roleName, resourceGroupName, context)); + } + + /** + * Gets a metric configuration of a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a metric configuration of a role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String deviceName, String roleName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + deviceName, + roleName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a metric configuration of a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a metric configuration of a role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String deviceName, String roleName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + deviceName, + roleName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets a metric configuration of a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a metric configuration of a role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String deviceName, String roleName, String resourceGroupName) { + return getWithResponseAsync(deviceName, roleName, resourceGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a metric configuration of a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a metric configuration of a role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MonitoringMetricConfigurationInner get(String deviceName, String roleName, String resourceGroupName) { + return getAsync(deviceName, roleName, resourceGroupName).block(); + } + + /** + * Gets a metric configuration of a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a metric configuration of a role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String deviceName, String roleName, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, roleName, resourceGroupName, context).block(); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitoringMetricConfiguration == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter monitoringMetricConfiguration is required and cannot be null.")); + } else { + monitoringMetricConfiguration.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + deviceName, + roleName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + monitoringMetricConfiguration, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitoringMetricConfiguration == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter monitoringMetricConfiguration is required and cannot be null.")); + } else { + monitoringMetricConfiguration.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + deviceName, + roleName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + monitoringMetricConfiguration, + accept, + context); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, MonitoringMetricConfigurationInner> + beginCreateOrUpdateAsync( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration) { + Mono>> mono = + createOrUpdateWithResponseAsync(deviceName, roleName, resourceGroupName, monitoringMetricConfiguration); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + MonitoringMetricConfigurationInner.class, + MonitoringMetricConfigurationInner.class, + Context.NONE); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, MonitoringMetricConfigurationInner> + beginCreateOrUpdateAsync( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + deviceName, roleName, resourceGroupName, monitoringMetricConfiguration, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + MonitoringMetricConfigurationInner.class, + MonitoringMetricConfigurationInner.class, + context); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, MonitoringMetricConfigurationInner> + beginCreateOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration) { + return beginCreateOrUpdateAsync(deviceName, roleName, resourceGroupName, monitoringMetricConfiguration) + .getSyncPoller(); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, MonitoringMetricConfigurationInner> + beginCreateOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration, + Context context) { + return beginCreateOrUpdateAsync(deviceName, roleName, resourceGroupName, monitoringMetricConfiguration, context) + .getSyncPoller(); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration) { + return beginCreateOrUpdateAsync(deviceName, roleName, resourceGroupName, monitoringMetricConfiguration) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration, + Context context) { + return beginCreateOrUpdateAsync(deviceName, roleName, resourceGroupName, monitoringMetricConfiguration, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MonitoringMetricConfigurationInner createOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration) { + return createOrUpdateAsync(deviceName, roleName, resourceGroupName, monitoringMetricConfiguration).block(); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MonitoringMetricConfigurationInner createOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration, + Context context) { + return createOrUpdateAsync(deviceName, roleName, resourceGroupName, monitoringMetricConfiguration, context) + .block(); + } + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String deviceName, String roleName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + deviceName, + roleName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String deviceName, String roleName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + deviceName, + roleName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String deviceName, String roleName, String resourceGroupName) { + Mono>> mono = deleteWithResponseAsync(deviceName, roleName, resourceGroupName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String deviceName, String roleName, String resourceGroupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(deviceName, roleName, resourceGroupName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String deviceName, String roleName, String resourceGroupName) { + return beginDeleteAsync(deviceName, roleName, resourceGroupName).getSyncPoller(); + } + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String deviceName, String roleName, String resourceGroupName, Context context) { + return beginDeleteAsync(deviceName, roleName, resourceGroupName, context).getSyncPoller(); + } + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String deviceName, String roleName, String resourceGroupName) { + return beginDeleteAsync(deviceName, roleName, resourceGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String deviceName, String roleName, String resourceGroupName, Context context) { + return beginDeleteAsync(deviceName, roleName, resourceGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String deviceName, String roleName, String resourceGroupName) { + deleteAsync(deviceName, roleName, resourceGroupName).block(); + } + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String deviceName, String roleName, String resourceGroupName, Context context) { + deleteAsync(deviceName, roleName, resourceGroupName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringConfigsImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringConfigsImpl.java new file mode 100644 index 0000000000000..7f37b5c5ac86f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringConfigsImpl.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.MonitoringConfigsClient; +import com.azure.resourcemanager.databoxedge.fluent.models.MonitoringMetricConfigurationInner; +import com.azure.resourcemanager.databoxedge.models.MonitoringConfigs; +import com.azure.resourcemanager.databoxedge.models.MonitoringMetricConfiguration; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class MonitoringConfigsImpl implements MonitoringConfigs { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitoringConfigsImpl.class); + + private final MonitoringConfigsClient innerClient; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + public MonitoringConfigsImpl( + MonitoringConfigsClient innerClient, com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list( + String deviceName, String roleName, String resourceGroupName) { + PagedIterable inner = + this.serviceClient().list(deviceName, roleName, resourceGroupName); + return Utils.mapPage(inner, inner1 -> new MonitoringMetricConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable list( + String deviceName, String roleName, String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().list(deviceName, roleName, resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new MonitoringMetricConfigurationImpl(inner1, this.manager())); + } + + public MonitoringMetricConfiguration get(String deviceName, String roleName, String resourceGroupName) { + MonitoringMetricConfigurationInner inner = this.serviceClient().get(deviceName, roleName, resourceGroupName); + if (inner != null) { + return new MonitoringMetricConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String deviceName, String roleName, String resourceGroupName, Context context) { + Response inner = + this.serviceClient().getWithResponse(deviceName, roleName, resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MonitoringMetricConfigurationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MonitoringMetricConfiguration createOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration) { + MonitoringMetricConfigurationInner inner = + this.serviceClient().createOrUpdate(deviceName, roleName, resourceGroupName, monitoringMetricConfiguration); + if (inner != null) { + return new MonitoringMetricConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public MonitoringMetricConfiguration createOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration, + Context context) { + MonitoringMetricConfigurationInner inner = + this + .serviceClient() + .createOrUpdate(deviceName, roleName, resourceGroupName, monitoringMetricConfiguration, context); + if (inner != null) { + return new MonitoringMetricConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String deviceName, String roleName, String resourceGroupName) { + this.serviceClient().delete(deviceName, roleName, resourceGroupName); + } + + public void delete(String deviceName, String roleName, String resourceGroupName, Context context) { + this.serviceClient().delete(deviceName, roleName, resourceGroupName, context); + } + + private MonitoringConfigsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringMetricConfigurationImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringMetricConfigurationImpl.java new file mode 100644 index 0000000000000..b20fb9a92a83f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringMetricConfigurationImpl.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.databoxedge.fluent.models.MonitoringMetricConfigurationInner; +import com.azure.resourcemanager.databoxedge.models.MetricConfiguration; +import com.azure.resourcemanager.databoxedge.models.MonitoringMetricConfiguration; +import java.util.Collections; +import java.util.List; + +public final class MonitoringMetricConfigurationImpl implements MonitoringMetricConfiguration { + private MonitoringMetricConfigurationInner innerObject; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + MonitoringMetricConfigurationImpl( + MonitoringMetricConfigurationInner innerObject, + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public List metricConfigurations() { + List inner = this.innerModel().metricConfigurations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public MonitoringMetricConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/NetworkSettingsImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/NetworkSettingsImpl.java index 6c074033a324b..16adc2cfa260e 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/NetworkSettingsImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/NetworkSettingsImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.NetworkSettingsInner; import com.azure.resourcemanager.databoxedge.models.NetworkAdapter; import com.azure.resourcemanager.databoxedge.models.NetworkSettings; @@ -33,6 +34,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public List networkAdapters() { List inner = this.innerModel().networkAdapters(); if (inner != null) { diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/NodesClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/NodesClientImpl.java index b7f42114ba7a1..ed7c01ac15853 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/NodesClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/NodesClientImpl.java @@ -72,6 +72,16 @@ Mono> listByDataBoxEdgeDevice( @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDataBoxEdgeDeviceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); } /** @@ -122,7 +132,12 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( .>map( res -> new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -173,7 +188,12 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( .map( res -> new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } /** @@ -188,7 +208,9 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, String resourceGroupName) { - return new PagedFlux<>(() -> listByDataBoxEdgeDeviceSinglePageAsync(deviceName, resourceGroupName)); + return new PagedFlux<>( + () -> listByDataBoxEdgeDeviceSinglePageAsync(deviceName, resourceGroupName), + nextLink -> listByDataBoxEdgeDeviceNextSinglePageAsync(nextLink)); } /** @@ -205,7 +227,9 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, Str @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( String deviceName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByDataBoxEdgeDeviceSinglePageAsync(deviceName, resourceGroupName, context)); + return new PagedFlux<>( + () -> listByDataBoxEdgeDeviceSinglePageAsync(deviceName, resourceGroupName, context), + nextLink -> listByDataBoxEdgeDeviceNextSinglePageAsync(nextLink, context)); } /** @@ -239,4 +263,77 @@ public PagedIterable listByDataBoxEdgeDevice( String deviceName, String resourceGroupName, Context context) { return new PagedIterable<>(listByDataBoxEdgeDeviceAsync(deviceName, resourceGroupName, context)); } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Nodes. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByDataBoxEdgeDeviceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Nodes. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByDataBoxEdgeDeviceNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationImpl.java index 55d451dd95a39..055b5d9798066 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationImpl.java @@ -23,6 +23,10 @@ public String name() { return this.innerModel().name(); } + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + public OperationDisplay display() { return this.innerModel().display(); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrderImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrderImpl.java index fc67d033c293c..cce9d91bdefc7 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrderImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrderImpl.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.OrderInner; import com.azure.resourcemanager.databoxedge.models.Address; import com.azure.resourcemanager.databoxedge.models.ContactDetails; import com.azure.resourcemanager.databoxedge.models.Order; import com.azure.resourcemanager.databoxedge.models.OrderStatus; +import com.azure.resourcemanager.databoxedge.models.ShipmentType; import com.azure.resourcemanager.databoxedge.models.TrackingInfo; import java.util.Collections; import java.util.List; @@ -35,6 +37,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public ContactDetails contactInformation() { return this.innerModel().contactInformation(); } @@ -78,6 +84,10 @@ public List returnTrackingInfo() { } } + public ShipmentType shipmentType() { + return this.innerModel().shipmentType(); + } + public OrderInner innerModel() { return this.innerObject; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrdersClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrdersClientImpl.java index e9fffd5940146..f7f5df3c5e13f 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrdersClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrdersClientImpl.java @@ -13,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -33,6 +34,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.databoxedge.fluent.OrdersClient; +import com.azure.resourcemanager.databoxedge.fluent.models.DCAccessCodeInner; import com.azure.resourcemanager.databoxedge.fluent.models.OrderInner; import com.azure.resourcemanager.databoxedge.models.OrderList; import java.nio.ByteBuffer; @@ -127,6 +129,21 @@ Mono>> delete( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/orders/default/listDCAccessCode") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDCAccessCode( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -950,6 +967,155 @@ public void delete(String deviceName, String resourceGroupName, Context context) deleteAsync(deviceName, resourceGroupName, context).block(); } + /** + * Gets the DCAccess Code. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DCAccess Code. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDCAccessCodeWithResponseAsync( + String deviceName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listDCAccessCode( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the DCAccess Code. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DCAccess Code. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDCAccessCodeWithResponseAsync( + String deviceName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listDCAccessCode( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets the DCAccess Code. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DCAccess Code. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listDCAccessCodeAsync(String deviceName, String resourceGroupName) { + return listDCAccessCodeWithResponseAsync(deviceName, resourceGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the DCAccess Code. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DCAccess Code. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DCAccessCodeInner listDCAccessCode(String deviceName, String resourceGroupName) { + return listDCAccessCodeAsync(deviceName, resourceGroupName).block(); + } + + /** + * Gets the DCAccess Code. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DCAccess Code. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listDCAccessCodeWithResponse( + String deviceName, String resourceGroupName, Context context) { + return listDCAccessCodeWithResponseAsync(deviceName, resourceGroupName, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrdersImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrdersImpl.java index 21a46ee61b671..f1abc00c2140c 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrdersImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrdersImpl.java @@ -10,7 +10,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.fluent.OrdersClient; +import com.azure.resourcemanager.databoxedge.fluent.models.DCAccessCodeInner; import com.azure.resourcemanager.databoxedge.fluent.models.OrderInner; +import com.azure.resourcemanager.databoxedge.models.DCAccessCode; import com.azure.resourcemanager.databoxedge.models.Order; import com.azure.resourcemanager.databoxedge.models.Orders; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -87,6 +89,30 @@ public void delete(String deviceName, String resourceGroupName, Context context) this.serviceClient().delete(deviceName, resourceGroupName, context); } + public DCAccessCode listDCAccessCode(String deviceName, String resourceGroupName) { + DCAccessCodeInner inner = this.serviceClient().listDCAccessCode(deviceName, resourceGroupName); + if (inner != null) { + return new DCAccessCodeImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listDCAccessCodeWithResponse( + String deviceName, String resourceGroupName, Context context) { + Response inner = + this.serviceClient().listDCAccessCodeWithResponse(deviceName, resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DCAccessCodeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + private OrdersClient serviceClient() { return this.innerClient; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/RoleImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/RoleImpl.java index 280fcda9d7ef5..b492c1b819ee0 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/RoleImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/RoleImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.RoleInner; import com.azure.resourcemanager.databoxedge.models.Role; @@ -29,6 +30,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public RoleInner innerModel() { return this.innerObject; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ShareImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ShareImpl.java index 6c18dafcb9077..8f8102dc13901 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ShareImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ShareImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.ShareInner; import com.azure.resourcemanager.databoxedge.models.AzureContainerInfo; @@ -36,6 +37,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String description() { return this.innerModel().description(); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SkusImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SkusImpl.java deleted file mode 100644 index 3c1882a1cafe5..0000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SkusImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databoxedge.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databoxedge.fluent.SkusClient; -import com.azure.resourcemanager.databoxedge.fluent.models.ResourceTypeSkuInner; -import com.azure.resourcemanager.databoxedge.models.ResourceTypeSku; -import com.azure.resourcemanager.databoxedge.models.Skus; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class SkusImpl implements Skus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkusImpl.class); - - private final SkusClient innerClient; - - private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; - - public SkusImpl(SkusClient innerClient, com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ResourceTypeSkuImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Context context) { - PagedIterable inner = this.serviceClient().list(filter, context); - return Utils.mapPage(inner, inner1 -> new ResourceTypeSkuImpl(inner1, this.manager())); - } - - private SkusClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialImpl.java index bfd8e11d56e8f..0e85828ceac9d 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.StorageAccountCredentialInner; import com.azure.resourcemanager.databoxedge.models.AccountType; @@ -29,6 +30,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String alias() { return this.innerModel().alias(); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountImpl.java index d7bad901d5c5d..66183462c5429 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.StorageAccountInner; import com.azure.resourcemanager.databoxedge.models.DataPolicy; @@ -27,6 +28,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String description() { return this.innerModel().description(); } @@ -146,6 +151,11 @@ public StorageAccount refresh(Context context) { return this; } + public StorageAccountImpl withDataPolicy(DataPolicy dataPolicy) { + this.innerModel().withDataPolicy(dataPolicy); + return this; + } + public StorageAccountImpl withDescription(String description) { this.innerModel().withDescription(description); return this; @@ -156,11 +166,6 @@ public StorageAccountImpl withStorageAccountStatus(StorageAccountStatus storageA return this; } - public StorageAccountImpl withDataPolicy(DataPolicy dataPolicy) { - this.innerModel().withDataPolicy(dataPolicy); - return this; - } - public StorageAccountImpl withStorageAccountCredentialId(String storageAccountCredentialId) { this.innerModel().withStorageAccountCredentialId(storageAccountCredentialId); return this; diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountsClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountsClientImpl.java index c5c1de48f611a..cba01e6fcff8b 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountsClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountsClientImpl.java @@ -143,7 +143,7 @@ Mono> listByDataBoxEdgeDeviceNext( } /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -200,7 +200,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePa } /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -255,7 +255,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePa } /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -272,7 +272,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String devic } /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -291,7 +291,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( } /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -306,7 +306,7 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceN } /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SupportPackagesClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SupportPackagesClientImpl.java new file mode 100644 index 0000000000000..0a3d17b54f82a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SupportPackagesClientImpl.java @@ -0,0 +1,362 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.databoxedge.fluent.SupportPackagesClient; +import com.azure.resourcemanager.databoxedge.models.TriggerSupportPackageRequest; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in SupportPackagesClient. */ +public final class SupportPackagesClientImpl implements SupportPackagesClient { + private final ClientLogger logger = new ClientLogger(SupportPackagesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final SupportPackagesService service; + + /** The service client containing this operation class. */ + private final DataBoxEdgeManagementClientImpl client; + + /** + * Initializes an instance of SupportPackagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SupportPackagesClientImpl(DataBoxEdgeManagementClientImpl client) { + this.service = + RestProxy.create(SupportPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataBoxEdgeManagementClientSupportPackages to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataBoxEdgeManagemen") + private interface SupportPackagesService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/triggerSupportPackage") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> triggerSupportPackage( + @HostParam("$host") String endpoint, + @PathParam("deviceName") String deviceName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") TriggerSupportPackageRequest triggerSupportPackageRequest, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> triggerSupportPackageWithResponseAsync( + String deviceName, String resourceGroupName, TriggerSupportPackageRequest triggerSupportPackageRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (triggerSupportPackageRequest == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter triggerSupportPackageRequest is required and cannot be null.")); + } else { + triggerSupportPackageRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .triggerSupportPackage( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + triggerSupportPackageRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> triggerSupportPackageWithResponseAsync( + String deviceName, + String resourceGroupName, + TriggerSupportPackageRequest triggerSupportPackageRequest, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (triggerSupportPackageRequest == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter triggerSupportPackageRequest is required and cannot be null.")); + } else { + triggerSupportPackageRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .triggerSupportPackage( + this.client.getEndpoint(), + deviceName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + triggerSupportPackageRequest, + accept, + context); + } + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginTriggerSupportPackageAsync( + String deviceName, String resourceGroupName, TriggerSupportPackageRequest triggerSupportPackageRequest) { + Mono>> mono = + triggerSupportPackageWithResponseAsync(deviceName, resourceGroupName, triggerSupportPackageRequest); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginTriggerSupportPackageAsync( + String deviceName, + String resourceGroupName, + TriggerSupportPackageRequest triggerSupportPackageRequest, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + triggerSupportPackageWithResponseAsync( + deviceName, resourceGroupName, triggerSupportPackageRequest, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginTriggerSupportPackage( + String deviceName, String resourceGroupName, TriggerSupportPackageRequest triggerSupportPackageRequest) { + return beginTriggerSupportPackageAsync(deviceName, resourceGroupName, triggerSupportPackageRequest) + .getSyncPoller(); + } + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginTriggerSupportPackage( + String deviceName, + String resourceGroupName, + TriggerSupportPackageRequest triggerSupportPackageRequest, + Context context) { + return beginTriggerSupportPackageAsync(deviceName, resourceGroupName, triggerSupportPackageRequest, context) + .getSyncPoller(); + } + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono triggerSupportPackageAsync( + String deviceName, String resourceGroupName, TriggerSupportPackageRequest triggerSupportPackageRequest) { + return beginTriggerSupportPackageAsync(deviceName, resourceGroupName, triggerSupportPackageRequest) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono triggerSupportPackageAsync( + String deviceName, + String resourceGroupName, + TriggerSupportPackageRequest triggerSupportPackageRequest, + Context context) { + return beginTriggerSupportPackageAsync(deviceName, resourceGroupName, triggerSupportPackageRequest, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void triggerSupportPackage( + String deviceName, String resourceGroupName, TriggerSupportPackageRequest triggerSupportPackageRequest) { + triggerSupportPackageAsync(deviceName, resourceGroupName, triggerSupportPackageRequest).block(); + } + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void triggerSupportPackage( + String deviceName, + String resourceGroupName, + TriggerSupportPackageRequest triggerSupportPackageRequest, + Context context) { + triggerSupportPackageAsync(deviceName, resourceGroupName, triggerSupportPackageRequest, context).block(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SupportPackagesImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SupportPackagesImpl.java new file mode 100644 index 0000000000000..2c765765d7242 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SupportPackagesImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.SupportPackagesClient; +import com.azure.resourcemanager.databoxedge.models.SupportPackages; +import com.azure.resourcemanager.databoxedge.models.TriggerSupportPackageRequest; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class SupportPackagesImpl implements SupportPackages { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SupportPackagesImpl.class); + + private final SupportPackagesClient innerClient; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + public SupportPackagesImpl( + SupportPackagesClient innerClient, com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void triggerSupportPackage( + String deviceName, String resourceGroupName, TriggerSupportPackageRequest triggerSupportPackageRequest) { + this.serviceClient().triggerSupportPackage(deviceName, resourceGroupName, triggerSupportPackageRequest); + } + + public void triggerSupportPackage( + String deviceName, + String resourceGroupName, + TriggerSupportPackageRequest triggerSupportPackageRequest, + Context context) { + this + .serviceClient() + .triggerSupportPackage(deviceName, resourceGroupName, triggerSupportPackageRequest, context); + } + + private SupportPackagesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggerImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggerImpl.java index 32887e6f7617c..e397c77effeaf 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggerImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggerImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.TriggerInner; import com.azure.resourcemanager.databoxedge.models.Trigger; @@ -29,6 +30,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public TriggerInner innerModel() { return this.innerObject; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UpdateSummaryImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UpdateSummaryImpl.java index 97e31e15efd16..25f4cc110b90b 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UpdateSummaryImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UpdateSummaryImpl.java @@ -4,8 +4,11 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.UpdateSummaryInner; import com.azure.resourcemanager.databoxedge.models.InstallRebootBehavior; +import com.azure.resourcemanager.databoxedge.models.JobStatus; +import com.azure.resourcemanager.databoxedge.models.UpdateDetails; import com.azure.resourcemanager.databoxedge.models.UpdateOperation; import com.azure.resourcemanager.databoxedge.models.UpdateSummary; import java.time.OffsetDateTime; @@ -35,6 +38,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String deviceVersionNumber() { return this.innerModel().deviceVersionNumber(); } @@ -51,14 +58,38 @@ public OffsetDateTime lastCompletedScanJobDateTime() { return this.innerModel().lastCompletedScanJobDateTime(); } + public OffsetDateTime lastSuccessfulScanJobTime() { + return this.innerModel().lastSuccessfulScanJobTime(); + } + public OffsetDateTime lastCompletedDownloadJobDateTime() { return this.innerModel().lastCompletedDownloadJobDateTime(); } + public String lastCompletedDownloadJobId() { + return this.innerModel().lastCompletedDownloadJobId(); + } + + public JobStatus lastDownloadJobStatus() { + return this.innerModel().lastDownloadJobStatus(); + } + + public OffsetDateTime lastSuccessfulInstallJobDateTime() { + return this.innerModel().lastSuccessfulInstallJobDateTime(); + } + public OffsetDateTime lastCompletedInstallJobDateTime() { return this.innerModel().lastCompletedInstallJobDateTime(); } + public String lastCompletedInstallJobId() { + return this.innerModel().lastCompletedInstallJobId(); + } + + public JobStatus lastInstallJobStatus() { + return this.innerModel().lastInstallJobStatus(); + } + public Integer totalNumberOfUpdatesAvailable() { return this.innerModel().totalNumberOfUpdatesAvailable(); } @@ -104,10 +135,23 @@ public List updateTitles() { } } + public List updates() { + List inner = this.innerModel().updates(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public Double totalUpdateSizeInBytes() { return this.innerModel().totalUpdateSizeInBytes(); } + public Integer totalTimeInMinutes() { + return this.innerModel().totalTimeInMinutes(); + } + public UpdateSummaryInner innerModel() { return this.innerObject; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UserImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UserImpl.java index 9bfa8220558a1..fa2ceefdceb28 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UserImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UserImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.UserInner; import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; @@ -30,6 +31,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public AsymmetricEncryptedSecret encryptedPassword() { return this.innerModel().encryptedPassword(); } @@ -150,9 +155,4 @@ public UserImpl withEncryptedPassword(AsymmetricEncryptedSecret encryptedPasswor this.innerModel().withEncryptedPassword(encryptedPassword); return this; } - - public UserImpl withShareAccessRights(List shareAccessRights) { - this.innerModel().withShareAccessRights(shareAccessRights); - return this; - } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UsersClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UsersClientImpl.java index 8992b1db93da5..8829679ce5813 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UsersClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UsersClientImpl.java @@ -147,7 +147,7 @@ Mono> listByDataBoxEdgeDeviceNext( * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -206,7 +206,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -263,7 +263,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -300,7 +300,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, Str * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -336,7 +336,7 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, Strin * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AccessLevel.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AccessLevel.java new file mode 100644 index 0000000000000..a851c997c2ae1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AccessLevel.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AccessLevel. */ +public final class AccessLevel extends ExpandableStringEnum { + /** Static value None for AccessLevel. */ + public static final AccessLevel NONE = fromString("None"); + + /** Static value ReadOnly for AccessLevel. */ + public static final AccessLevel READ_ONLY = fromString("ReadOnly"); + + /** Static value ReadWrite for AccessLevel. */ + public static final AccessLevel READ_WRITE = fromString("ReadWrite"); + + /** Static value FullAccess for AccessLevel. */ + public static final AccessLevel FULL_ACCESS = fromString("FullAccess"); + + /** + * Creates or finds a AccessLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding AccessLevel. + */ + @JsonCreator + public static AccessLevel fromString(String name) { + return fromString(name, AccessLevel.class); + } + + /** @return known AccessLevel values. */ + public static Collection values() { + return values(AccessLevel.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Addon.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Addon.java new file mode 100644 index 0000000000000..e8117c2699385 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Addon.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.databoxedge.fluent.models.AddonInner; + +/** An immutable client-side representation of Addon. */ +public interface Addon { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Addon type. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.AddonInner object. + * + * @return the inner object. + */ + AddonInner innerModel(); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonList.java new file mode 100644 index 0000000000000..0b98d3be1d192 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonList.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.models.AddonInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of all the Role addon on the Azure Stack Edge device. */ +@Immutable +public final class AddonList { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AddonList.class); + + /* + * The Value. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the value property: The Value. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonState.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonState.java new file mode 100644 index 0000000000000..43294e4bfc00b --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonState.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AddonState. */ +public final class AddonState extends ExpandableStringEnum { + /** Static value Invalid for AddonState. */ + public static final AddonState INVALID = fromString("Invalid"); + + /** Static value Creating for AddonState. */ + public static final AddonState CREATING = fromString("Creating"); + + /** Static value Created for AddonState. */ + public static final AddonState CREATED = fromString("Created"); + + /** Static value Updating for AddonState. */ + public static final AddonState UPDATING = fromString("Updating"); + + /** Static value Reconfiguring for AddonState. */ + public static final AddonState RECONFIGURING = fromString("Reconfiguring"); + + /** Static value Failed for AddonState. */ + public static final AddonState FAILED = fromString("Failed"); + + /** Static value Deleting for AddonState. */ + public static final AddonState DELETING = fromString("Deleting"); + + /** + * Creates or finds a AddonState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AddonState. + */ + @JsonCreator + public static AddonState fromString(String name) { + return fromString(name, AddonState.class); + } + + /** @return known AddonState values. */ + public static Collection values() { + return values(AddonState.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonType.java new file mode 100644 index 0000000000000..c909571d55f5e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AddonType. */ +public final class AddonType extends ExpandableStringEnum { + /** Static value IotEdge for AddonType. */ + public static final AddonType IOT_EDGE = fromString("IotEdge"); + + /** Static value ArcForKubernetes for AddonType. */ + public static final AddonType ARC_FOR_KUBERNETES = fromString("ArcForKubernetes"); + + /** + * Creates or finds a AddonType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AddonType. + */ + @JsonCreator + public static AddonType fromString(String name) { + return fromString(name, AddonType.class); + } + + /** @return known AddonType values. */ + public static Collection values() { + return values(AddonType.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Addons.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Addons.java new file mode 100644 index 0000000000000..740fbe67b2ad0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Addons.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.AddonInner; + +/** Resource collection API of Addons. */ +public interface Addons { + /** + * Lists all the addons configured in the role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + PagedIterable listByRole(String deviceName, String roleName, String resourceGroupName); + + /** + * Lists all the addons configured in the role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of all the Role addon on the Azure Stack Edge device. + */ + PagedIterable listByRole(String deviceName, String roleName, String resourceGroupName, Context context); + + /** + * Gets a specific addon by name. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific addon by name. + */ + Addon get(String deviceName, String roleName, String addonName, String resourceGroupName); + + /** + * Gets a specific addon by name. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific addon by name. + */ + Response getWithResponse( + String deviceName, String roleName, String addonName, String resourceGroupName, Context context); + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + Addon createOrUpdate( + String deviceName, String roleName, String addonName, String resourceGroupName, AddonInner addon); + + /** + * Create or update a addon. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Addon. + */ + Addon createOrUpdate( + String deviceName, + String roleName, + String addonName, + String resourceGroupName, + AddonInner addon, + Context context); + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String deviceName, String roleName, String addonName, String resourceGroupName); + + /** + * Deletes the addon on the device. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String deviceName, String roleName, String addonName, String resourceGroupName, Context context); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Address.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Address.java index 182dc4b24e947..c1c89619c9c28 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Address.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Address.java @@ -17,7 +17,7 @@ public final class Address { /* * The address line1. */ - @JsonProperty(value = "addressLine1", required = true) + @JsonProperty(value = "addressLine1") private String addressLine1; /* @@ -35,19 +35,19 @@ public final class Address { /* * The postal code. */ - @JsonProperty(value = "postalCode", required = true) + @JsonProperty(value = "postalCode") private String postalCode; /* * The city name. */ - @JsonProperty(value = "city", required = true) + @JsonProperty(value = "city") private String city; /* * The state name. */ - @JsonProperty(value = "state", required = true) + @JsonProperty(value = "state") private String state; /* @@ -202,24 +202,6 @@ public Address withCountry(String country) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (addressLine1() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property addressLine1 in model Address")); - } - if (postalCode() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property postalCode in model Address")); - } - if (city() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property city in model Address")); - } - if (state() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property state in model Address")); - } if (country() == null) { throw logger .logExceptionAsError( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Alert.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Alert.java index 7e1f872b4d8de..c094d89fd4c39 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Alert.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Alert.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.AlertInner; import java.time.OffsetDateTime; import java.util.Map; @@ -31,6 +32,13 @@ public interface Alert { */ String type(); + /** + * Gets the systemData property: Alert generated in the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the title property: Alert title. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ArcAddon.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ArcAddon.java new file mode 100644 index 0000000000000..c46378933b1f2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ArcAddon.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.models.AddonInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Arc Addon. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("ArcForKubernetes") +@JsonFlatten +@Fluent +public class ArcAddon extends AddonInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ArcAddon.class); + + /* + * Arc resource subscription Id + */ + @JsonProperty(value = "properties.subscriptionId", required = true) + private String subscriptionId; + + /* + * Arc resource group name + */ + @JsonProperty(value = "properties.resourceGroupName", required = true) + private String resourceGroupName; + + /* + * Arc resource Name + */ + @JsonProperty(value = "properties.resourceName", required = true) + private String resourceName; + + /* + * Arc resource location + */ + @JsonProperty(value = "properties.resourceLocation", required = true) + private String resourceLocation; + + /* + * Arc resource version + */ + @JsonProperty(value = "properties.version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /* + * Host OS supported by the Arc addon. + */ + @JsonProperty(value = "properties.hostPlatform", access = JsonProperty.Access.WRITE_ONLY) + private PlatformType hostPlatform; + + /* + * Platform where the runtime is hosted. + */ + @JsonProperty(value = "properties.hostPlatformType", access = JsonProperty.Access.WRITE_ONLY) + private HostPlatformType hostPlatformType; + + /* + * Addon Provisioning State + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AddonState provisioningState; + + /** + * Get the subscriptionId property: Arc resource subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Arc resource subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ArcAddon object itself. + */ + public ArcAddon withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroupName property: Arc resource group name. + * + * @return the resourceGroupName value. + */ + public String resourceGroupName() { + return this.resourceGroupName; + } + + /** + * Set the resourceGroupName property: Arc resource group name. + * + * @param resourceGroupName the resourceGroupName value to set. + * @return the ArcAddon object itself. + */ + public ArcAddon withResourceGroupName(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + /** + * Get the resourceName property: Arc resource Name. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the resourceName property: Arc resource Name. + * + * @param resourceName the resourceName value to set. + * @return the ArcAddon object itself. + */ + public ArcAddon withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Get the resourceLocation property: Arc resource location. + * + * @return the resourceLocation value. + */ + public String resourceLocation() { + return this.resourceLocation; + } + + /** + * Set the resourceLocation property: Arc resource location. + * + * @param resourceLocation the resourceLocation value to set. + * @return the ArcAddon object itself. + */ + public ArcAddon withResourceLocation(String resourceLocation) { + this.resourceLocation = resourceLocation; + return this; + } + + /** + * Get the version property: Arc resource version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the hostPlatform property: Host OS supported by the Arc addon. + * + * @return the hostPlatform value. + */ + public PlatformType hostPlatform() { + return this.hostPlatform; + } + + /** + * Get the hostPlatformType property: Platform where the runtime is hosted. + * + * @return the hostPlatformType value. + */ + public HostPlatformType hostPlatformType() { + return this.hostPlatformType; + } + + /** + * Get the provisioningState property: Addon Provisioning State. + * + * @return the provisioningState value. + */ + public AddonState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (subscriptionId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property subscriptionId in model ArcAddon")); + } + if (resourceGroupName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property resourceGroupName in model ArcAddon")); + } + if (resourceName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property resourceName in model ArcAddon")); + } + if (resourceLocation() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property resourceLocation in model ArcAddon")); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Skus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AvailableSkus.java similarity index 70% rename from sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Skus.java rename to sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AvailableSkus.java index 1af91b41addcf..af85d8a54c88a 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Skus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AvailableSkus.java @@ -7,26 +7,25 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Skus. */ -public interface Skus { +/** Resource collection API of AvailableSkus. */ +public interface AvailableSkus { /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of SKU Information objects. */ - PagedIterable list(); + PagedIterable list(); /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * - * @param filter Specify $filter='location eq <location>' to filter on location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of SKU Information objects. */ - PagedIterable list(String filter, Context context); + PagedIterable list(Context context); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedule.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedule.java index bec185f0c8286..84318eebd2282 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedule.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedule.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.BandwidthScheduleInner; import java.util.List; @@ -31,6 +32,13 @@ public interface BandwidthSchedule { */ String type(); + /** + * Gets the systemData property: Bandwidth object related to ASE resource. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the start property: The start time of the schedule in UTC. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/CloudEdgeManagementRole.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/CloudEdgeManagementRole.java new file mode 100644 index 0000000000000..1cbd60d0dcfd8 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/CloudEdgeManagementRole.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.models.RoleInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** CloudEdgeManagementRole role. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("CloudEdgeManagement") +@JsonFlatten +@Fluent +public class CloudEdgeManagementRole extends RoleInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CloudEdgeManagementRole.class); + + /* + * Local Edge Management Status + */ + @JsonProperty(value = "properties.localManagementStatus", access = JsonProperty.Access.WRITE_ONLY) + private RoleStatus localManagementStatus; + + /* + * Edge Profile of the resource + */ + @JsonProperty(value = "properties.edgeProfile", access = JsonProperty.Access.WRITE_ONLY) + private EdgeProfile edgeProfile; + + /* + * Role status. + */ + @JsonProperty(value = "properties.roleStatus") + private RoleStatus roleStatus; + + /** + * Get the localManagementStatus property: Local Edge Management Status. + * + * @return the localManagementStatus value. + */ + public RoleStatus localManagementStatus() { + return this.localManagementStatus; + } + + /** + * Get the edgeProfile property: Edge Profile of the resource. + * + * @return the edgeProfile value. + */ + public EdgeProfile edgeProfile() { + return this.edgeProfile; + } + + /** + * Get the roleStatus property: Role status. + * + * @return the roleStatus value. + */ + public RoleStatus roleStatus() { + return this.roleStatus; + } + + /** + * Set the roleStatus property: Role status. + * + * @param roleStatus the roleStatus value to set. + * @return the CloudEdgeManagementRole object itself. + */ + public CloudEdgeManagementRole withRoleStatus(RoleStatus roleStatus) { + this.roleStatus = roleStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (edgeProfile() != null) { + edgeProfile().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/CniConfig.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/CniConfig.java new file mode 100644 index 0000000000000..7dd298683691b --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/CniConfig.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Cni configuration. */ +@Immutable +public final class CniConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CniConfig.class); + + /* + * Cni type + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * Cni version + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /* + * Pod Subnet + */ + @JsonProperty(value = "podSubnet", access = JsonProperty.Access.WRITE_ONLY) + private String podSubnet; + + /* + * Service subnet + */ + @JsonProperty(value = "serviceSubnet", access = JsonProperty.Access.WRITE_ONLY) + private String serviceSubnet; + + /** + * Get the type property: Cni type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the version property: Cni version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the podSubnet property: Pod Subnet. + * + * @return the podSubnet value. + */ + public String podSubnet() { + return this.podSubnet; + } + + /** + * Get the serviceSubnet property: Service subnet. + * + * @return the serviceSubnet value. + */ + public String serviceSubnet() { + return this.serviceSubnet; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ComputeResource.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ComputeResource.java new file mode 100644 index 0000000000000..88c0448d0e2a9 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ComputeResource.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Compute infrastructure Resource. */ +@Fluent +public final class ComputeResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputeResource.class); + + /* + * Processor count + */ + @JsonProperty(value = "processorCount", required = true) + private int processorCount; + + /* + * Memory in GB + */ + @JsonProperty(value = "memoryInGB", required = true) + private long memoryInGB; + + /** + * Get the processorCount property: Processor count. + * + * @return the processorCount value. + */ + public int processorCount() { + return this.processorCount; + } + + /** + * Set the processorCount property: Processor count. + * + * @param processorCount the processorCount value to set. + * @return the ComputeResource object itself. + */ + public ComputeResource withProcessorCount(int processorCount) { + this.processorCount = processorCount; + return this; + } + + /** + * Get the memoryInGB property: Memory in GB. + * + * @return the memoryInGB value. + */ + public long memoryInGB() { + return this.memoryInGB; + } + + /** + * Set the memoryInGB property: Memory in GB. + * + * @param memoryInGB the memoryInGB value to set. + * @return the ComputeResource object itself. + */ + public ComputeResource withMemoryInGB(long memoryInGB) { + this.memoryInGB = memoryInGB; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Container.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Container.java index 16bdbdc4cebce..a8e8af7b082a1 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Container.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Container.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.ContainerInner; import java.time.OffsetDateTime; @@ -31,6 +32,13 @@ public interface Container { */ String type(); + /** + * Gets the systemData property: Container in DataBoxEdge Resource. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the containerStatus property: Current status of the container. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DCAccessCode.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DCAccessCode.java new file mode 100644 index 0000000000000..7a7c187332a3f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DCAccessCode.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.resourcemanager.databoxedge.fluent.models.DCAccessCodeInner; + +/** An immutable client-side representation of DCAccessCode. */ +public interface DCAccessCode { + /** + * Gets the authCode property: DCAccess Code for the Self Managed shipment. + * + * @return the authCode value. + */ + String authCode(); + + /** + * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.DCAccessCodeInner object. + * + * @return the inner object. + */ + DCAccessCodeInner innerModel(); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDevice.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDevice.java index d89a15ec7d0b7..d0a0c7441d7a6 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDevice.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDevice.java @@ -6,6 +6,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceInner; import java.util.List; @@ -65,6 +66,34 @@ public interface DataBoxEdgeDevice { */ String etag(); + /** + * Gets the identity property: Msi identity of the resource. + * + * @return the identity value. + */ + ResourceIdentity identity(); + + /** + * Gets the kind property: The kind of the device. + * + * @return the kind value. + */ + DataBoxEdgeDeviceKind kind(); + + /** + * Gets the systemData property: DataBoxEdge Resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the systemDataPropertiesSystemData property: DataBoxEdge Device Properties. + * + * @return the systemDataPropertiesSystemData value. + */ + SystemData systemDataPropertiesSystemData(); + /** * Gets the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. * @@ -163,6 +192,27 @@ public interface DataBoxEdgeDevice { */ Integer nodeCount(); + /** + * Gets the resourceMoveDetails property: The details of the move operation on this resource. + * + * @return the resourceMoveDetails value. + */ + ResourceMoveDetails resourceMoveDetails(); + + /** + * Gets the edgeProfile property: The details of Edge Profile for this resource. + * + * @return the edgeProfile value. + */ + EdgeProfile edgeProfile(); + + /** + * Gets the dataResidency property: The details of data-residency related properties for this resource. + * + * @return the dataResidency value. + */ + DataResidency dataResidency(); + /** * Gets the region of the resource. * @@ -238,10 +288,10 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku, DefinitionStages.WithEtag, + DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithDataBoxEdgeDeviceStatus, - DefinitionStages.WithDescription, - DefinitionStages.WithModelDescription, - DefinitionStages.WithFriendlyName { + DefinitionStages.WithDataResidency { /** * Executes the create request. * @@ -289,45 +339,45 @@ interface WithEtag { */ WithCreate withEtag(String etag); } - /** The stage of the DataBoxEdgeDevice definition allowing to specify dataBoxEdgeDeviceStatus. */ - interface WithDataBoxEdgeDeviceStatus { + /** The stage of the DataBoxEdgeDevice definition allowing to specify identity. */ + interface WithIdentity { /** - * Specifies the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device.. + * Specifies the identity property: Msi identity of the resource. * - * @param dataBoxEdgeDeviceStatus The status of the Data Box Edge/Gateway device. + * @param identity Msi identity of the resource. * @return the next definition stage. */ - WithCreate withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus); + WithCreate withIdentity(ResourceIdentity identity); } - /** The stage of the DataBoxEdgeDevice definition allowing to specify description. */ - interface WithDescription { + /** The stage of the DataBoxEdgeDevice definition allowing to specify kind. */ + interface WithKind { /** - * Specifies the description property: The Description of the Data Box Edge/Gateway device.. + * Specifies the kind property: The kind of the device.. * - * @param description The Description of the Data Box Edge/Gateway device. + * @param kind The kind of the device. * @return the next definition stage. */ - WithCreate withDescription(String description); + WithCreate withKind(DataBoxEdgeDeviceKind kind); } - /** The stage of the DataBoxEdgeDevice definition allowing to specify modelDescription. */ - interface WithModelDescription { + /** The stage of the DataBoxEdgeDevice definition allowing to specify dataBoxEdgeDeviceStatus. */ + interface WithDataBoxEdgeDeviceStatus { /** - * Specifies the modelDescription property: The description of the Data Box Edge/Gateway device model.. + * Specifies the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device.. * - * @param modelDescription The description of the Data Box Edge/Gateway device model. + * @param dataBoxEdgeDeviceStatus The status of the Data Box Edge/Gateway device. * @return the next definition stage. */ - WithCreate withModelDescription(String modelDescription); + WithCreate withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus); } - /** The stage of the DataBoxEdgeDevice definition allowing to specify friendlyName. */ - interface WithFriendlyName { + /** The stage of the DataBoxEdgeDevice definition allowing to specify dataResidency. */ + interface WithDataResidency { /** - * Specifies the friendlyName property: The Data Box Edge/Gateway device name.. + * Specifies the dataResidency property: The details of data-residency related properties for this resource. * - * @param friendlyName The Data Box Edge/Gateway device name. + * @param dataResidency The details of data-residency related properties for this resource. * @return the next definition stage. */ - WithCreate withFriendlyName(String friendlyName); + WithCreate withDataResidency(DataResidency dataResidency); } } /** @@ -338,7 +388,7 @@ interface WithFriendlyName { DataBoxEdgeDevice.Update update(); /** The template for DataBoxEdgeDevice update. */ - interface Update extends UpdateStages.WithTags { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithEdgeProfile { /** * Executes the update request. * @@ -366,6 +416,26 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the DataBoxEdgeDevice update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Msi identity of the resource. + * + * @param identity Msi identity of the resource. + * @return the next definition stage. + */ + Update withIdentity(ResourceIdentity identity); + } + /** The stage of the DataBoxEdgeDevice update allowing to specify edgeProfile. */ + interface WithEdgeProfile { + /** + * Specifies the edgeProfile property: Edge Profile property of the Data Box Edge/Gateway device. + * + * @param edgeProfile Edge Profile property of the Data Box Edge/Gateway device. + * @return the next definition stage. + */ + Update withEdgeProfile(EdgeProfilePatch edgeProfile); + } } /** * Refreshes the resource to sync with Azure. @@ -401,22 +471,42 @@ interface WithTags { void downloadUpdates(Context context); /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Generates certificate for activation key. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return used in activation key generation flow. + */ + GenerateCertResponse generateCertificate(); + + /** + * Generates certificate for activation key. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used in activation key generation flow. + */ + Response generateCertificateWithResponse(Context context); + + /** + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ DataBoxEdgeDeviceExtendedInfo getExtendedInformation(); /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ Response getExtendedInformationWithResponse(Context context); @@ -456,6 +546,30 @@ interface WithTags { */ void scanForUpdates(Context context); + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param parameters The patch object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device. + */ + DataBoxEdgeDeviceExtendedInfo updateExtendedInformation(DataBoxEdgeDeviceExtendedInfoPatch parameters); + + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param parameters The patch object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device. + */ + Response updateExtendedInformationWithResponse( + DataBoxEdgeDeviceExtendedInfoPatch parameters, Context context); + /** * Uploads registration certificate for the device. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceExtendedInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceExtendedInfo.java index 3c5993c0bb9dc..ebe927879e6b7 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceExtendedInfo.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceExtendedInfo.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.databoxedge.models; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceExtendedInfoInner; +import java.util.Map; /** An immutable client-side representation of DataBoxEdgeDeviceExtendedInfo. */ public interface DataBoxEdgeDeviceExtendedInfo { @@ -51,6 +52,49 @@ public interface DataBoxEdgeDeviceExtendedInfo { */ String resourceKey(); + /** + * Gets the clientSecretStoreId property: The Key Vault ARM Id for client secrets. + * + * @return the clientSecretStoreId value. + */ + String clientSecretStoreId(); + + /** + * Gets the clientSecretStoreUrl property: The url to access the Client Key Vault. + * + * @return the clientSecretStoreUrl value. + */ + String clientSecretStoreUrl(); + + /** + * Gets the channelIntegrityKeyName property: The name of Channel Integrity Key stored in the Client Key Vault. + * + * @return the channelIntegrityKeyName value. + */ + String channelIntegrityKeyName(); + + /** + * Gets the channelIntegrityKeyVersion property: The version of Channel Integrity Key stored in the Client Key + * Vault. + * + * @return the channelIntegrityKeyVersion value. + */ + String channelIntegrityKeyVersion(); + + /** + * Gets the keyVaultSyncStatus property: Key vault sync status. + * + * @return the keyVaultSyncStatus value. + */ + KeyVaultSyncStatus keyVaultSyncStatus(); + + /** + * Gets the deviceSecrets property: Device secrets, will be returned only with ODataFilter $expand=deviceSecrets. + * + * @return the deviceSecrets value. + */ + Map deviceSecrets(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceExtendedInfoInner object. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceExtendedInfoPatch.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceExtendedInfoPatch.java new file mode 100644 index 0000000000000..f01d67b29c3a1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceExtendedInfoPatch.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Data Box Edge/Gateway device extended info patch. */ +@Fluent +public final class DataBoxEdgeDeviceExtendedInfoPatch { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxEdgeDeviceExtendedInfoPatch.class); + + /* + * The Key Vault ARM Id for client secrets + */ + @JsonProperty(value = "clientSecretStoreId") + private String clientSecretStoreId; + + /* + * The url to access the Client Key Vault + */ + @JsonProperty(value = "clientSecretStoreUrl") + private String clientSecretStoreUrl; + + /* + * The name for Channel Integrity Key stored in the Client Key Vault + */ + @JsonProperty(value = "channelIntegrityKeyName") + private String channelIntegrityKeyName; + + /* + * The version of Channel Integrity Key stored in the Client Key Vault + */ + @JsonProperty(value = "channelIntegrityKeyVersion") + private String channelIntegrityKeyVersion; + + /* + * For changing or to initiate the resync to key-vault set the status to + * KeyVaultSyncPending, rest of the status will not be applicable. + */ + @JsonProperty(value = "syncStatus") + private KeyVaultSyncStatus syncStatus; + + /** + * Get the clientSecretStoreId property: The Key Vault ARM Id for client secrets. + * + * @return the clientSecretStoreId value. + */ + public String clientSecretStoreId() { + return this.clientSecretStoreId; + } + + /** + * Set the clientSecretStoreId property: The Key Vault ARM Id for client secrets. + * + * @param clientSecretStoreId the clientSecretStoreId value to set. + * @return the DataBoxEdgeDeviceExtendedInfoPatch object itself. + */ + public DataBoxEdgeDeviceExtendedInfoPatch withClientSecretStoreId(String clientSecretStoreId) { + this.clientSecretStoreId = clientSecretStoreId; + return this; + } + + /** + * Get the clientSecretStoreUrl property: The url to access the Client Key Vault. + * + * @return the clientSecretStoreUrl value. + */ + public String clientSecretStoreUrl() { + return this.clientSecretStoreUrl; + } + + /** + * Set the clientSecretStoreUrl property: The url to access the Client Key Vault. + * + * @param clientSecretStoreUrl the clientSecretStoreUrl value to set. + * @return the DataBoxEdgeDeviceExtendedInfoPatch object itself. + */ + public DataBoxEdgeDeviceExtendedInfoPatch withClientSecretStoreUrl(String clientSecretStoreUrl) { + this.clientSecretStoreUrl = clientSecretStoreUrl; + return this; + } + + /** + * Get the channelIntegrityKeyName property: The name for Channel Integrity Key stored in the Client Key Vault. + * + * @return the channelIntegrityKeyName value. + */ + public String channelIntegrityKeyName() { + return this.channelIntegrityKeyName; + } + + /** + * Set the channelIntegrityKeyName property: The name for Channel Integrity Key stored in the Client Key Vault. + * + * @param channelIntegrityKeyName the channelIntegrityKeyName value to set. + * @return the DataBoxEdgeDeviceExtendedInfoPatch object itself. + */ + public DataBoxEdgeDeviceExtendedInfoPatch withChannelIntegrityKeyName(String channelIntegrityKeyName) { + this.channelIntegrityKeyName = channelIntegrityKeyName; + return this; + } + + /** + * Get the channelIntegrityKeyVersion property: The version of Channel Integrity Key stored in the Client Key Vault. + * + * @return the channelIntegrityKeyVersion value. + */ + public String channelIntegrityKeyVersion() { + return this.channelIntegrityKeyVersion; + } + + /** + * Set the channelIntegrityKeyVersion property: The version of Channel Integrity Key stored in the Client Key Vault. + * + * @param channelIntegrityKeyVersion the channelIntegrityKeyVersion value to set. + * @return the DataBoxEdgeDeviceExtendedInfoPatch object itself. + */ + public DataBoxEdgeDeviceExtendedInfoPatch withChannelIntegrityKeyVersion(String channelIntegrityKeyVersion) { + this.channelIntegrityKeyVersion = channelIntegrityKeyVersion; + return this; + } + + /** + * Get the syncStatus property: For changing or to initiate the resync to key-vault set the status to + * KeyVaultSyncPending, rest of the status will not be applicable. + * + * @return the syncStatus value. + */ + public KeyVaultSyncStatus syncStatus() { + return this.syncStatus; + } + + /** + * Set the syncStatus property: For changing or to initiate the resync to key-vault set the status to + * KeyVaultSyncPending, rest of the status will not be applicable. + * + * @param syncStatus the syncStatus value to set. + * @return the DataBoxEdgeDeviceExtendedInfoPatch object itself. + */ + public DataBoxEdgeDeviceExtendedInfoPatch withSyncStatus(KeyVaultSyncStatus syncStatus) { + this.syncStatus = syncStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceKind.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceKind.java new file mode 100644 index 0000000000000..f30ad9d7cf185 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceKind.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DataBoxEdgeDeviceKind. */ +public final class DataBoxEdgeDeviceKind extends ExpandableStringEnum { + /** Static value AzureDataBoxGateway for DataBoxEdgeDeviceKind. */ + public static final DataBoxEdgeDeviceKind AZURE_DATA_BOX_GATEWAY = fromString("AzureDataBoxGateway"); + + /** Static value AzureStackEdge for DataBoxEdgeDeviceKind. */ + public static final DataBoxEdgeDeviceKind AZURE_STACK_EDGE = fromString("AzureStackEdge"); + + /** Static value AzureStackHub for DataBoxEdgeDeviceKind. */ + public static final DataBoxEdgeDeviceKind AZURE_STACK_HUB = fromString("AzureStackHub"); + + /** Static value AzureModularDataCentre for DataBoxEdgeDeviceKind. */ + public static final DataBoxEdgeDeviceKind AZURE_MODULAR_DATA_CENTRE = fromString("AzureModularDataCentre"); + + /** + * Creates or finds a DataBoxEdgeDeviceKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataBoxEdgeDeviceKind. + */ + @JsonCreator + public static DataBoxEdgeDeviceKind fromString(String name) { + return fromString(name, DataBoxEdgeDeviceKind.class); + } + + /** @return known DataBoxEdgeDeviceKind values. */ + public static Collection values() { + return values(DataBoxEdgeDeviceKind.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDevicePatch.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDevicePatch.java index ab437d4707f9d..44935b09d23d5 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDevicePatch.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDevicePatch.java @@ -5,22 +5,38 @@ package com.azure.resourcemanager.databoxedge.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** The Data Box Edge/Gateway device patch. */ +@JsonFlatten @Fluent -public final class DataBoxEdgeDevicePatch { +public class DataBoxEdgeDevicePatch { @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxEdgeDevicePatch.class); /* * The tags attached to the Data Box Edge/Gateway resource. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /* + * Msi identity of the resource + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /* + * Edge Profile property of the Data Box Edge/Gateway device + */ + @JsonProperty(value = "properties.edgeProfile") + private EdgeProfilePatch edgeProfile; + /** * Get the tags property: The tags attached to the Data Box Edge/Gateway resource. * @@ -41,11 +57,57 @@ public DataBoxEdgeDevicePatch withTags(Map tags) { return this; } + /** + * Get the identity property: Msi identity of the resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Msi identity of the resource. + * + * @param identity the identity value to set. + * @return the DataBoxEdgeDevicePatch object itself. + */ + public DataBoxEdgeDevicePatch withIdentity(ResourceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the edgeProfile property: Edge Profile property of the Data Box Edge/Gateway device. + * + * @return the edgeProfile value. + */ + public EdgeProfilePatch edgeProfile() { + return this.edgeProfile; + } + + /** + * Set the edgeProfile property: Edge Profile property of the Data Box Edge/Gateway device. + * + * @param edgeProfile the edgeProfile value to set. + * @return the DataBoxEdgeDevicePatch object itself. + */ + public DataBoxEdgeDevicePatch withEdgeProfile(EdgeProfilePatch edgeProfile) { + this.edgeProfile = edgeProfile; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } + if (edgeProfile() != null) { + edgeProfile().validate(); + } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceTypeSku.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeSku.java similarity index 52% rename from sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceTypeSku.java rename to sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeSku.java index 9812b27f45da6..3eb6d458f43e2 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceTypeSku.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeSku.java @@ -4,11 +4,11 @@ package com.azure.resourcemanager.databoxedge.models; -import com.azure.resourcemanager.databoxedge.fluent.models.ResourceTypeSkuInner; +import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeSkuInner; import java.util.List; -/** An immutable client-side representation of ResourceTypeSku. */ -public interface ResourceTypeSku { +/** An immutable client-side representation of DataBoxEdgeSku. */ +public interface DataBoxEdgeSku { /** * Gets the resourceType property: The type of the resource. * @@ -37,6 +37,13 @@ public interface ResourceTypeSku { */ SkuTier tier(); + /** + * Gets the size property: The Sku kind. + * + * @return the size value. + */ + String size(); + /** * Gets the family property: The Sku family. * @@ -45,21 +52,21 @@ public interface ResourceTypeSku { String family(); /** - * Gets the locations property: Availability of the SKU for the region. + * Gets the locations property: Availability of the Sku for the region. * * @return the locations value. */ List locations(); /** - * Gets the apiVersions property: The API versions in which SKU is available. + * Gets the apiVersions property: The API versions in which Sku is available. * * @return the apiVersions value. */ List apiVersions(); /** - * Gets the locationInfo property: Availability of the SKU for the location/zone. + * Gets the locationInfo property: Availability of the Sku for the location/zone/site. * * @return the locationInfo value. */ @@ -73,16 +80,44 @@ public interface ResourceTypeSku { List costs(); /** - * Gets the restrictions property: Restrictions of the SKU availability. + * Gets the signupOption property: Sku can be signed up by customer or not. + * + * @return the signupOption value. + */ + SkuSignupOption signupOption(); + + /** + * Gets the version property: Availability of the Sku as preview/stable. + * + * @return the version value. + */ + SkuVersion version(); + + /** + * Gets the availability property: Links to the next set of results. + * + * @return the availability value. + */ + SkuAvailability availability(); + + /** + * Gets the shipmentTypes property: List of Shipment Types supported by this SKU. + * + * @return the shipmentTypes value. + */ + List shipmentTypes(); + + /** + * Gets the capabilities property: The capability info of the SKU. * - * @return the restrictions value. + * @return the capabilities value. */ - List restrictions(); + List capabilities(); /** - * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.ResourceTypeSkuInner object. + * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeSkuInner object. * * @return the inner object. */ - ResourceTypeSkuInner innerModel(); + DataBoxEdgeSkuInner innerModel(); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuInformationList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeSkuList.java similarity index 85% rename from sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuInformationList.java rename to sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeSkuList.java index 08c1420a730fc..c410b059ddc25 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuInformationList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeSkuList.java @@ -6,21 +6,21 @@ import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databoxedge.fluent.models.ResourceTypeSkuInner; +import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeSkuInner; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of SKU Information objects. */ @Immutable -public final class SkuInformationList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuInformationList.class); +public final class DataBoxEdgeSkuList { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxEdgeSkuList.class); /* * List of ResourceType Sku */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; + private List value; /* * Links to the next set of results @@ -33,7 +33,7 @@ public final class SkuInformationList { * * @return the value value. */ - public List value() { + public List value() { return this.value; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataResidency.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataResidency.java new file mode 100644 index 0000000000000..cbb90a49eeb01 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataResidency.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Wraps data-residency related information for edge-resource and this should be used with ARM layer. */ +@Fluent +public final class DataResidency { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataResidency.class); + + /* + * DataResidencyType enum + */ + @JsonProperty(value = "type") + private DataResidencyType type; + + /** + * Get the type property: DataResidencyType enum. + * + * @return the type value. + */ + public DataResidencyType type() { + return this.type; + } + + /** + * Set the type property: DataResidencyType enum. + * + * @param type the type value to set. + * @return the DataResidency object itself. + */ + public DataResidency withType(DataResidencyType type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataResidencyType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataResidencyType.java new file mode 100644 index 0000000000000..71c637c6ad43f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataResidencyType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DataResidencyType. */ +public final class DataResidencyType extends ExpandableStringEnum { + /** Static value GeoZoneReplication for DataResidencyType. */ + public static final DataResidencyType GEO_ZONE_REPLICATION = fromString("GeoZoneReplication"); + + /** Static value ZoneReplication for DataResidencyType. */ + public static final DataResidencyType ZONE_REPLICATION = fromString("ZoneReplication"); + + /** + * Creates or finds a DataResidencyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataResidencyType. + */ + @JsonCreator + public static DataResidencyType fromString(String name) { + return fromString(name, DataResidencyType.class); + } + + /** @return known DataResidencyType values. */ + public static Collection values() { + return values(DataResidencyType.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Devices.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Devices.java index a5cd9893b45e3..86089fcda1f74 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Devices.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Devices.java @@ -130,19 +130,45 @@ Response getByResourceGroupWithResponse( void downloadUpdates(String deviceName, String resourceGroupName, Context context); /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Generates certificate for activation key. * * @param deviceName The device name. * @param resourceGroupName The resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return used in activation key generation flow. + */ + GenerateCertResponse generateCertificate(String deviceName, String resourceGroupName); + + /** + * Generates certificate for activation key. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used in activation key generation flow. + */ + Response generateCertificateWithResponse( + String deviceName, String resourceGroupName, Context context); + + /** + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ DataBoxEdgeDeviceExtendedInfo getExtendedInformation(String deviceName, String resourceGroupName); /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -150,7 +176,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ Response getExtendedInformationWithResponse( String deviceName, String resourceGroupName, Context context); @@ -253,6 +279,35 @@ Response getNetworkSettingsWithResponse( void createOrUpdateSecuritySettings( String deviceName, String resourceGroupName, SecuritySettings securitySettings, Context context); + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The patch object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device. + */ + DataBoxEdgeDeviceExtendedInfo updateExtendedInformation( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters); + + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The patch object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device. + */ + Response updateExtendedInformationWithResponse( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters, Context context); + /** * Gets information about the availability of updates based on the last scan of the device. It also gets information * about any ongoing download or install jobs on the device. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DiagnosticProactiveLogCollectionSettings.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DiagnosticProactiveLogCollectionSettings.java new file mode 100644 index 0000000000000..d6dfe40e43020 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DiagnosticProactiveLogCollectionSettings.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticProactiveLogCollectionSettingsInner; + +/** An immutable client-side representation of DiagnosticProactiveLogCollectionSettings. */ +public interface DiagnosticProactiveLogCollectionSettings { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: DiagnosticProactiveLogCollectionSettings. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the userConsent property: Proactive diagnostic collection consent flag. + * + * @return the userConsent value. + */ + ProactiveDiagnosticsConsent userConsent(); + + /** + * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticProactiveLogCollectionSettingsInner + * object. + * + * @return the inner object. + */ + DiagnosticProactiveLogCollectionSettingsInner innerModel(); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DiagnosticRemoteSupportSettings.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DiagnosticRemoteSupportSettings.java new file mode 100644 index 0000000000000..093bf38f9a0a4 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DiagnosticRemoteSupportSettings.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticRemoteSupportSettingsInner; +import java.util.List; + +/** An immutable client-side representation of DiagnosticRemoteSupportSettings. */ +public interface DiagnosticRemoteSupportSettings { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: DiagnosticRemoteSupportSettings. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the remoteSupportSettingsList property: Remote support settings list according to the RemoteApplicationType. + * + * @return the remoteSupportSettingsList value. + */ + List remoteSupportSettingsList(); + + /** + * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticRemoteSupportSettingsInner object. + * + * @return the inner object. + */ + DiagnosticRemoteSupportSettingsInner innerModel(); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DiagnosticSettings.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DiagnosticSettings.java new file mode 100644 index 0000000000000..74cbb55bb40d3 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DiagnosticSettings.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticProactiveLogCollectionSettingsInner; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticRemoteSupportSettingsInner; + +/** Resource collection API of DiagnosticSettings. */ +public interface DiagnosticSettings { + /** + * Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + */ + DiagnosticProactiveLogCollectionSettings getDiagnosticProactiveLogCollectionSettings( + String deviceName, String resourceGroupName); + + /** + * Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + */ + Response getDiagnosticProactiveLogCollectionSettingsWithResponse( + String deviceName, String resourceGroupName, Context context); + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + DiagnosticProactiveLogCollectionSettings updateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings); + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic proactive log collection settings of a device. + */ + DiagnosticProactiveLogCollectionSettings updateDiagnosticProactiveLogCollectionSettings( + String deviceName, + String resourceGroupName, + DiagnosticProactiveLogCollectionSettingsInner proactiveLogCollectionSettings, + Context context); + + /** + * Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + */ + DiagnosticRemoteSupportSettings getDiagnosticRemoteSupportSettings(String deviceName, String resourceGroupName); + + /** + * Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + */ + Response getDiagnosticRemoteSupportSettingsWithResponse( + String deviceName, String resourceGroupName, Context context); + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + DiagnosticRemoteSupportSettings updateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings); + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the remote support settings of a device. + */ + DiagnosticRemoteSupportSettings updateDiagnosticRemoteSupportSettings( + String deviceName, + String resourceGroupName, + DiagnosticRemoteSupportSettingsInner diagnosticRemoteSupportSettings, + Context context); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfile.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfile.java new file mode 100644 index 0000000000000..86b27378cf5b0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfile.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details about Edge Profile for the resource. */ +@Fluent +public final class EdgeProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EdgeProfile.class); + + /* + * Edge Profile Subscription + */ + @JsonProperty(value = "subscription") + private EdgeProfileSubscription subscription; + + /** + * Get the subscription property: Edge Profile Subscription. + * + * @return the subscription value. + */ + public EdgeProfileSubscription subscription() { + return this.subscription; + } + + /** + * Set the subscription property: Edge Profile Subscription. + * + * @param subscription the subscription value to set. + * @return the EdgeProfile object itself. + */ + public EdgeProfile withSubscription(EdgeProfileSubscription subscription) { + this.subscription = subscription; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subscription() != null) { + subscription().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfilePatch.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfilePatch.java new file mode 100644 index 0000000000000..1f7cc532ca396 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfilePatch.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Data Box Edge/Gateway Edge Profile patch. */ +@Fluent +public final class EdgeProfilePatch { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EdgeProfilePatch.class); + + /* + * The Data Box Edge/Gateway Edge Profile Subscription patch + */ + @JsonProperty(value = "subscription") + private EdgeProfileSubscriptionPatch subscription; + + /** + * Get the subscription property: The Data Box Edge/Gateway Edge Profile Subscription patch. + * + * @return the subscription value. + */ + public EdgeProfileSubscriptionPatch subscription() { + return this.subscription; + } + + /** + * Set the subscription property: The Data Box Edge/Gateway Edge Profile Subscription patch. + * + * @param subscription the subscription value to set. + * @return the EdgeProfilePatch object itself. + */ + public EdgeProfilePatch withSubscription(EdgeProfileSubscriptionPatch subscription) { + this.subscription = subscription; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subscription() != null) { + subscription().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfileSubscription.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfileSubscription.java new file mode 100644 index 0000000000000..4565c44521813 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfileSubscription.java @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Subscription details for the Edge Profile. */ +@JsonFlatten +@Fluent +public class EdgeProfileSubscription { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EdgeProfileSubscription.class); + + /* + * Edge Subscription Registration ID + */ + @JsonProperty(value = "registrationId") + private String registrationId; + + /* + * ARM ID of the subscription + */ + @JsonProperty(value = "id") + private String id; + + /* + * The state property. + */ + @JsonProperty(value = "state") + private SubscriptionState state; + + /* + * The registrationDate property. + */ + @JsonProperty(value = "registrationDate") + private String registrationDate; + + /* + * The subscriptionId property. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * The tenantId property. + */ + @JsonProperty(value = "properties.tenantId") + private String tenantId; + + /* + * The locationPlacementId property. + */ + @JsonProperty(value = "properties.locationPlacementId") + private String locationPlacementId; + + /* + * The quotaId property. + */ + @JsonProperty(value = "properties.quotaId") + private String quotaId; + + /* + * The serializedDetails property. + */ + @JsonProperty(value = "properties.serializedDetails") + private String serializedDetails; + + /* + * The registeredFeatures property. + */ + @JsonProperty(value = "properties.registeredFeatures") + private List registeredFeatures; + + /** + * Get the registrationId property: Edge Subscription Registration ID. + * + * @return the registrationId value. + */ + public String registrationId() { + return this.registrationId; + } + + /** + * Set the registrationId property: Edge Subscription Registration ID. + * + * @param registrationId the registrationId value to set. + * @return the EdgeProfileSubscription object itself. + */ + public EdgeProfileSubscription withRegistrationId(String registrationId) { + this.registrationId = registrationId; + return this; + } + + /** + * Get the id property: ARM ID of the subscription. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: ARM ID of the subscription. + * + * @param id the id value to set. + * @return the EdgeProfileSubscription object itself. + */ + public EdgeProfileSubscription withId(String id) { + this.id = id; + return this; + } + + /** + * Get the state property: The state property. + * + * @return the state value. + */ + public SubscriptionState state() { + return this.state; + } + + /** + * Set the state property: The state property. + * + * @param state the state value to set. + * @return the EdgeProfileSubscription object itself. + */ + public EdgeProfileSubscription withState(SubscriptionState state) { + this.state = state; + return this; + } + + /** + * Get the registrationDate property: The registrationDate property. + * + * @return the registrationDate value. + */ + public String registrationDate() { + return this.registrationDate; + } + + /** + * Set the registrationDate property: The registrationDate property. + * + * @param registrationDate the registrationDate value to set. + * @return the EdgeProfileSubscription object itself. + */ + public EdgeProfileSubscription withRegistrationDate(String registrationDate) { + this.registrationDate = registrationDate; + return this; + } + + /** + * Get the subscriptionId property: The subscriptionId property. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscriptionId property. + * + * @param subscriptionId the subscriptionId value to set. + * @return the EdgeProfileSubscription object itself. + */ + public EdgeProfileSubscription withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the tenantId property: The tenantId property. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenantId property. + * + * @param tenantId the tenantId value to set. + * @return the EdgeProfileSubscription object itself. + */ + public EdgeProfileSubscription withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the locationPlacementId property: The locationPlacementId property. + * + * @return the locationPlacementId value. + */ + public String locationPlacementId() { + return this.locationPlacementId; + } + + /** + * Set the locationPlacementId property: The locationPlacementId property. + * + * @param locationPlacementId the locationPlacementId value to set. + * @return the EdgeProfileSubscription object itself. + */ + public EdgeProfileSubscription withLocationPlacementId(String locationPlacementId) { + this.locationPlacementId = locationPlacementId; + return this; + } + + /** + * Get the quotaId property: The quotaId property. + * + * @return the quotaId value. + */ + public String quotaId() { + return this.quotaId; + } + + /** + * Set the quotaId property: The quotaId property. + * + * @param quotaId the quotaId value to set. + * @return the EdgeProfileSubscription object itself. + */ + public EdgeProfileSubscription withQuotaId(String quotaId) { + this.quotaId = quotaId; + return this; + } + + /** + * Get the serializedDetails property: The serializedDetails property. + * + * @return the serializedDetails value. + */ + public String serializedDetails() { + return this.serializedDetails; + } + + /** + * Set the serializedDetails property: The serializedDetails property. + * + * @param serializedDetails the serializedDetails value to set. + * @return the EdgeProfileSubscription object itself. + */ + public EdgeProfileSubscription withSerializedDetails(String serializedDetails) { + this.serializedDetails = serializedDetails; + return this; + } + + /** + * Get the registeredFeatures property: The registeredFeatures property. + * + * @return the registeredFeatures value. + */ + public List registeredFeatures() { + return this.registeredFeatures; + } + + /** + * Set the registeredFeatures property: The registeredFeatures property. + * + * @param registeredFeatures the registeredFeatures value to set. + * @return the EdgeProfileSubscription object itself. + */ + public EdgeProfileSubscription withRegisteredFeatures(List registeredFeatures) { + this.registeredFeatures = registeredFeatures; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (registeredFeatures() != null) { + registeredFeatures().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfileSubscriptionPatch.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfileSubscriptionPatch.java new file mode 100644 index 0000000000000..10f9d4ff9d990 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfileSubscriptionPatch.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Data Box Edge/Gateway Edge Profile Subscription patch. */ +@Fluent +public final class EdgeProfileSubscriptionPatch { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EdgeProfileSubscriptionPatch.class); + + /* + * The path ID that uniquely identifies the subscription of the edge + * profile. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the id property: The path ID that uniquely identifies the subscription of the edge profile. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The path ID that uniquely identifies the subscription of the edge profile. + * + * @param id the id value to set. + * @return the EdgeProfileSubscriptionPatch object itself. + */ + public EdgeProfileSubscriptionPatch withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestrictionInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EtcdInfo.java similarity index 51% rename from sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestrictionInfo.java rename to sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EtcdInfo.java index 74d76c8f4687b..c04daac3deb64 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestrictionInfo.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EtcdInfo.java @@ -8,41 +8,40 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -/** The restriction info with locations and zones. */ +/** Etcd configuration. */ @Immutable -public final class SkuRestrictionInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuRestrictionInfo.class); +public final class EtcdInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EtcdInfo.class); /* - * The locations. + * Etcd type */ - @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) - private List locations; + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; /* - * The zones. + * Etcd version */ - @JsonProperty(value = "zones", access = JsonProperty.Access.WRITE_ONLY) - private List zones; + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; /** - * Get the locations property: The locations. + * Get the type property: Etcd type. * - * @return the locations value. + * @return the type value. */ - public List locations() { - return this.locations; + public String type() { + return this.type; } /** - * Get the zones property: The zones. + * Get the version property: Etcd version. * - * @return the zones value. + * @return the version value. */ - public List zones() { - return this.zones; + public String version() { + return this.version; } /** diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/GenerateCertResponse.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/GenerateCertResponse.java new file mode 100644 index 0000000000000..e6cb1ac69734a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/GenerateCertResponse.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.resourcemanager.databoxedge.fluent.models.GenerateCertResponseInner; + +/** An immutable client-side representation of GenerateCertResponse. */ +public interface GenerateCertResponse { + /** + * Gets the publicKey property: Gets or sets base64 encoded certificate raw data, this is the public part needed to + * be uploaded to cert vault. + * + * @return the publicKey value. + */ + String publicKey(); + + /** + * Gets the privateKey property: Gets or sets base64 encoded private part of the certificate, needed to form the + * activation key. + * + * @return the privateKey value. + */ + String privateKey(); + + /** + * Gets the expiryTimeInUtc property: Gets or sets expiry time in UTC. + * + * @return the expiryTimeInUtc value. + */ + String expiryTimeInUtc(); + + /** + * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.GenerateCertResponseInner object. + * + * @return the inner object. + */ + GenerateCertResponseInner innerModel(); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/HostPlatformType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/HostPlatformType.java new file mode 100644 index 0000000000000..6b9fa5b4f1779 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/HostPlatformType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for HostPlatformType. */ +public final class HostPlatformType extends ExpandableStringEnum { + /** Static value KubernetesCluster for HostPlatformType. */ + public static final HostPlatformType KUBERNETES_CLUSTER = fromString("KubernetesCluster"); + + /** Static value LinuxVM for HostPlatformType. */ + public static final HostPlatformType LINUX_VM = fromString("LinuxVM"); + + /** + * Creates or finds a HostPlatformType from its string representation. + * + * @param name a name to look for. + * @return the corresponding HostPlatformType. + */ + @JsonCreator + public static HostPlatformType fromString(String name) { + return fromString(name, HostPlatformType.class); + } + + /** @return known HostPlatformType values. */ + public static Collection values() { + return values(HostPlatformType.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ImageRepositoryCredential.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ImageRepositoryCredential.java new file mode 100644 index 0000000000000..5e73a0a2f1eb7 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ImageRepositoryCredential.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Image repository credential. */ +@Fluent +public final class ImageRepositoryCredential { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ImageRepositoryCredential.class); + + /* + * Image repository url (e.g.: mcr.microsoft.com). + */ + @JsonProperty(value = "imageRepositoryUrl", required = true) + private String imageRepositoryUrl; + + /* + * Repository user name. + */ + @JsonProperty(value = "userName", required = true) + private String username; + + /* + * Repository user password. + */ + @JsonProperty(value = "password") + private AsymmetricEncryptedSecret password; + + /** + * Get the imageRepositoryUrl property: Image repository url (e.g.: mcr.microsoft.com). + * + * @return the imageRepositoryUrl value. + */ + public String imageRepositoryUrl() { + return this.imageRepositoryUrl; + } + + /** + * Set the imageRepositoryUrl property: Image repository url (e.g.: mcr.microsoft.com). + * + * @param imageRepositoryUrl the imageRepositoryUrl value to set. + * @return the ImageRepositoryCredential object itself. + */ + public ImageRepositoryCredential withImageRepositoryUrl(String imageRepositoryUrl) { + this.imageRepositoryUrl = imageRepositoryUrl; + return this; + } + + /** + * Get the username property: Repository user name. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: Repository user name. + * + * @param username the username value to set. + * @return the ImageRepositoryCredential object itself. + */ + public ImageRepositoryCredential withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: Repository user password. + * + * @return the password value. + */ + public AsymmetricEncryptedSecret password() { + return this.password; + } + + /** + * Set the password property: Repository user password. + * + * @param password the password value to set. + * @return the ImageRepositoryCredential object itself. + */ + public ImageRepositoryCredential withPassword(AsymmetricEncryptedSecret password) { + this.password = password; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (imageRepositoryUrl() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property imageRepositoryUrl in model ImageRepositoryCredential")); + } + if (username() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property username in model ImageRepositoryCredential")); + } + if (password() != null) { + password().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/InstallationImpact.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/InstallationImpact.java new file mode 100644 index 0000000000000..c8f1296a8404f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/InstallationImpact.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for InstallationImpact. */ +public final class InstallationImpact extends ExpandableStringEnum { + /** Static value None for InstallationImpact. */ + public static final InstallationImpact NONE = fromString("None"); + + /** Static value DeviceRebooted for InstallationImpact. */ + public static final InstallationImpact DEVICE_REBOOTED = fromString("DeviceRebooted"); + + /** Static value KubernetesWorkloadsDown for InstallationImpact. */ + public static final InstallationImpact KUBERNETES_WORKLOADS_DOWN = fromString("KubernetesWorkloadsDown"); + + /** + * Creates or finds a InstallationImpact from its string representation. + * + * @param name a name to look for. + * @return the corresponding InstallationImpact. + */ + @JsonCreator + public static InstallationImpact fromString(String name) { + return fromString(name, InstallationImpact.class); + } + + /** @return known InstallationImpact values. */ + public static Collection values() { + return values(InstallationImpact.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTAddon.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTAddon.java new file mode 100644 index 0000000000000..d3d3d6383f827 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTAddon.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.models.AddonInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** IoT Addon. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("IotEdge") +@JsonFlatten +@Fluent +public class IoTAddon extends AddonInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IoTAddon.class); + + /* + * IoT device metadata to which appliance needs to be connected. + */ + @JsonProperty(value = "properties.ioTDeviceDetails", required = true) + private IoTDeviceInfo ioTDeviceDetails; + + /* + * IoT edge device to which the IoT Addon needs to be configured. + */ + @JsonProperty(value = "properties.ioTEdgeDeviceDetails", required = true) + private IoTDeviceInfo ioTEdgeDeviceDetails; + + /* + * Version of IoT running on the appliance. + */ + @JsonProperty(value = "properties.version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /* + * Host OS supported by the IoT addon. + */ + @JsonProperty(value = "properties.hostPlatform", access = JsonProperty.Access.WRITE_ONLY) + private PlatformType hostPlatform; + + /* + * Platform where the runtime is hosted. + */ + @JsonProperty(value = "properties.hostPlatformType", access = JsonProperty.Access.WRITE_ONLY) + private HostPlatformType hostPlatformType; + + /* + * Addon Provisioning State + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AddonState provisioningState; + + /** + * Get the ioTDeviceDetails property: IoT device metadata to which appliance needs to be connected. + * + * @return the ioTDeviceDetails value. + */ + public IoTDeviceInfo ioTDeviceDetails() { + return this.ioTDeviceDetails; + } + + /** + * Set the ioTDeviceDetails property: IoT device metadata to which appliance needs to be connected. + * + * @param ioTDeviceDetails the ioTDeviceDetails value to set. + * @return the IoTAddon object itself. + */ + public IoTAddon withIoTDeviceDetails(IoTDeviceInfo ioTDeviceDetails) { + this.ioTDeviceDetails = ioTDeviceDetails; + return this; + } + + /** + * Get the ioTEdgeDeviceDetails property: IoT edge device to which the IoT Addon needs to be configured. + * + * @return the ioTEdgeDeviceDetails value. + */ + public IoTDeviceInfo ioTEdgeDeviceDetails() { + return this.ioTEdgeDeviceDetails; + } + + /** + * Set the ioTEdgeDeviceDetails property: IoT edge device to which the IoT Addon needs to be configured. + * + * @param ioTEdgeDeviceDetails the ioTEdgeDeviceDetails value to set. + * @return the IoTAddon object itself. + */ + public IoTAddon withIoTEdgeDeviceDetails(IoTDeviceInfo ioTEdgeDeviceDetails) { + this.ioTEdgeDeviceDetails = ioTEdgeDeviceDetails; + return this; + } + + /** + * Get the version property: Version of IoT running on the appliance. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the hostPlatform property: Host OS supported by the IoT addon. + * + * @return the hostPlatform value. + */ + public PlatformType hostPlatform() { + return this.hostPlatform; + } + + /** + * Get the hostPlatformType property: Platform where the runtime is hosted. + * + * @return the hostPlatformType value. + */ + public HostPlatformType hostPlatformType() { + return this.hostPlatformType; + } + + /** + * Get the provisioningState property: Addon Provisioning State. + * + * @return the provisioningState value. + */ + public AddonState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (ioTDeviceDetails() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property ioTDeviceDetails in model IoTAddon")); + } else { + ioTDeviceDetails().validate(); + } + if (ioTEdgeDeviceDetails() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property ioTEdgeDeviceDetails in model IoTAddon")); + } else { + ioTEdgeDeviceDetails().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTDeviceInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTDeviceInfo.java index 74f9a70b23935..9cd7cdf3569e9 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTDeviceInfo.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTDeviceInfo.java @@ -33,7 +33,7 @@ public final class IoTDeviceInfo { private String ioTHostHubId; /* - * IoT device authentication info. + * Encrypted IoT device/IoT edge device connection string. */ @JsonProperty(value = "authentication") private Authentication authentication; @@ -99,7 +99,7 @@ public IoTDeviceInfo withIoTHostHubId(String ioTHostHubId) { } /** - * Get the authentication property: IoT device authentication info. + * Get the authentication property: Encrypted IoT device/IoT edge device connection string. * * @return the authentication value. */ @@ -108,7 +108,7 @@ public Authentication authentication() { } /** - * Set the authentication property: IoT device authentication info. + * Set the authentication property: Encrypted IoT device/IoT edge device connection string. * * @param authentication the authentication value to set. * @return the IoTDeviceInfo object itself. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTEdgeAgentInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTEdgeAgentInfo.java new file mode 100644 index 0000000000000..3c97970e3090e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTEdgeAgentInfo.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * IoT edge agent details is optional, this will be used for download system Agent module while bootstrapping IoT Role + * if specified. + */ +@Fluent +public final class IoTEdgeAgentInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IoTEdgeAgentInfo.class); + + /* + * Name of the IoT edge agent image. + */ + @JsonProperty(value = "imageName", required = true) + private String imageName; + + /* + * Image Tag. + */ + @JsonProperty(value = "tag", required = true) + private String tag; + + /* + * Image repository details. + */ + @JsonProperty(value = "imageRepository") + private ImageRepositoryCredential imageRepository; + + /** + * Get the imageName property: Name of the IoT edge agent image. + * + * @return the imageName value. + */ + public String imageName() { + return this.imageName; + } + + /** + * Set the imageName property: Name of the IoT edge agent image. + * + * @param imageName the imageName value to set. + * @return the IoTEdgeAgentInfo object itself. + */ + public IoTEdgeAgentInfo withImageName(String imageName) { + this.imageName = imageName; + return this; + } + + /** + * Get the tag property: Image Tag. + * + * @return the tag value. + */ + public String tag() { + return this.tag; + } + + /** + * Set the tag property: Image Tag. + * + * @param tag the tag value to set. + * @return the IoTEdgeAgentInfo object itself. + */ + public IoTEdgeAgentInfo withTag(String tag) { + this.tag = tag; + return this; + } + + /** + * Get the imageRepository property: Image repository details. + * + * @return the imageRepository value. + */ + public ImageRepositoryCredential imageRepository() { + return this.imageRepository; + } + + /** + * Set the imageRepository property: Image repository details. + * + * @param imageRepository the imageRepository value to set. + * @return the IoTEdgeAgentInfo object itself. + */ + public IoTEdgeAgentInfo withImageRepository(ImageRepositoryCredential imageRepository) { + this.imageRepository = imageRepository; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (imageName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property imageName in model IoTEdgeAgentInfo")); + } + if (tag() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property tag in model IoTEdgeAgentInfo")); + } + if (imageRepository() != null) { + imageRepository().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTRole.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTRole.java index 1075a2480e11b..c42d12842cc81 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTRole.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTRole.java @@ -46,6 +46,24 @@ public class IoTRole extends RoleInner { @JsonProperty(value = "properties.shareMappings") private List shareMappings; + /* + * Iot edge agent details to download the agent and bootstrap iot runtime. + */ + @JsonProperty(value = "properties.ioTEdgeAgentInfo") + private IoTEdgeAgentInfo ioTEdgeAgentInfo; + + /* + * Platform where the Iot runtime is hosted. + */ + @JsonProperty(value = "properties.hostPlatformType", access = JsonProperty.Access.WRITE_ONLY) + private HostPlatformType hostPlatformType; + + /* + * Resource allocation + */ + @JsonProperty(value = "properties.computeResource") + private ComputeResource computeResource; + /* * Role status. */ @@ -132,6 +150,55 @@ public IoTRole withShareMappings(List shareMappings) { return this; } + /** + * Get the ioTEdgeAgentInfo property: Iot edge agent details to download the agent and bootstrap iot runtime. + * + * @return the ioTEdgeAgentInfo value. + */ + public IoTEdgeAgentInfo ioTEdgeAgentInfo() { + return this.ioTEdgeAgentInfo; + } + + /** + * Set the ioTEdgeAgentInfo property: Iot edge agent details to download the agent and bootstrap iot runtime. + * + * @param ioTEdgeAgentInfo the ioTEdgeAgentInfo value to set. + * @return the IoTRole object itself. + */ + public IoTRole withIoTEdgeAgentInfo(IoTEdgeAgentInfo ioTEdgeAgentInfo) { + this.ioTEdgeAgentInfo = ioTEdgeAgentInfo; + return this; + } + + /** + * Get the hostPlatformType property: Platform where the Iot runtime is hosted. + * + * @return the hostPlatformType value. + */ + public HostPlatformType hostPlatformType() { + return this.hostPlatformType; + } + + /** + * Get the computeResource property: Resource allocation. + * + * @return the computeResource value. + */ + public ComputeResource computeResource() { + return this.computeResource; + } + + /** + * Set the computeResource property: Resource allocation. + * + * @param computeResource the computeResource value to set. + * @return the IoTRole object itself. + */ + public IoTRole withComputeResource(ComputeResource computeResource) { + this.computeResource = computeResource; + return this; + } + /** * Get the roleStatus property: Role status. * @@ -169,5 +236,11 @@ public void validate() { if (shareMappings() != null) { shareMappings().forEach(e -> e.validate()); } + if (ioTEdgeAgentInfo() != null) { + ioTEdgeAgentInfo().validate(); + } + if (computeResource() != null) { + computeResource().validate(); + } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobType.java index 06a1b3820e580..f5a49da9808a9 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobType.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobType.java @@ -28,6 +28,15 @@ public final class JobType extends ExpandableStringEnum { /** Static value RefreshContainer for JobType. */ public static final JobType REFRESH_CONTAINER = fromString("RefreshContainer"); + /** Static value Backup for JobType. */ + public static final JobType BACKUP = fromString("Backup"); + + /** Static value Restore for JobType. */ + public static final JobType RESTORE = fromString("Restore"); + + /** Static value TriggerSupportPackage for JobType. */ + public static final JobType TRIGGER_SUPPORT_PACKAGE = fromString("TriggerSupportPackage"); + /** * Creates or finds a JobType from its string representation. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KeyVaultSyncStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KeyVaultSyncStatus.java new file mode 100644 index 0000000000000..5a27a6b72827e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KeyVaultSyncStatus.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for KeyVaultSyncStatus. */ +public final class KeyVaultSyncStatus extends ExpandableStringEnum { + /** Static value KeyVaultSynced for KeyVaultSyncStatus. */ + public static final KeyVaultSyncStatus KEY_VAULT_SYNCED = fromString("KeyVaultSynced"); + + /** Static value KeyVaultSyncFailed for KeyVaultSyncStatus. */ + public static final KeyVaultSyncStatus KEY_VAULT_SYNC_FAILED = fromString("KeyVaultSyncFailed"); + + /** Static value KeyVaultNotConfigured for KeyVaultSyncStatus. */ + public static final KeyVaultSyncStatus KEY_VAULT_NOT_CONFIGURED = fromString("KeyVaultNotConfigured"); + + /** Static value KeyVaultSyncPending for KeyVaultSyncStatus. */ + public static final KeyVaultSyncStatus KEY_VAULT_SYNC_PENDING = fromString("KeyVaultSyncPending"); + + /** Static value KeyVaultSyncing for KeyVaultSyncStatus. */ + public static final KeyVaultSyncStatus KEY_VAULT_SYNCING = fromString("KeyVaultSyncing"); + + /** Static value KeyVaultNotSynced for KeyVaultSyncStatus. */ + public static final KeyVaultSyncStatus KEY_VAULT_NOT_SYNCED = fromString("KeyVaultNotSynced"); + + /** + * Creates or finds a KeyVaultSyncStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding KeyVaultSyncStatus. + */ + @JsonCreator + public static KeyVaultSyncStatus fromString(String name) { + return fromString(name, KeyVaultSyncStatus.class); + } + + /** @return known KeyVaultSyncStatus values. */ + public static Collection values() { + return values(KeyVaultSyncStatus.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesClusterInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesClusterInfo.java new file mode 100644 index 0000000000000..53dc1afc7b6ac --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesClusterInfo.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Kubernetes cluster configuration. */ +@Fluent +public final class KubernetesClusterInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubernetesClusterInfo.class); + + /* + * Etcd configuration + */ + @JsonProperty(value = "etcdInfo", access = JsonProperty.Access.WRITE_ONLY) + private EtcdInfo etcdInfo; + + /* + * Kubernetes cluster nodes + */ + @JsonProperty(value = "nodes", access = JsonProperty.Access.WRITE_ONLY) + private List nodes; + + /* + * Kubernetes cluster version + */ + @JsonProperty(value = "version", required = true) + private String version; + + /** + * Get the etcdInfo property: Etcd configuration. + * + * @return the etcdInfo value. + */ + public EtcdInfo etcdInfo() { + return this.etcdInfo; + } + + /** + * Get the nodes property: Kubernetes cluster nodes. + * + * @return the nodes value. + */ + public List nodes() { + return this.nodes; + } + + /** + * Get the version property: Kubernetes cluster version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Kubernetes cluster version. + * + * @param version the version value to set. + * @return the KubernetesClusterInfo object itself. + */ + public KubernetesClusterInfo withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (etcdInfo() != null) { + etcdInfo().validate(); + } + if (nodes() != null) { + nodes().forEach(e -> e.validate()); + } + if (version() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property version in model KubernetesClusterInfo")); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesIpConfiguration.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesIpConfiguration.java new file mode 100644 index 0000000000000..aefdda0e2b2d0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesIpConfiguration.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Kubernetes node IP configuration. */ +@Fluent +public final class KubernetesIpConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubernetesIpConfiguration.class); + + /* + * Port of the Kubernetes node. + */ + @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY) + private String port; + + /* + * IP address of the Kubernetes node. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * Get the port property: Port of the Kubernetes node. + * + * @return the port value. + */ + public String port() { + return this.port; + } + + /** + * Get the ipAddress property: IP address of the Kubernetes node. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: IP address of the Kubernetes node. + * + * @param ipAddress the ipAddress value to set. + * @return the KubernetesIpConfiguration object itself. + */ + public KubernetesIpConfiguration withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesNodeType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesNodeType.java new file mode 100644 index 0000000000000..a92b872669856 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesNodeType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for KubernetesNodeType. */ +public final class KubernetesNodeType extends ExpandableStringEnum { + /** Static value Invalid for KubernetesNodeType. */ + public static final KubernetesNodeType INVALID = fromString("Invalid"); + + /** Static value Master for KubernetesNodeType. */ + public static final KubernetesNodeType MASTER = fromString("Master"); + + /** Static value Worker for KubernetesNodeType. */ + public static final KubernetesNodeType WORKER = fromString("Worker"); + + /** + * Creates or finds a KubernetesNodeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding KubernetesNodeType. + */ + @JsonCreator + public static KubernetesNodeType fromString(String name) { + return fromString(name, KubernetesNodeType.class); + } + + /** @return known KubernetesNodeType values. */ + public static Collection values() { + return values(KubernetesNodeType.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRole.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRole.java new file mode 100644 index 0000000000000..879fa5a6078dc --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRole.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.models.RoleInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Kubernetes role. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("Kubernetes") +@JsonFlatten +@Fluent +public class KubernetesRole extends RoleInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubernetesRole.class); + + /* + * Host OS supported by the Kubernetes role. + */ + @JsonProperty(value = "properties.hostPlatform") + private PlatformType hostPlatform; + + /* + * State of Kubernetes deployment + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private KubernetesState provisioningState; + + /* + * Platform where the runtime is hosted. + */ + @JsonProperty(value = "properties.hostPlatformType", access = JsonProperty.Access.WRITE_ONLY) + private HostPlatformType hostPlatformType; + + /* + * Kubernetes cluster configuration + */ + @JsonProperty(value = "properties.kubernetesClusterInfo") + private KubernetesClusterInfo kubernetesClusterInfo; + + /* + * Kubernetes role resources + */ + @JsonProperty(value = "properties.kubernetesRoleResources") + private KubernetesRoleResources kubernetesRoleResources; + + /* + * Role status. + */ + @JsonProperty(value = "properties.roleStatus") + private RoleStatus roleStatus; + + /** + * Get the hostPlatform property: Host OS supported by the Kubernetes role. + * + * @return the hostPlatform value. + */ + public PlatformType hostPlatform() { + return this.hostPlatform; + } + + /** + * Set the hostPlatform property: Host OS supported by the Kubernetes role. + * + * @param hostPlatform the hostPlatform value to set. + * @return the KubernetesRole object itself. + */ + public KubernetesRole withHostPlatform(PlatformType hostPlatform) { + this.hostPlatform = hostPlatform; + return this; + } + + /** + * Get the provisioningState property: State of Kubernetes deployment. + * + * @return the provisioningState value. + */ + public KubernetesState provisioningState() { + return this.provisioningState; + } + + /** + * Get the hostPlatformType property: Platform where the runtime is hosted. + * + * @return the hostPlatformType value. + */ + public HostPlatformType hostPlatformType() { + return this.hostPlatformType; + } + + /** + * Get the kubernetesClusterInfo property: Kubernetes cluster configuration. + * + * @return the kubernetesClusterInfo value. + */ + public KubernetesClusterInfo kubernetesClusterInfo() { + return this.kubernetesClusterInfo; + } + + /** + * Set the kubernetesClusterInfo property: Kubernetes cluster configuration. + * + * @param kubernetesClusterInfo the kubernetesClusterInfo value to set. + * @return the KubernetesRole object itself. + */ + public KubernetesRole withKubernetesClusterInfo(KubernetesClusterInfo kubernetesClusterInfo) { + this.kubernetesClusterInfo = kubernetesClusterInfo; + return this; + } + + /** + * Get the kubernetesRoleResources property: Kubernetes role resources. + * + * @return the kubernetesRoleResources value. + */ + public KubernetesRoleResources kubernetesRoleResources() { + return this.kubernetesRoleResources; + } + + /** + * Set the kubernetesRoleResources property: Kubernetes role resources. + * + * @param kubernetesRoleResources the kubernetesRoleResources value to set. + * @return the KubernetesRole object itself. + */ + public KubernetesRole withKubernetesRoleResources(KubernetesRoleResources kubernetesRoleResources) { + this.kubernetesRoleResources = kubernetesRoleResources; + return this; + } + + /** + * Get the roleStatus property: Role status. + * + * @return the roleStatus value. + */ + public RoleStatus roleStatus() { + return this.roleStatus; + } + + /** + * Set the roleStatus property: Role status. + * + * @param roleStatus the roleStatus value to set. + * @return the KubernetesRole object itself. + */ + public KubernetesRole withRoleStatus(RoleStatus roleStatus) { + this.roleStatus = roleStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (kubernetesClusterInfo() != null) { + kubernetesClusterInfo().validate(); + } + if (kubernetesRoleResources() != null) { + kubernetesRoleResources().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleCompute.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleCompute.java new file mode 100644 index 0000000000000..9da59957e690d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleCompute.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Kubernetes role compute resource. */ +@Fluent +public final class KubernetesRoleCompute { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubernetesRoleCompute.class); + + /* + * VM profile + */ + @JsonProperty(value = "vmProfile", required = true) + private String vmProfile; + + /* + * Memory in bytes + */ + @JsonProperty(value = "memoryInBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long memoryInBytes; + + /* + * Processor count + */ + @JsonProperty(value = "processorCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer processorCount; + + /** + * Get the vmProfile property: VM profile. + * + * @return the vmProfile value. + */ + public String vmProfile() { + return this.vmProfile; + } + + /** + * Set the vmProfile property: VM profile. + * + * @param vmProfile the vmProfile value to set. + * @return the KubernetesRoleCompute object itself. + */ + public KubernetesRoleCompute withVmProfile(String vmProfile) { + this.vmProfile = vmProfile; + return this; + } + + /** + * Get the memoryInBytes property: Memory in bytes. + * + * @return the memoryInBytes value. + */ + public Long memoryInBytes() { + return this.memoryInBytes; + } + + /** + * Get the processorCount property: Processor count. + * + * @return the processorCount value. + */ + public Integer processorCount() { + return this.processorCount; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vmProfile() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property vmProfile in model KubernetesRoleCompute")); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleNetwork.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleNetwork.java new file mode 100644 index 0000000000000..e405660fbf6bb --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleNetwork.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Kubernetes role network resource. */ +@Immutable +public final class KubernetesRoleNetwork { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubernetesRoleNetwork.class); + + /* + * Cni configuration + */ + @JsonProperty(value = "cniConfig", access = JsonProperty.Access.WRITE_ONLY) + private CniConfig cniConfig; + + /* + * Load balancer configuration + */ + @JsonProperty(value = "loadBalancerConfig", access = JsonProperty.Access.WRITE_ONLY) + private LoadBalancerConfig loadBalancerConfig; + + /** + * Get the cniConfig property: Cni configuration. + * + * @return the cniConfig value. + */ + public CniConfig cniConfig() { + return this.cniConfig; + } + + /** + * Get the loadBalancerConfig property: Load balancer configuration. + * + * @return the loadBalancerConfig value. + */ + public LoadBalancerConfig loadBalancerConfig() { + return this.loadBalancerConfig; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (cniConfig() != null) { + cniConfig().validate(); + } + if (loadBalancerConfig() != null) { + loadBalancerConfig().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleResources.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleResources.java new file mode 100644 index 0000000000000..01891ab2f5063 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleResources.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Kubernetes role resources. */ +@Fluent +public final class KubernetesRoleResources { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubernetesRoleResources.class); + + /* + * Kubernetes role storage resource + */ + @JsonProperty(value = "storage") + private KubernetesRoleStorage storage; + + /* + * Kubernetes role compute resource + */ + @JsonProperty(value = "compute", required = true) + private KubernetesRoleCompute compute; + + /* + * Kubernetes role network resource + */ + @JsonProperty(value = "network", access = JsonProperty.Access.WRITE_ONLY) + private KubernetesRoleNetwork network; + + /** + * Get the storage property: Kubernetes role storage resource. + * + * @return the storage value. + */ + public KubernetesRoleStorage storage() { + return this.storage; + } + + /** + * Set the storage property: Kubernetes role storage resource. + * + * @param storage the storage value to set. + * @return the KubernetesRoleResources object itself. + */ + public KubernetesRoleResources withStorage(KubernetesRoleStorage storage) { + this.storage = storage; + return this; + } + + /** + * Get the compute property: Kubernetes role compute resource. + * + * @return the compute value. + */ + public KubernetesRoleCompute compute() { + return this.compute; + } + + /** + * Set the compute property: Kubernetes role compute resource. + * + * @param compute the compute value to set. + * @return the KubernetesRoleResources object itself. + */ + public KubernetesRoleResources withCompute(KubernetesRoleCompute compute) { + this.compute = compute; + return this; + } + + /** + * Get the network property: Kubernetes role network resource. + * + * @return the network value. + */ + public KubernetesRoleNetwork network() { + return this.network; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storage() != null) { + storage().validate(); + } + if (compute() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property compute in model KubernetesRoleResources")); + } else { + compute().validate(); + } + if (network() != null) { + network().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleStorage.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleStorage.java new file mode 100644 index 0000000000000..ac5aed65cbe51 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleStorage.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Kubernetes role storage resource. */ +@Fluent +public final class KubernetesRoleStorage { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubernetesRoleStorage.class); + + /* + * Kubernetes storage class info. + */ + @JsonProperty(value = "storageClasses", access = JsonProperty.Access.WRITE_ONLY) + private List storageClasses; + + /* + * Mount points of shares in role(s). + */ + @JsonProperty(value = "endpoints") + private List endpoints; + + /** + * Get the storageClasses property: Kubernetes storage class info. + * + * @return the storageClasses value. + */ + public List storageClasses() { + return this.storageClasses; + } + + /** + * Get the endpoints property: Mount points of shares in role(s). + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: Mount points of shares in role(s). + * + * @param endpoints the endpoints value to set. + * @return the KubernetesRoleStorage object itself. + */ + public KubernetesRoleStorage withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageClasses() != null) { + storageClasses().forEach(e -> e.validate()); + } + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleStorageClassInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleStorageClassInfo.java new file mode 100644 index 0000000000000..a776eaf568586 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleStorageClassInfo.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Kubernetes storage class info. */ +@Immutable +public final class KubernetesRoleStorageClassInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubernetesRoleStorageClassInfo.class); + + /* + * Storage class name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Storage class type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * If provisioned storage is posix compliant. + */ + @JsonProperty(value = "posixCompliant", access = JsonProperty.Access.WRITE_ONLY) + private PosixComplianceStatus posixCompliant; + + /** + * Get the name property: Storage class name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Storage class type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the posixCompliant property: If provisioned storage is posix compliant. + * + * @return the posixCompliant value. + */ + public PosixComplianceStatus posixCompliant() { + return this.posixCompliant; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesState.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesState.java new file mode 100644 index 0000000000000..a33482e567888 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesState.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for KubernetesState. */ +public final class KubernetesState extends ExpandableStringEnum { + /** Static value Invalid for KubernetesState. */ + public static final KubernetesState INVALID = fromString("Invalid"); + + /** Static value Creating for KubernetesState. */ + public static final KubernetesState CREATING = fromString("Creating"); + + /** Static value Created for KubernetesState. */ + public static final KubernetesState CREATED = fromString("Created"); + + /** Static value Updating for KubernetesState. */ + public static final KubernetesState UPDATING = fromString("Updating"); + + /** Static value Reconfiguring for KubernetesState. */ + public static final KubernetesState RECONFIGURING = fromString("Reconfiguring"); + + /** Static value Failed for KubernetesState. */ + public static final KubernetesState FAILED = fromString("Failed"); + + /** Static value Deleting for KubernetesState. */ + public static final KubernetesState DELETING = fromString("Deleting"); + + /** + * Creates or finds a KubernetesState from its string representation. + * + * @param name a name to look for. + * @return the corresponding KubernetesState. + */ + @JsonCreator + public static KubernetesState fromString(String name) { + return fromString(name, KubernetesState.class); + } + + /** @return known KubernetesState values. */ + public static Collection values() { + return values(KubernetesState.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/LoadBalancerConfig.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/LoadBalancerConfig.java new file mode 100644 index 0000000000000..ee325903e9ed0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/LoadBalancerConfig.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Load balancer configuration. */ +@Immutable +public final class LoadBalancerConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LoadBalancerConfig.class); + + /* + * Load balancer type + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * Load balancer version + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /** + * Get the type property: Load balancer type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the version property: Load balancer version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MecRole.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MecRole.java new file mode 100644 index 0000000000000..72066f6c5a5fa --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MecRole.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.models.RoleInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** MEC role. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("MEC") +@JsonFlatten +@Fluent +public class MecRole extends RoleInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MecRole.class); + + /* + * Activation key of the MEC. + */ + @JsonProperty(value = "properties.connectionString") + private AsymmetricEncryptedSecret connectionString; + + /* + * Controller Endpoint. + */ + @JsonProperty(value = "properties.controllerEndpoint") + private String controllerEndpoint; + + /* + * Unique Id of the Resource. + */ + @JsonProperty(value = "properties.resourceUniqueId") + private String resourceUniqueId; + + /* + * Role status. + */ + @JsonProperty(value = "properties.roleStatus") + private RoleStatus roleStatus; + + /** + * Get the connectionString property: Activation key of the MEC. + * + * @return the connectionString value. + */ + public AsymmetricEncryptedSecret connectionString() { + return this.connectionString; + } + + /** + * Set the connectionString property: Activation key of the MEC. + * + * @param connectionString the connectionString value to set. + * @return the MecRole object itself. + */ + public MecRole withConnectionString(AsymmetricEncryptedSecret connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Get the controllerEndpoint property: Controller Endpoint. + * + * @return the controllerEndpoint value. + */ + public String controllerEndpoint() { + return this.controllerEndpoint; + } + + /** + * Set the controllerEndpoint property: Controller Endpoint. + * + * @param controllerEndpoint the controllerEndpoint value to set. + * @return the MecRole object itself. + */ + public MecRole withControllerEndpoint(String controllerEndpoint) { + this.controllerEndpoint = controllerEndpoint; + return this; + } + + /** + * Get the resourceUniqueId property: Unique Id of the Resource. + * + * @return the resourceUniqueId value. + */ + public String resourceUniqueId() { + return this.resourceUniqueId; + } + + /** + * Set the resourceUniqueId property: Unique Id of the Resource. + * + * @param resourceUniqueId the resourceUniqueId value to set. + * @return the MecRole object itself. + */ + public MecRole withResourceUniqueId(String resourceUniqueId) { + this.resourceUniqueId = resourceUniqueId; + return this; + } + + /** + * Get the roleStatus property: Role status. + * + * @return the roleStatus value. + */ + public RoleStatus roleStatus() { + return this.roleStatus; + } + + /** + * Set the roleStatus property: Role status. + * + * @param roleStatus the roleStatus value to set. + * @return the MecRole object itself. + */ + public MecRole withRoleStatus(RoleStatus roleStatus) { + this.roleStatus = roleStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (connectionString() != null) { + connectionString().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricConfiguration.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricConfiguration.java new file mode 100644 index 0000000000000..932a90470b76a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricConfiguration.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Metric configuration. */ +@Fluent +public final class MetricConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricConfiguration.class); + + /* + * The Resource ID on which the metrics should be pushed. + */ + @JsonProperty(value = "resourceId", required = true) + private String resourceId; + + /* + * The MDM account to which the counters should be pushed. + */ + @JsonProperty(value = "mdmAccount") + private String mdmAccount; + + /* + * The MDM namespace to which the counters should be pushed. This is + * required if MDMAccount is specified + */ + @JsonProperty(value = "metricNameSpace") + private String metricNameSpace; + + /* + * Host name for the IoT hub associated to the device. + */ + @JsonProperty(value = "counterSets", required = true) + private List counterSets; + + /** + * Get the resourceId property: The Resource ID on which the metrics should be pushed. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The Resource ID on which the metrics should be pushed. + * + * @param resourceId the resourceId value to set. + * @return the MetricConfiguration object itself. + */ + public MetricConfiguration withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the mdmAccount property: The MDM account to which the counters should be pushed. + * + * @return the mdmAccount value. + */ + public String mdmAccount() { + return this.mdmAccount; + } + + /** + * Set the mdmAccount property: The MDM account to which the counters should be pushed. + * + * @param mdmAccount the mdmAccount value to set. + * @return the MetricConfiguration object itself. + */ + public MetricConfiguration withMdmAccount(String mdmAccount) { + this.mdmAccount = mdmAccount; + return this; + } + + /** + * Get the metricNameSpace property: The MDM namespace to which the counters should be pushed. This is required if + * MDMAccount is specified. + * + * @return the metricNameSpace value. + */ + public String metricNameSpace() { + return this.metricNameSpace; + } + + /** + * Set the metricNameSpace property: The MDM namespace to which the counters should be pushed. This is required if + * MDMAccount is specified. + * + * @param metricNameSpace the metricNameSpace value to set. + * @return the MetricConfiguration object itself. + */ + public MetricConfiguration withMetricNameSpace(String metricNameSpace) { + this.metricNameSpace = metricNameSpace; + return this; + } + + /** + * Get the counterSets property: Host name for the IoT hub associated to the device. + * + * @return the counterSets value. + */ + public List counterSets() { + return this.counterSets; + } + + /** + * Set the counterSets property: Host name for the IoT hub associated to the device. + * + * @param counterSets the counterSets value to set. + * @return the MetricConfiguration object itself. + */ + public MetricConfiguration withCounterSets(List counterSets) { + this.counterSets = counterSets; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property resourceId in model MetricConfiguration")); + } + if (counterSets() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property counterSets in model MetricConfiguration")); + } else { + counterSets().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCounter.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCounter.java new file mode 100644 index 0000000000000..90fc784cd4430 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCounter.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The metric counter. */ +@Fluent +public final class MetricCounter { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricCounter.class); + + /* + * The counter name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The instance from which counter should be collected. + */ + @JsonProperty(value = "instance") + private String instance; + + /* + * The dimension filter. + */ + @JsonProperty(value = "dimensionFilter") + private List dimensionFilter; + + /* + * The additional dimensions to be added to metric. + */ + @JsonProperty(value = "additionalDimensions") + private List additionalDimensions; + + /** + * Get the name property: The counter name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The counter name. + * + * @param name the name value to set. + * @return the MetricCounter object itself. + */ + public MetricCounter withName(String name) { + this.name = name; + return this; + } + + /** + * Get the instance property: The instance from which counter should be collected. + * + * @return the instance value. + */ + public String instance() { + return this.instance; + } + + /** + * Set the instance property: The instance from which counter should be collected. + * + * @param instance the instance value to set. + * @return the MetricCounter object itself. + */ + public MetricCounter withInstance(String instance) { + this.instance = instance; + return this; + } + + /** + * Get the dimensionFilter property: The dimension filter. + * + * @return the dimensionFilter value. + */ + public List dimensionFilter() { + return this.dimensionFilter; + } + + /** + * Set the dimensionFilter property: The dimension filter. + * + * @param dimensionFilter the dimensionFilter value to set. + * @return the MetricCounter object itself. + */ + public MetricCounter withDimensionFilter(List dimensionFilter) { + this.dimensionFilter = dimensionFilter; + return this; + } + + /** + * Get the additionalDimensions property: The additional dimensions to be added to metric. + * + * @return the additionalDimensions value. + */ + public List additionalDimensions() { + return this.additionalDimensions; + } + + /** + * Set the additionalDimensions property: The additional dimensions to be added to metric. + * + * @param additionalDimensions the additionalDimensions value to set. + * @return the MetricCounter object itself. + */ + public MetricCounter withAdditionalDimensions(List additionalDimensions) { + this.additionalDimensions = additionalDimensions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model MetricCounter")); + } + if (dimensionFilter() != null) { + dimensionFilter().forEach(e -> e.validate()); + } + if (additionalDimensions() != null) { + additionalDimensions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCounterSet.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCounterSet.java new file mode 100644 index 0000000000000..1bba2e9c842f1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCounterSet.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The metric counter set. */ +@Fluent +public final class MetricCounterSet { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricCounterSet.class); + + /* + * The counters that should be collected in this set. + */ + @JsonProperty(value = "counters", required = true) + private List counters; + + /** + * Get the counters property: The counters that should be collected in this set. + * + * @return the counters value. + */ + public List counters() { + return this.counters; + } + + /** + * Set the counters property: The counters that should be collected in this set. + * + * @param counters the counters value to set. + * @return the MetricCounterSet object itself. + */ + public MetricCounterSet withCounters(List counters) { + this.counters = counters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (counters() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property counters in model MetricCounterSet")); + } else { + counters().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricDimension.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricDimension.java new file mode 100644 index 0000000000000..1cee75c373711 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricDimension.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The metric dimension. */ +@Fluent +public final class MetricDimension { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricDimension.class); + + /* + * The dimension type. + */ + @JsonProperty(value = "sourceType", required = true) + private String sourceType; + + /* + * The dimension value. + */ + @JsonProperty(value = "sourceName", required = true) + private String sourceName; + + /** + * Get the sourceType property: The dimension type. + * + * @return the sourceType value. + */ + public String sourceType() { + return this.sourceType; + } + + /** + * Set the sourceType property: The dimension type. + * + * @param sourceType the sourceType value to set. + * @return the MetricDimension object itself. + */ + public MetricDimension withSourceType(String sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get the sourceName property: The dimension value. + * + * @return the sourceName value. + */ + public String sourceName() { + return this.sourceName; + } + + /** + * Set the sourceName property: The dimension value. + * + * @param sourceName the sourceName value to set. + * @return the MetricDimension object itself. + */ + public MetricDimension withSourceName(String sourceName) { + this.sourceName = sourceName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property sourceType in model MetricDimension")); + } + if (sourceName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property sourceName in model MetricDimension")); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringConfigs.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringConfigs.java new file mode 100644 index 0000000000000..a9a999f68097d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringConfigs.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.MonitoringMetricConfigurationInner; + +/** Resource collection API of MonitoringConfigs. */ +public interface MonitoringConfigs { + /** + * Lists metric configurations in a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + PagedIterable list(String deviceName, String roleName, String resourceGroupName); + + /** + * Lists metric configurations in a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric configurations. + */ + PagedIterable list( + String deviceName, String roleName, String resourceGroupName, Context context); + + /** + * Gets a metric configuration of a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a metric configuration of a role. + */ + MonitoringMetricConfiguration get(String deviceName, String roleName, String resourceGroupName); + + /** + * Gets a metric configuration of a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a metric configuration of a role. + */ + Response getWithResponse( + String deviceName, String roleName, String resourceGroupName, Context context); + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + MonitoringMetricConfiguration createOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration); + + /** + * Creates a new metric configuration or updates an existing one for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the metric setting details for the role. + */ + MonitoringMetricConfiguration createOrUpdate( + String deviceName, + String roleName, + String resourceGroupName, + MonitoringMetricConfigurationInner monitoringMetricConfiguration, + Context context); + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String deviceName, String roleName, String resourceGroupName); + + /** + * deletes a new metric configuration for a role. + * + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String deviceName, String roleName, String resourceGroupName, Context context); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringMetricConfiguration.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringMetricConfiguration.java new file mode 100644 index 0000000000000..60c6ad5446b2c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringMetricConfiguration.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.databoxedge.fluent.models.MonitoringMetricConfigurationInner; +import java.util.List; + +/** An immutable client-side representation of MonitoringMetricConfiguration. */ +public interface MonitoringMetricConfiguration { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: MonitoringConfiguration on ASE device. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the metricConfigurations property: The metrics configuration details. + * + * @return the metricConfigurations value. + */ + List metricConfigurations(); + + /** + * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.MonitoringMetricConfigurationInner object. + * + * @return the inner object. + */ + MonitoringMetricConfigurationInner innerModel(); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringMetricConfigurationList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringMetricConfigurationList.java new file mode 100644 index 0000000000000..132c11057de31 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringMetricConfigurationList.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.models.MonitoringMetricConfigurationInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of metric configurations. */ +@Immutable +public final class MonitoringMetricConfigurationList { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitoringMetricConfigurationList.class); + + /* + * The list of metric configurations. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the value property: The list of metric configurations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MountPointMap.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MountPointMap.java index fa15964372061..5803809db8f2d 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MountPointMap.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MountPointMap.java @@ -32,6 +32,12 @@ public final class MountPointMap { @JsonProperty(value = "mountPoint", access = JsonProperty.Access.WRITE_ONLY) private String mountPoint; + /* + * Mounting type. + */ + @JsonProperty(value = "mountType", access = JsonProperty.Access.WRITE_ONLY) + private MountType mountType; + /* * Role type. */ @@ -76,6 +82,15 @@ public String mountPoint() { return this.mountPoint; } + /** + * Get the mountType property: Mounting type. + * + * @return the mountType value. + */ + public MountType mountType() { + return this.mountType; + } + /** * Get the roleType property: Role type. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MountType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MountType.java new file mode 100644 index 0000000000000..8fdccfa2d0b49 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MountType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for MountType. */ +public final class MountType extends ExpandableStringEnum { + /** Static value Volume for MountType. */ + public static final MountType VOLUME = fromString("Volume"); + + /** Static value HostPath for MountType. */ + public static final MountType HOST_PATH = fromString("HostPath"); + + /** + * Creates or finds a MountType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MountType. + */ + @JsonCreator + public static MountType fromString(String name) { + return fromString(name, MountType.class); + } + + /** @return known MountType values. */ + public static Collection values() { + return values(MountType.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MsiIdentityType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MsiIdentityType.java new file mode 100644 index 0000000000000..f3e16e5b37f56 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MsiIdentityType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for MsiIdentityType. */ +public final class MsiIdentityType extends ExpandableStringEnum { + /** Static value None for MsiIdentityType. */ + public static final MsiIdentityType NONE = fromString("None"); + + /** Static value SystemAssigned for MsiIdentityType. */ + public static final MsiIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** Static value UserAssigned for MsiIdentityType. */ + public static final MsiIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** + * Creates or finds a MsiIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MsiIdentityType. + */ + @JsonCreator + public static MsiIdentityType fromString(String name) { + return fromString(name, MsiIdentityType.class); + } + + /** @return known MsiIdentityType values. */ + public static Collection values() { + return values(MsiIdentityType.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkSettings.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkSettings.java index e225b91167736..90cbb2ab85f02 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkSettings.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkSettings.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.NetworkSettingsInner; import java.util.List; @@ -30,6 +31,13 @@ public interface NetworkSettings { */ String type(); + /** + * Gets the systemData property: NetworkSettings on ASE device. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the networkAdapters property: The network adapter list on the device. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NodeInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NodeInfo.java new file mode 100644 index 0000000000000..ff7fe2aa5888e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NodeInfo.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Kubernetes node info. */ +@Fluent +public final class NodeInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NodeInfo.class); + + /* + * Node name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Node type - Master/Worker + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private KubernetesNodeType type; + + /* + * IP Configuration of the Kubernetes node. + */ + @JsonProperty(value = "ipConfiguration") + private List ipConfiguration; + + /** + * Get the name property: Node name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Node type - Master/Worker. + * + * @return the type value. + */ + public KubernetesNodeType type() { + return this.type; + } + + /** + * Get the ipConfiguration property: IP Configuration of the Kubernetes node. + * + * @return the ipConfiguration value. + */ + public List ipConfiguration() { + return this.ipConfiguration; + } + + /** + * Set the ipConfiguration property: IP Configuration of the Kubernetes node. + * + * @param ipConfiguration the ipConfiguration value to set. + * @return the NodeInfo object itself. + */ + public NodeInfo withIpConfiguration(List ipConfiguration) { + this.ipConfiguration = ipConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipConfiguration() != null) { + ipConfiguration().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NodeList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NodeList.java index 5898dde5532d6..d57bc3ee62477 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NodeList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NodeList.java @@ -22,6 +22,12 @@ public final class NodeList { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + /** * Get the value property: The list of Nodes. * @@ -31,6 +37,15 @@ public List value() { return this.value; } + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + /** * Validates the instance. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Operation.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Operation.java index 773d19cfaec27..a9c9adb65da0c 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Operation.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Operation.java @@ -15,6 +15,13 @@ public interface Operation { */ String name(); + /** + * Gets the isDataAction property: Is data action. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + /** * Gets the display property: Properties displayed for the operation. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Order.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Order.java index a4546284bf4b8..3600d20ba14db 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Order.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Order.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.OrderInner; import java.util.List; @@ -30,6 +31,13 @@ public interface Order { */ String type(); + /** + * Gets the systemData property: Order configured on ASE resource. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the contactInformation property: The contact details. * @@ -81,6 +89,13 @@ public interface Order { */ List returnTrackingInfo(); + /** + * Gets the shipmentType property: ShipmentType of the order. + * + * @return the shipmentType value. + */ + ShipmentType shipmentType(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.OrderInner object. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderState.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderState.java index ba3c467e57f58..3a3f27f5d64a4 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderState.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderState.java @@ -13,8 +13,8 @@ public final class OrderState extends ExpandableStringEnum { /** Static value Untracked for OrderState. */ public static final OrderState UNTRACKED = fromString("Untracked"); - /** Static value AwaitingFulfilment for OrderState. */ - public static final OrderState AWAITING_FULFILMENT = fromString("AwaitingFulfilment"); + /** Static value AwaitingFulfillment for OrderState. */ + public static final OrderState AWAITING_FULFILLMENT = fromString("AwaitingFulfillment"); /** Static value AwaitingPreparation for OrderState. */ public static final OrderState AWAITING_PREPARATION = fromString("AwaitingPreparation"); @@ -52,6 +52,15 @@ public final class OrderState extends ExpandableStringEnum { /** Static value CollectedAtMicrosoft for OrderState. */ public static final OrderState COLLECTED_AT_MICROSOFT = fromString("CollectedAtMicrosoft"); + /** Static value AwaitingPickup for OrderState. */ + public static final OrderState AWAITING_PICKUP = fromString("AwaitingPickup"); + + /** Static value PickupCompleted for OrderState. */ + public static final OrderState PICKUP_COMPLETED = fromString("PickupCompleted"); + + /** Static value AwaitingDrop for OrderState. */ + public static final OrderState AWAITING_DROP = fromString("AwaitingDrop"); + /** * Creates or finds a OrderState from its string representation. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderStatus.java index 917d425588982..4da36e3e2e1a3 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderStatus.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; @@ -34,11 +35,18 @@ public final class OrderStatus { @JsonProperty(value = "comments") private String comments; + /* + * Tracking information related to the state in the ordering flow + */ + @JsonProperty(value = "trackingInformation", access = JsonProperty.Access.WRITE_ONLY) + private TrackingInfo trackingInformation; + /* * Dictionary to hold generic information which is not stored * by the already existing properties */ @JsonProperty(value = "additionalOrderDetails", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map additionalOrderDetails; /** @@ -90,6 +98,15 @@ public OrderStatus withComments(String comments) { return this; } + /** + * Get the trackingInformation property: Tracking information related to the state in the ordering flow. + * + * @return the trackingInformation value. + */ + public TrackingInfo trackingInformation() { + return this.trackingInformation; + } + /** * Get the additionalOrderDetails property: Dictionary to hold generic information which is not stored by the * already existing properties. @@ -111,5 +128,8 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException("Missing required property status in model OrderStatus")); } + if (trackingInformation() != null) { + trackingInformation().validate(); + } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Orders.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Orders.java index 3825466359cea..ca7d201f8b9ef 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Orders.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Orders.java @@ -110,4 +110,29 @@ public interface Orders { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String deviceName, String resourceGroupName, Context context); + + /** + * Gets the DCAccess Code. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DCAccess Code. + */ + DCAccessCode listDCAccessCode(String deviceName, String resourceGroupName); + + /** + * Gets the DCAccess Code. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DCAccess Code. + */ + Response listDCAccessCodeWithResponse(String deviceName, String resourceGroupName, Context context); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PosixComplianceStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PosixComplianceStatus.java new file mode 100644 index 0000000000000..89e3e1e68ad45 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PosixComplianceStatus.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PosixComplianceStatus. */ +public final class PosixComplianceStatus extends ExpandableStringEnum { + /** Static value Invalid for PosixComplianceStatus. */ + public static final PosixComplianceStatus INVALID = fromString("Invalid"); + + /** Static value Enabled for PosixComplianceStatus. */ + public static final PosixComplianceStatus ENABLED = fromString("Enabled"); + + /** Static value Disabled for PosixComplianceStatus. */ + public static final PosixComplianceStatus DISABLED = fromString("Disabled"); + + /** + * Creates or finds a PosixComplianceStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PosixComplianceStatus. + */ + @JsonCreator + public static PosixComplianceStatus fromString(String name) { + return fromString(name, PosixComplianceStatus.class); + } + + /** @return known PosixComplianceStatus values. */ + public static Collection values() { + return values(PosixComplianceStatus.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ProactiveDiagnosticsConsent.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ProactiveDiagnosticsConsent.java new file mode 100644 index 0000000000000..84bd6bfa0fc92 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ProactiveDiagnosticsConsent.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ProactiveDiagnosticsConsent. */ +public final class ProactiveDiagnosticsConsent extends ExpandableStringEnum { + /** Static value Enabled for ProactiveDiagnosticsConsent. */ + public static final ProactiveDiagnosticsConsent ENABLED = fromString("Enabled"); + + /** Static value Disabled for ProactiveDiagnosticsConsent. */ + public static final ProactiveDiagnosticsConsent DISABLED = fromString("Disabled"); + + /** + * Creates or finds a ProactiveDiagnosticsConsent from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProactiveDiagnosticsConsent. + */ + @JsonCreator + public static ProactiveDiagnosticsConsent fromString(String name) { + return fromString(name, ProactiveDiagnosticsConsent.class); + } + + /** @return known ProactiveDiagnosticsConsent values. */ + public static Collection values() { + return values(ProactiveDiagnosticsConsent.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RemoteApplicationType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RemoteApplicationType.java new file mode 100644 index 0000000000000..3629c64abace0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RemoteApplicationType.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for RemoteApplicationType. */ +public final class RemoteApplicationType extends ExpandableStringEnum { + /** Static value Powershell for RemoteApplicationType. */ + public static final RemoteApplicationType POWERSHELL = fromString("Powershell"); + + /** Static value WAC for RemoteApplicationType. */ + public static final RemoteApplicationType WAC = fromString("WAC"); + + /** Static value LocalUI for RemoteApplicationType. */ + public static final RemoteApplicationType LOCAL_UI = fromString("LocalUI"); + + /** Static value AllApplications for RemoteApplicationType. */ + public static final RemoteApplicationType ALL_APPLICATIONS = fromString("AllApplications"); + + /** + * Creates or finds a RemoteApplicationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RemoteApplicationType. + */ + @JsonCreator + public static RemoteApplicationType fromString(String name) { + return fromString(name, RemoteApplicationType.class); + } + + /** @return known RemoteApplicationType values. */ + public static Collection values() { + return values(RemoteApplicationType.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RemoteSupportSettings.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RemoteSupportSettings.java new file mode 100644 index 0000000000000..ce29433d2bb31 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RemoteSupportSettings.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** RemoteApplicationType for which remote support settings is being modified. */ +@Fluent +public final class RemoteSupportSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RemoteSupportSettings.class); + + /* + * Remote application type + */ + @JsonProperty(value = "remoteApplicationType") + private RemoteApplicationType remoteApplicationType; + + /* + * Access level allowed for this remote application type + */ + @JsonProperty(value = "accessLevel") + private AccessLevel accessLevel; + + /* + * Expiration time stamp + */ + @JsonProperty(value = "expirationTimeStampInUTC") + private OffsetDateTime expirationTimestampInUtc; + + /** + * Get the remoteApplicationType property: Remote application type. + * + * @return the remoteApplicationType value. + */ + public RemoteApplicationType remoteApplicationType() { + return this.remoteApplicationType; + } + + /** + * Set the remoteApplicationType property: Remote application type. + * + * @param remoteApplicationType the remoteApplicationType value to set. + * @return the RemoteSupportSettings object itself. + */ + public RemoteSupportSettings withRemoteApplicationType(RemoteApplicationType remoteApplicationType) { + this.remoteApplicationType = remoteApplicationType; + return this; + } + + /** + * Get the accessLevel property: Access level allowed for this remote application type. + * + * @return the accessLevel value. + */ + public AccessLevel accessLevel() { + return this.accessLevel; + } + + /** + * Set the accessLevel property: Access level allowed for this remote application type. + * + * @param accessLevel the accessLevel value to set. + * @return the RemoteSupportSettings object itself. + */ + public RemoteSupportSettings withAccessLevel(AccessLevel accessLevel) { + this.accessLevel = accessLevel; + return this; + } + + /** + * Get the expirationTimestampInUtc property: Expiration time stamp. + * + * @return the expirationTimestampInUtc value. + */ + public OffsetDateTime expirationTimestampInUtc() { + return this.expirationTimestampInUtc; + } + + /** + * Set the expirationTimestampInUtc property: Expiration time stamp. + * + * @param expirationTimestampInUtc the expirationTimestampInUtc value to set. + * @return the RemoteSupportSettings object itself. + */ + public RemoteSupportSettings withExpirationTimestampInUtc(OffsetDateTime expirationTimestampInUtc) { + this.expirationTimestampInUtc = expirationTimestampInUtc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceIdentity.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceIdentity.java new file mode 100644 index 0000000000000..793602baa0e28 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceIdentity.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Msi identity details of the resource. */ +@Fluent +public class ResourceIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceIdentity.class); + + /* + * Identity type + */ + @JsonProperty(value = "type") + private MsiIdentityType type; + + /* + * Service Principal Id backing the Msi + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * Home Tenant Id + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * Get the type property: Identity type. + * + * @return the type value. + */ + public MsiIdentityType type() { + return this.type; + } + + /** + * Set the type property: Identity type. + * + * @param type the type value to set. + * @return the ResourceIdentity object itself. + */ + public ResourceIdentity withType(MsiIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the principalId property: Service Principal Id backing the Msi. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: Home Tenant Id. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceMoveDetails.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceMoveDetails.java new file mode 100644 index 0000000000000..81e6e2a9f8e47 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceMoveDetails.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Fields for tracking resource move. */ +@Fluent +public final class ResourceMoveDetails { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceMoveDetails.class); + + /* + * Denotes whether move operation is in progress + */ + @JsonProperty(value = "operationInProgress") + private ResourceMoveStatus operationInProgress; + + /* + * Denotes the timeout of the operation to finish + */ + @JsonProperty(value = "operationInProgressLockTimeoutInUTC") + private OffsetDateTime operationInProgressLockTimeoutInUtc; + + /** + * Get the operationInProgress property: Denotes whether move operation is in progress. + * + * @return the operationInProgress value. + */ + public ResourceMoveStatus operationInProgress() { + return this.operationInProgress; + } + + /** + * Set the operationInProgress property: Denotes whether move operation is in progress. + * + * @param operationInProgress the operationInProgress value to set. + * @return the ResourceMoveDetails object itself. + */ + public ResourceMoveDetails withOperationInProgress(ResourceMoveStatus operationInProgress) { + this.operationInProgress = operationInProgress; + return this; + } + + /** + * Get the operationInProgressLockTimeoutInUtc property: Denotes the timeout of the operation to finish. + * + * @return the operationInProgressLockTimeoutInUtc value. + */ + public OffsetDateTime operationInProgressLockTimeoutInUtc() { + return this.operationInProgressLockTimeoutInUtc; + } + + /** + * Set the operationInProgressLockTimeoutInUtc property: Denotes the timeout of the operation to finish. + * + * @param operationInProgressLockTimeoutInUtc the operationInProgressLockTimeoutInUtc value to set. + * @return the ResourceMoveDetails object itself. + */ + public ResourceMoveDetails withOperationInProgressLockTimeoutInUtc( + OffsetDateTime operationInProgressLockTimeoutInUtc) { + this.operationInProgressLockTimeoutInUtc = operationInProgressLockTimeoutInUtc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceMoveStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceMoveStatus.java new file mode 100644 index 0000000000000..70ee57182a813 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceMoveStatus.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ResourceMoveStatus. */ +public final class ResourceMoveStatus extends ExpandableStringEnum { + /** Static value None for ResourceMoveStatus. */ + public static final ResourceMoveStatus NONE = fromString("None"); + + /** Static value ResourceMoveInProgress for ResourceMoveStatus. */ + public static final ResourceMoveStatus RESOURCE_MOVE_IN_PROGRESS = fromString("ResourceMoveInProgress"); + + /** Static value ResourceMoveFailed for ResourceMoveStatus. */ + public static final ResourceMoveStatus RESOURCE_MOVE_FAILED = fromString("ResourceMoveFailed"); + + /** + * Creates or finds a ResourceMoveStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceMoveStatus. + */ + @JsonCreator + public static ResourceMoveStatus fromString(String name) { + return fromString(name, ResourceMoveStatus.class); + } + + /** @return known ResourceMoveStatus values. */ + public static Collection values() { + return values(ResourceMoveStatus.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Role.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Role.java index a470ff9e54474..5ec36459f0d6c 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Role.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Role.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.RoleInner; /** An immutable client-side representation of Role. */ @@ -29,6 +30,13 @@ public interface Role { */ String type(); + /** + * Gets the systemData property: Role configured on ASE resource. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.RoleInner object. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleTypes.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleTypes.java index 77d85cf669660..ab2bf0c22160a 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleTypes.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleTypes.java @@ -22,6 +22,15 @@ public final class RoleTypes extends ExpandableStringEnum { /** Static value Cognitive for RoleTypes. */ public static final RoleTypes COGNITIVE = fromString("Cognitive"); + /** Static value MEC for RoleTypes. */ + public static final RoleTypes MEC = fromString("MEC"); + + /** Static value CloudEdgeManagement for RoleTypes. */ + public static final RoleTypes CLOUD_EDGE_MANAGEMENT = fromString("CloudEdgeManagement"); + + /** Static value Kubernetes for RoleTypes. */ + public static final RoleTypes KUBERNETES = fromString("Kubernetes"); + /** * Creates or finds a RoleTypes from its string representation. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Secret.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Secret.java new file mode 100644 index 0000000000000..7aed61657f786 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Secret.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Holds device secret either as a KeyVault reference or as an encrypted value. */ +@Fluent +public final class Secret { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Secret.class); + + /* + * Encrypted (using device public key) secret value. + */ + @JsonProperty(value = "encryptedSecret") + private AsymmetricEncryptedSecret encryptedSecret; + + /* + * Id of the Key-Vault where secret is stored (ex: + * secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740). + */ + @JsonProperty(value = "keyVaultId") + private String keyVaultId; + + /** + * Get the encryptedSecret property: Encrypted (using device public key) secret value. + * + * @return the encryptedSecret value. + */ + public AsymmetricEncryptedSecret encryptedSecret() { + return this.encryptedSecret; + } + + /** + * Set the encryptedSecret property: Encrypted (using device public key) secret value. + * + * @param encryptedSecret the encryptedSecret value to set. + * @return the Secret object itself. + */ + public Secret withEncryptedSecret(AsymmetricEncryptedSecret encryptedSecret) { + this.encryptedSecret = encryptedSecret; + return this; + } + + /** + * Get the keyVaultId property: Id of the Key-Vault where secret is stored (ex: + * secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740). + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set the keyVaultId property: Id of the Key-Vault where secret is stored (ex: + * secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740). + * + * @param keyVaultId the keyVaultId value to set. + * @return the Secret object itself. + */ + public Secret withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryptedSecret() != null) { + encryptedSecret().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Share.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Share.java index 72dffc3710a86..e4c92a3b1b212 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Share.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Share.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.ShareInner; import java.util.List; @@ -31,6 +32,13 @@ public interface Share { */ String type(); + /** + * Gets the systemData property: Share on ASE device. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the description property: Description for the share. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShipmentType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShipmentType.java new file mode 100644 index 0000000000000..c63c9bc2a2f84 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShipmentType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ShipmentType. */ +public final class ShipmentType extends ExpandableStringEnum { + /** Static value NotApplicable for ShipmentType. */ + public static final ShipmentType NOT_APPLICABLE = fromString("NotApplicable"); + + /** Static value ShippedToCustomer for ShipmentType. */ + public static final ShipmentType SHIPPED_TO_CUSTOMER = fromString("ShippedToCustomer"); + + /** Static value SelfPickup for ShipmentType. */ + public static final ShipmentType SELF_PICKUP = fromString("SelfPickup"); + + /** + * Creates or finds a ShipmentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ShipmentType. + */ + @JsonCreator + public static ShipmentType fromString(String name) { + return fromString(name, ShipmentType.class); + } + + /** @return known ShipmentType values. */ + public static Collection values() { + return values(ShipmentType.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuAvailability.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuAvailability.java new file mode 100644 index 0000000000000..d2c237315c13a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuAvailability.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SkuAvailability. */ +public final class SkuAvailability extends ExpandableStringEnum { + /** Static value Available for SkuAvailability. */ + public static final SkuAvailability AVAILABLE = fromString("Available"); + + /** Static value Unavailable for SkuAvailability. */ + public static final SkuAvailability UNAVAILABLE = fromString("Unavailable"); + + /** + * Creates or finds a SkuAvailability from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuAvailability. + */ + @JsonCreator + public static SkuAvailability fromString(String name) { + return fromString(name, SkuAvailability.class); + } + + /** @return known SkuAvailability values. */ + public static Collection values() { + return values(SkuAvailability.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuCapability.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuCapability.java new file mode 100644 index 0000000000000..a5a6a90695357 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuCapability.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The metadata to describe the capability. */ +@Immutable +public final class SkuCapability { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuCapability.class); + + /* + * An invariant to describe the feature. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * An invariant if the feature is measured by quantity. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** + * Get the name property: An invariant to describe the feature. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the value property: An invariant if the feature is measured by quantity. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuCost.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuCost.java index d90f1c5a98367..ebde7e6a11af5 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuCost.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuCost.java @@ -27,7 +27,7 @@ public final class SkuCost { private Long quantity; /* - * Restriction of the SKU for the location/zone + * The extended unit. */ @JsonProperty(value = "extendedUnit", access = JsonProperty.Access.WRITE_ONLY) private String extendedUnit; @@ -51,7 +51,7 @@ public Long quantity() { } /** - * Get the extendedUnit property: Restriction of the SKU for the location/zone. + * Get the extendedUnit property: The extended unit. * * @return the extendedUnit value. */ diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuName.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuName.java index 4fbb2fb050570..8bf117e675843 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuName.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuName.java @@ -37,6 +37,54 @@ public final class SkuName extends ExpandableStringEnum { /** Static value TMA for SkuName. */ public static final SkuName TMA = fromString("TMA"); + /** Static value TDC for SkuName. */ + public static final SkuName TDC = fromString("TDC"); + + /** Static value TCA_Small for SkuName. */ + public static final SkuName TCA_SMALL = fromString("TCA_Small"); + + /** Static value GPU for SkuName. */ + public static final SkuName GPU = fromString("GPU"); + + /** Static value TCA_Large for SkuName. */ + public static final SkuName TCA_LARGE = fromString("TCA_Large"); + + /** Static value EdgeP_Base for SkuName. */ + public static final SkuName EDGE_P_BASE = fromString("EdgeP_Base"); + + /** Static value EdgeP_High for SkuName. */ + public static final SkuName EDGE_P_HIGH = fromString("EdgeP_High"); + + /** Static value EdgePR_Base for SkuName. */ + public static final SkuName EDGE_PR_BASE = fromString("EdgePR_Base"); + + /** Static value EdgePR_Base_UPS for SkuName. */ + public static final SkuName EDGE_PR_BASE_UPS = fromString("EdgePR_Base_UPS"); + + /** Static value EP2_64_1VPU_W for SkuName. */ + public static final SkuName EP2_64_1VPU_W = fromString("EP2_64_1VPU_W"); + + /** Static value EP2_128_1T4_Mx1_W for SkuName. */ + public static final SkuName EP2_128_1T4_MX1_W = fromString("EP2_128_1T4_Mx1_W"); + + /** Static value EP2_256_2T4_W for SkuName. */ + public static final SkuName EP2_256_2T4_W = fromString("EP2_256_2T4_W"); + + /** Static value EdgeMR_Mini for SkuName. */ + public static final SkuName EDGE_MR_MINI = fromString("EdgeMR_Mini"); + + /** Static value RCA_Small for SkuName. */ + public static final SkuName RCA_SMALL = fromString("RCA_Small"); + + /** Static value RCA_Large for SkuName. */ + public static final SkuName RCA_LARGE = fromString("RCA_Large"); + + /** Static value RDC for SkuName. */ + public static final SkuName RDC = fromString("RDC"); + + /** Static value Management for SkuName. */ + public static final SkuName MANAGEMENT = fromString("Management"); + /** * Creates or finds a SkuName from its string representation. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestriction.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestriction.java deleted file mode 100644 index 1f1f9bca17ffc..0000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestriction.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databoxedge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The restrictions because of which SKU cannot be used. */ -@Immutable -public final class SkuRestriction { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuRestriction.class); - - /* - * The type of the restriction. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * The locations where sku is restricted. - */ - @JsonProperty(value = "values", access = JsonProperty.Access.WRITE_ONLY) - private List values; - - /* - * The SKU restriction reason. - */ - @JsonProperty(value = "reasonCode", access = JsonProperty.Access.WRITE_ONLY) - private SkuRestrictionReasonCode reasonCode; - - /* - * Restriction of the SKU for the location/zone - */ - @JsonProperty(value = "restrictionInfo", access = JsonProperty.Access.WRITE_ONLY) - private SkuRestrictionInfo restrictionInfo; - - /** - * Get the type property: The type of the restriction. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the values property: The locations where sku is restricted. - * - * @return the values value. - */ - public List values() { - return this.values; - } - - /** - * Get the reasonCode property: The SKU restriction reason. - * - * @return the reasonCode value. - */ - public SkuRestrictionReasonCode reasonCode() { - return this.reasonCode; - } - - /** - * Get the restrictionInfo property: Restriction of the SKU for the location/zone. - * - * @return the restrictionInfo value. - */ - public SkuRestrictionInfo restrictionInfo() { - return this.restrictionInfo; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (restrictionInfo() != null) { - restrictionInfo().validate(); - } - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestrictionReasonCode.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestrictionReasonCode.java deleted file mode 100644 index 30312411d9492..0000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestrictionReasonCode.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databoxedge.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SkuRestrictionReasonCode. */ -public final class SkuRestrictionReasonCode extends ExpandableStringEnum { - /** Static value NotAvailableForSubscription for SkuRestrictionReasonCode. */ - public static final SkuRestrictionReasonCode NOT_AVAILABLE_FOR_SUBSCRIPTION = - fromString("NotAvailableForSubscription"); - - /** Static value QuotaId for SkuRestrictionReasonCode. */ - public static final SkuRestrictionReasonCode QUOTA_ID = fromString("QuotaId"); - - /** - * Creates or finds a SkuRestrictionReasonCode from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuRestrictionReasonCode. - */ - @JsonCreator - public static SkuRestrictionReasonCode fromString(String name) { - return fromString(name, SkuRestrictionReasonCode.class); - } - - /** @return known SkuRestrictionReasonCode values. */ - public static Collection values() { - return values(SkuRestrictionReasonCode.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuSignupOption.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuSignupOption.java new file mode 100644 index 0000000000000..527b7fd8061f2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuSignupOption.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SkuSignupOption. */ +public final class SkuSignupOption extends ExpandableStringEnum { + /** Static value None for SkuSignupOption. */ + public static final SkuSignupOption NONE = fromString("None"); + + /** Static value Available for SkuSignupOption. */ + public static final SkuSignupOption AVAILABLE = fromString("Available"); + + /** + * Creates or finds a SkuSignupOption from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuSignupOption. + */ + @JsonCreator + public static SkuSignupOption fromString(String name) { + return fromString(name, SkuSignupOption.class); + } + + /** @return known SkuSignupOption values. */ + public static Collection values() { + return values(SkuSignupOption.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuVersion.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuVersion.java new file mode 100644 index 0000000000000..b4ad50da31d15 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuVersion.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SkuVersion. */ +public final class SkuVersion extends ExpandableStringEnum { + /** Static value Stable for SkuVersion. */ + public static final SkuVersion STABLE = fromString("Stable"); + + /** Static value Preview for SkuVersion. */ + public static final SkuVersion PREVIEW = fromString("Preview"); + + /** + * Creates or finds a SkuVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuVersion. + */ + @JsonCreator + public static SkuVersion fromString(String name) { + return fromString(name, SkuVersion.class); + } + + /** @return known SkuVersion values. */ + public static Collection values() { + return values(SkuVersion.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccount.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccount.java index 33b382d1360d0..41a9400dae73c 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccount.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccount.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.StorageAccountInner; @@ -30,6 +31,13 @@ public interface StorageAccount { */ String type(); + /** + * Gets the systemData property: StorageAccount object on ASE device. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the description property: Description for the storage Account. * @@ -82,7 +90,10 @@ public interface StorageAccount { /** The entirety of the StorageAccount definition. */ interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithDataPolicy, + DefinitionStages.WithCreate { } /** The StorageAccount definition stages. */ interface DefinitionStages { @@ -98,7 +109,17 @@ interface WithParentResource { * @param resourceGroupName The resource group name. * @return the next definition stage. */ - WithCreate withExistingDataBoxEdgeDevice(String deviceName, String resourceGroupName); + WithDataPolicy withExistingDataBoxEdgeDevice(String deviceName, String resourceGroupName); + } + /** The stage of the StorageAccount definition allowing to specify dataPolicy. */ + interface WithDataPolicy { + /** + * Specifies the dataPolicy property: Data policy of the storage Account.. + * + * @param dataPolicy Data policy of the storage Account. + * @return the next definition stage. + */ + WithCreate withDataPolicy(DataPolicy dataPolicy); } /** * The stage of the StorageAccount definition which contains all the minimum required properties for the @@ -107,7 +128,6 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithDescription, DefinitionStages.WithStorageAccountStatus, - DefinitionStages.WithDataPolicy, DefinitionStages.WithStorageAccountCredentialId { /** * Executes the create request. @@ -144,16 +164,6 @@ interface WithStorageAccountStatus { */ WithCreate withStorageAccountStatus(StorageAccountStatus storageAccountStatus); } - /** The stage of the StorageAccount definition allowing to specify dataPolicy. */ - interface WithDataPolicy { - /** - * Specifies the dataPolicy property: Data policy of the storage Account.. - * - * @param dataPolicy Data policy of the storage Account. - * @return the next definition stage. - */ - WithCreate withDataPolicy(DataPolicy dataPolicy); - } /** The stage of the StorageAccount definition allowing to specify storageAccountCredentialId. */ interface WithStorageAccountCredentialId { /** diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredential.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredential.java index d84a6b6654c33..d552f06085efd 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredential.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredential.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.StorageAccountCredentialInner; @@ -30,6 +31,13 @@ public interface StorageAccountCredential { */ String type(); + /** + * Gets the systemData property: StorageAccountCredential object. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the alias property: Alias for the storage account. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccounts.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccounts.java index b0697bb7f8396..0b3aa31f5f0e0 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccounts.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccounts.java @@ -11,7 +11,7 @@ /** Resource collection API of StorageAccounts. */ public interface StorageAccounts { /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -23,7 +23,7 @@ public interface StorageAccounts { PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SubscriptionRegisteredFeatures.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SubscriptionRegisteredFeatures.java new file mode 100644 index 0000000000000..84fa2b644bf50 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SubscriptionRegisteredFeatures.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SubscriptionRegisteredFeatures model. */ +@Fluent +public final class SubscriptionRegisteredFeatures { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SubscriptionRegisteredFeatures.class); + + /* + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The state property. + */ + @JsonProperty(value = "state") + private String state; + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the SubscriptionRegisteredFeatures object itself. + */ + public SubscriptionRegisteredFeatures withName(String name) { + this.name = name; + return this; + } + + /** + * Get the state property: The state property. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Set the state property: The state property. + * + * @param state the state value to set. + * @return the SubscriptionRegisteredFeatures object itself. + */ + public SubscriptionRegisteredFeatures withState(String state) { + this.state = state; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SubscriptionState.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SubscriptionState.java new file mode 100644 index 0000000000000..1248a151f9439 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SubscriptionState.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SubscriptionState. */ +public final class SubscriptionState extends ExpandableStringEnum { + /** Static value Registered for SubscriptionState. */ + public static final SubscriptionState REGISTERED = fromString("Registered"); + + /** Static value Warned for SubscriptionState. */ + public static final SubscriptionState WARNED = fromString("Warned"); + + /** Static value Suspended for SubscriptionState. */ + public static final SubscriptionState SUSPENDED = fromString("Suspended"); + + /** Static value Deleted for SubscriptionState. */ + public static final SubscriptionState DELETED = fromString("Deleted"); + + /** Static value Unregistered for SubscriptionState. */ + public static final SubscriptionState UNREGISTERED = fromString("Unregistered"); + + /** + * Creates or finds a SubscriptionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding SubscriptionState. + */ + @JsonCreator + public static SubscriptionState fromString(String name) { + return fromString(name, SubscriptionState.class); + } + + /** @return known SubscriptionState values. */ + public static Collection values() { + return values(SubscriptionState.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SupportPackages.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SupportPackages.java new file mode 100644 index 0000000000000..35d148e7466a9 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SupportPackages.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.Context; + +/** Resource collection API of SupportPackages. */ +public interface SupportPackages { + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void triggerSupportPackage( + String deviceName, String resourceGroupName, TriggerSupportPackageRequest triggerSupportPackageRequest); + + /** + * Triggers support package on the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void triggerSupportPackage( + String deviceName, + String resourceGroupName, + TriggerSupportPackageRequest triggerSupportPackageRequest, + Context context); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Trigger.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Trigger.java index a05d1d29d3083..9561bcfa71665 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Trigger.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Trigger.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.TriggerInner; /** An immutable client-side representation of Trigger. */ @@ -29,6 +30,13 @@ public interface Trigger { */ String type(); + /** + * Gets the systemData property: Trigger in DataBoxEdge Resource. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.TriggerInner object. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TriggerSupportPackageRequest.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TriggerSupportPackageRequest.java new file mode 100644 index 0000000000000..44bfc06c5f8f2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TriggerSupportPackageRequest.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The request object for trigger support package. */ +@JsonFlatten +@Fluent +public class TriggerSupportPackageRequest extends ArmBaseModel { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggerSupportPackageRequest.class); + + /* + * MinimumTimeStamp from where logs need to be collected + */ + @JsonProperty(value = "properties.minimumTimeStamp") + private OffsetDateTime minimumTimestamp; + + /* + * MaximumTimeStamp until where logs need to be collected + */ + @JsonProperty(value = "properties.maximumTimeStamp") + private OffsetDateTime maximumTimestamp; + + /* + * Type of files, which need to be included in the logs + * This will contain the type of logs + * (Default/DefaultWithDumps/None/All/DefaultWithArchived) + * or a comma separated list of log types that are required + */ + @JsonProperty(value = "properties.include") + private String include; + + /** + * Get the minimumTimestamp property: MinimumTimeStamp from where logs need to be collected. + * + * @return the minimumTimestamp value. + */ + public OffsetDateTime minimumTimestamp() { + return this.minimumTimestamp; + } + + /** + * Set the minimumTimestamp property: MinimumTimeStamp from where logs need to be collected. + * + * @param minimumTimestamp the minimumTimestamp value to set. + * @return the TriggerSupportPackageRequest object itself. + */ + public TriggerSupportPackageRequest withMinimumTimestamp(OffsetDateTime minimumTimestamp) { + this.minimumTimestamp = minimumTimestamp; + return this; + } + + /** + * Get the maximumTimestamp property: MaximumTimeStamp until where logs need to be collected. + * + * @return the maximumTimestamp value. + */ + public OffsetDateTime maximumTimestamp() { + return this.maximumTimestamp; + } + + /** + * Set the maximumTimestamp property: MaximumTimeStamp until where logs need to be collected. + * + * @param maximumTimestamp the maximumTimestamp value to set. + * @return the TriggerSupportPackageRequest object itself. + */ + public TriggerSupportPackageRequest withMaximumTimestamp(OffsetDateTime maximumTimestamp) { + this.maximumTimestamp = maximumTimestamp; + return this; + } + + /** + * Get the include property: Type of files, which need to be included in the logs This will contain the type of logs + * (Default/DefaultWithDumps/None/All/DefaultWithArchived) or a comma separated list of log types that are required. + * + * @return the include value. + */ + public String include() { + return this.include; + } + + /** + * Set the include property: Type of files, which need to be included in the logs This will contain the type of logs + * (Default/DefaultWithDumps/None/All/DefaultWithArchived) or a comma separated list of log types that are required. + * + * @param include the include value to set. + * @return the TriggerSupportPackageRequest object itself. + */ + public TriggerSupportPackageRequest withInclude(String include) { + this.include = include; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateDetails.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateDetails.java new file mode 100644 index 0000000000000..44a3ebefa52f2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateDetails.java @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Update Specific attributes. */ +@Fluent +public final class UpdateDetails { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateDetails.class); + + /* + * Title of the Update + */ + @JsonProperty(value = "updateTitle") + private String updateTitle; + + /* + * Size of the update(In Bytes) + */ + @JsonProperty(value = "updateSize") + private Double updateSize; + + /* + * Type of the Update + */ + @JsonProperty(value = "updateType") + private UpdateType updateType; + + /* + * Target Version number + */ + @JsonProperty(value = "targetVersion") + private String targetVersion; + + /* + * Friendly Version Number + */ + @JsonProperty(value = "friendlyVersionNumber") + private String friendlyVersionNumber; + + /* + * Estimated Install Time for the update + */ + @JsonProperty(value = "estimatedInstallTimeInMins") + private Integer estimatedInstallTimeInMins; + + /* + * Indicates if updates are available and at least one of the updates needs + * a reboot. + */ + @JsonProperty(value = "rebootBehavior") + private InstallRebootBehavior rebootBehavior; + + /* + * Impact of Installing an updateType + */ + @JsonProperty(value = "installationImpact") + private InstallationImpact installationImpact; + + /* + * Status of the update. + */ + @JsonProperty(value = "status") + private UpdateStatus status; + + /** + * Get the updateTitle property: Title of the Update. + * + * @return the updateTitle value. + */ + public String updateTitle() { + return this.updateTitle; + } + + /** + * Set the updateTitle property: Title of the Update. + * + * @param updateTitle the updateTitle value to set. + * @return the UpdateDetails object itself. + */ + public UpdateDetails withUpdateTitle(String updateTitle) { + this.updateTitle = updateTitle; + return this; + } + + /** + * Get the updateSize property: Size of the update(In Bytes). + * + * @return the updateSize value. + */ + public Double updateSize() { + return this.updateSize; + } + + /** + * Set the updateSize property: Size of the update(In Bytes). + * + * @param updateSize the updateSize value to set. + * @return the UpdateDetails object itself. + */ + public UpdateDetails withUpdateSize(Double updateSize) { + this.updateSize = updateSize; + return this; + } + + /** + * Get the updateType property: Type of the Update. + * + * @return the updateType value. + */ + public UpdateType updateType() { + return this.updateType; + } + + /** + * Set the updateType property: Type of the Update. + * + * @param updateType the updateType value to set. + * @return the UpdateDetails object itself. + */ + public UpdateDetails withUpdateType(UpdateType updateType) { + this.updateType = updateType; + return this; + } + + /** + * Get the targetVersion property: Target Version number. + * + * @return the targetVersion value. + */ + public String targetVersion() { + return this.targetVersion; + } + + /** + * Set the targetVersion property: Target Version number. + * + * @param targetVersion the targetVersion value to set. + * @return the UpdateDetails object itself. + */ + public UpdateDetails withTargetVersion(String targetVersion) { + this.targetVersion = targetVersion; + return this; + } + + /** + * Get the friendlyVersionNumber property: Friendly Version Number. + * + * @return the friendlyVersionNumber value. + */ + public String friendlyVersionNumber() { + return this.friendlyVersionNumber; + } + + /** + * Set the friendlyVersionNumber property: Friendly Version Number. + * + * @param friendlyVersionNumber the friendlyVersionNumber value to set. + * @return the UpdateDetails object itself. + */ + public UpdateDetails withFriendlyVersionNumber(String friendlyVersionNumber) { + this.friendlyVersionNumber = friendlyVersionNumber; + return this; + } + + /** + * Get the estimatedInstallTimeInMins property: Estimated Install Time for the update. + * + * @return the estimatedInstallTimeInMins value. + */ + public Integer estimatedInstallTimeInMins() { + return this.estimatedInstallTimeInMins; + } + + /** + * Set the estimatedInstallTimeInMins property: Estimated Install Time for the update. + * + * @param estimatedInstallTimeInMins the estimatedInstallTimeInMins value to set. + * @return the UpdateDetails object itself. + */ + public UpdateDetails withEstimatedInstallTimeInMins(Integer estimatedInstallTimeInMins) { + this.estimatedInstallTimeInMins = estimatedInstallTimeInMins; + return this; + } + + /** + * Get the rebootBehavior property: Indicates if updates are available and at least one of the updates needs a + * reboot. + * + * @return the rebootBehavior value. + */ + public InstallRebootBehavior rebootBehavior() { + return this.rebootBehavior; + } + + /** + * Set the rebootBehavior property: Indicates if updates are available and at least one of the updates needs a + * reboot. + * + * @param rebootBehavior the rebootBehavior value to set. + * @return the UpdateDetails object itself. + */ + public UpdateDetails withRebootBehavior(InstallRebootBehavior rebootBehavior) { + this.rebootBehavior = rebootBehavior; + return this; + } + + /** + * Get the installationImpact property: Impact of Installing an updateType. + * + * @return the installationImpact value. + */ + public InstallationImpact installationImpact() { + return this.installationImpact; + } + + /** + * Set the installationImpact property: Impact of Installing an updateType. + * + * @param installationImpact the installationImpact value to set. + * @return the UpdateDetails object itself. + */ + public UpdateDetails withInstallationImpact(InstallationImpact installationImpact) { + this.installationImpact = installationImpact; + return this; + } + + /** + * Get the status property: Status of the update. + * + * @return the status value. + */ + public UpdateStatus status() { + return this.status; + } + + /** + * Set the status property: Status of the update. + * + * @param status the status value to set. + * @return the UpdateDetails object itself. + */ + public UpdateDetails withStatus(UpdateStatus status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateStatus.java new file mode 100644 index 0000000000000..bd94a281dbab5 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateStatus.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for UpdateStatus. */ +public final class UpdateStatus extends ExpandableStringEnum { + /** Static value DownloadPending for UpdateStatus. */ + public static final UpdateStatus DOWNLOAD_PENDING = fromString("DownloadPending"); + + /** Static value DownloadStarted for UpdateStatus. */ + public static final UpdateStatus DOWNLOAD_STARTED = fromString("DownloadStarted"); + + /** Static value DownloadCompleted for UpdateStatus. */ + public static final UpdateStatus DOWNLOAD_COMPLETED = fromString("DownloadCompleted"); + + /** Static value InstallStarted for UpdateStatus. */ + public static final UpdateStatus INSTALL_STARTED = fromString("InstallStarted"); + + /** Static value InstallCompleted for UpdateStatus. */ + public static final UpdateStatus INSTALL_COMPLETED = fromString("InstallCompleted"); + + /** + * Creates or finds a UpdateStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpdateStatus. + */ + @JsonCreator + public static UpdateStatus fromString(String name) { + return fromString(name, UpdateStatus.class); + } + + /** @return known UpdateStatus values. */ + public static Collection values() { + return values(UpdateStatus.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateSummary.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateSummary.java index 0ddca1b351a2d..3322fdba37cab 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateSummary.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateSummary.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.UpdateSummaryInner; import java.time.OffsetDateTime; import java.util.List; @@ -31,6 +32,13 @@ public interface UpdateSummary { */ String type(); + /** + * Gets the systemData property: UpdateSummary Result. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the deviceVersionNumber property: The current version of the device in format: 1.2.17312.13.",. * @@ -60,6 +68,13 @@ public interface UpdateSummary { */ OffsetDateTime lastCompletedScanJobDateTime(); + /** + * Gets the lastSuccessfulScanJobTime property: Time when the last scan job is successfully completed. + * + * @return the lastSuccessfulScanJobTime value. + */ + OffsetDateTime lastSuccessfulScanJobTime(); + /** * Gets the lastCompletedDownloadJobDateTime property: The time when the last Download job was completed * (success/cancelled/failed) on the appliance. @@ -68,6 +83,29 @@ public interface UpdateSummary { */ OffsetDateTime lastCompletedDownloadJobDateTime(); + /** + * Gets the lastCompletedDownloadJobId property: JobId of the last ran download job.(Can be + * success/cancelled/failed). + * + * @return the lastCompletedDownloadJobId value. + */ + String lastCompletedDownloadJobId(); + + /** + * Gets the lastDownloadJobStatus property: JobStatus of the last ran download job. + * + * @return the lastDownloadJobStatus value. + */ + JobStatus lastDownloadJobStatus(); + + /** + * Gets the lastSuccessfulInstallJobDateTime property: The time when the Last Install job was completed successfully + * on the appliance. + * + * @return the lastSuccessfulInstallJobDateTime value. + */ + OffsetDateTime lastSuccessfulInstallJobDateTime(); + /** * Gets the lastCompletedInstallJobDateTime property: The time when the last Install job was completed * (success/cancelled/failed) on the appliance. @@ -76,6 +114,20 @@ public interface UpdateSummary { */ OffsetDateTime lastCompletedInstallJobDateTime(); + /** + * Gets the lastCompletedInstallJobId property: JobId of the last ran install job.(Can be success/cancelled/failed). + * + * @return the lastCompletedInstallJobId value. + */ + String lastCompletedInstallJobId(); + + /** + * Gets the lastInstallJobStatus property: JobStatus of the last ran install job. + * + * @return the lastInstallJobStatus value. + */ + JobStatus lastInstallJobStatus(); + /** * Gets the totalNumberOfUpdatesAvailable property: The number of updates available for the current device version * as per the last device scan. @@ -150,6 +202,13 @@ public interface UpdateSummary { */ List updateTitles(); + /** + * Gets the updates property: The list of updates available for install. + * + * @return the updates value. + */ + List updates(); + /** * Gets the totalUpdateSizeInBytes property: The total size of updates available for download in bytes. * @@ -157,6 +216,13 @@ public interface UpdateSummary { */ Double totalUpdateSizeInBytes(); + /** + * Gets the totalTimeInMinutes property: The total time in Minutes. + * + * @return the totalTimeInMinutes value. + */ + Integer totalTimeInMinutes(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.UpdateSummaryInner object. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateType.java new file mode 100644 index 0000000000000..0aa3817f182e7 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databoxedge.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for UpdateType. */ +public final class UpdateType extends ExpandableStringEnum { + /** Static value Software for UpdateType. */ + public static final UpdateType SOFTWARE = fromString("Software"); + + /** Static value Kubernetes for UpdateType. */ + public static final UpdateType KUBERNETES = fromString("Kubernetes"); + + /** Static value Firmware for UpdateType. */ + public static final UpdateType FIRMWARE = fromString("Firmware"); + + /** + * Creates or finds a UpdateType from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpdateType. + */ + @JsonCreator + public static UpdateType fromString(String name) { + return fromString(name, UpdateType.class); + } + + /** @return known UpdateType values. */ + public static Collection values() { + return values(UpdateType.class); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/User.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/User.java index 1630b85106288..38a366a01deb4 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/User.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/User.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.UserInner; import java.util.List; @@ -31,6 +32,13 @@ public interface User { */ String type(); + /** + * Gets the systemData property: User in DataBoxEdge Resource. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the encryptedPassword property: The password details. * @@ -97,7 +105,7 @@ interface WithUserType { * The stage of the User definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithEncryptedPassword, DefinitionStages.WithShareAccessRights { + interface WithCreate extends DefinitionStages.WithEncryptedPassword { /** * Executes the create request. * @@ -123,18 +131,6 @@ interface WithEncryptedPassword { */ WithCreate withEncryptedPassword(AsymmetricEncryptedSecret encryptedPassword); } - /** The stage of the User definition allowing to specify shareAccessRights. */ - interface WithShareAccessRights { - /** - * Specifies the shareAccessRights property: List of shares that the user has rights on. This field should - * not be specified during user creation.. - * - * @param shareAccessRights List of shares that the user has rights on. This field should not be specified - * during user creation. - * @return the next definition stage. - */ - WithCreate withShareAccessRights(List shareAccessRights); - } } /** * Begins update for the User resource. @@ -144,8 +140,7 @@ interface WithShareAccessRights { User.Update update(); /** The template for User update. */ - interface Update - extends UpdateStages.WithEncryptedPassword, UpdateStages.WithShareAccessRights, UpdateStages.WithUserType { + interface Update extends UpdateStages.WithEncryptedPassword, UpdateStages.WithUserType { /** * Executes the update request. * @@ -173,18 +168,6 @@ interface WithEncryptedPassword { */ Update withEncryptedPassword(AsymmetricEncryptedSecret encryptedPassword); } - /** The stage of the User update allowing to specify shareAccessRights. */ - interface WithShareAccessRights { - /** - * Specifies the shareAccessRights property: List of shares that the user has rights on. This field should - * not be specified during user creation.. - * - * @param shareAccessRights List of shares that the user has rights on. This field should not be specified - * during user creation. - * @return the next definition stage. - */ - Update withShareAccessRights(List shareAccessRights); - } /** The stage of the User update allowing to specify userType. */ interface WithUserType { /** diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Users.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Users.java index cf8ed029cdf99..feb8f70f462b3 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Users.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Users.java @@ -27,7 +27,7 @@ public interface Users { * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.