diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/CHANGELOG.md b/sdk/databoxedge/azure-resourcemanager-databoxedge/CHANGELOG.md index 0ed4046c5a0e..d294ab159cb6 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 (2022-12-14) +- Azure Resource Manager DataBoxEdge client library for Java. This package contains Microsoft Azure SDK for DataBoxEdge Management SDK. Package tag package-2022-03-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 1fbf18e47484..1b5cc9d2a377 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-2022-03-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}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -74,19 +74,22 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/databoxedge/azure-resourcemanager-databoxedge/SAMPLE.md) + + ## Troubleshooting ## Next steps ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -97,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/SAMPLE.md b/sdk/databoxedge/azure-resourcemanager-databoxedge/SAMPLE.md new file mode 100644 index 000000000000..efaa523ab635 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/SAMPLE.md @@ -0,0 +1,2167 @@ +# Code snippets and samples + + +## Addons + +- [CreateOrUpdate](#addons_createorupdate) +- [Delete](#addons_delete) +- [Get](#addons_get) +- [ListByRole](#addons_listbyrole) + +## Alerts + +- [Get](#alerts_get) +- [ListByDataBoxEdgeDevice](#alerts_listbydataboxedgedevice) + +## AvailableSkus + +- [List](#availableskus_list) + +## BandwidthSchedules + +- [CreateOrUpdate](#bandwidthschedules_createorupdate) +- [Delete](#bandwidthschedules_delete) +- [Get](#bandwidthschedules_get) +- [ListByDataBoxEdgeDevice](#bandwidthschedules_listbydataboxedgedevice) + +## Containers + +- [CreateOrUpdate](#containers_createorupdate) +- [Delete](#containers_delete) +- [Get](#containers_get) +- [ListByStorageAccount](#containers_listbystorageaccount) +- [Refresh](#containers_refresh) + +## DeviceCapacityCheck + +- [CheckResourceCreationFeasibility](#devicecapacitycheck_checkresourcecreationfeasibility) + +## DeviceCapacityInfo + +- [GetDeviceCapacityInfo](#devicecapacityinfo_getdevicecapacityinfo) + +## Devices + +- [CreateOrUpdate](#devices_createorupdate) +- [CreateOrUpdateSecuritySettings](#devices_createorupdatesecuritysettings) +- [Delete](#devices_delete) +- [DownloadUpdates](#devices_downloadupdates) +- [GenerateCertificate](#devices_generatecertificate) +- [GetByResourceGroup](#devices_getbyresourcegroup) +- [GetExtendedInformation](#devices_getextendedinformation) +- [GetNetworkSettings](#devices_getnetworksettings) +- [GetUpdateSummary](#devices_getupdatesummary) +- [InstallUpdates](#devices_installupdates) +- [List](#devices_list) +- [ListByResourceGroup](#devices_listbyresourcegroup) +- [ScanForUpdates](#devices_scanforupdates) +- [Update](#devices_update) +- [UpdateExtendedInformation](#devices_updateextendedinformation) +- [UploadCertificate](#devices_uploadcertificate) + +## DiagnosticSettings + +- [GetDiagnosticProactiveLogCollectionSettings](#diagnosticsettings_getdiagnosticproactivelogcollectionsettings) +- [GetDiagnosticRemoteSupportSettings](#diagnosticsettings_getdiagnosticremotesupportsettings) +- [UpdateDiagnosticProactiveLogCollectionSettings](#diagnosticsettings_updatediagnosticproactivelogcollectionsettings) +- [UpdateDiagnosticRemoteSupportSettings](#diagnosticsettings_updatediagnosticremotesupportsettings) + +## Jobs + +- [Get](#jobs_get) + +## MonitoringConfig + +- [CreateOrUpdate](#monitoringconfig_createorupdate) +- [Delete](#monitoringconfig_delete) +- [Get](#monitoringconfig_get) +- [List](#monitoringconfig_list) + +## Nodes + +- [ListByDataBoxEdgeDevice](#nodes_listbydataboxedgedevice) + +## Operations + +- [List](#operations_list) + +## OperationsStatus + +- [Get](#operationsstatus_get) + +## Orders + +- [CreateOrUpdate](#orders_createorupdate) +- [Delete](#orders_delete) +- [Get](#orders_get) +- [ListByDataBoxEdgeDevice](#orders_listbydataboxedgedevice) +- [ListDCAccessCode](#orders_listdcaccesscode) + +## Roles + +- [CreateOrUpdate](#roles_createorupdate) +- [Delete](#roles_delete) +- [Get](#roles_get) +- [ListByDataBoxEdgeDevice](#roles_listbydataboxedgedevice) + +## Shares + +- [CreateOrUpdate](#shares_createorupdate) +- [Delete](#shares_delete) +- [Get](#shares_get) +- [ListByDataBoxEdgeDevice](#shares_listbydataboxedgedevice) +- [Refresh](#shares_refresh) + +## StorageAccountCredentials + +- [CreateOrUpdate](#storageaccountcredentials_createorupdate) +- [Delete](#storageaccountcredentials_delete) +- [Get](#storageaccountcredentials_get) +- [ListByDataBoxEdgeDevice](#storageaccountcredentials_listbydataboxedgedevice) + +## StorageAccounts + +- [CreateOrUpdate](#storageaccounts_createorupdate) +- [Delete](#storageaccounts_delete) +- [Get](#storageaccounts_get) +- [ListByDataBoxEdgeDevice](#storageaccounts_listbydataboxedgedevice) + +## SupportPackages + +- [TriggerSupportPackage](#supportpackages_triggersupportpackage) + +## Triggers + +- [CreateOrUpdate](#triggers_createorupdate) +- [Delete](#triggers_delete) +- [Get](#triggers_get) +- [ListByDataBoxEdgeDevice](#triggers_listbydataboxedgedevice) + +## Users + +- [CreateOrUpdate](#users_createorupdate) +- [Delete](#users_delete) +- [Get](#users_get) +- [ListByDataBoxEdgeDevice](#users_listbydataboxedgedevice) +### Addons_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.ArcAddon; + +/** Samples for Addons CreateOrUpdate. */ +public final class AddonsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/PutAddons.json + */ + /** + * Sample code: PutAddOns. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void putAddOns(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .addons() + .createOrUpdate( + "testedgedevice", + "KubernetesRole", + "arcName", + "GroupForEdgeAutomation", + new ArcAddon() + .withSubscriptionId("4385cf00-2d3a-425a-832f-f4285b1c9dce") + .withResourceGroupName("GroupForEdgeAutomation") + .withResourceName("testedgedevice") + .withResourceLocation("EastUS"), + Context.NONE); + } +} +``` + +### Addons_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Addons Delete. */ +public final class AddonsDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DeleteAddons.json + */ + /** + * Sample code: DeleteAddOns. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void deleteAddOns(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.addons().delete("testedgedevice", "KubernetesRole", "arcName", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Addons_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Addons Get. */ +public final class AddonsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetAddons.json + */ + /** + * Sample code: GetAddOns. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getAddOns(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .addons() + .getWithResponse("testedgedevice", "KubernetesRole", "arcName", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Addons_ListByRole + +```java +import com.azure.core.util.Context; + +/** Samples for Addons ListByRole. */ +public final class AddonsListByRoleSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/RoleListAddOns.json + */ + /** + * Sample code: RoleListAddOns. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void roleListAddOns(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.addons().listByRole("testedgedevice", "IoTRole1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Alerts_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Alerts Get. */ +public final class AlertsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/AlertGet.json + */ + /** + * Sample code: AlertGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void alertGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .alerts() + .getWithResponse( + "testedgedevice", "159a00c7-8543-4343-9435-263ac87df3bb", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Alerts_ListByDataBoxEdgeDevice + +```java +import com.azure.core.util.Context; + +/** Samples for Alerts ListByDataBoxEdgeDevice. */ +public final class AlertsListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/AlertGetAllInDevice.json + */ + /** + * Sample code: AlertGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void alertGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.alerts().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### AvailableSkus_List + +```java +import com.azure.core.util.Context; + +/** Samples for AvailableSkus List. */ +public final class AvailableSkusListSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/AvailableSkusList.json + */ + /** + * Sample code: AvailableSkus. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void availableSkus(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.availableSkus().list(Context.NONE); + } +} +``` + +### BandwidthSchedules_CreateOrUpdate + +```java +import com.azure.resourcemanager.databoxedge.models.DayOfWeek; +import java.util.Arrays; + +/** Samples for BandwidthSchedules CreateOrUpdate. */ +public final class BandwidthSchedulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/BandwidthSchedulePut.json + */ + /** + * Sample code: BandwidthSchedulePut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void bandwidthSchedulePut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .bandwidthSchedules() + .define("bandwidth-1") + .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withStart("0:0:0") + .withStop("13:59:0") + .withRateInMbps(100) + .withDays(Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.MONDAY)) + .create(); + } +} +``` + +### BandwidthSchedules_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for BandwidthSchedules Delete. */ +public final class BandwidthSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/BandwidthScheduleDelete.json + */ + /** + * Sample code: BandwidthScheduleDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void bandwidthScheduleDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.bandwidthSchedules().delete("testedgedevice", "bandwidth-1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### BandwidthSchedules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for BandwidthSchedules Get. */ +public final class BandwidthSchedulesGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/BandwidthScheduleGet.json + */ + /** + * Sample code: BandwidthScheduleGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void bandwidthScheduleGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .bandwidthSchedules() + .getWithResponse("testedgedevice", "bandwidth-1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### BandwidthSchedules_ListByDataBoxEdgeDevice + +```java +import com.azure.core.util.Context; + +/** Samples for BandwidthSchedules ListByDataBoxEdgeDevice. */ +public final class BandwidthSchedulesListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/BandwidthScheduleGetAllInDevice.json + */ + /** + * Sample code: BandwidthScheduleGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void bandwidthScheduleGetAllInDevice( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.bandwidthSchedules().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Containers_CreateOrUpdate + +```java +import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; + +/** Samples for Containers CreateOrUpdate. */ +public final class ContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ContainerPut.json + */ + /** + * Sample code: ContainerPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void containerPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .containers() + .define("blobcontainer1") + .withExistingStorageAccount("testedgedevice", "storageaccount1", "GroupForEdgeAutomation") + .withDataFormat(AzureContainerDataFormat.BLOCK_BLOB) + .create(); + } +} +``` + +### Containers_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Containers Delete. */ +public final class ContainersDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ContainerDelete.json + */ + /** + * Sample code: ContainerDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void containerDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .containers() + .delete("testedgedevice", "storageaccount1", "blobcontainer1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Containers_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Containers Get. */ +public final class ContainersGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ContainerGet.json + */ + /** + * Sample code: ContainerGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void containerGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .containers() + .getWithResponse( + "testedgedevice", "storageaccount1", "blobcontainer1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Containers_ListByStorageAccount + +```java +import com.azure.core.util.Context; + +/** Samples for Containers ListByStorageAccount. */ +public final class ContainersListByStorageAccountSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ContainerListAllInDevice.json + */ + /** + * Sample code: ContainerListAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void containerListAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .containers() + .listByStorageAccount("testedgedevice", "storageaccount1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Containers_Refresh + +```java +import com.azure.core.util.Context; + +/** Samples for Containers Refresh. */ +public final class ContainersRefreshSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ContainerRefresh.json + */ + /** + * Sample code: ContainerRefresh. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void containerRefresh(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .containers() + .refresh("testedgedevice", "storageaccount1", "blobcontainer1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### DeviceCapacityCheck_CheckResourceCreationFeasibility + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.DeviceCapacityRequestInfo; +import java.util.Arrays; + +/** Samples for DeviceCapacityCheck CheckResourceCreationFeasibility. */ +public final class DeviceCapacityCheckCheckResourceCreationFeasibilitySamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DeviceCapacityRequestPost.json + */ + /** + * Sample code: DeviceCapacityRequestPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void deviceCapacityRequestPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .deviceCapacityChecks() + .checkResourceCreationFeasibility( + "GroupForEdgeAutomation", + "testedgedevice", + new DeviceCapacityRequestInfo().withVmPlacementQuery(Arrays.asList(Arrays.asList("Standard_D2_v2"))), + null, + Context.NONE); + } +} +``` + +### DeviceCapacityInfo_GetDeviceCapacityInfo + +```java +import com.azure.core.util.Context; + +/** Samples for DeviceCapacityInfo GetDeviceCapacityInfo. */ +public final class DeviceCapacityInfoGetDeviceCapacityInfoSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DeviceCapacityGet.json + */ + /** + * Sample code: DeviceCapacityGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void deviceCapacityGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .deviceCapacityInfoes() + .getDeviceCapacityInfoWithResponse("GroupForEdgeAutomation", "testedgedevice", Context.NONE); + } +} +``` + +### Devices_CreateOrUpdate + +```java +import com.azure.resourcemanager.databoxedge.models.DataResidency; +import com.azure.resourcemanager.databoxedge.models.DataResidencyType; +import com.azure.resourcemanager.databoxedge.models.Sku; +import com.azure.resourcemanager.databoxedge.models.SkuName; +import com.azure.resourcemanager.databoxedge.models.SkuTier; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Devices CreateOrUpdate. */ +public final class DevicesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDevicePutWithDataResidency.json + */ + /** + * Sample code: DataBoxEdgeDevicePutWithDataResidency. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDevicePutWithDataResidency( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .devices() + .define("testedgedevice") + .withRegion("WUS") + .withExistingResourceGroup("GroupForEdgeAutomation") + .withTags(mapOf()) + .withSku(new Sku().withName(SkuName.EDGE).withTier(SkuTier.STANDARD)) + .withDataResidency(new DataResidency().withType(DataResidencyType.ZONE_REPLICATION)) + .create(); + } + + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDevicePut.json + */ + /** + * Sample code: DataBoxEdgeDevicePut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDevicePut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .devices() + .define("testedgedevice") + .withRegion("WUS") + .withExistingResourceGroup("GroupForEdgeAutomation") + .withTags(mapOf()) + .withSku(new Sku().withName(SkuName.EDGE).withTier(SkuTier.STANDARD)) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Devices_CreateOrUpdateSecuritySettings + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; +import com.azure.resourcemanager.databoxedge.models.SecuritySettings; + +/** Samples for Devices CreateOrUpdateSecuritySettings. */ +public final class DevicesCreateOrUpdateSecuritySettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SecuritySettingsUpdatePost.json + */ + /** + * Sample code: CreateOrUpdateSecuritySettings. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void createOrUpdateSecuritySettings( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .devices() + .createOrUpdateSecuritySettings( + "testedgedevice", + "AzureVM", + new SecuritySettings() + .withDeviceAdminPassword( + new AsymmetricEncryptedSecret() + .withValue("") + .withEncryptionCertThumbprint("") + .withEncryptionAlgorithm(EncryptionAlgorithm.AES256)), + Context.NONE); + } +} +``` + +### Devices_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Devices Delete. */ +public final class DevicesDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDeviceDelete.json + */ + /** + * Sample code: DataBoxEdgeDeviceDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDeviceDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().delete("GroupForEdgeAutomation", "testedgedevice", Context.NONE); + } +} +``` + +### Devices_DownloadUpdates + +```java +import com.azure.core.util.Context; + +/** Samples for Devices DownloadUpdates. */ +public final class DevicesDownloadUpdatesSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DownloadUpdatesPost.json + */ + /** + * Sample code: DownloadUpdatesPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void downloadUpdatesPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().downloadUpdates("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Devices_GenerateCertificate + +```java +import com.azure.core.util.Context; + +/** Samples for Devices GenerateCertificate. */ +public final class DevicesGenerateCertificateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GenerateCertificate.json + */ + /** + * Sample code: GenerateCertificate. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void generateCertificate(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().generateCertificateWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Devices_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Devices GetByResourceGroup. */ +public final class DevicesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDeviceGetByName.json + */ + /** + * Sample code: DataBoxEdgeDeviceGetByName. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDeviceGetByName(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().getByResourceGroupWithResponse("GroupForEdgeAutomation", "testedgedevice", Context.NONE); + } + + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDeviceGetByNameWithDataResidency.json + */ + /** + * Sample code: DataBoxEdgeDeviceGetByNameWithDataResidency. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDeviceGetByNameWithDataResidency( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().getByResourceGroupWithResponse("GroupForEdgeAutomation", "testedgedevice", Context.NONE); + } +} +``` + +### Devices_GetExtendedInformation + +```java +import com.azure.core.util.Context; + +/** Samples for Devices GetExtendedInformation. */ +public final class DevicesGetExtendedInformationSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ExtendedInfoPost.json + */ + /** + * Sample code: ExtendedInfoPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void extendedInfoPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().getExtendedInformationWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Devices_GetNetworkSettings + +```java +import com.azure.core.util.Context; + +/** Samples for Devices GetNetworkSettings. */ +public final class DevicesGetNetworkSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/NetworkSettingsGet.json + */ + /** + * Sample code: NetworkSettingsGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void networkSettingsGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().getNetworkSettingsWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Devices_GetUpdateSummary + +```java +import com.azure.core.util.Context; + +/** Samples for Devices GetUpdateSummary. */ +public final class DevicesGetUpdateSummarySamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UpdateSummaryGet.json + */ + /** + * Sample code: UpdateSummaryGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void updateSummaryGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().getUpdateSummaryWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Devices_InstallUpdates + +```java +import com.azure.core.util.Context; + +/** Samples for Devices InstallUpdates. */ +public final class DevicesInstallUpdatesSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/InstallUpdatesPost.json + */ + /** + * Sample code: InstallUpdatesPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void installUpdatesPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().installUpdates("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Devices_List + +```java +import com.azure.core.util.Context; + +/** Samples for Devices List. */ +public final class DevicesListSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDeviceGetBySubscription.json + */ + /** + * Sample code: DataBoxEdgeDeviceGetBySubscription. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDeviceGetBySubscription( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().list(null, Context.NONE); + } +} +``` + +### Devices_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Devices ListByResourceGroup. */ +public final class DevicesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDeviceGetByResourceGroup.json + */ + /** + * Sample code: DataBoxEdgeDeviceGetByResourceGroup. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDeviceGetByResourceGroup( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().listByResourceGroup("GroupForEdgeAutomation", null, Context.NONE); + } +} +``` + +### Devices_ScanForUpdates + +```java +import com.azure.core.util.Context; + +/** Samples for Devices ScanForUpdates. */ +public final class DevicesScanForUpdatesSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ScanForUpdatesPost.json + */ + /** + * Sample code: ScanForUpdatesPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void scanForUpdatesPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().scanForUpdates("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Devices_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevice; +import com.azure.resourcemanager.databoxedge.models.EdgeProfilePatch; +import com.azure.resourcemanager.databoxedge.models.EdgeProfileSubscriptionPatch; + +/** Samples for Devices Update. */ +public final class DevicesUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDevicePatch.json + */ + /** + * Sample code: DataBoxEdgeDevicePatch. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDevicePatch(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + DataBoxEdgeDevice resource = + manager + .devices() + .getByResourceGroupWithResponse("GroupForEdgeAutomation", "testedgedevice", Context.NONE) + .getValue(); + resource + .update() + .withEdgeProfile( + new EdgeProfilePatch() + .withSubscription( + new EdgeProfileSubscriptionPatch() + .withId( + "/subscriptions/0d44739e-0563-474f-97e7-24a0cdb23b29/resourceGroups/rapvs-rg/providers/Microsoft.AzureStack/linkedSubscriptions/ca014ddc-5cf2-45f8-b390-e901e4a0ae87"))) + .apply(); + } +} +``` + +### Devices_UpdateExtendedInformation + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch; + +/** Samples for Devices UpdateExtendedInformation. */ +public final class DevicesUpdateExtendedInformationSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetUpdateExtendedInfo.json + */ + /** + * Sample code: GetUpdateExtendedInfo. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getUpdateExtendedInfo(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .devices() + .updateExtendedInformationWithResponse( + "testedgedevice", "GroupForEdgeAutomation", new DataBoxEdgeDeviceExtendedInfoPatch(), Context.NONE); + } +} +``` + +### Devices_UploadCertificate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.UploadCertificateRequest; + +/** Samples for Devices UploadCertificate. */ +public final class DevicesUploadCertificateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UploadCertificatePost.json + */ + /** + * Sample code: UploadCertificatePost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void uploadCertificatePost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .devices() + .uploadCertificateWithResponse( + "testedgedevice", + "GroupForEdgeAutomation", + new UploadCertificateRequest() + .withCertificate( + "MIIC9DCCAdygAwIBAgIQWJae7GNjiI9Mcv/gJyrOPTANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDDAdXaW5kb3dzMB4XDTE4MTEyNzAwMTA0NVoXDTIxMTEyODAwMTA0NVowEjEQMA4GA1UEAwwHV2luZG93czCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKxkRExqxf0qH1avnyORptIbRC2yQwqe3EIbJ2FPKr5jtAppGeX/dGKrFSnX+7/0HFr77aJHafdpEAtOiLyJ4zCAVs0obZCCIq4qJdmjYUTU0UXH/w/YzXfQA0d9Zh9AN+NJBX9xj05NzgsT24fkgsK2v6mWJQXT7YcWAsl5sEYPnx1e+MrupNyVSL/RUJmrS+etJSysHtFeWRhsUhVAs1DD5ExJvBLU3WH0IsojEvpXcjrutB5/MDQNrd/StGI6WovoSSPH7FyT9tgERx+q+Yg3YUGzfaIPCctlrRGehcdtzdNoKd0rsX62yCq0U6POoSfwe22NJu41oAUMd7e6R8cCAwEAAaNGMEQwEwYDVR0lBAwwCgYIKwYBBQUHAwIwHQYDVR0OBBYEFDd0VxnS3LnMIfwc7xW4b4IZWG5GMA4GA1UdDwEB/wQEAwIFIDANBgkqhkiG9w0BAQUFAAOCAQEAPQRby2u9celvtvL/DLEb5Vt3/tPStRQC5MyTD62L5RT/q8E6EMCXVZNkXF5WlWucLJi/18tY+9PNgP9xWLJh7kpSWlWdi9KPtwMqKDlEH8L2TnQdjimt9XuiCrTnoFy/1X2BGLY/rCaUJNSd15QCkz2xeW+Z+YSk2GwAc/A/4YfNpqSIMfNuPrT76o02VdD9WmJUA3fS/HY0sU9qgQRS/3F5/0EPS+HYQ0SvXCK9tggcCd4O050ytNBMJC9qMOJ7yE0iOrFfOJSCfDAuPhn/rHFh79Kn1moF+/CE+nc0/2RPiLC8r54/rt5dYyyxJDfXg0a3VrrX39W69WZGW5OXiw=="), + Context.NONE); + } +} +``` + +### DiagnosticSettings_GetDiagnosticProactiveLogCollectionSettings + +```java +import com.azure.core.util.Context; + +/** Samples for DiagnosticSettings GetDiagnosticProactiveLogCollectionSettings. */ +public final class DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetDiagnosticProactiveLogCollectionSettings.json + */ + /** + * Sample code: GetDiagnosticProactiveLogCollectionSettings. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getDiagnosticProactiveLogCollectionSettings( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .diagnosticSettings() + .getDiagnosticProactiveLogCollectionSettingsWithResponse( + "testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### DiagnosticSettings_GetDiagnosticRemoteSupportSettings + +```java +import com.azure.core.util.Context; + +/** Samples for DiagnosticSettings GetDiagnosticRemoteSupportSettings. */ +public final class DiagnosticSettingsGetDiagnosticRemoteSupportSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetDiagnosticRemoteSupportSettings.json + */ + /** + * Sample code: GetDiagnosticRemoteSupportSettings. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getDiagnosticRemoteSupportSettings( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .diagnosticSettings() + .getDiagnosticRemoteSupportSettingsWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### DiagnosticSettings_UpdateDiagnosticProactiveLogCollectionSettings + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticProactiveLogCollectionSettingsInner; +import com.azure.resourcemanager.databoxedge.models.ProactiveDiagnosticsConsent; + +/** Samples for DiagnosticSettings UpdateDiagnosticProactiveLogCollectionSettings. */ +public final class DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UpdateDiagnosticProactiveLogCollectionSettings.json + */ + /** + * Sample code: UpdateDiagnosticProactiveLogCollectionSettings. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void updateDiagnosticProactiveLogCollectionSettings( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .diagnosticSettings() + .updateDiagnosticProactiveLogCollectionSettings( + "testedgedevice", + "GroupForEdgeAutomation", + new DiagnosticProactiveLogCollectionSettingsInner() + .withUserConsent(ProactiveDiagnosticsConsent.ENABLED), + Context.NONE); + } +} +``` + +### DiagnosticSettings_UpdateDiagnosticRemoteSupportSettings + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticRemoteSupportSettingsInner; +import com.azure.resourcemanager.databoxedge.models.AccessLevel; +import com.azure.resourcemanager.databoxedge.models.RemoteApplicationType; +import com.azure.resourcemanager.databoxedge.models.RemoteSupportSettings; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** Samples for DiagnosticSettings UpdateDiagnosticRemoteSupportSettings. */ +public final class DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UpdateDiagnosticRemoteSupportSettings.json + */ + /** + * Sample code: UpdateDiagnosticRemoteSupportSettings. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void updateDiagnosticRemoteSupportSettings( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .diagnosticSettings() + .updateDiagnosticRemoteSupportSettings( + "testedgedevice", + "GroupForEdgeAutomation", + new DiagnosticRemoteSupportSettingsInner() + .withRemoteSupportSettingsList( + Arrays + .asList( + new RemoteSupportSettings() + .withRemoteApplicationType(RemoteApplicationType.POWERSHELL) + .withAccessLevel(AccessLevel.READ_WRITE) + .withExpirationTimestampInUtc(OffsetDateTime.parse("2021-07-07T00:00:00+00:00")))), + Context.NONE); + } +} +``` + +### Jobs_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Jobs Get. */ +public final class JobsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/JobsGet.json + */ + /** + * Sample code: JobsGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void jobsGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .jobs() + .getWithResponse( + "testedgedevice", "159a00c7-8543-4343-9435-263ac87df3bb", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### MonitoringConfig_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.MonitoringMetricConfigurationInner; +import com.azure.resourcemanager.databoxedge.models.MetricConfiguration; +import com.azure.resourcemanager.databoxedge.models.MetricCounter; +import com.azure.resourcemanager.databoxedge.models.MetricCounterSet; +import java.util.Arrays; + +/** Samples for MonitoringConfig CreateOrUpdate. */ +public final class MonitoringConfigCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/PutMonitoringConfig.json + */ + /** + * Sample code: PutMonitoringConfig. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void putMonitoringConfig(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .monitoringConfigs() + .createOrUpdate( + "testedgedevice", + "testrole", + "GroupForEdgeAutomation", + new MonitoringMetricConfigurationInner() + .withMetricConfigurations( + Arrays + .asList( + new MetricConfiguration() + .withResourceId("test") + .withMdmAccount("test") + .withMetricNameSpace("test") + .withCounterSets( + Arrays + .asList( + new MetricCounterSet() + .withCounters( + Arrays.asList(new MetricCounter().withName("test"))))))), + Context.NONE); + } +} +``` + +### MonitoringConfig_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for MonitoringConfig Delete. */ +public final class MonitoringConfigDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DeleteMonitoringConfig.json + */ + /** + * Sample code: DeleteMonitoringConfig. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void deleteMonitoringConfig(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.monitoringConfigs().delete("testedgedevice", "testrole", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### MonitoringConfig_Get + +```java +import com.azure.core.util.Context; + +/** Samples for MonitoringConfig Get. */ +public final class MonitoringConfigGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetMonitoringConfig.json + */ + /** + * Sample code: GetMonitoringConfig. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getMonitoringConfig(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .monitoringConfigs() + .getWithResponse("testedgedevice", "testrole", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### MonitoringConfig_List + +```java +import com.azure.core.util.Context; + +/** Samples for MonitoringConfig List. */ +public final class MonitoringConfigListSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ListMonitoringConfig.json + */ + /** + * Sample code: ListMonitoringConfig. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void listMonitoringConfig(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.monitoringConfigs().list("testedgedevice", "testrole", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Nodes_ListByDataBoxEdgeDevice + +```java +import com.azure.core.util.Context; + +/** Samples for Nodes ListByDataBoxEdgeDevice. */ +public final class NodesListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/NodeGetAllInDevice.json + */ + /** + * Sample code: NodesGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void nodesGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.nodes().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OperationsGet.json + */ + /** + * Sample code: OperationsGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void operationsGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + +### OperationsStatus_Get + +```java +import com.azure.core.util.Context; + +/** Samples for OperationsStatus Get. */ +public final class OperationsStatusGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OperationsStatusGet.json + */ + /** + * Sample code: OperationsStatusGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void operationsStatusGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .operationsStatus() + .getWithResponse( + "testedgedevice", "159a00c7-8543-4343-9435-263ac87df3bb", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Orders_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.OrderInner; +import com.azure.resourcemanager.databoxedge.models.Address; +import com.azure.resourcemanager.databoxedge.models.ContactDetails; +import java.util.Arrays; + +/** Samples for Orders CreateOrUpdate. */ +public final class OrdersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OrderPut.json + */ + /** + * Sample code: OrderPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void orderPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .orders() + .createOrUpdate( + "testedgedevice", + "GroupForEdgeAutomation", + new OrderInner() + .withContactInformation( + new ContactDetails() + .withContactPerson("John Mcclane") + .withCompanyName("Microsoft") + .withPhone("(800) 426-9400") + .withEmailList(Arrays.asList("john@microsoft.com"))) + .withShippingAddress( + new Address() + .withAddressLine1("Microsoft Corporation") + .withAddressLine2("One Microsoft Way") + .withAddressLine3("Redmond") + .withPostalCode("fakeTokenPlaceholder") + .withCity("WA") + .withState("WA") + .withCountry("USA")), + Context.NONE); + } +} +``` + +### Orders_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Orders Delete. */ +public final class OrdersDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OrderDelete.json + */ + /** + * Sample code: OrderDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void orderDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.orders().delete("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Orders_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Orders Get. */ +public final class OrdersGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OrderGet.json + */ + /** + * Sample code: OrderGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void orderGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.orders().getWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Orders_ListByDataBoxEdgeDevice + +```java +import com.azure.core.util.Context; + +/** Samples for Orders ListByDataBoxEdgeDevice. */ +public final class OrdersListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OrderGetAllInDevice.json + */ + /** + * Sample code: OrderGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void orderGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.orders().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Orders_ListDCAccessCode + +```java +import com.azure.core.util.Context; + +/** Samples for Orders ListDCAccessCode. */ +public final class OrdersListDCAccessCodeSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetDCAccessCode.json + */ + /** + * Sample code: GetDCAccessCode. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getDCAccessCode(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.orders().listDCAccessCodeWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Roles_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.azure.resourcemanager.databoxedge.models.Authentication; +import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; +import com.azure.resourcemanager.databoxedge.models.IoTDeviceInfo; +import com.azure.resourcemanager.databoxedge.models.IoTRole; +import com.azure.resourcemanager.databoxedge.models.PlatformType; +import com.azure.resourcemanager.databoxedge.models.RoleStatus; +import com.azure.resourcemanager.databoxedge.models.SymmetricKey; +import java.util.Arrays; + +/** Samples for Roles CreateOrUpdate. */ +public final class RolesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/RolePut.json + */ + /** + * Sample code: RolePut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void rolePut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .roles() + .createOrUpdate( + "testedgedevice", + "IoTRole1", + "GroupForEdgeAutomation", + new IoTRole() + .withHostPlatform(PlatformType.LINUX) + .withIoTDeviceDetails( + new IoTDeviceInfo() + .withDeviceId("iotdevice") + .withIoTHostHub("iothub.azure-devices.net") + .withAuthentication( + new Authentication() + .withSymmetricKey( + new SymmetricKey() + .withConnectionString( + new AsymmetricEncryptedSecret() + .withValue( + "Encrypted<>") + .withEncryptionCertThumbprint("348586569999244") + .withEncryptionAlgorithm(EncryptionAlgorithm.AES256))))) + .withIoTEdgeDeviceDetails( + new IoTDeviceInfo() + .withDeviceId("iotEdge") + .withIoTHostHub("iothub.azure-devices.net") + .withAuthentication( + new Authentication() + .withSymmetricKey( + new SymmetricKey() + .withConnectionString( + new AsymmetricEncryptedSecret() + .withValue( + "Encrypted<>") + .withEncryptionCertThumbprint("1245475856069999244") + .withEncryptionAlgorithm(EncryptionAlgorithm.AES256))))) + .withShareMappings(Arrays.asList()) + .withRoleStatus(RoleStatus.ENABLED), + Context.NONE); + } +} +``` + +### Roles_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Roles Delete. */ +public final class RolesDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/RoleDelete.json + */ + /** + * Sample code: RoleDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void roleDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.roles().delete("testedgedevice", "IoTRole1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Roles_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Roles Get. */ +public final class RolesGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/RoleGet.json + */ + /** + * Sample code: RoleGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void roleGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.roles().getWithResponse("testedgedevice", "IoTRole1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Roles_ListByDataBoxEdgeDevice + +```java +import com.azure.core.util.Context; + +/** Samples for Roles ListByDataBoxEdgeDevice. */ +public final class RolesListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/RoleGetAllInDevice.json + */ + /** + * Sample code: RoleGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void roleGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.roles().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Shares_CreateOrUpdate + +```java +import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; +import com.azure.resourcemanager.databoxedge.models.AzureContainerInfo; +import com.azure.resourcemanager.databoxedge.models.DataPolicy; +import com.azure.resourcemanager.databoxedge.models.MonitoringStatus; +import com.azure.resourcemanager.databoxedge.models.ShareAccessProtocol; +import com.azure.resourcemanager.databoxedge.models.ShareAccessType; +import com.azure.resourcemanager.databoxedge.models.ShareStatus; +import com.azure.resourcemanager.databoxedge.models.UserAccessRight; +import java.util.Arrays; + +/** Samples for Shares CreateOrUpdate. */ +public final class SharesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SharePut.json + */ + /** + * Sample code: SharePut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void sharePut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .shares() + .define("smbshare") + .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withShareStatus(ShareStatus.fromString("Online")) + .withMonitoringStatus(MonitoringStatus.ENABLED) + .withAccessProtocol(ShareAccessProtocol.SMB) + .withDescription("") + .withAzureContainerInfo( + new AzureContainerInfo() + .withStorageAccountCredentialId("fakeTokenPlaceholder") + .withContainerName("testContainerSMB") + .withDataFormat(AzureContainerDataFormat.BLOCK_BLOB)) + .withUserAccessRights( + Arrays + .asList( + new UserAccessRight() + .withUserId( + "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/users/user2") + .withAccessType(ShareAccessType.CHANGE))) + .withDataPolicy(DataPolicy.CLOUD) + .create(); + } +} +``` + +### Shares_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Shares Delete. */ +public final class SharesDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ShareDelete.json + */ + /** + * Sample code: ShareDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void shareDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.shares().delete("testedgedevice", "smbshare", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Shares_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Shares Get. */ +public final class SharesGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ShareGet.json + */ + /** + * Sample code: ShareGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void shareGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.shares().getWithResponse("testedgedevice", "smbshare", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Shares_ListByDataBoxEdgeDevice + +```java +import com.azure.core.util.Context; + +/** Samples for Shares ListByDataBoxEdgeDevice. */ +public final class SharesListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ShareGetAllInDevice.json + */ + /** + * Sample code: ShareGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void shareGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.shares().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Shares_Refresh + +```java +import com.azure.core.util.Context; + +/** Samples for Shares Refresh. */ +public final class SharesRefreshSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ShareRefreshPost.json + */ + /** + * Sample code: ShareRefreshPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void shareRefreshPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.shares().refresh("testedgedevice", "smbshare", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### StorageAccountCredentials_CreateOrUpdate + +```java +import com.azure.resourcemanager.databoxedge.models.AccountType; +import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; +import com.azure.resourcemanager.databoxedge.models.SslStatus; + +/** Samples for StorageAccountCredentials CreateOrUpdate. */ +public final class StorageAccountCredentialsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SACPut.json + */ + /** + * Sample code: SACPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void sACPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .storageAccountCredentials() + .define("sac1") + .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withAlias("sac1") + .withSslStatus(SslStatus.DISABLED) + .withAccountType(AccountType.BLOB_STORAGE) + .withUsername("cisbvt") + .withAccountKey( + new AsymmetricEncryptedSecret() + .withValue( + "lAeZEYi6rNP1/EyNaVUYmTSZEYyaIaWmwUsGwek0+xiZj54GM9Ue9/UA2ed/ClC03wuSit2XzM/cLRU5eYiFBwks23rGwiQOr3sruEL2a74EjPD050xYjA6M1I2hu/w2yjVHhn5j+DbXS4Xzi+rHHNZK3DgfDO3PkbECjPck+PbpSBjy9+6Mrjcld5DIZhUAeMlMHrFlg+WKRKB14o/og56u5/xX6WKlrMLEQ+y6E18dUwvWs2elTNoVO8PBE8SM/CfooX4AMNvaNdSObNBPdP+F6Lzc556nFNWXrBLRt0vC7s9qTiVRO4x/qCNaK/B4y7IqXMllwQFf4Np9UQ2ECA==") + .withEncryptionCertThumbprint("2A9D8D6BE51574B5461230AEF02F162C5F01AD31") + .withEncryptionAlgorithm(EncryptionAlgorithm.AES256)) + .create(); + } +} +``` + +### StorageAccountCredentials_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for StorageAccountCredentials Delete. */ +public final class StorageAccountCredentialsDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SACDelete.json + */ + /** + * Sample code: SACDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void sACDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.storageAccountCredentials().delete("testedgedevice", "sac1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### StorageAccountCredentials_Get + +```java +import com.azure.core.util.Context; + +/** Samples for StorageAccountCredentials Get. */ +public final class StorageAccountCredentialsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SACGet.json + */ + /** + * Sample code: SACGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void sACGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .storageAccountCredentials() + .getWithResponse("testedgedevice", "sac1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### StorageAccountCredentials_ListByDataBoxEdgeDevice + +```java +import com.azure.core.util.Context; + +/** Samples for StorageAccountCredentials ListByDataBoxEdgeDevice. */ +public final class StorageAccountCredentialsListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SACGetAllInDevice.json + */ + /** + * Sample code: SACGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void sACGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .storageAccountCredentials() + .listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### StorageAccounts_CreateOrUpdate + +```java +import com.azure.resourcemanager.databoxedge.models.DataPolicy; +import com.azure.resourcemanager.databoxedge.models.StorageAccountStatus; + +/** Samples for StorageAccounts CreateOrUpdate. */ +public final class StorageAccountsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/StorageAccountPut.json + */ + /** + * Sample code: StorageAccountPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void storageAccountPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .storageAccounts() + .define("blobstorageaccount1") + .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withDataPolicy(DataPolicy.CLOUD) + .withDescription("It's an awesome storage account") + .withStorageAccountStatus(StorageAccountStatus.OK) + .withStorageAccountCredentialId( + "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForDataBoxEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/storageAccountCredentials/cisbvt") + .create(); + } +} +``` + +### StorageAccounts_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for StorageAccounts Delete. */ +public final class StorageAccountsDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/StorageAccountDelete.json + */ + /** + * Sample code: StorageAccountDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void storageAccountDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.storageAccounts().delete("testedgedevice", "storageaccount1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### StorageAccounts_Get + +```java +import com.azure.core.util.Context; + +/** Samples for StorageAccounts Get. */ +public final class StorageAccountsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/StorageAccountGet.json + */ + /** + * Sample code: StorageAccountGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void storageAccountGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .storageAccounts() + .getWithResponse("testedgedevice", "blobstorageaccount1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### StorageAccounts_ListByDataBoxEdgeDevice + +```java +import com.azure.core.util.Context; + +/** Samples for StorageAccounts ListByDataBoxEdgeDevice. */ +public final class StorageAccountsListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/StorageAccountGetAllInDevice.json + */ + /** + * Sample code: StorageAccountGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void storageAccountGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.storageAccounts().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### SupportPackages_TriggerSupportPackage + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.TriggerSupportPackageRequest; +import java.time.OffsetDateTime; + +/** Samples for SupportPackages TriggerSupportPackage. */ +public final class SupportPackagesTriggerSupportPackageSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/TriggerSupportPackage.json + */ + /** + * Sample code: TriggerSupportPackage. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void triggerSupportPackage(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .supportPackages() + .triggerSupportPackage( + "testedgedevice", + "GroupForEdgeAutomation", + new TriggerSupportPackageRequest() + .withMinimumTimestamp(OffsetDateTime.parse("2018-12-18T02:18:51.4270267Z")) + .withMaximumTimestamp(OffsetDateTime.parse("2018-12-18T02:19:51.4270267Z")) + .withInclude("DefaultWithDumps"), + Context.NONE); + } +} +``` + +### Triggers_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.FileEventTrigger; +import com.azure.resourcemanager.databoxedge.models.FileSourceInfo; +import com.azure.resourcemanager.databoxedge.models.RoleSinkInfo; + +/** Samples for Triggers CreateOrUpdate. */ +public final class TriggersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/TriggerPut.json + */ + /** + * Sample code: TriggerPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void triggerPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .triggers() + .createOrUpdate( + "testedgedevice", + "trigger1", + "GroupForEdgeAutomation", + new FileEventTrigger() + .withSourceInfo( + new FileSourceInfo() + .withShareId( + "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/shares/share1")) + .withSinkInfo( + new RoleSinkInfo() + .withRoleId( + "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/roles/role1")) + .withCustomContextTag("CustomContextTags-1235346475"), + Context.NONE); + } +} +``` + +### Triggers_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Triggers Delete. */ +public final class TriggersDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/TriggerDelete.json + */ + /** + * Sample code: TriggerDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void triggerDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.triggers().delete("testedgedevice", "trigger1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Triggers_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Triggers Get. */ +public final class TriggersGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/TriggerGet.json + */ + /** + * Sample code: TriggerGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void triggerGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.triggers().getWithResponse("testedgedevice", "trigger1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Triggers_ListByDataBoxEdgeDevice + +```java +import com.azure.core.util.Context; + +/** Samples for Triggers ListByDataBoxEdgeDevice. */ +public final class TriggersListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/TriggerGetAllInDevice.json + */ + /** + * Sample code: TriggerGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void triggerGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.triggers().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", null, Context.NONE); + } +} +``` + +### Users_CreateOrUpdate + +```java +import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; +import com.azure.resourcemanager.databoxedge.models.UserType; + +/** Samples for Users CreateOrUpdate. */ +public final class UsersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UserPut.json + */ + /** + * Sample code: UserPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void userPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .users() + .define("user1") + .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withUserType(UserType.SHARE) + .withEncryptedPassword( + new AsymmetricEncryptedSecret() + .withValue("") + .withEncryptionCertThumbprint("blah") + .withEncryptionAlgorithm(EncryptionAlgorithm.NONE)) + .create(); + } +} +``` + +### Users_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Users Delete. */ +public final class UsersDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UserDelete.json + */ + /** + * Sample code: UserDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void userDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.users().delete("testedgedevice", "user1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Users_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Users Get. */ +public final class UsersGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UserGet.json + */ + /** + * Sample code: UserGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void userGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.users().getWithResponse("testedgedevice", "user1", "GroupForEdgeAutomation", Context.NONE); + } +} +``` + +### Users_ListByDataBoxEdgeDevice + +```java +import com.azure.core.util.Context; + +/** Samples for Users ListByDataBoxEdgeDevice. */ +public final class UsersListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UserGetAllInDevice.json + */ + /** + * Sample code: UserGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void userGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.users().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", null, Context.NONE); + } +} +``` + diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml b/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml index 8f95779b3037..7321d2b3aed1 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml @@ -1,55 +1,55 @@ - 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-2022-03-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 - true - - - - com.azure - azure-core - 1.34.0 - - - com.azure - azure-core-management - 1.9.0 - - + + 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 + true + + + + com.azure + azure-core + 1.34.0 + + + com.azure + azure-core-management + 1.9.0 + + 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 0ddbb150ce2d..3aed0647b35f 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 @@ -8,50 +8,65 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; 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.DeviceCapacityChecksImpl; +import com.azure.resourcemanager.databoxedge.implementation.DeviceCapacityInfoesImpl; 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.DeviceCapacityChecks; +import com.azure.resourcemanager.databoxedge.models.DeviceCapacityInfoes; 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; @@ -59,17 +74,26 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to DataBoxEdgeManager. */ public final class DataBoxEdgeManager { private Operations operations; + private AvailableSkus availableSkus; + private Devices devices; private Alerts alerts; private BandwidthSchedules bandwidthSchedules; + private DeviceCapacityChecks deviceCapacityChecks; + + private DeviceCapacityInfoes deviceCapacityInfoes; + + private DiagnosticSettings diagnosticSettings; + private Jobs jobs; private Nodes nodes; @@ -80,6 +104,10 @@ public final class DataBoxEdgeManager { private Roles roles; + private Addons addons; + + private MonitoringConfigs monitoringConfigs; + private Shares shares; private StorageAccountCredentials storageAccountCredentials; @@ -90,9 +118,9 @@ public final class DataBoxEdgeManager { private Triggers triggers; - private Users users; + private SupportPackages supportPackages; - private Skus skus; + private Users users; private final DataBoxEdgeManagementClient clientObject; @@ -121,6 +149,19 @@ public static DataBoxEdgeManager authenticate(TokenCredential credential, AzureP return configure().authenticate(credential, profile); } + /** + * Creates an instance of DataBoxEdge service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the DataBoxEdge service API instance. + */ + public static DataBoxEdgeManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new DataBoxEdgeManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create DataBoxEdgeManager with optional configuration. * @@ -132,12 +173,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -176,6 +219,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. * @@ -187,6 +241,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -194,9 +261,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -232,20 +301,38 @@ 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); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = @@ -257,7 +344,11 @@ public DataBoxEdgeManager authenticate(TokenCredential credential, AzureProfile } } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); @@ -265,7 +356,23 @@ public Operations operations() { return operations; } - /** @return Resource collection API of Devices. */ + /** + * Gets the resource collection API of AvailableSkus. + * + * @return Resource collection API of AvailableSkus. + */ + public AvailableSkus availableSkus() { + if (this.availableSkus == null) { + this.availableSkus = new AvailableSkusImpl(clientObject.getAvailableSkus(), this); + } + return availableSkus; + } + + /** + * Gets the resource collection API of Devices. It manages DataBoxEdgeDevice. + * + * @return Resource collection API of Devices. + */ public Devices devices() { if (this.devices == null) { this.devices = new DevicesImpl(clientObject.getDevices(), this); @@ -273,7 +380,11 @@ public Devices devices() { return devices; } - /** @return Resource collection API of Alerts. */ + /** + * Gets the resource collection API of Alerts. + * + * @return Resource collection API of Alerts. + */ public Alerts alerts() { if (this.alerts == null) { this.alerts = new AlertsImpl(clientObject.getAlerts(), this); @@ -281,7 +392,11 @@ public Alerts alerts() { return alerts; } - /** @return Resource collection API of BandwidthSchedules. */ + /** + * Gets the resource collection API of BandwidthSchedules. It manages BandwidthSchedule. + * + * @return Resource collection API of BandwidthSchedules. + */ public BandwidthSchedules bandwidthSchedules() { if (this.bandwidthSchedules == null) { this.bandwidthSchedules = new BandwidthSchedulesImpl(clientObject.getBandwidthSchedules(), this); @@ -289,7 +404,47 @@ public BandwidthSchedules bandwidthSchedules() { return bandwidthSchedules; } - /** @return Resource collection API of Jobs. */ + /** + * Gets the resource collection API of DeviceCapacityChecks. + * + * @return Resource collection API of DeviceCapacityChecks. + */ + public DeviceCapacityChecks deviceCapacityChecks() { + if (this.deviceCapacityChecks == null) { + this.deviceCapacityChecks = new DeviceCapacityChecksImpl(clientObject.getDeviceCapacityChecks(), this); + } + return deviceCapacityChecks; + } + + /** + * Gets the resource collection API of DeviceCapacityInfoes. + * + * @return Resource collection API of DeviceCapacityInfoes. + */ + public DeviceCapacityInfoes deviceCapacityInfoes() { + if (this.deviceCapacityInfoes == null) { + this.deviceCapacityInfoes = new DeviceCapacityInfoesImpl(clientObject.getDeviceCapacityInfoes(), this); + } + return deviceCapacityInfoes; + } + + /** + * Gets the resource collection API of DiagnosticSettings. + * + * @return Resource collection API of DiagnosticSettings. + */ + public DiagnosticSettings diagnosticSettings() { + if (this.diagnosticSettings == null) { + this.diagnosticSettings = new DiagnosticSettingsImpl(clientObject.getDiagnosticSettings(), this); + } + return diagnosticSettings; + } + + /** + * Gets the resource collection API of Jobs. + * + * @return Resource collection API of Jobs. + */ public Jobs jobs() { if (this.jobs == null) { this.jobs = new JobsImpl(clientObject.getJobs(), this); @@ -297,7 +452,11 @@ public Jobs jobs() { return jobs; } - /** @return Resource collection API of Nodes. */ + /** + * Gets the resource collection API of Nodes. + * + * @return Resource collection API of Nodes. + */ public Nodes nodes() { if (this.nodes == null) { this.nodes = new NodesImpl(clientObject.getNodes(), this); @@ -305,7 +464,11 @@ public Nodes nodes() { return nodes; } - /** @return Resource collection API of OperationsStatus. */ + /** + * Gets the resource collection API of OperationsStatus. + * + * @return Resource collection API of OperationsStatus. + */ public OperationsStatus operationsStatus() { if (this.operationsStatus == null) { this.operationsStatus = new OperationsStatusImpl(clientObject.getOperationsStatus(), this); @@ -313,7 +476,11 @@ public OperationsStatus operationsStatus() { return operationsStatus; } - /** @return Resource collection API of Orders. */ + /** + * Gets the resource collection API of Orders. + * + * @return Resource collection API of Orders. + */ public Orders orders() { if (this.orders == null) { this.orders = new OrdersImpl(clientObject.getOrders(), this); @@ -321,7 +488,11 @@ public Orders orders() { return orders; } - /** @return Resource collection API of Roles. */ + /** + * Gets the resource collection API of Roles. + * + * @return Resource collection API of Roles. + */ public Roles roles() { if (this.roles == null) { this.roles = new RolesImpl(clientObject.getRoles(), this); @@ -329,7 +500,35 @@ public Roles roles() { return roles; } - /** @return Resource collection API of Shares. */ + /** + * Gets the resource collection API of Addons. + * + * @return Resource collection API of Addons. + */ + public Addons addons() { + if (this.addons == null) { + this.addons = new AddonsImpl(clientObject.getAddons(), this); + } + return addons; + } + + /** + * Gets the resource collection API of MonitoringConfigs. + * + * @return Resource collection API of MonitoringConfigs. + */ + public MonitoringConfigs monitoringConfigs() { + if (this.monitoringConfigs == null) { + this.monitoringConfigs = new MonitoringConfigsImpl(clientObject.getMonitoringConfigs(), this); + } + return monitoringConfigs; + } + + /** + * Gets the resource collection API of Shares. It manages Share. + * + * @return Resource collection API of Shares. + */ public Shares shares() { if (this.shares == null) { this.shares = new SharesImpl(clientObject.getShares(), this); @@ -337,7 +536,11 @@ public Shares shares() { return shares; } - /** @return Resource collection API of StorageAccountCredentials. */ + /** + * Gets the resource collection API of StorageAccountCredentials. It manages StorageAccountCredential. + * + * @return Resource collection API of StorageAccountCredentials. + */ public StorageAccountCredentials storageAccountCredentials() { if (this.storageAccountCredentials == null) { this.storageAccountCredentials = @@ -346,7 +549,11 @@ public StorageAccountCredentials storageAccountCredentials() { return storageAccountCredentials; } - /** @return Resource collection API of StorageAccounts. */ + /** + * Gets the resource collection API of StorageAccounts. It manages StorageAccount. + * + * @return Resource collection API of StorageAccounts. + */ public StorageAccounts storageAccounts() { if (this.storageAccounts == null) { this.storageAccounts = new StorageAccountsImpl(clientObject.getStorageAccounts(), this); @@ -354,7 +561,11 @@ public StorageAccounts storageAccounts() { return storageAccounts; } - /** @return Resource collection API of Containers. */ + /** + * Gets the resource collection API of Containers. It manages Container. + * + * @return Resource collection API of Containers. + */ public Containers containers() { if (this.containers == null) { this.containers = new ContainersImpl(clientObject.getContainers(), this); @@ -362,7 +573,11 @@ public Containers containers() { return containers; } - /** @return Resource collection API of Triggers. */ + /** + * Gets the resource collection API of Triggers. + * + * @return Resource collection API of Triggers. + */ public Triggers triggers() { if (this.triggers == null) { this.triggers = new TriggersImpl(clientObject.getTriggers(), this); @@ -370,7 +585,23 @@ public Triggers triggers() { return triggers; } - /** @return Resource collection API of Users. */ + /** + * Gets the resource collection API of SupportPackages. + * + * @return Resource collection API of SupportPackages. + */ + public SupportPackages supportPackages() { + if (this.supportPackages == null) { + this.supportPackages = new SupportPackagesImpl(clientObject.getSupportPackages(), this); + } + return supportPackages; + } + + /** + * Gets the resource collection API of Users. It manages User. + * + * @return Resource collection API of Users. + */ public Users users() { if (this.users == null) { this.users = new UsersImpl(clientObject.getUsers(), this); @@ -378,14 +609,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 000000000000..87658cffd405 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/AddonsClient.java @@ -0,0 +1,222 @@ +// 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 as paginated response with {@link + * PagedIterable}. + */ + @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 as paginated response with {@link + * PagedIterable}. + */ + @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. + * @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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String deviceName, String roleName, String addonName, 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); + + /** + * 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 the {@link SyncPoller} for polling of role Addon. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 the {@link SyncPoller} for polling of role Addon. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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/AlertsClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/AlertsClient.java index 334d594b5082..bf4a33a3dc2a 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/AlertsClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/AlertsClient.java @@ -21,7 +21,8 @@ public interface AlertsClient { * @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 all the alerts for a Data Box Edge/Data Box Gateway device. + * @return all the alerts for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -35,7 +36,8 @@ public interface AlertsClient { * @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 all the alerts for a Data Box Edge/Data Box Gateway device. + * @return all the alerts for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName, Context context); @@ -46,13 +48,14 @@ public interface AlertsClient { * @param deviceName The device name. * @param name The alert 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 an alert by name. + * @return an alert by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertInner get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets an alert by name. @@ -60,12 +63,11 @@ public interface AlertsClient { * @param deviceName The device name. * @param name The alert 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 an alert by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + AlertInner get(String deviceName, String name, String resourceGroupName); } 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 65% 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 73dc0b341725..fa3dfa540c23 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,30 +8,29 @@ 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. + * @return list of SKU Information objects as paginated response with {@link PagedIterable}. */ @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU Information objects. + * @return list of SKU Information objects as paginated response with {@link PagedIterable}. */ @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/BandwidthSchedulesClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/BandwidthSchedulesClient.java index bf68720bc8fe..085a14bad87d 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/BandwidthSchedulesClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/BandwidthSchedulesClient.java @@ -23,7 +23,8 @@ public interface BandwidthSchedulesClient { * @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 all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + * @return all the bandwidth schedules for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -37,7 +38,8 @@ public interface BandwidthSchedulesClient { * @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 all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + * @return all the bandwidth schedules for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice( @@ -49,13 +51,15 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The bandwidth schedule 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 properties of the specified bandwidth schedule. + * @return the properties of the specified bandwidth schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BandwidthScheduleInner get(String deviceName, String name, String resourceGroupName); + Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context); /** * Gets the properties of the specified bandwidth schedule. @@ -63,15 +67,13 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The bandwidth schedule 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 properties of the specified bandwidth schedule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context); + BandwidthScheduleInner get(String deviceName, String name, String resourceGroupName); /** * Creates or updates a bandwidth schedule. @@ -83,9 +85,9 @@ Response getWithResponse( * @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 bandwidth schedule details. + * @return the {@link SyncPoller} for polling of the bandwidth schedule details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BandwidthScheduleInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, BandwidthScheduleInner parameters); @@ -100,9 +102,9 @@ SyncPoller, BandwidthScheduleInner> beginCrea * @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 bandwidth schedule details. + * @return the {@link SyncPoller} for polling of the bandwidth schedule details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BandwidthScheduleInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, BandwidthScheduleInner parameters, Context context); @@ -148,9 +150,9 @@ BandwidthScheduleInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName); /** @@ -163,9 +165,9 @@ BandwidthScheduleInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String deviceName, String name, String resourceGroupName, Context context); diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/ContainersClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/ContainersClient.java index 1122c177d346..81867cb822b3 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/ContainersClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/ContainersClient.java @@ -24,7 +24,8 @@ public interface ContainersClient { * @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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByStorageAccount( @@ -40,7 +41,8 @@ PagedIterable listByStorageAccount( * @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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByStorageAccount( @@ -53,13 +55,15 @@ PagedIterable listByStorageAccount( * @param storageAccountName The Storage Account Name. * @param containerName The container 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 container by name. + * @return a container by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ContainerInner get(String deviceName, String storageAccountName, String containerName, String resourceGroupName); + Response getWithResponse( + String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context); /** * Gets a container by name. @@ -68,15 +72,13 @@ PagedIterable listByStorageAccount( * @param storageAccountName The Storage Account Name. * @param containerName The container 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 container by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context); + ContainerInner get(String deviceName, String storageAccountName, String containerName, String resourceGroupName); /** * Creates a new container or updates an existing container on the device. @@ -89,9 +91,9 @@ Response getWithResponse( * @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 represents a container on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a container on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ContainerInner> beginCreateOrUpdate( String deviceName, String storageAccountName, @@ -111,9 +113,9 @@ SyncPoller, ContainerInner> beginCreateOrUpdate( * @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 represents a container on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a container on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ContainerInner> beginCreateOrUpdate( String deviceName, String storageAccountName, @@ -176,9 +178,9 @@ ContainerInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String deviceName, String storageAccountName, String containerName, String resourceGroupName); @@ -193,9 +195,9 @@ SyncPoller, Void> beginDelete( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context); @@ -239,9 +241,9 @@ void delete( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRefresh( String deviceName, String storageAccountName, String containerName, String resourceGroupName); @@ -256,9 +258,9 @@ SyncPoller, Void> beginRefresh( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRefresh( String deviceName, String storageAccountName, String containerName, String resourceGroupName, 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 d3ea0cb32538..a02f6709d6ec 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,27 @@ public interface DataBoxEdgeManagementClient { */ BandwidthSchedulesClient getBandwidthSchedules(); + /** + * Gets the DeviceCapacityChecksClient object to access its operations. + * + * @return the DeviceCapacityChecksClient object. + */ + DeviceCapacityChecksClient getDeviceCapacityChecks(); + + /** + * Gets the DeviceCapacityInfoesClient object to access its operations. + * + * @return the DeviceCapacityInfoesClient object. + */ + DeviceCapacityInfoesClient getDeviceCapacityInfoes(); + + /** + * Gets the DiagnosticSettingsClient object to access its operations. + * + * @return the DiagnosticSettingsClient object. + */ + DiagnosticSettingsClient getDiagnosticSettings(); + /** * Gets the JobsClient object to access its operations. * @@ -107,6 +135,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 +185,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/DeviceCapacityChecksClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DeviceCapacityChecksClient.java new file mode 100644 index 000000000000..d91d77b877d2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DeviceCapacityChecksClient.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.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.DeviceCapacityRequestInfo; + +/** An instance of this class provides access to all the operations defined in DeviceCapacityChecksClient. */ +public interface DeviceCapacityChecksClient { + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCheckResourceCreationFeasibility( + String resourceGroupName, String deviceName, DeviceCapacityRequestInfo deviceCapacityRequestInfo); + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param capacityName The capacity 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCheckResourceCreationFeasibility( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName, + Context context); + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @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 checkResourceCreationFeasibility( + String resourceGroupName, String deviceName, DeviceCapacityRequestInfo deviceCapacityRequestInfo); + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param capacityName The capacity 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 checkResourceCreationFeasibility( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName, + Context context); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DeviceCapacityInfoesClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DeviceCapacityInfoesClient.java new file mode 100644 index 000000000000..a54fb39b02c2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DeviceCapacityInfoesClient.java @@ -0,0 +1,42 @@ +// 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.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.DeviceCapacityInfoInner; + +/** An instance of this class provides access to all the operations defined in DeviceCapacityInfoesClient. */ +public interface DeviceCapacityInfoesClient { + /** + * Gets the properties of the specified device capacity info. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device 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 properties of the specified device capacity info along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeviceCapacityInfoWithResponse( + String resourceGroupName, String deviceName, Context context); + + /** + * Gets the properties of the specified device capacity info. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device 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 properties of the specified device capacity info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeviceCapacityInfoInner getDeviceCapacityInfo(String resourceGroupName, String deviceName); +} 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 44aa91941334..5407da2f8a0e 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; @@ -27,7 +29,8 @@ public interface DevicesClient { * * @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 all the Data Box Edge/Data Box Gateway devices in a subscription. + * @return all the Data Box Edge/Data Box Gateway devices in a subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -41,7 +44,8 @@ public interface DevicesClient { * @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 all the Data Box Edge/Data Box Gateway devices in a subscription. + * @return all the Data Box Edge/Data Box Gateway devices in a subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String expand, Context context); @@ -53,7 +57,8 @@ public interface DevicesClient { * @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 all the Data Box Edge/Data Box Gateway devices in a resource group. + * @return all the Data Box Edge/Data Box Gateway devices in a resource group as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -68,24 +73,12 @@ public interface DevicesClient { * @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 all the Data Box Edge/Data Box Gateway devices in a resource group. + * @return all the Data Box Edge/Data Box Gateway devices in a resource group as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context); - /** - * Gets the properties of the Data Box Edge/Data Box Gateway device. - * - * @param resourceGroupName The resource group name. - * @param deviceName The device 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 properties of the Data Box Edge/Data Box Gateway device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataBoxEdgeDeviceInner getByResourceGroup(String resourceGroupName, String deviceName); - /** * Gets the properties of the Data Box Edge/Data Box Gateway device. * @@ -95,26 +88,24 @@ public interface DevicesClient { * @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 properties of the Data Box Edge/Data Box Gateway device. + * @return the properties of the Data Box Edge/Data Box Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( String resourceGroupName, String deviceName, Context context); /** - * Creates or updates a Data Box Edge/Data Box Gateway resource. + * Gets the properties of the Data Box Edge/Data Box Gateway device. * - * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param dataBoxEdgeDevice The resource object. + * @param deviceName The device 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 Data Box Edge/Gateway device. + * @return the properties of the Data Box Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, DataBoxEdgeDeviceInner> beginCreateOrUpdate( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice); + DataBoxEdgeDeviceInner getByResourceGroup(String resourceGroupName, String deviceName); /** * Creates or updates a Data Box Edge/Data Box Gateway resource. @@ -126,10 +117,10 @@ SyncPoller, DataBoxEdgeDeviceInner> beginCrea * @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. + * @return the Data Box Edge/Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, DataBoxEdgeDeviceInner> beginCreateOrUpdate( + Response createOrUpdateWithResponse( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context); /** @@ -147,22 +138,6 @@ SyncPoller, DataBoxEdgeDeviceInner> beginCrea DataBoxEdgeDeviceInner createOrUpdate( 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) - DataBoxEdgeDeviceInner createOrUpdate( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context); - /** * Deletes the Data Box Edge/Data Box Gateway device. * @@ -171,9 +146,9 @@ DataBoxEdgeDeviceInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String deviceName); /** @@ -185,9 +160,9 @@ DataBoxEdgeDeviceInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String deviceName, Context context); /** @@ -221,13 +196,15 @@ DataBoxEdgeDeviceInner createOrUpdate( * @param deviceName The device name. * @param resourceGroupName The resource group name. * @param parameters The resource parameters. + * @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. + * @return the Data Box Edge/Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataBoxEdgeDeviceInner update(String deviceName, String resourceGroupName, DataBoxEdgeDevicePatch parameters); + Response updateWithResponse( + String deviceName, String resourceGroupName, DataBoxEdgeDevicePatch parameters, Context context); /** * Modifies a Data Box Edge/Data Box Gateway resource. @@ -235,15 +212,13 @@ DataBoxEdgeDeviceInner createOrUpdate( * @param deviceName The device name. * @param resourceGroupName The resource group name. * @param parameters The resource parameters. - * @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) - Response updateWithResponse( - String deviceName, String resourceGroupName, DataBoxEdgeDevicePatch parameters, Context context); + DataBoxEdgeDeviceInner update(String deviceName, String resourceGroupName, DataBoxEdgeDevicePatch parameters); /** * Downloads the updates on a Data Box Edge/Data Box Gateway device. @@ -253,9 +228,9 @@ Response updateWithResponse( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDownloadUpdates(String deviceName, String resourceGroupName); /** @@ -267,9 +242,9 @@ Response updateWithResponse( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDownloadUpdates( String deviceName, String resourceGroupName, Context context); @@ -299,20 +274,35 @@ 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. + * @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 used in activation key generation flow along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceName, String resourceGroupName); + Response generateCertificateWithResponse( + 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 used in activation key generation flow. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GenerateCertResponseInner generateCertificate(String deviceName, String resourceGroupName); + + /** + * 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,23 +310,37 @@ 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 along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getExtendedInformationWithResponse( String deviceName, String resourceGroupName, Context context); /** - * Installs the updates on the 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 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. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) + DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceName, String resourceGroupName); + + /** + * Installs the updates on the 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginInstallUpdates(String deviceName, String resourceGroupName); /** @@ -348,9 +352,9 @@ Response getExtendedInformationWithResponse( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginInstallUpdates( String deviceName, String resourceGroupName, Context context); @@ -384,28 +388,28 @@ SyncPoller, Void> beginInstallUpdates( * * @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 network settings of the specified Data Box Edge/Data Box Gateway device. + * @return the network settings of the specified Data Box Edge/Data Box Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkSettingsInner getNetworkSettings(String deviceName, String resourceGroupName); + Response getNetworkSettingsWithResponse( + String deviceName, String resourceGroupName, Context context); /** * Gets the network 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 network settings of the specified Data Box Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getNetworkSettingsWithResponse( - String deviceName, String resourceGroupName, Context context); + NetworkSettingsInner getNetworkSettings(String deviceName, String resourceGroupName); /** * Scans for updates on a Data Box Edge/Data Box Gateway device. @@ -415,9 +419,9 @@ Response getNetworkSettingsWithResponse( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginScanForUpdates(String deviceName, String resourceGroupName); /** @@ -429,9 +433,9 @@ Response getNetworkSettingsWithResponse( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginScanForUpdates( String deviceName, String resourceGroupName, Context context); @@ -469,9 +473,9 @@ SyncPoller, Void> beginScanForUpdates( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginCreateOrUpdateSecuritySettings( String deviceName, String resourceGroupName, SecuritySettings securitySettings); @@ -485,9 +489,9 @@ SyncPoller, Void> beginCreateOrUpdateSecuritySettings( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginCreateOrUpdateSecuritySettings( String deviceName, String resourceGroupName, SecuritySettings securitySettings, Context context); @@ -520,18 +524,36 @@ void createOrUpdateSecuritySettings( String deviceName, String resourceGroupName, SecuritySettings securitySettings, 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. + * 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 information about the availability of updates based on the last scan of the device. + * @return additional information for the specified Data Box Edge/Data Box Gateway device along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateSummaryInner getUpdateSummary(String deviceName, String resourceGroupName); + Response updateExtendedInformationWithResponse( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters, 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 information about the availability of updates based on the last scan of the device. It also gets information @@ -543,26 +565,26 @@ void createOrUpdateSecuritySettings( * @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 information about the availability of updates based on the last scan of the device. + * @return information about the availability of updates based on the last scan of the device along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getUpdateSummaryWithResponse( String deviceName, String resourceGroupName, Context context); /** - * Uploads registration certificate for the device. + * 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. * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param parameters The upload certificate request. * @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 upload registration certificate response. + * @return information about the availability of updates based on the last scan of the device. */ @ServiceMethod(returns = ReturnType.SINGLE) - UploadCertificateResponseInner uploadCertificate( - String deviceName, String resourceGroupName, UploadCertificateRequest parameters); + UpdateSummaryInner getUpdateSummary(String deviceName, String resourceGroupName); /** * Uploads registration certificate for the device. @@ -574,9 +596,24 @@ UploadCertificateResponseInner uploadCertificate( * @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 upload registration certificate response. + * @return the upload registration certificate response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response uploadCertificateWithResponse( String deviceName, String resourceGroupName, UploadCertificateRequest parameters, Context context); + + /** + * Uploads registration certificate for the device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The upload certificate request. + * @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 upload registration certificate response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UploadCertificateResponseInner uploadCertificate( + String deviceName, String resourceGroupName, UploadCertificateRequest parameters); } 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 000000000000..96cd838bdd25 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DiagnosticSettingsClient.java @@ -0,0 +1,225 @@ +// 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. + * @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 along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDiagnosticProactiveLogCollectionSettingsWithResponse( + String deviceName, String resourceGroupName, 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 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); + + /** + * 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 {@link SyncPoller} for polling of the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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. + * @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 along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDiagnosticRemoteSupportSettingsWithResponse( + String deviceName, String resourceGroupName, 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); + + /** + * 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 {@link SyncPoller} for polling of the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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/JobsClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/JobsClient.java index 640570ef6745..4cfd0c95a398 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/JobsClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/JobsClient.java @@ -18,13 +18,14 @@ public interface JobsClient { * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobInner get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. @@ -32,12 +33,11 @@ public interface JobsClient { * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + JobInner get(String deviceName, String name, String resourceGroupName); } 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 000000000000..b4f87a95515d --- /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 as paginated response with {@link PagedIterable}. + */ + @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 as paginated response with {@link PagedIterable}. + */ + @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. + * @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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + 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); + + /** + * 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 {@link SyncPoller} for polling of the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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/NodesClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/NodesClient.java index 47241df8e08d..b5541870f215 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/NodesClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/NodesClient.java @@ -20,7 +20,8 @@ public interface NodesClient { * @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 all the nodes currently configured under this Data Box Edge device. + * @return all the nodes currently configured under this Data Box Edge device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -34,7 +35,8 @@ public interface NodesClient { * @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 all the nodes currently configured under this Data Box Edge device. + * @return all the nodes currently configured under this Data Box Edge device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName, Context context); diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OperationsClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OperationsClient.java index 04b9c37132d4..5caa98526a2a 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OperationsClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OperationsClient.java @@ -17,7 +17,8 @@ public interface OperationsClient { * * @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 list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ public interface OperationsClient { * @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 list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OperationsStatusClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OperationsStatusClient.java index 1cc20e96c622..2d3f3f509553 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OperationsStatusClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OperationsStatusClient.java @@ -18,13 +18,14 @@ public interface OperationsStatusClient { * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobInner get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. @@ -32,12 +33,11 @@ public interface OperationsStatusClient { * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + JobInner get(String deviceName, String name, String resourceGroupName); } 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 6f7bc753adbd..35aada6004fd 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. */ @@ -23,7 +24,7 @@ public interface OrdersClient { * @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 order entities. + * @return list of order entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -37,7 +38,7 @@ public interface OrdersClient { * @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 order entities. + * @return list of order entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName, Context context); @@ -47,27 +48,27 @@ public interface OrdersClient { * * @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 a specific order by name. + * @return a specific order by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - OrderInner get(String deviceName, String resourceGroupName); + Response getWithResponse(String deviceName, String resourceGroupName, Context context); /** * Gets a specific order by name. * * @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 a specific order by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String deviceName, String resourceGroupName, Context context); + OrderInner get(String deviceName, String resourceGroupName); /** * Creates or updates an order. @@ -78,9 +79,9 @@ public interface OrdersClient { * @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 order details. + * @return the {@link SyncPoller} for polling of the order details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OrderInner> beginCreateOrUpdate( String deviceName, String resourceGroupName, OrderInner order); @@ -94,9 +95,9 @@ SyncPoller, OrderInner> beginCreateOrUpdate( * @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 order details. + * @return the {@link SyncPoller} for polling of the order details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OrderInner> beginCreateOrUpdate( String deviceName, String resourceGroupName, OrderInner order, Context context); @@ -137,9 +138,9 @@ SyncPoller, OrderInner> beginCreateOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String deviceName, String resourceGroupName); /** @@ -151,9 +152,9 @@ SyncPoller, OrderInner> beginCreateOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String deviceName, String resourceGroupName, Context context); /** @@ -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. + * @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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listDCAccessCodeWithResponse( + 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); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/RolesClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/RolesClient.java index cef88cc8ea6e..db47c1f33c19 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/RolesClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/RolesClient.java @@ -23,7 +23,7 @@ public interface RolesClient { * @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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -37,7 +37,7 @@ public interface RolesClient { * @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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName, Context context); @@ -48,13 +48,14 @@ public interface RolesClient { * @param deviceName The device name. * @param name 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 specific role by name. + * @return a specific role by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RoleInner get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets a specific role by name. @@ -62,14 +63,13 @@ public interface RolesClient { * @param deviceName The device name. * @param name 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 specific role by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + RoleInner get(String deviceName, String name, String resourceGroupName); /** * Create or update a role. @@ -81,9 +81,9 @@ public interface RolesClient { * @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 compute role. + * @return the {@link SyncPoller} for polling of compute role. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, RoleInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, RoleInner role); @@ -98,9 +98,9 @@ SyncPoller, RoleInner> beginCreateOrUpdate( * @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 compute role. + * @return the {@link SyncPoller} for polling of compute role. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, RoleInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, RoleInner role, Context context); @@ -144,9 +144,9 @@ SyncPoller, RoleInner> beginCreateOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName); /** @@ -159,9 +159,9 @@ SyncPoller, RoleInner> beginCreateOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String deviceName, String name, String resourceGroupName, Context context); diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SharesClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SharesClient.java index e1a33e0771fc..a9ac76ad67b2 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SharesClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SharesClient.java @@ -23,7 +23,8 @@ public interface SharesClient { * @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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -37,7 +38,8 @@ public interface SharesClient { * @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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName, Context context); @@ -48,13 +50,14 @@ public interface SharesClient { * @param deviceName The device name. * @param name The share 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 share by name. + * @return a share by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ShareInner get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets a share by name. @@ -62,14 +65,13 @@ public interface SharesClient { * @param deviceName The device name. * @param name The share 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 share by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + ShareInner get(String deviceName, String name, String resourceGroupName); /** * Creates a new share or updates an existing share on the device. @@ -81,9 +83,9 @@ public interface SharesClient { * @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 represents a share on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a share on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ShareInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, ShareInner share); @@ -98,9 +100,9 @@ SyncPoller, ShareInner> beginCreateOrUpdate( * @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 represents a share on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a share on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ShareInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, ShareInner share, Context context); @@ -145,9 +147,9 @@ ShareInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName); /** @@ -160,9 +162,9 @@ ShareInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String deviceName, String name, String resourceGroupName, Context context); @@ -202,9 +204,9 @@ SyncPoller, Void> beginDelete( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRefresh(String deviceName, String name, String resourceGroupName); /** @@ -217,9 +219,9 @@ SyncPoller, Void> beginDelete( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRefresh( String deviceName, String name, String resourceGroupName, Context context); diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/StorageAccountCredentialsClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/StorageAccountCredentialsClient.java index 435bc27ffad7..2133247d1437 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/StorageAccountCredentialsClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/StorageAccountCredentialsClient.java @@ -23,7 +23,8 @@ public interface StorageAccountCredentialsClient { * @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 all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * @return all the storage account credentials in a Data Box Edge/Data Box Gateway device as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -37,7 +38,8 @@ public interface StorageAccountCredentialsClient { * @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 all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * @return all the storage account credentials in a Data Box Edge/Data Box Gateway device as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice( @@ -49,13 +51,15 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The storage account credential 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 properties of the specified storage account credential. + * @return the properties of the specified storage account credential along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageAccountCredentialInner get(String deviceName, String name, String resourceGroupName); + Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context); /** * Gets the properties of the specified storage account credential. @@ -63,15 +67,13 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The storage account credential 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 properties of the specified storage account credential. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context); + StorageAccountCredentialInner get(String deviceName, String name, String resourceGroupName); /** * Creates or updates the storage account credential. @@ -83,9 +85,9 @@ Response getWithResponse( * @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 storage account credential. + * @return the {@link SyncPoller} for polling of the storage account credential. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StorageAccountCredentialInner> beginCreateOrUpdate( String deviceName, String name, @@ -103,9 +105,9 @@ SyncPoller, StorageAccountCredentialIn * @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 storage account credential. + * @return the {@link SyncPoller} for polling of the storage account credential. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StorageAccountCredentialInner> beginCreateOrUpdate( String deviceName, String name, @@ -162,9 +164,9 @@ StorageAccountCredentialInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName); /** @@ -177,9 +179,9 @@ StorageAccountCredentialInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String deviceName, String name, 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 9badd639ba64..4a7931a57d2c 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,20 +16,21 @@ /** 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. * @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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) 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. @@ -37,7 +38,8 @@ public interface StorageAccountsClient { * @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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice( @@ -49,13 +51,15 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param storageAccountName The storage account 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 StorageAccount by name. + * @return a StorageAccount by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageAccountInner get(String deviceName, String storageAccountName, String resourceGroupName); + Response getWithResponse( + String deviceName, String storageAccountName, String resourceGroupName, Context context); /** * Gets a StorageAccount by name. @@ -63,15 +67,13 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param storageAccountName The storage account 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 StorageAccount by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String deviceName, String storageAccountName, String resourceGroupName, Context context); + StorageAccountInner get(String deviceName, String storageAccountName, String resourceGroupName); /** * Creates a new StorageAccount or updates an existing StorageAccount on the device. @@ -83,9 +85,9 @@ Response getWithResponse( * @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 represents a Storage Account on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a Storage Account on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StorageAccountInner> beginCreateOrUpdate( String deviceName, String storageAccountName, String resourceGroupName, StorageAccountInner storageAccount); @@ -100,9 +102,9 @@ SyncPoller, StorageAccountInner> beginCreateOrUp * @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 represents a Storage Account on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a Storage Account on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StorageAccountInner> beginCreateOrUpdate( String deviceName, String storageAccountName, @@ -156,9 +158,9 @@ StorageAccountInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String deviceName, String storageAccountName, String resourceGroupName); @@ -172,9 +174,9 @@ SyncPoller, Void> beginDelete( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String deviceName, String storageAccountName, String resourceGroupName, Context context); 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 000000000000..c2a6d793e7a5 --- /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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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/TriggersClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/TriggersClient.java index 7eb923093069..d6d0db48bae5 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/TriggersClient.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/TriggersClient.java @@ -23,7 +23,7 @@ public interface TriggersClient { * @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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -38,7 +38,7 @@ public interface TriggersClient { * @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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice( @@ -50,13 +50,14 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The trigger 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 trigger by name. + * @return a specific trigger by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - TriggerInner get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Get a specific trigger by name. @@ -64,14 +65,13 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The trigger 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 trigger by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + TriggerInner get(String deviceName, String name, String resourceGroupName); /** * Creates or updates a trigger. @@ -83,9 +83,9 @@ PagedIterable listByDataBoxEdgeDevice( * @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 trigger details. + * @return the {@link SyncPoller} for polling of trigger details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, TriggerInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, TriggerInner trigger); @@ -100,9 +100,9 @@ SyncPoller, TriggerInner> beginCreateOrUpdate( * @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 trigger details. + * @return the {@link SyncPoller} for polling of trigger details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, TriggerInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, TriggerInner trigger, Context context); @@ -147,9 +147,9 @@ TriggerInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName); /** @@ -162,9 +162,9 @@ TriggerInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String deviceName, String name, String resourceGroupName, 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 6fc2a24cfbdc..ee130ce579c5 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 @@ -23,7 +23,8 @@ public interface UsersClient { * @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 all the users registered on a Data Box Edge/Data Box Gateway device. + * @return all the users registered on a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -33,12 +34,13 @@ 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the users registered on a Data Box Edge/Data Box Gateway device. + * @return all the users registered on a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDataBoxEdgeDevice( @@ -50,13 +52,14 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The user 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 properties of the specified user. + * @return the properties of the specified user along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - UserInner get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets the properties of the specified user. @@ -64,14 +67,13 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The user 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 properties of the specified user. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + UserInner get(String deviceName, String name, String resourceGroupName); /** * Creates a new user or updates an existing user's information on a Data Box Edge/Data Box Gateway device. @@ -83,9 +85,10 @@ PagedIterable listByDataBoxEdgeDevice( * @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 represents a user who has access to one or more shares on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a user who has access to one or more shares on the Data + * Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, UserInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, UserInner user); @@ -100,9 +103,10 @@ SyncPoller, UserInner> beginCreateOrUpdate( * @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 represents a user who has access to one or more shares on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a user who has access to one or more shares on the Data + * Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, UserInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, UserInner user, Context context); @@ -146,9 +150,9 @@ SyncPoller, UserInner> beginCreateOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName); /** @@ -161,9 +165,9 @@ SyncPoller, UserInner> beginCreateOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String deviceName, String name, String resourceGroupName, Context context); 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 000000000000..c91f1674a4fa --- /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.resourcemanager.databoxedge.models.ArcAddon; +import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; +import com.azure.resourcemanager.databoxedge.models.IoTAddon; +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 { + /* + * Metadata pertaining to creation and last modification of Addon + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of AddonInner class. */ + public AddonInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of Addon. + * + * @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 1cf1a3fc5ecc..adb9454c37f9 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 @@ -5,63 +5,50 @@ package com.azure.resourcemanager.databoxedge.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.management.SystemData; 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.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; /** Alert on the data box edge/gateway device. */ -@JsonFlatten @Immutable -public class AlertInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertInner.class); - +public final class AlertInner extends ArmBaseModel { /* - * Alert title. + * Properties of alert. */ - @JsonProperty(value = "properties.title", access = JsonProperty.Access.WRITE_ONLY) - private String title; + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private AlertProperties innerProperties; /* - * Alert type. + * Metadata pertaining to creation and last modification of Alert */ - @JsonProperty(value = "properties.alertType", access = JsonProperty.Access.WRITE_ONLY) - private String alertType; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * UTC time when the alert appeared. - */ - @JsonProperty(value = "properties.appearedAtDateTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime appearedAtDateTime; - - /* - * Alert recommendation. - */ - @JsonProperty(value = "properties.recommendation", access = JsonProperty.Access.WRITE_ONLY) - private String recommendation; - - /* - * Severity of the alert. - */ - @JsonProperty(value = "properties.severity", access = JsonProperty.Access.WRITE_ONLY) - private AlertSeverity severity; + /** Creates an instance of AlertInner class. */ + public AlertInner() { + } - /* - * Error details of the alert. + /** + * Get the innerProperties property: Properties of alert. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.errorDetails", access = JsonProperty.Access.WRITE_ONLY) - private AlertErrorDetails errorDetails; + private AlertProperties innerProperties() { + return this.innerProperties; + } - /* - * Alert details. + /** + * Get the systemData property: Metadata pertaining to creation and last modification of Alert. + * + * @return the systemData value. */ - @JsonProperty(value = "properties.detailedInformation", access = JsonProperty.Access.WRITE_ONLY) - private Map detailedInformation; + public SystemData systemData() { + return this.systemData; + } /** * Get the title property: Alert title. @@ -69,7 +56,7 @@ public class AlertInner extends ArmBaseModel { * @return the title value. */ public String title() { - return this.title; + return this.innerProperties() == null ? null : this.innerProperties().title(); } /** @@ -78,7 +65,7 @@ public String title() { * @return the alertType value. */ public String alertType() { - return this.alertType; + return this.innerProperties() == null ? null : this.innerProperties().alertType(); } /** @@ -87,7 +74,7 @@ public String alertType() { * @return the appearedAtDateTime value. */ public OffsetDateTime appearedAtDateTime() { - return this.appearedAtDateTime; + return this.innerProperties() == null ? null : this.innerProperties().appearedAtDateTime(); } /** @@ -96,7 +83,7 @@ public OffsetDateTime appearedAtDateTime() { * @return the recommendation value. */ public String recommendation() { - return this.recommendation; + return this.innerProperties() == null ? null : this.innerProperties().recommendation(); } /** @@ -105,7 +92,7 @@ public String recommendation() { * @return the severity value. */ public AlertSeverity severity() { - return this.severity; + return this.innerProperties() == null ? null : this.innerProperties().severity(); } /** @@ -114,7 +101,7 @@ public AlertSeverity severity() { * @return the errorDetails value. */ public AlertErrorDetails errorDetails() { - return this.errorDetails; + return this.innerProperties() == null ? null : this.innerProperties().errorDetails(); } /** @@ -123,7 +110,7 @@ public AlertErrorDetails errorDetails() { * @return the detailedInformation value. */ public Map detailedInformation() { - return this.detailedInformation; + return this.innerProperties() == null ? null : this.innerProperties().detailedInformation(); } /** @@ -134,8 +121,8 @@ public Map detailedInformation() { @Override public void validate() { super.validate(); - if (errorDetails() != null) { - errorDetails().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AlertProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AlertProperties.java new file mode 100644 index 000000000000..fac40e0bb5ef --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AlertProperties.java @@ -0,0 +1,138 @@ +// 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.resourcemanager.databoxedge.models.AlertErrorDetails; +import com.azure.resourcemanager.databoxedge.models.AlertSeverity; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Properties of alert. */ +@Immutable +public final class AlertProperties { + /* + * Alert title. + */ + @JsonProperty(value = "title", access = JsonProperty.Access.WRITE_ONLY) + private String title; + + /* + * Alert type. + */ + @JsonProperty(value = "alertType", access = JsonProperty.Access.WRITE_ONLY) + private String alertType; + + /* + * UTC time when the alert appeared. + */ + @JsonProperty(value = "appearedAtDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime appearedAtDateTime; + + /* + * Alert recommendation. + */ + @JsonProperty(value = "recommendation", access = JsonProperty.Access.WRITE_ONLY) + private String recommendation; + + /* + * Severity of the alert. + */ + @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) + private AlertSeverity severity; + + /* + * Error details of the alert. + */ + @JsonProperty(value = "errorDetails", access = JsonProperty.Access.WRITE_ONLY) + private AlertErrorDetails errorDetails; + + /* + * Alert details. + */ + @JsonProperty(value = "detailedInformation", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map detailedInformation; + + /** Creates an instance of AlertProperties class. */ + public AlertProperties() { + } + + /** + * Get the title property: Alert title. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Get the alertType property: Alert type. + * + * @return the alertType value. + */ + public String alertType() { + return this.alertType; + } + + /** + * Get the appearedAtDateTime property: UTC time when the alert appeared. + * + * @return the appearedAtDateTime value. + */ + public OffsetDateTime appearedAtDateTime() { + return this.appearedAtDateTime; + } + + /** + * Get the recommendation property: Alert recommendation. + * + * @return the recommendation value. + */ + public String recommendation() { + return this.recommendation; + } + + /** + * Get the severity property: Severity of the alert. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.severity; + } + + /** + * Get the errorDetails property: Error details of the alert. + * + * @return the errorDetails value. + */ + public AlertErrorDetails errorDetails() { + return this.errorDetails; + } + + /** + * Get the detailedInformation property: Alert details. + * + * @return the detailedInformation value. + */ + public Map detailedInformation() { + return this.detailedInformation; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (errorDetails() != null) { + errorDetails().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ArcAddonProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ArcAddonProperties.java new file mode 100644 index 000000000000..8185c985a976 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ArcAddonProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.AddonState; +import com.azure.resourcemanager.databoxedge.models.HostPlatformType; +import com.azure.resourcemanager.databoxedge.models.PlatformType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Arc addon properties. */ +@Fluent +public final class ArcAddonProperties { + /* + * Arc resource subscription Id + */ + @JsonProperty(value = "subscriptionId", required = true) + private String subscriptionId; + + /* + * Arc resource group name + */ + @JsonProperty(value = "resourceGroupName", required = true) + private String resourceGroupName; + + /* + * Arc resource Name + */ + @JsonProperty(value = "resourceName", required = true) + private String resourceName; + + /* + * Arc resource location + */ + @JsonProperty(value = "resourceLocation", required = true) + private String resourceLocation; + + /* + * Arc resource version + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /* + * Host OS supported by the Arc addon. + */ + @JsonProperty(value = "hostPlatform", access = JsonProperty.Access.WRITE_ONLY) + private PlatformType hostPlatform; + + /* + * Platform where the runtime is hosted. + */ + @JsonProperty(value = "hostPlatformType", access = JsonProperty.Access.WRITE_ONLY) + private HostPlatformType hostPlatformType; + + /* + * Addon Provisioning State + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AddonState provisioningState; + + /** Creates an instance of ArcAddonProperties class. */ + public ArcAddonProperties() { + } + + /** + * 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 ArcAddonProperties object itself. + */ + public ArcAddonProperties 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 ArcAddonProperties object itself. + */ + public ArcAddonProperties 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 ArcAddonProperties object itself. + */ + public ArcAddonProperties 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 ArcAddonProperties object itself. + */ + public ArcAddonProperties 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. + */ + public void validate() { + if (subscriptionId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property subscriptionId in model ArcAddonProperties")); + } + if (resourceGroupName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property resourceGroupName in model ArcAddonProperties")); + } + if (resourceName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property resourceName in model ArcAddonProperties")); + } + if (resourceLocation() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property resourceLocation in model ArcAddonProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ArcAddonProperties.class); +} 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 3bd2fdf8f7c6..fa8b28b757b5 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 @@ -5,43 +5,49 @@ 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.DayOfWeek; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The bandwidth schedule details. */ -@JsonFlatten @Fluent -public class BandwidthScheduleInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BandwidthScheduleInner.class); - +public final class BandwidthScheduleInner extends ArmBaseModel { /* - * The start time of the schedule in UTC. + * The properties of the bandwidth schedule. */ - @JsonProperty(value = "properties.start", required = true) - private String start; + @JsonProperty(value = "properties", required = true) + private BandwidthScheduleProperties innerProperties = new BandwidthScheduleProperties(); /* - * The stop time of the schedule in UTC. + * Metadata pertaining to creation and last modification of BandwidthSchedule */ - @JsonProperty(value = "properties.stop", required = true) - private String stop; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * The bandwidth rate in Mbps. + /** Creates an instance of BandwidthScheduleInner class. */ + public BandwidthScheduleInner() { + } + + /** + * Get the innerProperties property: The properties of the bandwidth schedule. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.rateInMbps", required = true) - private int rateInMbps; + private BandwidthScheduleProperties innerProperties() { + return this.innerProperties; + } - /* - * The days of the week when this schedule is applicable. + /** + * Get the systemData property: Metadata pertaining to creation and last modification of BandwidthSchedule. + * + * @return the systemData value. */ - @JsonProperty(value = "properties.days", required = true) - private List days; + public SystemData systemData() { + return this.systemData; + } /** * Get the start property: The start time of the schedule in UTC. @@ -49,7 +55,7 @@ public class BandwidthScheduleInner extends ArmBaseModel { * @return the start value. */ public String start() { - return this.start; + return this.innerProperties() == null ? null : this.innerProperties().start(); } /** @@ -59,7 +65,10 @@ public String start() { * @return the BandwidthScheduleInner object itself. */ public BandwidthScheduleInner withStart(String start) { - this.start = start; + if (this.innerProperties() == null) { + this.innerProperties = new BandwidthScheduleProperties(); + } + this.innerProperties().withStart(start); return this; } @@ -69,7 +78,7 @@ public BandwidthScheduleInner withStart(String start) { * @return the stop value. */ public String stop() { - return this.stop; + return this.innerProperties() == null ? null : this.innerProperties().stop(); } /** @@ -79,7 +88,10 @@ public String stop() { * @return the BandwidthScheduleInner object itself. */ public BandwidthScheduleInner withStop(String stop) { - this.stop = stop; + if (this.innerProperties() == null) { + this.innerProperties = new BandwidthScheduleProperties(); + } + this.innerProperties().withStop(stop); return this; } @@ -89,7 +101,7 @@ public BandwidthScheduleInner withStop(String stop) { * @return the rateInMbps value. */ public int rateInMbps() { - return this.rateInMbps; + return this.innerProperties() == null ? 0 : this.innerProperties().rateInMbps(); } /** @@ -99,7 +111,10 @@ public int rateInMbps() { * @return the BandwidthScheduleInner object itself. */ public BandwidthScheduleInner withRateInMbps(int rateInMbps) { - this.rateInMbps = rateInMbps; + if (this.innerProperties() == null) { + this.innerProperties = new BandwidthScheduleProperties(); + } + this.innerProperties().withRateInMbps(rateInMbps); return this; } @@ -109,7 +124,7 @@ public BandwidthScheduleInner withRateInMbps(int rateInMbps) { * @return the days value. */ public List days() { - return this.days; + return this.innerProperties() == null ? null : this.innerProperties().days(); } /** @@ -119,7 +134,10 @@ public List days() { * @return the BandwidthScheduleInner object itself. */ public BandwidthScheduleInner withDays(List days) { - this.days = days; + if (this.innerProperties() == null) { + this.innerProperties = new BandwidthScheduleProperties(); + } + this.innerProperties().withDays(days); return this; } @@ -131,20 +149,15 @@ public BandwidthScheduleInner withDays(List days) { @Override public void validate() { super.validate(); - if (start() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property start in model BandwidthScheduleInner")); - } - if (stop() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property stop in model BandwidthScheduleInner")); - } - if (days() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property days in model BandwidthScheduleInner")); + new IllegalArgumentException( + "Missing required property innerProperties in model BandwidthScheduleInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(BandwidthScheduleInner.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/BandwidthScheduleProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/BandwidthScheduleProperties.java new file mode 100644 index 000000000000..593c2c6477ab --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/BandwidthScheduleProperties.java @@ -0,0 +1,151 @@ +// 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.azure.resourcemanager.databoxedge.models.DayOfWeek; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The properties of the bandwidth schedule. */ +@Fluent +public final class BandwidthScheduleProperties { + /* + * The start time of the schedule in UTC. + */ + @JsonProperty(value = "start", required = true) + private String start; + + /* + * The stop time of the schedule in UTC. + */ + @JsonProperty(value = "stop", required = true) + private String stop; + + /* + * The bandwidth rate in Mbps. + */ + @JsonProperty(value = "rateInMbps", required = true) + private int rateInMbps; + + /* + * The days of the week when this schedule is applicable. + */ + @JsonProperty(value = "days", required = true) + private List days; + + /** Creates an instance of BandwidthScheduleProperties class. */ + public BandwidthScheduleProperties() { + } + + /** + * Get the start property: The start time of the schedule in UTC. + * + * @return the start value. + */ + public String start() { + return this.start; + } + + /** + * Set the start property: The start time of the schedule in UTC. + * + * @param start the start value to set. + * @return the BandwidthScheduleProperties object itself. + */ + public BandwidthScheduleProperties withStart(String start) { + this.start = start; + return this; + } + + /** + * Get the stop property: The stop time of the schedule in UTC. + * + * @return the stop value. + */ + public String stop() { + return this.stop; + } + + /** + * Set the stop property: The stop time of the schedule in UTC. + * + * @param stop the stop value to set. + * @return the BandwidthScheduleProperties object itself. + */ + public BandwidthScheduleProperties withStop(String stop) { + this.stop = stop; + return this; + } + + /** + * Get the rateInMbps property: The bandwidth rate in Mbps. + * + * @return the rateInMbps value. + */ + public int rateInMbps() { + return this.rateInMbps; + } + + /** + * Set the rateInMbps property: The bandwidth rate in Mbps. + * + * @param rateInMbps the rateInMbps value to set. + * @return the BandwidthScheduleProperties object itself. + */ + public BandwidthScheduleProperties withRateInMbps(int rateInMbps) { + this.rateInMbps = rateInMbps; + return this; + } + + /** + * Get the days property: The days of the week when this schedule is applicable. + * + * @return the days value. + */ + public List days() { + return this.days; + } + + /** + * Set the days property: The days of the week when this schedule is applicable. + * + * @param days the days value to set. + * @return the BandwidthScheduleProperties object itself. + */ + public BandwidthScheduleProperties withDays(List days) { + this.days = days; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (start() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property start in model BandwidthScheduleProperties")); + } + if (stop() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property stop in model BandwidthScheduleProperties")); + } + if (days() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property days in model BandwidthScheduleProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BandwidthScheduleProperties.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/CloudEdgeManagementRoleProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/CloudEdgeManagementRoleProperties.java new file mode 100644 index 000000000000..b13e36521338 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/CloudEdgeManagementRoleProperties.java @@ -0,0 +1,94 @@ +// 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.azure.resourcemanager.databoxedge.models.EdgeProfile; +import com.azure.resourcemanager.databoxedge.models.RoleStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** CloudEdgeManagement Role properties. */ +@Fluent +public final class CloudEdgeManagementRoleProperties { + /* + * Local Edge Management Status + */ + @JsonProperty(value = "localManagementStatus", access = JsonProperty.Access.WRITE_ONLY) + private RoleStatus localManagementStatus; + + /* + * Edge Profile of the resource + */ + @JsonProperty(value = "edgeProfile", access = JsonProperty.Access.WRITE_ONLY) + private EdgeProfile edgeProfile; + + /* + * Role status. + */ + @JsonProperty(value = "roleStatus", required = true) + private RoleStatus roleStatus; + + /** Creates an instance of CloudEdgeManagementRoleProperties class. */ + public CloudEdgeManagementRoleProperties() { + } + + /** + * 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 CloudEdgeManagementRoleProperties object itself. + */ + public CloudEdgeManagementRoleProperties withRoleStatus(RoleStatus roleStatus) { + this.roleStatus = roleStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (edgeProfile() != null) { + edgeProfile().validate(); + } + if (roleStatus() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property roleStatus in model CloudEdgeManagementRoleProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CloudEdgeManagementRoleProperties.class); +} 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 d4c2952aa00f..20805c371bb3 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 @@ -5,45 +5,51 @@ 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.AzureContainerDataFormat; import com.azure.resourcemanager.databoxedge.models.ContainerStatus; import com.azure.resourcemanager.databoxedge.models.RefreshDetails; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Represents a container on the Data Box Edge/Gateway device. */ -@JsonFlatten @Fluent -public class ContainerInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerInner.class); - +public final class ContainerInner extends ArmBaseModel { /* - * Current status of the container. + * The container properties. */ - @JsonProperty(value = "properties.containerStatus", access = JsonProperty.Access.WRITE_ONLY) - private ContainerStatus containerStatus; + @JsonProperty(value = "properties", required = true) + private ContainerProperties innerProperties = new ContainerProperties(); /* - * DataFormat for Container + * Metadata pertaining to creation and last modification of Container */ - @JsonProperty(value = "properties.dataFormat", required = true) - private AzureContainerDataFormat dataFormat; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * Details of the refresh job on this container. + /** Creates an instance of ContainerInner class. */ + public ContainerInner() { + } + + /** + * Get the innerProperties property: The container properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.refreshDetails", access = JsonProperty.Access.WRITE_ONLY) - private RefreshDetails refreshDetails; + private ContainerProperties innerProperties() { + return this.innerProperties; + } - /* - * The UTC time when container got created. + /** + * Get the systemData property: Metadata pertaining to creation and last modification of Container. + * + * @return the systemData value. */ - @JsonProperty(value = "properties.createdDateTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDateTime; + public SystemData systemData() { + return this.systemData; + } /** * Get the containerStatus property: Current status of the container. @@ -51,7 +57,7 @@ public class ContainerInner extends ArmBaseModel { * @return the containerStatus value. */ public ContainerStatus containerStatus() { - return this.containerStatus; + return this.innerProperties() == null ? null : this.innerProperties().containerStatus(); } /** @@ -60,7 +66,7 @@ public ContainerStatus containerStatus() { * @return the dataFormat value. */ public AzureContainerDataFormat dataFormat() { - return this.dataFormat; + return this.innerProperties() == null ? null : this.innerProperties().dataFormat(); } /** @@ -70,7 +76,10 @@ public AzureContainerDataFormat dataFormat() { * @return the ContainerInner object itself. */ public ContainerInner withDataFormat(AzureContainerDataFormat dataFormat) { - this.dataFormat = dataFormat; + if (this.innerProperties() == null) { + this.innerProperties = new ContainerProperties(); + } + this.innerProperties().withDataFormat(dataFormat); return this; } @@ -80,7 +89,7 @@ public ContainerInner withDataFormat(AzureContainerDataFormat dataFormat) { * @return the refreshDetails value. */ public RefreshDetails refreshDetails() { - return this.refreshDetails; + return this.innerProperties() == null ? null : this.innerProperties().refreshDetails(); } /** @@ -89,7 +98,7 @@ public RefreshDetails refreshDetails() { * @return the createdDateTime value. */ public OffsetDateTime createdDateTime() { - return this.createdDateTime; + return this.innerProperties() == null ? null : this.innerProperties().createdDateTime(); } /** @@ -100,13 +109,14 @@ public OffsetDateTime createdDateTime() { @Override public void validate() { super.validate(); - if (dataFormat() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property dataFormat in model ContainerInner")); - } - if (refreshDetails() != null) { - refreshDetails().validate(); + new IllegalArgumentException("Missing required property innerProperties in model ContainerInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerInner.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ContainerProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ContainerProperties.java new file mode 100644 index 000000000000..4a286bd0755d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ContainerProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; +import com.azure.resourcemanager.databoxedge.models.ContainerStatus; +import com.azure.resourcemanager.databoxedge.models.RefreshDetails; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The container properties. */ +@Fluent +public final class ContainerProperties { + /* + * Current status of the container. + */ + @JsonProperty(value = "containerStatus", access = JsonProperty.Access.WRITE_ONLY) + private ContainerStatus containerStatus; + + /* + * DataFormat for Container + */ + @JsonProperty(value = "dataFormat", required = true) + private AzureContainerDataFormat dataFormat; + + /* + * Details of the refresh job on this container. + */ + @JsonProperty(value = "refreshDetails", access = JsonProperty.Access.WRITE_ONLY) + private RefreshDetails refreshDetails; + + /* + * The UTC time when container got created. + */ + @JsonProperty(value = "createdDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDateTime; + + /** Creates an instance of ContainerProperties class. */ + public ContainerProperties() { + } + + /** + * Get the containerStatus property: Current status of the container. + * + * @return the containerStatus value. + */ + public ContainerStatus containerStatus() { + return this.containerStatus; + } + + /** + * Get the dataFormat property: DataFormat for Container. + * + * @return the dataFormat value. + */ + public AzureContainerDataFormat dataFormat() { + return this.dataFormat; + } + + /** + * Set the dataFormat property: DataFormat for Container. + * + * @param dataFormat the dataFormat value to set. + * @return the ContainerProperties object itself. + */ + public ContainerProperties withDataFormat(AzureContainerDataFormat dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * Get the refreshDetails property: Details of the refresh job on this container. + * + * @return the refreshDetails value. + */ + public RefreshDetails refreshDetails() { + return this.refreshDetails; + } + + /** + * Get the createdDateTime property: The UTC time when container got created. + * + * @return the createdDateTime value. + */ + public OffsetDateTime createdDateTime() { + return this.createdDateTime; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataFormat() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property dataFormat in model ContainerProperties")); + } + if (refreshDetails() != null) { + refreshDetails().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerProperties.class); +} 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 000000000000..2dde8155be26 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DCAccessCodeInner.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DC Access code in the case of Self Managed Shipping. */ +@Fluent +public final class DCAccessCodeInner { + /* + * DCAccessCode properties. + */ + @JsonProperty(value = "properties") + private DCAccessCodeProperties innerProperties; + + /** Creates an instance of DCAccessCodeInner class. */ + public DCAccessCodeInner() { + } + + /** + * Get the innerProperties property: DCAccessCode properties. + * + * @return the innerProperties value. + */ + private DCAccessCodeProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the authCode property: DCAccess Code for the Self Managed shipment. + * + * @return the authCode value. + */ + public String authCode() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new DCAccessCodeProperties(); + } + this.innerProperties().withAuthCode(authCode); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DCAccessCodeProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DCAccessCodeProperties.java new file mode 100644 index 000000000000..0c5557ca9898 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DCAccessCodeProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DCAccessCode Properties. */ +@Fluent +public final class DCAccessCodeProperties { + /* + * DCAccess Code for the Self Managed shipment. + */ + @JsonProperty(value = "authCode") + private String authCode; + + /** Creates an instance of DCAccessCodeProperties class. */ + public DCAccessCodeProperties() { + } + + /** + * 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 DCAccessCodeProperties object itself. + */ + public DCAccessCodeProperties 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 e748fb08dbf4..cffcda0d0075 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 @@ -5,36 +5,50 @@ 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.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.databoxedge.models.ClusterWitnessType; +import com.azure.resourcemanager.databoxedge.models.KeyVaultSyncStatus; +import com.azure.resourcemanager.databoxedge.models.Secret; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; /** The extended Info of the Data Box Edge/Gateway device. */ -@JsonFlatten @Fluent -public class DataBoxEdgeDeviceExtendedInfoInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxEdgeDeviceExtendedInfoInner.class); - +public final class DataBoxEdgeDeviceExtendedInfoInner extends ArmBaseModel { /* - * The digital signature of encrypted certificate. + * The extended info properties. */ - @JsonProperty(value = "properties.encryptionKeyThumbprint") - private String encryptionKeyThumbprint; + @JsonProperty(value = "properties") + private DataBoxEdgeDeviceExtendedInfoProperties innerProperties; /* - * The public part of the encryption certificate. Client uses this to - * encrypt any secret. + * Metadata pertaining to creation and last modification of DataBoxEdgeDevice */ - @JsonProperty(value = "properties.encryptionKey") - private String encryptionKey; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * The Resource ID of the Resource. + /** Creates an instance of DataBoxEdgeDeviceExtendedInfoInner class. */ + public DataBoxEdgeDeviceExtendedInfoInner() { + } + + /** + * Get the innerProperties property: The extended info properties. + * + * @return the innerProperties value. + */ + private DataBoxEdgeDeviceExtendedInfoProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of DataBoxEdgeDevice. + * + * @return the systemData value. */ - @JsonProperty(value = "properties.resourceKey", access = JsonProperty.Access.WRITE_ONLY) - private String resourceKey; + public SystemData systemData() { + return this.systemData; + } /** * Get the encryptionKeyThumbprint property: The digital signature of encrypted certificate. @@ -42,7 +56,7 @@ public class DataBoxEdgeDeviceExtendedInfoInner extends ArmBaseModel { * @return the encryptionKeyThumbprint value. */ public String encryptionKeyThumbprint() { - return this.encryptionKeyThumbprint; + return this.innerProperties() == null ? null : this.innerProperties().encryptionKeyThumbprint(); } /** @@ -52,7 +66,10 @@ public String encryptionKeyThumbprint() { * @return the DataBoxEdgeDeviceExtendedInfoInner object itself. */ public DataBoxEdgeDeviceExtendedInfoInner withEncryptionKeyThumbprint(String encryptionKeyThumbprint) { - this.encryptionKeyThumbprint = encryptionKeyThumbprint; + if (this.innerProperties() == null) { + this.innerProperties = new DataBoxEdgeDeviceExtendedInfoProperties(); + } + this.innerProperties().withEncryptionKeyThumbprint(encryptionKeyThumbprint); return this; } @@ -63,7 +80,7 @@ public DataBoxEdgeDeviceExtendedInfoInner withEncryptionKeyThumbprint(String enc * @return the encryptionKey value. */ public String encryptionKey() { - return this.encryptionKey; + return this.innerProperties() == null ? null : this.innerProperties().encryptionKey(); } /** @@ -74,7 +91,10 @@ public String encryptionKey() { * @return the DataBoxEdgeDeviceExtendedInfoInner object itself. */ public DataBoxEdgeDeviceExtendedInfoInner withEncryptionKey(String encryptionKey) { - this.encryptionKey = encryptionKey; + if (this.innerProperties() == null) { + this.innerProperties = new DataBoxEdgeDeviceExtendedInfoProperties(); + } + this.innerProperties().withEncryptionKey(encryptionKey); return this; } @@ -84,7 +104,185 @@ public DataBoxEdgeDeviceExtendedInfoInner withEncryptionKey(String encryptionKey * @return the resourceKey value. */ public String resourceKey() { - return this.resourceKey; + return this.innerProperties() == null ? null : this.innerProperties().resourceKey(); + } + + /** + * Get the clientSecretStoreId property: The Key Vault ARM Id for client secrets. + * + * @return the clientSecretStoreId value. + */ + public String clientSecretStoreId() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new DataBoxEdgeDeviceExtendedInfoProperties(); + } + this.innerProperties().withClientSecretStoreId(clientSecretStoreId); + return this; + } + + /** + * Get the clientSecretStoreUrl property: The url to access the Client Key Vault. + * + * @return the clientSecretStoreUrl value. + */ + public String clientSecretStoreUrl() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new DataBoxEdgeDeviceExtendedInfoProperties(); + } + this.innerProperties().withClientSecretStoreUrl(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.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new DataBoxEdgeDeviceExtendedInfoProperties(); + } + this.innerProperties().withChannelIntegrityKeyName(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.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new DataBoxEdgeDeviceExtendedInfoProperties(); + } + this.innerProperties().withChannelIntegrityKeyVersion(channelIntegrityKeyVersion); + return this; + } + + /** + * Get the keyVaultSyncStatus property: Key vault sync status. + * + * @return the keyVaultSyncStatus value. + */ + public KeyVaultSyncStatus keyVaultSyncStatus() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new DataBoxEdgeDeviceExtendedInfoProperties(); + } + this.innerProperties().withKeyVaultSyncStatus(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.innerProperties() == null ? null : this.innerProperties().deviceSecrets(); + } + + /** + * Get the clusterWitnessType property: Cluster Witness Type. + * + * @return the clusterWitnessType value. + */ + public ClusterWitnessType clusterWitnessType() { + return this.innerProperties() == null ? null : this.innerProperties().clusterWitnessType(); + } + + /** + * Get the fileShareWitnessLocation property: The witness location of file share. + * + * @return the fileShareWitnessLocation value. + */ + public String fileShareWitnessLocation() { + return this.innerProperties() == null ? null : this.innerProperties().fileShareWitnessLocation(); + } + + /** + * Get the fileShareWitnessUsername property: The username of file share. + * + * @return the fileShareWitnessUsername value. + */ + public String fileShareWitnessUsername() { + return this.innerProperties() == null ? null : this.innerProperties().fileShareWitnessUsername(); + } + + /** + * Get the cloudWitnessStorageAccountName property: The Cloud Witness Storage account name. + * + * @return the cloudWitnessStorageAccountName value. + */ + public String cloudWitnessStorageAccountName() { + return this.innerProperties() == null ? null : this.innerProperties().cloudWitnessStorageAccountName(); + } + + /** + * Get the cloudWitnessContainerName property: The Container for cloud witness in the storage account. + * + * @return the cloudWitnessContainerName value. + */ + public String cloudWitnessContainerName() { + return this.innerProperties() == null ? null : this.innerProperties().cloudWitnessContainerName(); + } + + /** + * Get the cloudWitnessStorageEndpoint property: The Azure service endpoint of the cloud witness storage account. + * + * @return the cloudWitnessStorageEndpoint value. + */ + public String cloudWitnessStorageEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().cloudWitnessStorageEndpoint(); } /** @@ -95,5 +293,8 @@ public String resourceKey() { @Override public void validate() { super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceExtendedInfoProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceExtendedInfoProperties.java new file mode 100644 index 000000000000..7cc0dcf7a10d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceExtendedInfoProperties.java @@ -0,0 +1,344 @@ +// 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.resourcemanager.databoxedge.models.ClusterWitnessType; +import com.azure.resourcemanager.databoxedge.models.KeyVaultSyncStatus; +import com.azure.resourcemanager.databoxedge.models.Secret; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The properties of the Data Box Edge/Gateway device extended info. */ +@Fluent +public final class DataBoxEdgeDeviceExtendedInfoProperties { + /* + * The digital signature of encrypted certificate. + */ + @JsonProperty(value = "encryptionKeyThumbprint") + private String encryptionKeyThumbprint; + + /* + * The public part of the encryption certificate. Client uses this to encrypt any secret. + */ + @JsonProperty(value = "encryptionKey") + private String encryptionKey; + + /* + * The Resource ID of the Resource. + */ + @JsonProperty(value = "resourceKey", access = JsonProperty.Access.WRITE_ONLY) + private String resourceKey; + + /* + * 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 of 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; + + /* + * Key vault sync status + */ + @JsonProperty(value = "keyVaultSyncStatus") + private KeyVaultSyncStatus keyVaultSyncStatus; + + /* + * Device secrets, will be returned only with ODataFilter $expand=deviceSecrets + */ + @JsonProperty(value = "deviceSecrets", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map deviceSecrets; + + /* + * Cluster Witness Type + */ + @JsonProperty(value = "clusterWitnessType", access = JsonProperty.Access.WRITE_ONLY) + private ClusterWitnessType clusterWitnessType; + + /* + * The witness location of file share. + */ + @JsonProperty(value = "fileShareWitnessLocation", access = JsonProperty.Access.WRITE_ONLY) + private String fileShareWitnessLocation; + + /* + * The username of file share. + */ + @JsonProperty(value = "fileShareWitnessUsername", access = JsonProperty.Access.WRITE_ONLY) + private String fileShareWitnessUsername; + + /* + * The Cloud Witness Storage account name. + */ + @JsonProperty(value = "cloudWitnessStorageAccountName", access = JsonProperty.Access.WRITE_ONLY) + private String cloudWitnessStorageAccountName; + + /* + * The Container for cloud witness in the storage account. + */ + @JsonProperty(value = "cloudWitnessContainerName", access = JsonProperty.Access.WRITE_ONLY) + private String cloudWitnessContainerName; + + /* + * The Azure service endpoint of the cloud witness storage account. + */ + @JsonProperty(value = "cloudWitnessStorageEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String cloudWitnessStorageEndpoint; + + /** Creates an instance of DataBoxEdgeDeviceExtendedInfoProperties class. */ + public DataBoxEdgeDeviceExtendedInfoProperties() { + } + + /** + * Get the encryptionKeyThumbprint property: The digital signature of encrypted certificate. + * + * @return the encryptionKeyThumbprint value. + */ + public String encryptionKeyThumbprint() { + return this.encryptionKeyThumbprint; + } + + /** + * Set the encryptionKeyThumbprint property: The digital signature of encrypted certificate. + * + * @param encryptionKeyThumbprint the encryptionKeyThumbprint value to set. + * @return the DataBoxEdgeDeviceExtendedInfoProperties object itself. + */ + public DataBoxEdgeDeviceExtendedInfoProperties withEncryptionKeyThumbprint(String encryptionKeyThumbprint) { + this.encryptionKeyThumbprint = encryptionKeyThumbprint; + return this; + } + + /** + * Get the encryptionKey property: The public part of the encryption certificate. Client uses this to encrypt any + * secret. + * + * @return the encryptionKey value. + */ + public String encryptionKey() { + return this.encryptionKey; + } + + /** + * Set the encryptionKey property: The public part of the encryption certificate. Client uses this to encrypt any + * secret. + * + * @param encryptionKey the encryptionKey value to set. + * @return the DataBoxEdgeDeviceExtendedInfoProperties object itself. + */ + public DataBoxEdgeDeviceExtendedInfoProperties withEncryptionKey(String encryptionKey) { + this.encryptionKey = encryptionKey; + return this; + } + + /** + * Get the resourceKey property: The Resource ID of the Resource. + * + * @return the resourceKey value. + */ + 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 DataBoxEdgeDeviceExtendedInfoProperties object itself. + */ + public DataBoxEdgeDeviceExtendedInfoProperties 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 DataBoxEdgeDeviceExtendedInfoProperties object itself. + */ + public DataBoxEdgeDeviceExtendedInfoProperties 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 DataBoxEdgeDeviceExtendedInfoProperties object itself. + */ + public DataBoxEdgeDeviceExtendedInfoProperties 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 DataBoxEdgeDeviceExtendedInfoProperties object itself. + */ + public DataBoxEdgeDeviceExtendedInfoProperties 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 DataBoxEdgeDeviceExtendedInfoProperties object itself. + */ + public DataBoxEdgeDeviceExtendedInfoProperties 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; + } + + /** + * Get the clusterWitnessType property: Cluster Witness Type. + * + * @return the clusterWitnessType value. + */ + public ClusterWitnessType clusterWitnessType() { + return this.clusterWitnessType; + } + + /** + * Get the fileShareWitnessLocation property: The witness location of file share. + * + * @return the fileShareWitnessLocation value. + */ + public String fileShareWitnessLocation() { + return this.fileShareWitnessLocation; + } + + /** + * Get the fileShareWitnessUsername property: The username of file share. + * + * @return the fileShareWitnessUsername value. + */ + public String fileShareWitnessUsername() { + return this.fileShareWitnessUsername; + } + + /** + * Get the cloudWitnessStorageAccountName property: The Cloud Witness Storage account name. + * + * @return the cloudWitnessStorageAccountName value. + */ + public String cloudWitnessStorageAccountName() { + return this.cloudWitnessStorageAccountName; + } + + /** + * Get the cloudWitnessContainerName property: The Container for cloud witness in the storage account. + * + * @return the cloudWitnessContainerName value. + */ + public String cloudWitnessContainerName() { + return this.cloudWitnessContainerName; + } + + /** + * Get the cloudWitnessStorageEndpoint property: The Azure service endpoint of the cloud witness storage account. + * + * @return the cloudWitnessStorageEndpoint value. + */ + public String cloudWitnessStorageEndpoint() { + return this.cloudWitnessStorageEndpoint; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void 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 37f660791285..f1077116b3dc 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 @@ -5,39 +5,40 @@ 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.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; /** The Data Box Edge/Gateway device. */ -@JsonFlatten @Fluent -public class DataBoxEdgeDeviceInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxEdgeDeviceInner.class); - +public final class DataBoxEdgeDeviceInner extends ArmBaseModel { /* - * 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 once it is - * created, but if an identical geographical region is specified on update, - * the request will succeed. + * 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 once it is created, but if an + * identical geographical region is specified on update, the request will succeed. */ @JsonProperty(value = "location", required = true) private String location; /* - * The list of tags that describe the device. These tags can be used to - * view and group this device (across resource groups). + * The list of tags that describe the device. These tags can be used to view and group this device (across resource + * groups). */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* @@ -53,88 +54,32 @@ public class DataBoxEdgeDeviceInner extends ArmBaseModel { private String etag; /* - * The status of the Data Box Edge/Gateway device. - */ - @JsonProperty(value = "properties.dataBoxEdgeDeviceStatus") - private DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus; - - /* - * The Serial Number of Data Box Edge/Gateway device. - */ - @JsonProperty(value = "properties.serialNumber", access = JsonProperty.Access.WRITE_ONLY) - private String serialNumber; - - /* - * The Description of the Data Box Edge/Gateway device. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The description of the Data Box Edge/Gateway device model. - */ - @JsonProperty(value = "properties.modelDescription") - private String modelDescription; - - /* - * The type of the Data Box Edge/Gateway device. - */ - @JsonProperty(value = "properties.deviceType", access = JsonProperty.Access.WRITE_ONLY) - private DeviceType deviceType; - - /* - * The Data Box Edge/Gateway device name. - */ - @JsonProperty(value = "properties.friendlyName") - private String friendlyName; - - /* - * The Data Box Edge/Gateway device culture. - */ - @JsonProperty(value = "properties.culture", access = JsonProperty.Access.WRITE_ONLY) - private String culture; - - /* - * The Data Box Edge/Gateway device model. - */ - @JsonProperty(value = "properties.deviceModel", access = JsonProperty.Access.WRITE_ONLY) - private String deviceModel; - - /* - * The Data Box Edge/Gateway device software version. - */ - @JsonProperty(value = "properties.deviceSoftwareVersion", access = JsonProperty.Access.WRITE_ONLY) - private String deviceSoftwareVersion; - - /* - * The Data Box Edge/Gateway device local capacity in MB. + * Msi identity of the resource */ - @JsonProperty(value = "properties.deviceLocalCapacity", access = JsonProperty.Access.WRITE_ONLY) - private Long deviceLocalCapacity; + @JsonProperty(value = "identity") + private ResourceIdentity identity; /* - * The Data Box Edge/Gateway device timezone. + * The kind of the device. */ - @JsonProperty(value = "properties.timeZone", access = JsonProperty.Access.WRITE_ONLY) - private String timeZone; + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private DataBoxEdgeDeviceKind kind; /* - * The device software version number of the device (eg: 1.2.18105.6). + * DataBoxEdge Resource */ - @JsonProperty(value = "properties.deviceHcsVersion", access = JsonProperty.Access.WRITE_ONLY) - private String deviceHcsVersion; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /* - * Type of compute roles configured. + * The properties of the Data Box Edge/Gateway device. */ - @JsonProperty(value = "properties.configuredRoleTypes", access = JsonProperty.Access.WRITE_ONLY) - private List configuredRoleTypes; + @JsonProperty(value = "properties") + private DataBoxEdgeDeviceProperties innerProperties; - /* - * The number of nodes in the cluster. - */ - @JsonProperty(value = "properties.nodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer nodeCount; + /** Creates an instance of DataBoxEdgeDeviceInner class. */ + public DataBoxEdgeDeviceInner() { + } /** * Get the location property: The location of the device. This is a supported and registered Azure geographical @@ -223,72 +168,95 @@ public DataBoxEdgeDeviceInner withEtag(String etag) { } /** - * Get the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. + * Get the identity property: Msi identity of the resource. * - * @return the dataBoxEdgeDeviceStatus value. + * @return the identity value. */ - public DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus() { - return this.dataBoxEdgeDeviceStatus; + public ResourceIdentity identity() { + return this.identity; } /** - * Set the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. + * Set the identity property: Msi identity of the resource. * - * @param dataBoxEdgeDeviceStatus the dataBoxEdgeDeviceStatus value to set. + * @param identity the identity value to set. * @return the DataBoxEdgeDeviceInner object itself. */ - public DataBoxEdgeDeviceInner withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus) { - this.dataBoxEdgeDeviceStatus = dataBoxEdgeDeviceStatus; + public DataBoxEdgeDeviceInner withIdentity(ResourceIdentity identity) { + this.identity = identity; return this; } /** - * Get the serialNumber property: The Serial Number of Data Box Edge/Gateway device. + * Get the kind property: The kind of the device. * - * @return the serialNumber value. + * @return the kind value. */ - public String serialNumber() { - return this.serialNumber; + public DataBoxEdgeDeviceKind kind() { + return this.kind; } /** - * Get the description property: The Description of the Data Box Edge/Gateway device. + * Get the systemData property: DataBoxEdge Resource. * - * @return the description value. + * @return the systemData value. */ - public String description() { - return this.description; + public SystemData systemData() { + return this.systemData; } /** - * Set the description property: The Description of the Data Box Edge/Gateway device. + * Get the innerProperties property: The properties of the Data Box Edge/Gateway device. * - * @param description the description value to set. - * @return the DataBoxEdgeDeviceInner object itself. + * @return the innerProperties value. */ - public DataBoxEdgeDeviceInner withDescription(String description) { - this.description = description; - return this; + private DataBoxEdgeDeviceProperties innerProperties() { + return this.innerProperties; } /** - * Get the modelDescription property: The description of the Data Box Edge/Gateway device model. + * Get the systemData property: DataBoxEdge Device Properties. * - * @return the modelDescription value. + * @return the systemData value. */ - public String modelDescription() { - return this.modelDescription; + public SystemData systemDataPropertiesSystemData() { + return this.innerProperties() == null ? null : this.innerProperties().systemData(); } /** - * Set the modelDescription property: The description of the Data Box Edge/Gateway device model. + * Get the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. * - * @param modelDescription the modelDescription value to set. - * @return the DataBoxEdgeDeviceInner object itself. + * @return the dataBoxEdgeDeviceStatus value. */ - public DataBoxEdgeDeviceInner withModelDescription(String modelDescription) { - this.modelDescription = modelDescription; - return this; + public DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus() { + return this.innerProperties() == null ? null : this.innerProperties().dataBoxEdgeDeviceStatus(); + } + + /** + * Get the serialNumber property: The Serial Number of Data Box Edge/Gateway device. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + } + + /** + * Get the description property: The Description of the Data Box Edge/Gateway device. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Get the modelDescription property: The description of the Data Box Edge/Gateway device model. + * + * @return the modelDescription value. + */ + public String modelDescription() { + return this.innerProperties() == null ? null : this.innerProperties().modelDescription(); } /** @@ -297,7 +265,7 @@ public DataBoxEdgeDeviceInner withModelDescription(String modelDescription) { * @return the deviceType value. */ public DeviceType deviceType() { - return this.deviceType; + return this.innerProperties() == null ? null : this.innerProperties().deviceType(); } /** @@ -306,18 +274,7 @@ public DeviceType deviceType() { * @return the friendlyName value. */ 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; + return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); } /** @@ -326,7 +283,7 @@ public DataBoxEdgeDeviceInner withFriendlyName(String friendlyName) { * @return the culture value. */ public String culture() { - return this.culture; + return this.innerProperties() == null ? null : this.innerProperties().culture(); } /** @@ -335,7 +292,7 @@ public String culture() { * @return the deviceModel value. */ public String deviceModel() { - return this.deviceModel; + return this.innerProperties() == null ? null : this.innerProperties().deviceModel(); } /** @@ -344,7 +301,7 @@ public String deviceModel() { * @return the deviceSoftwareVersion value. */ public String deviceSoftwareVersion() { - return this.deviceSoftwareVersion; + return this.innerProperties() == null ? null : this.innerProperties().deviceSoftwareVersion(); } /** @@ -353,7 +310,7 @@ public String deviceSoftwareVersion() { * @return the deviceLocalCapacity value. */ public Long deviceLocalCapacity() { - return this.deviceLocalCapacity; + return this.innerProperties() == null ? null : this.innerProperties().deviceLocalCapacity(); } /** @@ -362,7 +319,7 @@ public Long deviceLocalCapacity() { * @return the timeZone value. */ public String timeZone() { - return this.timeZone; + return this.innerProperties() == null ? null : this.innerProperties().timeZone(); } /** @@ -371,7 +328,7 @@ public String timeZone() { * @return the deviceHcsVersion value. */ public String deviceHcsVersion() { - return this.deviceHcsVersion; + return this.innerProperties() == null ? null : this.innerProperties().deviceHcsVersion(); } /** @@ -380,7 +337,7 @@ public String deviceHcsVersion() { * @return the configuredRoleTypes value. */ public List configuredRoleTypes() { - return this.configuredRoleTypes; + return this.innerProperties() == null ? null : this.innerProperties().configuredRoleTypes(); } /** @@ -389,7 +346,48 @@ public List configuredRoleTypes() { * @return the nodeCount value. */ public Integer nodeCount() { - return this.nodeCount; + return this.innerProperties() == null ? null : this.innerProperties().nodeCount(); + } + + /** + * Get the resourceMoveDetails property: The details of the move operation on this resource. + * + * @return the resourceMoveDetails value. + */ + public ResourceMoveDetails resourceMoveDetails() { + return this.innerProperties() == null ? null : this.innerProperties().resourceMoveDetails(); + } + + /** + * Get the edgeProfile property: The details of Edge Profile for this resource. + * + * @return the edgeProfile value. + */ + public EdgeProfile edgeProfile() { + return this.innerProperties() == null ? null : this.innerProperties().edgeProfile(); + } + + /** + * Get the dataResidency property: The details of data-residency related properties for this resource. + * + * @return the dataResidency value. + */ + public DataResidency dataResidency() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new DataBoxEdgeDeviceProperties(); + } + this.innerProperties().withDataResidency(dataResidency); + return this; } /** @@ -401,12 +399,20 @@ public Integer nodeCount() { public void validate() { super.validate(); if (location() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property location in model DataBoxEdgeDeviceInner")); } if (sku() != null) { sku().validate(); } + if (identity() != null) { + identity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(DataBoxEdgeDeviceInner.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceProperties.java new file mode 100644 index 000000000000..96059d5230fd --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceProperties.java @@ -0,0 +1,322 @@ +// 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.management.SystemData; +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.ResourceMoveDetails; +import com.azure.resourcemanager.databoxedge.models.RoleTypes; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The properties of the Data Box Edge/Gateway device. */ +@Fluent +public final class DataBoxEdgeDeviceProperties { + /* + * DataBoxEdge Device Properties + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * The status of the Data Box Edge/Gateway device. + */ + @JsonProperty(value = "dataBoxEdgeDeviceStatus", access = JsonProperty.Access.WRITE_ONLY) + private DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus; + + /* + * The Serial Number of Data Box Edge/Gateway device. + */ + @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /* + * The Description of the Data Box Edge/Gateway device. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * The description of the Data Box Edge/Gateway device model. + */ + @JsonProperty(value = "modelDescription", access = JsonProperty.Access.WRITE_ONLY) + private String modelDescription; + + /* + * The type of the Data Box Edge/Gateway device. + */ + @JsonProperty(value = "deviceType", access = JsonProperty.Access.WRITE_ONLY) + private DeviceType deviceType; + + /* + * The Data Box Edge/Gateway device name. + */ + @JsonProperty(value = "friendlyName", access = JsonProperty.Access.WRITE_ONLY) + private String friendlyName; + + /* + * The Data Box Edge/Gateway device culture. + */ + @JsonProperty(value = "culture", access = JsonProperty.Access.WRITE_ONLY) + private String culture; + + /* + * The Data Box Edge/Gateway device model. + */ + @JsonProperty(value = "deviceModel", access = JsonProperty.Access.WRITE_ONLY) + private String deviceModel; + + /* + * The Data Box Edge/Gateway device software version. + */ + @JsonProperty(value = "deviceSoftwareVersion", access = JsonProperty.Access.WRITE_ONLY) + private String deviceSoftwareVersion; + + /* + * The Data Box Edge/Gateway device local capacity in MB. + */ + @JsonProperty(value = "deviceLocalCapacity", access = JsonProperty.Access.WRITE_ONLY) + private Long deviceLocalCapacity; + + /* + * The Data Box Edge/Gateway device timezone. + */ + @JsonProperty(value = "timeZone", access = JsonProperty.Access.WRITE_ONLY) + private String timeZone; + + /* + * The device software version number of the device (eg: 1.2.18105.6). + */ + @JsonProperty(value = "deviceHcsVersion", access = JsonProperty.Access.WRITE_ONLY) + private String deviceHcsVersion; + + /* + * Type of compute roles configured. + */ + @JsonProperty(value = "configuredRoleTypes", access = JsonProperty.Access.WRITE_ONLY) + private List configuredRoleTypes; + + /* + * The number of nodes in the cluster. + */ + @JsonProperty(value = "nodeCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer nodeCount; + + /* + * The details of the move operation on this resource. + */ + @JsonProperty(value = "resourceMoveDetails", access = JsonProperty.Access.WRITE_ONLY) + private ResourceMoveDetails resourceMoveDetails; + + /* + * The details of Edge Profile for this resource + */ + @JsonProperty(value = "edgeProfile", access = JsonProperty.Access.WRITE_ONLY) + private EdgeProfile edgeProfile; + + /* + * The details of data-residency related properties for this resource + */ + @JsonProperty(value = "dataResidency") + private DataResidency dataResidency; + + /** Creates an instance of DataBoxEdgeDeviceProperties class. */ + public DataBoxEdgeDeviceProperties() { + } + + /** + * Get the systemData property: DataBoxEdge Device Properties. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. + * + * @return the dataBoxEdgeDeviceStatus value. + */ + public DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus() { + return this.dataBoxEdgeDeviceStatus; + } + + /** + * Get the serialNumber property: The Serial Number of Data Box Edge/Gateway device. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the description property: The Description of the Data Box Edge/Gateway device. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the modelDescription property: The description of the Data Box Edge/Gateway device model. + * + * @return the modelDescription value. + */ + public String modelDescription() { + return this.modelDescription; + } + + /** + * Get the deviceType property: The type of the Data Box Edge/Gateway device. + * + * @return the deviceType value. + */ + public DeviceType deviceType() { + return this.deviceType; + } + + /** + * Get the friendlyName property: The Data Box Edge/Gateway device name. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Get the culture property: The Data Box Edge/Gateway device culture. + * + * @return the culture value. + */ + public String culture() { + return this.culture; + } + + /** + * Get the deviceModel property: The Data Box Edge/Gateway device model. + * + * @return the deviceModel value. + */ + public String deviceModel() { + return this.deviceModel; + } + + /** + * Get the deviceSoftwareVersion property: The Data Box Edge/Gateway device software version. + * + * @return the deviceSoftwareVersion value. + */ + public String deviceSoftwareVersion() { + return this.deviceSoftwareVersion; + } + + /** + * Get the deviceLocalCapacity property: The Data Box Edge/Gateway device local capacity in MB. + * + * @return the deviceLocalCapacity value. + */ + public Long deviceLocalCapacity() { + return this.deviceLocalCapacity; + } + + /** + * Get the timeZone property: The Data Box Edge/Gateway device timezone. + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Get the deviceHcsVersion property: The device software version number of the device (eg: 1.2.18105.6). + * + * @return the deviceHcsVersion value. + */ + public String deviceHcsVersion() { + return this.deviceHcsVersion; + } + + /** + * Get the configuredRoleTypes property: Type of compute roles configured. + * + * @return the configuredRoleTypes value. + */ + public List configuredRoleTypes() { + return this.configuredRoleTypes; + } + + /** + * Get the nodeCount property: The number of nodes in the cluster. + * + * @return the nodeCount value. + */ + 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 DataBoxEdgeDeviceProperties object itself. + */ + public DataBoxEdgeDeviceProperties withDataResidency(DataResidency dataResidency) { + this.dataResidency = dataResidency; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void 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/DataBoxEdgeDevicePropertiesPatch.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDevicePropertiesPatch.java new file mode 100644 index 000000000000..11a9a43d0d09 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDevicePropertiesPatch.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.databoxedge.models.EdgeProfilePatch; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Data Box Edge/Gateway device properties patch. */ +@Fluent +public final class DataBoxEdgeDevicePropertiesPatch { + /* + * Edge Profile property of the Data Box Edge/Gateway device + */ + @JsonProperty(value = "edgeProfile") + private EdgeProfilePatch edgeProfile; + + /** Creates an instance of DataBoxEdgeDevicePropertiesPatch class. */ + public DataBoxEdgeDevicePropertiesPatch() { + } + + /** + * 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 DataBoxEdgeDevicePropertiesPatch object itself. + */ + public DataBoxEdgeDevicePropertiesPatch withEdgeProfile(EdgeProfilePatch edgeProfile) { + this.edgeProfile = edgeProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (edgeProfile() != null) { + edgeProfile().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 53% 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 7cdc781fa780..91f3ed9f9769 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 @@ -5,65 +5,71 @@ package com.azure.resourcemanager.databoxedge.fluent.models; 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.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.databoxedge.models.SkuVersion; 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 { /* - * 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 +81,38 @@ 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; + + /** Creates an instance of DataBoxEdgeSkuInner class. */ + public DataBoxEdgeSkuInner() { + } /** * 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/DeviceCapacityInfoInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DeviceCapacityInfoInner.java new file mode 100644 index 000000000000..191ceadb2c91 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DeviceCapacityInfoInner.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; +import com.azure.resourcemanager.databoxedge.models.ClusterCapacityViewData; +import com.azure.resourcemanager.databoxedge.models.ClusterStorageViewData; +import com.azure.resourcemanager.databoxedge.models.HostCapacity; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Object for Capturing DeviceCapacityInfo. */ +@Fluent +public final class DeviceCapacityInfoInner extends ArmBaseModel { + /* + * The device capacity properties. + */ + @JsonProperty(value = "properties") + private DeviceCapacityInfoProperties innerProperties; + + /* + * Metadata pertaining to device capacity info. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of DeviceCapacityInfoInner class. */ + public DeviceCapacityInfoInner() { + } + + /** + * Get the innerProperties property: The device capacity properties. + * + * @return the innerProperties value. + */ + private DeviceCapacityInfoProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Metadata pertaining to device capacity info. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the timestamp property: Timestamp of request in UTC. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.innerProperties() == null ? null : this.innerProperties().timestamp(); + } + + /** + * Set the timestamp property: Timestamp of request in UTC. + * + * @param timestamp the timestamp value to set. + * @return the DeviceCapacityInfoInner object itself. + */ + public DeviceCapacityInfoInner withTimestamp(OffsetDateTime timestamp) { + if (this.innerProperties() == null) { + this.innerProperties = new DeviceCapacityInfoProperties(); + } + this.innerProperties().withTimestamp(timestamp); + return this; + } + + /** + * Get the clusterStorageCapacityInfo property: Cluster capacity data for storage resources (CSV). + * + * @return the clusterStorageCapacityInfo value. + */ + public ClusterStorageViewData clusterStorageCapacityInfo() { + return this.innerProperties() == null ? null : this.innerProperties().clusterStorageCapacityInfo(); + } + + /** + * Set the clusterStorageCapacityInfo property: Cluster capacity data for storage resources (CSV). + * + * @param clusterStorageCapacityInfo the clusterStorageCapacityInfo value to set. + * @return the DeviceCapacityInfoInner object itself. + */ + public DeviceCapacityInfoInner withClusterStorageCapacityInfo(ClusterStorageViewData clusterStorageCapacityInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new DeviceCapacityInfoProperties(); + } + this.innerProperties().withClusterStorageCapacityInfo(clusterStorageCapacityInfo); + return this; + } + + /** + * Get the clusterComputeCapacityInfo property: Cluster capacity data for compute resources (Memory and GPU). + * + * @return the clusterComputeCapacityInfo value. + */ + public ClusterCapacityViewData clusterComputeCapacityInfo() { + return this.innerProperties() == null ? null : this.innerProperties().clusterComputeCapacityInfo(); + } + + /** + * Set the clusterComputeCapacityInfo property: Cluster capacity data for compute resources (Memory and GPU). + * + * @param clusterComputeCapacityInfo the clusterComputeCapacityInfo value to set. + * @return the DeviceCapacityInfoInner object itself. + */ + public DeviceCapacityInfoInner withClusterComputeCapacityInfo(ClusterCapacityViewData clusterComputeCapacityInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new DeviceCapacityInfoProperties(); + } + this.innerProperties().withClusterComputeCapacityInfo(clusterComputeCapacityInfo); + return this; + } + + /** + * Get the nodeCapacityInfos property: The dictionary of individual node names and node capacities in the cluster. + * + * @return the nodeCapacityInfos value. + */ + public Map nodeCapacityInfos() { + return this.innerProperties() == null ? null : this.innerProperties().nodeCapacityInfos(); + } + + /** + * Set the nodeCapacityInfos property: The dictionary of individual node names and node capacities in the cluster. + * + * @param nodeCapacityInfos the nodeCapacityInfos value to set. + * @return the DeviceCapacityInfoInner object itself. + */ + public DeviceCapacityInfoInner withNodeCapacityInfos(Map nodeCapacityInfos) { + if (this.innerProperties() == null) { + this.innerProperties = new DeviceCapacityInfoProperties(); + } + this.innerProperties().withNodeCapacityInfos(nodeCapacityInfos); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DeviceCapacityInfoProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DeviceCapacityInfoProperties.java new file mode 100644 index 000000000000..22d800702dea --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DeviceCapacityInfoProperties.java @@ -0,0 +1,153 @@ +// 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.resourcemanager.databoxedge.models.ClusterCapacityViewData; +import com.azure.resourcemanager.databoxedge.models.ClusterStorageViewData; +import com.azure.resourcemanager.databoxedge.models.HostCapacity; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** The properties of Device Capacity Info. */ +@Fluent +public final class DeviceCapacityInfoProperties { + /* + * Timestamp of request in UTC + */ + @JsonProperty(value = "timeStamp") + private OffsetDateTime timestamp; + + /* + * Cluster capacity data for storage resources (CSV). + */ + @JsonProperty(value = "clusterStorageCapacityInfo") + private ClusterStorageViewData clusterStorageCapacityInfo; + + /* + * Cluster capacity data for compute resources (Memory and GPU). + */ + @JsonProperty(value = "clusterComputeCapacityInfo") + private ClusterCapacityViewData clusterComputeCapacityInfo; + + /* + * The dictionary of individual node names and node capacities in the cluster. + */ + @JsonProperty(value = "nodeCapacityInfos") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map nodeCapacityInfos; + + /** Creates an instance of DeviceCapacityInfoProperties class. */ + public DeviceCapacityInfoProperties() { + } + + /** + * Get the timestamp property: Timestamp of request in UTC. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: Timestamp of request in UTC. + * + * @param timestamp the timestamp value to set. + * @return the DeviceCapacityInfoProperties object itself. + */ + public DeviceCapacityInfoProperties withTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the clusterStorageCapacityInfo property: Cluster capacity data for storage resources (CSV). + * + * @return the clusterStorageCapacityInfo value. + */ + public ClusterStorageViewData clusterStorageCapacityInfo() { + return this.clusterStorageCapacityInfo; + } + + /** + * Set the clusterStorageCapacityInfo property: Cluster capacity data for storage resources (CSV). + * + * @param clusterStorageCapacityInfo the clusterStorageCapacityInfo value to set. + * @return the DeviceCapacityInfoProperties object itself. + */ + public DeviceCapacityInfoProperties withClusterStorageCapacityInfo( + ClusterStorageViewData clusterStorageCapacityInfo) { + this.clusterStorageCapacityInfo = clusterStorageCapacityInfo; + return this; + } + + /** + * Get the clusterComputeCapacityInfo property: Cluster capacity data for compute resources (Memory and GPU). + * + * @return the clusterComputeCapacityInfo value. + */ + public ClusterCapacityViewData clusterComputeCapacityInfo() { + return this.clusterComputeCapacityInfo; + } + + /** + * Set the clusterComputeCapacityInfo property: Cluster capacity data for compute resources (Memory and GPU). + * + * @param clusterComputeCapacityInfo the clusterComputeCapacityInfo value to set. + * @return the DeviceCapacityInfoProperties object itself. + */ + public DeviceCapacityInfoProperties withClusterComputeCapacityInfo( + ClusterCapacityViewData clusterComputeCapacityInfo) { + this.clusterComputeCapacityInfo = clusterComputeCapacityInfo; + return this; + } + + /** + * Get the nodeCapacityInfos property: The dictionary of individual node names and node capacities in the cluster. + * + * @return the nodeCapacityInfos value. + */ + public Map nodeCapacityInfos() { + return this.nodeCapacityInfos; + } + + /** + * Set the nodeCapacityInfos property: The dictionary of individual node names and node capacities in the cluster. + * + * @param nodeCapacityInfos the nodeCapacityInfos value to set. + * @return the DeviceCapacityInfoProperties object itself. + */ + public DeviceCapacityInfoProperties withNodeCapacityInfos(Map nodeCapacityInfos) { + this.nodeCapacityInfos = nodeCapacityInfos; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (clusterStorageCapacityInfo() != null) { + clusterStorageCapacityInfo().validate(); + } + if (clusterComputeCapacityInfo() != null) { + clusterComputeCapacityInfo().validate(); + } + if (nodeCapacityInfos() != null) { + nodeCapacityInfos() + .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/DeviceCapacityRequestInfoProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DeviceCapacityRequestInfoProperties.java new file mode 100644 index 000000000000..b655c16bd84f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DeviceCapacityRequestInfoProperties.java @@ -0,0 +1,95 @@ +// 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.azure.resourcemanager.databoxedge.models.VmPlacementRequestResult; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of Device Capacity Request Info containing VM's to be checked and their corresponding results. */ +@Fluent +public final class DeviceCapacityRequestInfoProperties { + /* + * Array containing the sizes of the VMs for checking if its feasible to create them on the appliance. + */ + @JsonProperty(value = "vmPlacementQuery", required = true) + private List> vmPlacementQuery; + + /* + * Array of the VMs of the sizes in VmSizes can be provisioned on the appliance. + */ + @JsonProperty(value = "vmPlacementResults") + private List vmPlacementResults; + + /** Creates an instance of DeviceCapacityRequestInfoProperties class. */ + public DeviceCapacityRequestInfoProperties() { + } + + /** + * Get the vmPlacementQuery property: Array containing the sizes of the VMs for checking if its feasible to create + * them on the appliance. + * + * @return the vmPlacementQuery value. + */ + public List> vmPlacementQuery() { + return this.vmPlacementQuery; + } + + /** + * Set the vmPlacementQuery property: Array containing the sizes of the VMs for checking if its feasible to create + * them on the appliance. + * + * @param vmPlacementQuery the vmPlacementQuery value to set. + * @return the DeviceCapacityRequestInfoProperties object itself. + */ + public DeviceCapacityRequestInfoProperties withVmPlacementQuery(List> vmPlacementQuery) { + this.vmPlacementQuery = vmPlacementQuery; + return this; + } + + /** + * Get the vmPlacementResults property: Array of the VMs of the sizes in VmSizes can be provisioned on the + * appliance. + * + * @return the vmPlacementResults value. + */ + public List vmPlacementResults() { + return this.vmPlacementResults; + } + + /** + * Set the vmPlacementResults property: Array of the VMs of the sizes in VmSizes can be provisioned on the + * appliance. + * + * @param vmPlacementResults the vmPlacementResults value to set. + * @return the DeviceCapacityRequestInfoProperties object itself. + */ + public DeviceCapacityRequestInfoProperties withVmPlacementResults( + List vmPlacementResults) { + this.vmPlacementResults = vmPlacementResults; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vmPlacementQuery() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property vmPlacementQuery in model DeviceCapacityRequestInfoProperties")); + } + if (vmPlacementResults() != null) { + vmPlacementResults().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DeviceCapacityRequestInfoProperties.class); +} 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 000000000000..f109cdf3a43f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DiagnosticProactiveLogCollectionSettingsInner.java @@ -0,0 +1,95 @@ +// 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.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.JsonProperty; + +/** The diagnostic proactive log collection settings of a device. */ +@Fluent +public final class DiagnosticProactiveLogCollectionSettingsInner extends ArmBaseModel { + /* + * Properties of the diagnostic proactive log collection settings. + */ + @JsonProperty(value = "properties", required = true) + private ProactiveLogCollectionSettingsProperties innerProperties = new ProactiveLogCollectionSettingsProperties(); + + /* + * Metadata pertaining to creation and last modification of DiagnosticProactiveLogCollectionSettings + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of DiagnosticProactiveLogCollectionSettingsInner class. */ + public DiagnosticProactiveLogCollectionSettingsInner() { + } + + /** + * Get the innerProperties property: Properties of the diagnostic proactive log collection settings. + * + * @return the innerProperties value. + */ + private ProactiveLogCollectionSettingsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of + * 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.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new ProactiveLogCollectionSettingsProperties(); + } + this.innerProperties().withUserConsent(userConsent); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model" + + " DiagnosticProactiveLogCollectionSettingsInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiagnosticProactiveLogCollectionSettingsInner.class); +} 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 000000000000..3b02459fcd96 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DiagnosticRemoteSupportSettingsInner.java @@ -0,0 +1,95 @@ +// 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.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.JsonProperty; +import java.util.List; + +/** The remote support settings of a device. */ +@Fluent +public final class DiagnosticRemoteSupportSettingsInner extends ArmBaseModel { + /* + * Properties of the remote support settings. + */ + @JsonProperty(value = "properties", required = true) + private DiagnosticRemoteSupportSettingsProperties innerProperties = new DiagnosticRemoteSupportSettingsProperties(); + + /* + * Represents resource creation and updation time + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of DiagnosticRemoteSupportSettingsInner class. */ + public DiagnosticRemoteSupportSettingsInner() { + } + + /** + * Get the innerProperties property: Properties of the remote support settings. + * + * @return the innerProperties value. + */ + private DiagnosticRemoteSupportSettingsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Represents resource creation and updation time. + * + * @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.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticRemoteSupportSettingsProperties(); + } + this.innerProperties().withRemoteSupportSettingsList(remoteSupportSettingsList); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model DiagnosticRemoteSupportSettingsInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiagnosticRemoteSupportSettingsInner.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DiagnosticRemoteSupportSettingsProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DiagnosticRemoteSupportSettingsProperties.java new file mode 100644 index 000000000000..bcf0fc7157a2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DiagnosticRemoteSupportSettingsProperties.java @@ -0,0 +1,56 @@ +// 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.resourcemanager.databoxedge.models.RemoteSupportSettings; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The properties of remote support settings. */ +@Fluent +public final class DiagnosticRemoteSupportSettingsProperties { + /* + * Remote support settings list according to the RemoteApplicationType + */ + @JsonProperty(value = "remoteSupportSettingsList") + private List remoteSupportSettingsList; + + /** Creates an instance of DiagnosticRemoteSupportSettingsProperties class. */ + public DiagnosticRemoteSupportSettingsProperties() { + } + + /** + * 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 DiagnosticRemoteSupportSettingsProperties object itself. + */ + public DiagnosticRemoteSupportSettingsProperties withRemoteSupportSettingsList( + List remoteSupportSettingsList) { + this.remoteSupportSettingsList = remoteSupportSettingsList; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void 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/FileTriggerProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/FileTriggerProperties.java new file mode 100644 index 000000000000..9c8455b9dc01 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/FileTriggerProperties.java @@ -0,0 +1,128 @@ +// 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.azure.resourcemanager.databoxedge.models.FileSourceInfo; +import com.azure.resourcemanager.databoxedge.models.RoleSinkInfo; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** File trigger properties. */ +@Fluent +public final class FileTriggerProperties { + /* + * File event source details. + */ + @JsonProperty(value = "sourceInfo", required = true) + private FileSourceInfo sourceInfo; + + /* + * Role sink info. + */ + @JsonProperty(value = "sinkInfo", required = true) + private RoleSinkInfo sinkInfo; + + /* + * A custom context tag typically used to correlate the trigger against its usage. For example, if a periodic timer + * trigger is intended for certain specific IoT modules in the device, the tag can be the name or the image URL of + * the module. + */ + @JsonProperty(value = "customContextTag") + private String customContextTag; + + /** Creates an instance of FileTriggerProperties class. */ + public FileTriggerProperties() { + } + + /** + * Get the sourceInfo property: File event source details. + * + * @return the sourceInfo value. + */ + public FileSourceInfo sourceInfo() { + return this.sourceInfo; + } + + /** + * Set the sourceInfo property: File event source details. + * + * @param sourceInfo the sourceInfo value to set. + * @return the FileTriggerProperties object itself. + */ + public FileTriggerProperties withSourceInfo(FileSourceInfo sourceInfo) { + this.sourceInfo = sourceInfo; + return this; + } + + /** + * Get the sinkInfo property: Role sink info. + * + * @return the sinkInfo value. + */ + public RoleSinkInfo sinkInfo() { + return this.sinkInfo; + } + + /** + * Set the sinkInfo property: Role sink info. + * + * @param sinkInfo the sinkInfo value to set. + * @return the FileTriggerProperties object itself. + */ + public FileTriggerProperties withSinkInfo(RoleSinkInfo sinkInfo) { + this.sinkInfo = sinkInfo; + return this; + } + + /** + * Get the customContextTag property: A custom context tag typically used to correlate the trigger against its + * usage. For example, if a periodic timer trigger is intended for certain specific IoT modules in the device, the + * tag can be the name or the image URL of the module. + * + * @return the customContextTag value. + */ + public String customContextTag() { + return this.customContextTag; + } + + /** + * Set the customContextTag property: A custom context tag typically used to correlate the trigger against its + * usage. For example, if a periodic timer trigger is intended for certain specific IoT modules in the device, the + * tag can be the name or the image URL of the module. + * + * @param customContextTag the customContextTag value to set. + * @return the FileTriggerProperties object itself. + */ + public FileTriggerProperties withCustomContextTag(String customContextTag) { + this.customContextTag = customContextTag; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceInfo() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sourceInfo in model FileTriggerProperties")); + } else { + sourceInfo().validate(); + } + if (sinkInfo() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property sinkInfo in model FileTriggerProperties")); + } else { + sinkInfo().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FileTriggerProperties.class); +} 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 000000000000..88d3f5aacf74 --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** Used in activation key generation flow. */ +@Fluent +public final class GenerateCertResponseInner { + /* + * 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; + + /** Creates an instance of GenerateCertResponseInner class. */ + public GenerateCertResponseInner() { + } + + /** + * 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/IoTAddonProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/IoTAddonProperties.java new file mode 100644 index 000000000000..ed5e1410ccf7 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/IoTAddonProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.AddonState; +import com.azure.resourcemanager.databoxedge.models.HostPlatformType; +import com.azure.resourcemanager.databoxedge.models.IoTDeviceInfo; +import com.azure.resourcemanager.databoxedge.models.PlatformType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** IoT addon properties. */ +@Fluent +public final class IoTAddonProperties { + /* + * IoT device metadata to which appliance needs to be connected. + */ + @JsonProperty(value = "ioTDeviceDetails", required = true) + private IoTDeviceInfo ioTDeviceDetails; + + /* + * IoT edge device to which the IoT Addon needs to be configured. + */ + @JsonProperty(value = "ioTEdgeDeviceDetails", required = true) + private IoTDeviceInfo ioTEdgeDeviceDetails; + + /* + * Version of IoT running on the appliance. + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /* + * Host OS supported by the IoT addon. + */ + @JsonProperty(value = "hostPlatform", access = JsonProperty.Access.WRITE_ONLY) + private PlatformType hostPlatform; + + /* + * Platform where the runtime is hosted. + */ + @JsonProperty(value = "hostPlatformType", access = JsonProperty.Access.WRITE_ONLY) + private HostPlatformType hostPlatformType; + + /* + * Addon Provisioning State + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AddonState provisioningState; + + /** Creates an instance of IoTAddonProperties class. */ + public IoTAddonProperties() { + } + + /** + * 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 IoTAddonProperties object itself. + */ + public IoTAddonProperties 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 IoTAddonProperties object itself. + */ + public IoTAddonProperties 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. + */ + public void validate() { + if (ioTDeviceDetails() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ioTDeviceDetails in model IoTAddonProperties")); + } else { + ioTDeviceDetails().validate(); + } + if (ioTEdgeDeviceDetails() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ioTEdgeDeviceDetails in model IoTAddonProperties")); + } else { + ioTEdgeDeviceDetails().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IoTAddonProperties.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/IoTRoleProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/IoTRoleProperties.java new file mode 100644 index 000000000000..0d982af377b4 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/IoTRoleProperties.java @@ -0,0 +1,267 @@ +// 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.azure.resourcemanager.databoxedge.models.ComputeResource; +import com.azure.resourcemanager.databoxedge.models.HostPlatformType; +import com.azure.resourcemanager.databoxedge.models.IoTDeviceInfo; +import com.azure.resourcemanager.databoxedge.models.IoTEdgeAgentInfo; +import com.azure.resourcemanager.databoxedge.models.MountPointMap; +import com.azure.resourcemanager.databoxedge.models.PlatformType; +import com.azure.resourcemanager.databoxedge.models.RoleStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** IoT role properties. */ +@Fluent +public final class IoTRoleProperties { + /* + * Host OS supported by the IoT role. + */ + @JsonProperty(value = "hostPlatform", required = true) + private PlatformType hostPlatform; + + /* + * IoT device metadata to which data box edge device needs to be connected. + */ + @JsonProperty(value = "ioTDeviceDetails", required = true) + private IoTDeviceInfo ioTDeviceDetails; + + /* + * IoT edge device to which the IoT role needs to be configured. + */ + @JsonProperty(value = "ioTEdgeDeviceDetails", required = true) + private IoTDeviceInfo ioTEdgeDeviceDetails; + + /* + * Mount points of shares in role(s). + */ + @JsonProperty(value = "shareMappings") + private List shareMappings; + + /* + * Iot edge agent details to download the agent and bootstrap iot runtime. + */ + @JsonProperty(value = "ioTEdgeAgentInfo") + private IoTEdgeAgentInfo ioTEdgeAgentInfo; + + /* + * Platform where the Iot runtime is hosted. + */ + @JsonProperty(value = "hostPlatformType", access = JsonProperty.Access.WRITE_ONLY) + private HostPlatformType hostPlatformType; + + /* + * Resource allocation + */ + @JsonProperty(value = "computeResource") + private ComputeResource computeResource; + + /* + * Role status. + */ + @JsonProperty(value = "roleStatus", required = true) + private RoleStatus roleStatus; + + /** Creates an instance of IoTRoleProperties class. */ + public IoTRoleProperties() { + } + + /** + * Get the hostPlatform property: Host OS supported by the IoT role. + * + * @return the hostPlatform value. + */ + public PlatformType hostPlatform() { + return this.hostPlatform; + } + + /** + * Set the hostPlatform property: Host OS supported by the IoT role. + * + * @param hostPlatform the hostPlatform value to set. + * @return the IoTRoleProperties object itself. + */ + public IoTRoleProperties withHostPlatform(PlatformType hostPlatform) { + this.hostPlatform = hostPlatform; + return this; + } + + /** + * Get the ioTDeviceDetails property: IoT device metadata to which data box edge device needs to be connected. + * + * @return the ioTDeviceDetails value. + */ + public IoTDeviceInfo ioTDeviceDetails() { + return this.ioTDeviceDetails; + } + + /** + * Set the ioTDeviceDetails property: IoT device metadata to which data box edge device needs to be connected. + * + * @param ioTDeviceDetails the ioTDeviceDetails value to set. + * @return the IoTRoleProperties object itself. + */ + public IoTRoleProperties withIoTDeviceDetails(IoTDeviceInfo ioTDeviceDetails) { + this.ioTDeviceDetails = ioTDeviceDetails; + return this; + } + + /** + * Get the ioTEdgeDeviceDetails property: IoT edge device to which the IoT role 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 role needs to be configured. + * + * @param ioTEdgeDeviceDetails the ioTEdgeDeviceDetails value to set. + * @return the IoTRoleProperties object itself. + */ + public IoTRoleProperties withIoTEdgeDeviceDetails(IoTDeviceInfo ioTEdgeDeviceDetails) { + this.ioTEdgeDeviceDetails = ioTEdgeDeviceDetails; + return this; + } + + /** + * Get the shareMappings property: Mount points of shares in role(s). + * + * @return the shareMappings value. + */ + public List shareMappings() { + return this.shareMappings; + } + + /** + * Set the shareMappings property: Mount points of shares in role(s). + * + * @param shareMappings the shareMappings value to set. + * @return the IoTRoleProperties object itself. + */ + public IoTRoleProperties withShareMappings(List shareMappings) { + this.shareMappings = 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 IoTRoleProperties object itself. + */ + public IoTRoleProperties 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 IoTRoleProperties object itself. + */ + public IoTRoleProperties withComputeResource(ComputeResource computeResource) { + this.computeResource = computeResource; + 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 IoTRoleProperties object itself. + */ + public IoTRoleProperties withRoleStatus(RoleStatus roleStatus) { + this.roleStatus = roleStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hostPlatform() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property hostPlatform in model IoTRoleProperties")); + } + if (ioTDeviceDetails() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ioTDeviceDetails in model IoTRoleProperties")); + } else { + ioTDeviceDetails().validate(); + } + if (ioTEdgeDeviceDetails() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ioTEdgeDeviceDetails in model IoTRoleProperties")); + } else { + ioTEdgeDeviceDetails().validate(); + } + if (shareMappings() != null) { + shareMappings().forEach(e -> e.validate()); + } + if (ioTEdgeAgentInfo() != null) { + ioTEdgeAgentInfo().validate(); + } + if (computeResource() != null) { + computeResource().validate(); + } + if (roleStatus() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property roleStatus in model IoTRoleProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IoTRoleProperties.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/JobInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/JobInner.java index b1714c488b56..ab4d6fb138a6 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/JobInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/JobInner.java @@ -4,25 +4,19 @@ 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.azure.core.annotation.Immutable; import com.azure.resourcemanager.databoxedge.models.JobErrorDetails; import com.azure.resourcemanager.databoxedge.models.JobStatus; import com.azure.resourcemanager.databoxedge.models.JobType; import com.azure.resourcemanager.databoxedge.models.UpdateDownloadProgress; import com.azure.resourcemanager.databoxedge.models.UpdateInstallProgress; import com.azure.resourcemanager.databoxedge.models.UpdateOperationStage; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** A device job. */ -@JsonFlatten -@Fluent -public class JobInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInner.class); - +@Immutable +public final class JobInner { /* * The path ID that uniquely identifies the object. */ @@ -72,54 +66,14 @@ public class JobInner { private JobErrorDetails error; /* - * The type of the job. - */ - @JsonProperty(value = "properties.jobType", access = JsonProperty.Access.WRITE_ONLY) - private JobType jobType; - - /* - * Current stage of the update operation. + * The properties of the job. */ - @JsonProperty(value = "properties.currentStage", access = JsonProperty.Access.WRITE_ONLY) - private UpdateOperationStage currentStage; + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private JobProperties innerProperties; - /* - * The download progress. - */ - @JsonProperty(value = "properties.downloadProgress", access = JsonProperty.Access.WRITE_ONLY) - private UpdateDownloadProgress downloadProgress; - - /* - * The install progress. - */ - @JsonProperty(value = "properties.installProgress", access = JsonProperty.Access.WRITE_ONLY) - private UpdateInstallProgress installProgress; - - /* - * Total number of errors encountered during the refresh process. - */ - @JsonProperty(value = "properties.totalRefreshErrors", access = JsonProperty.Access.WRITE_ONLY) - private Integer totalRefreshErrors; - - /* - * Local share/remote container relative path to the error manifest file of - * the refresh. - */ - @JsonProperty(value = "properties.errorManifestFile", access = JsonProperty.Access.WRITE_ONLY) - private String errorManifestFile; - - /* - * ARM ID of the entity that was refreshed. - */ - @JsonProperty(value = "properties.refreshedEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String refreshedEntityId; - - /* - * If only subfolders need to be refreshed, then the subfolder path inside - * the share or container. (The path is empty if there are no subfolders.) - */ - @JsonProperty(value = "properties.folder") - private String folder; + /** Creates an instance of JobInner class. */ + public JobInner() { + } /** * Get the id property: The path ID that uniquely identifies the object. @@ -193,13 +147,22 @@ public JobErrorDetails error() { return this.error; } + /** + * Get the innerProperties property: The properties of the job. + * + * @return the innerProperties value. + */ + private JobProperties innerProperties() { + return this.innerProperties; + } + /** * Get the jobType property: The type of the job. * * @return the jobType value. */ public JobType jobType() { - return this.jobType; + return this.innerProperties() == null ? null : this.innerProperties().jobType(); } /** @@ -208,7 +171,7 @@ public JobType jobType() { * @return the currentStage value. */ public UpdateOperationStage currentStage() { - return this.currentStage; + return this.innerProperties() == null ? null : this.innerProperties().currentStage(); } /** @@ -217,7 +180,7 @@ public UpdateOperationStage currentStage() { * @return the downloadProgress value. */ public UpdateDownloadProgress downloadProgress() { - return this.downloadProgress; + return this.innerProperties() == null ? null : this.innerProperties().downloadProgress(); } /** @@ -226,7 +189,7 @@ public UpdateDownloadProgress downloadProgress() { * @return the installProgress value. */ public UpdateInstallProgress installProgress() { - return this.installProgress; + return this.innerProperties() == null ? null : this.innerProperties().installProgress(); } /** @@ -235,7 +198,7 @@ public UpdateInstallProgress installProgress() { * @return the totalRefreshErrors value. */ public Integer totalRefreshErrors() { - return this.totalRefreshErrors; + return this.innerProperties() == null ? null : this.innerProperties().totalRefreshErrors(); } /** @@ -245,7 +208,7 @@ public Integer totalRefreshErrors() { * @return the errorManifestFile value. */ public String errorManifestFile() { - return this.errorManifestFile; + return this.innerProperties() == null ? null : this.innerProperties().errorManifestFile(); } /** @@ -254,7 +217,7 @@ public String errorManifestFile() { * @return the refreshedEntityId value. */ public String refreshedEntityId() { - return this.refreshedEntityId; + return this.innerProperties() == null ? null : this.innerProperties().refreshedEntityId(); } /** @@ -264,7 +227,7 @@ public String refreshedEntityId() { * @return the folder value. */ public String folder() { - return this.folder; + return this.innerProperties() == null ? null : this.innerProperties().folder(); } /** @@ -275,7 +238,10 @@ public String folder() { * @return the JobInner object itself. */ public JobInner withFolder(String folder) { - this.folder = folder; + if (this.innerProperties() == null) { + this.innerProperties = new JobProperties(); + } + this.innerProperties().withFolder(folder); return this; } @@ -288,11 +254,8 @@ public void validate() { if (error() != null) { error().validate(); } - if (downloadProgress() != null) { - downloadProgress().validate(); - } - if (installProgress() != null) { - installProgress().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/JobProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/JobProperties.java new file mode 100644 index 000000000000..9a0c13be703a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/JobProperties.java @@ -0,0 +1,169 @@ +// 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.resourcemanager.databoxedge.models.JobType; +import com.azure.resourcemanager.databoxedge.models.UpdateDownloadProgress; +import com.azure.resourcemanager.databoxedge.models.UpdateInstallProgress; +import com.azure.resourcemanager.databoxedge.models.UpdateOperationStage; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties for the job. */ +@Fluent +public final class JobProperties { + /* + * The type of the job. + */ + @JsonProperty(value = "jobType", access = JsonProperty.Access.WRITE_ONLY) + private JobType jobType; + + /* + * Current stage of the update operation. + */ + @JsonProperty(value = "currentStage", access = JsonProperty.Access.WRITE_ONLY) + private UpdateOperationStage currentStage; + + /* + * The download progress. + */ + @JsonProperty(value = "downloadProgress", access = JsonProperty.Access.WRITE_ONLY) + private UpdateDownloadProgress downloadProgress; + + /* + * The install progress. + */ + @JsonProperty(value = "installProgress", access = JsonProperty.Access.WRITE_ONLY) + private UpdateInstallProgress installProgress; + + /* + * Total number of errors encountered during the refresh process. + */ + @JsonProperty(value = "totalRefreshErrors", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalRefreshErrors; + + /* + * Local share/remote container relative path to the error manifest file of the refresh. + */ + @JsonProperty(value = "errorManifestFile", access = JsonProperty.Access.WRITE_ONLY) + private String errorManifestFile; + + /* + * ARM ID of the entity that was refreshed. + */ + @JsonProperty(value = "refreshedEntityId", access = JsonProperty.Access.WRITE_ONLY) + private String refreshedEntityId; + + /* + * If only subfolders need to be refreshed, then the subfolder path inside the share or container. (The path is + * empty if there are no subfolders.) + */ + @JsonProperty(value = "folder") + private String folder; + + /** Creates an instance of JobProperties class. */ + public JobProperties() { + } + + /** + * Get the jobType property: The type of the job. + * + * @return the jobType value. + */ + public JobType jobType() { + return this.jobType; + } + + /** + * Get the currentStage property: Current stage of the update operation. + * + * @return the currentStage value. + */ + public UpdateOperationStage currentStage() { + return this.currentStage; + } + + /** + * Get the downloadProgress property: The download progress. + * + * @return the downloadProgress value. + */ + public UpdateDownloadProgress downloadProgress() { + return this.downloadProgress; + } + + /** + * Get the installProgress property: The install progress. + * + * @return the installProgress value. + */ + public UpdateInstallProgress installProgress() { + return this.installProgress; + } + + /** + * Get the totalRefreshErrors property: Total number of errors encountered during the refresh process. + * + * @return the totalRefreshErrors value. + */ + public Integer totalRefreshErrors() { + return this.totalRefreshErrors; + } + + /** + * Get the errorManifestFile property: Local share/remote container relative path to the error manifest file of the + * refresh. + * + * @return the errorManifestFile value. + */ + public String errorManifestFile() { + return this.errorManifestFile; + } + + /** + * Get the refreshedEntityId property: ARM ID of the entity that was refreshed. + * + * @return the refreshedEntityId value. + */ + public String refreshedEntityId() { + return this.refreshedEntityId; + } + + /** + * Get the folder property: If only subfolders need to be refreshed, then the subfolder path inside the share or + * container. (The path is empty if there are no subfolders.). + * + * @return the folder value. + */ + public String folder() { + return this.folder; + } + + /** + * Set the folder property: If only subfolders need to be refreshed, then the subfolder path inside the share or + * container. (The path is empty if there are no subfolders.). + * + * @param folder the folder value to set. + * @return the JobProperties object itself. + */ + public JobProperties withFolder(String folder) { + this.folder = folder; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (downloadProgress() != null) { + downloadProgress().validate(); + } + if (installProgress() != null) { + installProgress().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/KubernetesRoleProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/KubernetesRoleProperties.java new file mode 100644 index 000000000000..bc85acc67428 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/KubernetesRoleProperties.java @@ -0,0 +1,195 @@ +// 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.azure.resourcemanager.databoxedge.models.HostPlatformType; +import com.azure.resourcemanager.databoxedge.models.KubernetesClusterInfo; +import com.azure.resourcemanager.databoxedge.models.KubernetesRoleResources; +import com.azure.resourcemanager.databoxedge.models.KubernetesState; +import com.azure.resourcemanager.databoxedge.models.PlatformType; +import com.azure.resourcemanager.databoxedge.models.RoleStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Kubernetes role properties. */ +@Fluent +public final class KubernetesRoleProperties { + /* + * Host OS supported by the Kubernetes role. + */ + @JsonProperty(value = "hostPlatform", required = true) + private PlatformType hostPlatform; + + /* + * State of Kubernetes deployment + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private KubernetesState provisioningState; + + /* + * Platform where the runtime is hosted. + */ + @JsonProperty(value = "hostPlatformType", access = JsonProperty.Access.WRITE_ONLY) + private HostPlatformType hostPlatformType; + + /* + * Kubernetes cluster configuration + */ + @JsonProperty(value = "kubernetesClusterInfo", required = true) + private KubernetesClusterInfo kubernetesClusterInfo; + + /* + * Kubernetes role resources + */ + @JsonProperty(value = "kubernetesRoleResources", required = true) + private KubernetesRoleResources kubernetesRoleResources; + + /* + * Role status. + */ + @JsonProperty(value = "roleStatus", required = true) + private RoleStatus roleStatus; + + /** Creates an instance of KubernetesRoleProperties class. */ + public KubernetesRoleProperties() { + } + + /** + * 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 KubernetesRoleProperties object itself. + */ + public KubernetesRoleProperties 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 KubernetesRoleProperties object itself. + */ + public KubernetesRoleProperties 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 KubernetesRoleProperties object itself. + */ + public KubernetesRoleProperties 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 KubernetesRoleProperties object itself. + */ + public KubernetesRoleProperties withRoleStatus(RoleStatus roleStatus) { + this.roleStatus = roleStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hostPlatform() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property hostPlatform in model KubernetesRoleProperties")); + } + if (kubernetesClusterInfo() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property kubernetesClusterInfo in model KubernetesRoleProperties")); + } else { + kubernetesClusterInfo().validate(); + } + if (kubernetesRoleResources() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property kubernetesRoleResources in model KubernetesRoleProperties")); + } else { + kubernetesRoleResources().validate(); + } + if (roleStatus() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property roleStatus in model KubernetesRoleProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KubernetesRoleProperties.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/MecRoleProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/MecRoleProperties.java new file mode 100644 index 000000000000..dba9a9d49aec --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/MecRoleProperties.java @@ -0,0 +1,141 @@ +// 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.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.azure.resourcemanager.databoxedge.models.RoleStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** MEC role properties. */ +@Fluent +public final class MecRoleProperties { + /* + * Activation key of the MEC. + */ + @JsonProperty(value = "connectionString") + private AsymmetricEncryptedSecret connectionString; + + /* + * Controller Endpoint. + */ + @JsonProperty(value = "controllerEndpoint") + private String controllerEndpoint; + + /* + * Unique Id of the Resource. + */ + @JsonProperty(value = "resourceUniqueId") + private String resourceUniqueId; + + /* + * Role status. + */ + @JsonProperty(value = "roleStatus", required = true) + private RoleStatus roleStatus; + + /** Creates an instance of MecRoleProperties class. */ + public MecRoleProperties() { + } + + /** + * 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 MecRoleProperties object itself. + */ + public MecRoleProperties 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 MecRoleProperties object itself. + */ + public MecRoleProperties 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 MecRoleProperties object itself. + */ + public MecRoleProperties 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 MecRoleProperties object itself. + */ + public MecRoleProperties withRoleStatus(RoleStatus roleStatus) { + this.roleStatus = roleStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (connectionString() != null) { + connectionString().validate(); + } + if (roleStatus() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property roleStatus in model MecRoleProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MecRoleProperties.class); +} 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 000000000000..012e3ee91294 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/MonitoringMetricConfigurationInner.java @@ -0,0 +1,94 @@ +// 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.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.JsonProperty; +import java.util.List; + +/** The metric setting details for the role. */ +@Fluent +public final class MonitoringMetricConfigurationInner extends ArmBaseModel { + /* + * The metric setting properties. + */ + @JsonProperty(value = "properties", required = true) + private MonitoringMetricConfigurationProperties innerProperties = new MonitoringMetricConfigurationProperties(); + + /* + * Metadata pertaining to creation and last modification of MonitoringConfiguration + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of MonitoringMetricConfigurationInner class. */ + public MonitoringMetricConfigurationInner() { + } + + /** + * Get the innerProperties property: The metric setting properties. + * + * @return the innerProperties value. + */ + private MonitoringMetricConfigurationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of MonitoringConfiguration. + * + * @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.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new MonitoringMetricConfigurationProperties(); + } + this.innerProperties().withMetricConfigurations(metricConfigurations); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model MonitoringMetricConfigurationInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MonitoringMetricConfigurationInner.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/MonitoringMetricConfigurationProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/MonitoringMetricConfigurationProperties.java new file mode 100644 index 000000000000..029d773d869d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/MonitoringMetricConfigurationProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.MetricConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Metrics properties. */ +@Fluent +public final class MonitoringMetricConfigurationProperties { + /* + * The metrics configuration details + */ + @JsonProperty(value = "metricConfigurations", required = true) + private List metricConfigurations; + + /** Creates an instance of MonitoringMetricConfigurationProperties class. */ + public MonitoringMetricConfigurationProperties() { + } + + /** + * 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 MonitoringMetricConfigurationProperties object itself. + */ + public MonitoringMetricConfigurationProperties withMetricConfigurations( + List metricConfigurations) { + this.metricConfigurations = metricConfigurations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metricConfigurations() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metricConfigurations in model" + + " MonitoringMetricConfigurationProperties")); + } else { + metricConfigurations().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MonitoringMetricConfigurationProperties.class); +} 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 3812339ecb2a..6d910ec9c89f 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 @@ -5,25 +5,48 @@ package com.azure.resourcemanager.databoxedge.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.NetworkAdapter; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The network settings of a device. */ -@JsonFlatten @Immutable -public class NetworkSettingsInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkSettingsInner.class); +public final class NetworkSettingsInner extends ArmBaseModel { + /* + * The properties of network settings of a device. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private NetworkSettingsProperties innerProperties; /* - * The network adapter list on the device. + * Metadata pertaining to creation and last modification of NetworkSettings + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of NetworkSettingsInner class. */ + public NetworkSettingsInner() { + } + + /** + * Get the innerProperties property: The properties of network settings of a device. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.networkAdapters", access = JsonProperty.Access.WRITE_ONLY) - private List networkAdapters; + private NetworkSettingsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of NetworkSettings. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } /** * Get the networkAdapters property: The network adapter list on the device. @@ -31,7 +54,7 @@ public class NetworkSettingsInner extends ArmBaseModel { * @return the networkAdapters value. */ public List networkAdapters() { - return this.networkAdapters; + return this.innerProperties() == null ? null : this.innerProperties().networkAdapters(); } /** @@ -42,8 +65,8 @@ public List networkAdapters() { @Override public void validate() { super.validate(); - if (networkAdapters() != null) { - networkAdapters().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NetworkSettingsProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NetworkSettingsProperties.java new file mode 100644 index 000000000000..1754709d27f1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NetworkSettingsProperties.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.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.databoxedge.models.NetworkAdapter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The properties of network settings. */ +@Immutable +public final class NetworkSettingsProperties { + /* + * The network adapter list on the device. + */ + @JsonProperty(value = "networkAdapters", access = JsonProperty.Access.WRITE_ONLY) + private List networkAdapters; + + /** Creates an instance of NetworkSettingsProperties class. */ + public NetworkSettingsProperties() { + } + + /** + * Get the networkAdapters property: The network adapter list on the device. + * + * @return the networkAdapters value. + */ + public List networkAdapters() { + return this.networkAdapters; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkAdapters() != null) { + networkAdapters().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NodeInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NodeInner.java index c294abf52db4..d550b0f914ce 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NodeInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NodeInner.java @@ -5,63 +5,34 @@ package com.azure.resourcemanager.databoxedge.fluent.models; import com.azure.core.annotation.Immutable; -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.NodeStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** * Represents a single node in a Data box Edge/Gateway device Gateway devices, standalone Edge devices and a single node * cluster Edge device will all have 1 node Multi-node Edge devices will have more than 1 nodes. */ -@JsonFlatten @Immutable -public class NodeInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NodeInner.class); - - /* - * The current status of the individual node - */ - @JsonProperty(value = "properties.nodeStatus", access = JsonProperty.Access.WRITE_ONLY) - private NodeStatus nodeStatus; - - /* - * Serial number of the Chassis - */ - @JsonProperty(value = "properties.nodeChassisSerialNumber", access = JsonProperty.Access.WRITE_ONLY) - private String nodeChassisSerialNumber; - - /* - * Serial number of the individual node - */ - @JsonProperty(value = "properties.nodeSerialNumber", access = JsonProperty.Access.WRITE_ONLY) - private String nodeSerialNumber; - +public final class NodeInner extends ArmBaseModel { /* - * Display Name of the individual node + * The properties of the node */ - @JsonProperty(value = "properties.nodeDisplayName", access = JsonProperty.Access.WRITE_ONLY) - private String nodeDisplayName; + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private NodeProperties innerProperties; - /* - * Friendly software version name that is currently installed on the node - */ - @JsonProperty(value = "properties.nodeFriendlySoftwareVersion", access = JsonProperty.Access.WRITE_ONLY) - private String nodeFriendlySoftwareVersion; - - /* - * HCS version that is currently installed on the node - */ - @JsonProperty(value = "properties.nodeHcsVersion", access = JsonProperty.Access.WRITE_ONLY) - private String nodeHcsVersion; + /** Creates an instance of NodeInner class. */ + public NodeInner() { + } - /* - * Guid instance id of the node + /** + * Get the innerProperties property: The properties of the node. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.nodeInstanceId", access = JsonProperty.Access.WRITE_ONLY) - private String nodeInstanceId; + private NodeProperties innerProperties() { + return this.innerProperties; + } /** * Get the nodeStatus property: The current status of the individual node. @@ -69,7 +40,7 @@ public class NodeInner extends ArmBaseModel { * @return the nodeStatus value. */ public NodeStatus nodeStatus() { - return this.nodeStatus; + return this.innerProperties() == null ? null : this.innerProperties().nodeStatus(); } /** @@ -78,7 +49,7 @@ public NodeStatus nodeStatus() { * @return the nodeChassisSerialNumber value. */ public String nodeChassisSerialNumber() { - return this.nodeChassisSerialNumber; + return this.innerProperties() == null ? null : this.innerProperties().nodeChassisSerialNumber(); } /** @@ -87,7 +58,7 @@ public String nodeChassisSerialNumber() { * @return the nodeSerialNumber value. */ public String nodeSerialNumber() { - return this.nodeSerialNumber; + return this.innerProperties() == null ? null : this.innerProperties().nodeSerialNumber(); } /** @@ -96,7 +67,7 @@ public String nodeSerialNumber() { * @return the nodeDisplayName value. */ public String nodeDisplayName() { - return this.nodeDisplayName; + return this.innerProperties() == null ? null : this.innerProperties().nodeDisplayName(); } /** @@ -106,7 +77,7 @@ public String nodeDisplayName() { * @return the nodeFriendlySoftwareVersion value. */ public String nodeFriendlySoftwareVersion() { - return this.nodeFriendlySoftwareVersion; + return this.innerProperties() == null ? null : this.innerProperties().nodeFriendlySoftwareVersion(); } /** @@ -115,7 +86,7 @@ public String nodeFriendlySoftwareVersion() { * @return the nodeHcsVersion value. */ public String nodeHcsVersion() { - return this.nodeHcsVersion; + return this.innerProperties() == null ? null : this.innerProperties().nodeHcsVersion(); } /** @@ -124,7 +95,7 @@ public String nodeHcsVersion() { * @return the nodeInstanceId value. */ public String nodeInstanceId() { - return this.nodeInstanceId; + return this.innerProperties() == null ? null : this.innerProperties().nodeInstanceId(); } /** @@ -135,5 +106,8 @@ public String nodeInstanceId() { @Override public void validate() { super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NodeProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NodeProperties.java new file mode 100644 index 000000000000..f959da86b31c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/NodeProperties.java @@ -0,0 +1,131 @@ +// 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.resourcemanager.databoxedge.models.NodeStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** This class represents the nodes in a highly available cluster. */ +@Immutable +public final class NodeProperties { + /* + * The current status of the individual node + */ + @JsonProperty(value = "nodeStatus", access = JsonProperty.Access.WRITE_ONLY) + private NodeStatus nodeStatus; + + /* + * Serial number of the Chassis + */ + @JsonProperty(value = "nodeChassisSerialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String nodeChassisSerialNumber; + + /* + * Serial number of the individual node + */ + @JsonProperty(value = "nodeSerialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String nodeSerialNumber; + + /* + * Display Name of the individual node + */ + @JsonProperty(value = "nodeDisplayName", access = JsonProperty.Access.WRITE_ONLY) + private String nodeDisplayName; + + /* + * Friendly software version name that is currently installed on the node + */ + @JsonProperty(value = "nodeFriendlySoftwareVersion", access = JsonProperty.Access.WRITE_ONLY) + private String nodeFriendlySoftwareVersion; + + /* + * HCS version that is currently installed on the node + */ + @JsonProperty(value = "nodeHcsVersion", access = JsonProperty.Access.WRITE_ONLY) + private String nodeHcsVersion; + + /* + * Guid instance id of the node + */ + @JsonProperty(value = "nodeInstanceId", access = JsonProperty.Access.WRITE_ONLY) + private String nodeInstanceId; + + /** Creates an instance of NodeProperties class. */ + public NodeProperties() { + } + + /** + * Get the nodeStatus property: The current status of the individual node. + * + * @return the nodeStatus value. + */ + public NodeStatus nodeStatus() { + return this.nodeStatus; + } + + /** + * Get the nodeChassisSerialNumber property: Serial number of the Chassis. + * + * @return the nodeChassisSerialNumber value. + */ + public String nodeChassisSerialNumber() { + return this.nodeChassisSerialNumber; + } + + /** + * Get the nodeSerialNumber property: Serial number of the individual node. + * + * @return the nodeSerialNumber value. + */ + public String nodeSerialNumber() { + return this.nodeSerialNumber; + } + + /** + * Get the nodeDisplayName property: Display Name of the individual node. + * + * @return the nodeDisplayName value. + */ + public String nodeDisplayName() { + return this.nodeDisplayName; + } + + /** + * Get the nodeFriendlySoftwareVersion property: Friendly software version name that is currently installed on the + * node. + * + * @return the nodeFriendlySoftwareVersion value. + */ + public String nodeFriendlySoftwareVersion() { + return this.nodeFriendlySoftwareVersion; + } + + /** + * Get the nodeHcsVersion property: HCS version that is currently installed on the node. + * + * @return the nodeHcsVersion value. + */ + public String nodeHcsVersion() { + return this.nodeHcsVersion; + } + + /** + * Get the nodeInstanceId property: Guid instance id of the node. + * + * @return the nodeInstanceId value. + */ + public String nodeInstanceId() { + return this.nodeInstanceId; + } + + /** + * 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/OperationInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OperationInner.java index e534c0cf2f7a..0dd9d0f17532 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 @@ -5,25 +5,25 @@ 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.azure.resourcemanager.databoxedge.models.OperationDisplay; import com.azure.resourcemanager.databoxedge.models.ServiceSpecification; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Operations. */ -@JsonFlatten @Fluent -public class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - +public final class OperationInner { /* * Name of the operation. */ @JsonProperty(value = "name") private String name; + /* + * Is data action. + */ + @JsonProperty(value = "isDataAction") + private Boolean isDataAction; + /* * Properties displayed for the operation. */ @@ -37,10 +37,14 @@ public class OperationInner { private String origin; /* - * Service specification. + * Operation properties. */ - @JsonProperty(value = "properties.serviceSpecification") - private ServiceSpecification serviceSpecification; + @JsonProperty(value = "properties") + private OperationProperties innerProperties; + + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } /** * Get the name property: Name of the operation. @@ -62,6 +66,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. * @@ -102,13 +126,22 @@ public OperationInner withOrigin(String origin) { return this; } + /** + * Get the innerProperties property: Operation properties. + * + * @return the innerProperties value. + */ + private OperationProperties innerProperties() { + return this.innerProperties; + } + /** * Get the serviceSpecification property: Service specification. * * @return the serviceSpecification value. */ public ServiceSpecification serviceSpecification() { - return this.serviceSpecification; + return this.innerProperties() == null ? null : this.innerProperties().serviceSpecification(); } /** @@ -118,7 +151,10 @@ public ServiceSpecification serviceSpecification() { * @return the OperationInner object itself. */ public OperationInner withServiceSpecification(ServiceSpecification serviceSpecification) { - this.serviceSpecification = serviceSpecification; + if (this.innerProperties() == null) { + this.innerProperties = new OperationProperties(); + } + this.innerProperties().withServiceSpecification(serviceSpecification); return this; } @@ -131,8 +167,8 @@ public void validate() { if (display() != null) { display().validate(); } - if (serviceSpecification() != null) { - serviceSpecification().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OperationProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OperationProperties.java new file mode 100644 index 000000000000..d317021ba592 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OperationProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.databoxedge.models.ServiceSpecification; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Operation properties. */ +@Fluent +public final class OperationProperties { + /* + * Service specification. + */ + @JsonProperty(value = "serviceSpecification") + private ServiceSpecification serviceSpecification; + + /** Creates an instance of OperationProperties class. */ + public OperationProperties() { + } + + /** + * Get the serviceSpecification property: Service specification. + * + * @return the serviceSpecification value. + */ + public ServiceSpecification serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set the serviceSpecification property: Service specification. + * + * @param serviceSpecification the serviceSpecification value to set. + * @return the OperationProperties object itself. + */ + public OperationProperties withServiceSpecification(ServiceSpecification serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (serviceSpecification() != null) { + serviceSpecification().validate(); + } + } +} 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 34ff53e2c15f..7074af5c53ad 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 @@ -5,66 +5,76 @@ 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.azure.core.management.SystemData; 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; import java.util.List; /** The order details. */ -@JsonFlatten @Fluent -public class OrderInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OrderInner.class); - +public final class OrderInner extends ArmBaseModel { /* - * The contact details. + * It specify the order api version. */ - @JsonProperty(value = "properties.contactInformation") - private ContactDetails contactInformation; + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private String kind; /* - * The shipping address. + * Metadata pertaining to creation and last modification of Order */ - @JsonProperty(value = "properties.shippingAddress") - private Address shippingAddress; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /* - * Current status of the order. + * The order properties. */ - @JsonProperty(value = "properties.currentStatus") - private OrderStatus currentStatus; + @JsonProperty(value = "properties") + private OrderProperties innerProperties; - /* - * List of status changes in the order. + /** Creates an instance of OrderInner class. */ + public OrderInner() { + } + + /** + * Get the kind property: It specify the order api version. + * + * @return the kind value. */ - @JsonProperty(value = "properties.orderHistory", access = JsonProperty.Access.WRITE_ONLY) - private List orderHistory; + public String kind() { + return this.kind; + } - /* - * Serial number of the device. + /** + * Get the systemData property: Metadata pertaining to creation and last modification of Order. + * + * @return the systemData value. */ - @JsonProperty(value = "properties.serialNumber", access = JsonProperty.Access.WRITE_ONLY) - private String serialNumber; + public SystemData systemData() { + return this.systemData; + } - /* - * Tracking information for the package delivered to the customer whether - * it has an original or a replacement device. + /** + * Get the innerProperties property: The order properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.deliveryTrackingInfo", access = JsonProperty.Access.WRITE_ONLY) - private List deliveryTrackingInfo; + private OrderProperties innerProperties() { + return this.innerProperties; + } - /* - * Tracking information for the package returned from the customer whether - * it has an original or a replacement device. + /** + * Get the orderId property: It specify the order resource id. + * + * @return the orderId value. */ - @JsonProperty(value = "properties.returnTrackingInfo", access = JsonProperty.Access.WRITE_ONLY) - private List returnTrackingInfo; + public String orderId() { + return this.innerProperties() == null ? null : this.innerProperties().orderId(); + } /** * Get the contactInformation property: The contact details. @@ -72,7 +82,7 @@ public class OrderInner extends ArmBaseModel { * @return the contactInformation value. */ public ContactDetails contactInformation() { - return this.contactInformation; + return this.innerProperties() == null ? null : this.innerProperties().contactInformation(); } /** @@ -82,7 +92,10 @@ public ContactDetails contactInformation() { * @return the OrderInner object itself. */ public OrderInner withContactInformation(ContactDetails contactInformation) { - this.contactInformation = contactInformation; + if (this.innerProperties() == null) { + this.innerProperties = new OrderProperties(); + } + this.innerProperties().withContactInformation(contactInformation); return this; } @@ -92,7 +105,7 @@ public OrderInner withContactInformation(ContactDetails contactInformation) { * @return the shippingAddress value. */ public Address shippingAddress() { - return this.shippingAddress; + return this.innerProperties() == null ? null : this.innerProperties().shippingAddress(); } /** @@ -102,7 +115,10 @@ public Address shippingAddress() { * @return the OrderInner object itself. */ public OrderInner withShippingAddress(Address shippingAddress) { - this.shippingAddress = shippingAddress; + if (this.innerProperties() == null) { + this.innerProperties = new OrderProperties(); + } + this.innerProperties().withShippingAddress(shippingAddress); return this; } @@ -112,18 +128,7 @@ public OrderInner withShippingAddress(Address shippingAddress) { * @return the currentStatus value. */ 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; + return this.innerProperties() == null ? null : this.innerProperties().currentStatus(); } /** @@ -132,7 +137,7 @@ public OrderInner withCurrentStatus(OrderStatus currentStatus) { * @return the orderHistory value. */ public List orderHistory() { - return this.orderHistory; + return this.innerProperties() == null ? null : this.innerProperties().orderHistory(); } /** @@ -141,7 +146,7 @@ public List orderHistory() { * @return the serialNumber value. */ public String serialNumber() { - return this.serialNumber; + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); } /** @@ -151,7 +156,7 @@ public String serialNumber() { * @return the deliveryTrackingInfo value. */ public List deliveryTrackingInfo() { - return this.deliveryTrackingInfo; + return this.innerProperties() == null ? null : this.innerProperties().deliveryTrackingInfo(); } /** @@ -161,7 +166,30 @@ public List deliveryTrackingInfo() { * @return the returnTrackingInfo value. */ public List returnTrackingInfo() { - return this.returnTrackingInfo; + return this.innerProperties() == null ? null : this.innerProperties().returnTrackingInfo(); + } + + /** + * Get the shipmentType property: ShipmentType of the order. + * + * @return the shipmentType value. + */ + public ShipmentType shipmentType() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new OrderProperties(); + } + this.innerProperties().withShipmentType(shipmentType); + return this; } /** @@ -172,23 +200,8 @@ public List returnTrackingInfo() { @Override public void validate() { super.validate(); - if (contactInformation() != null) { - contactInformation().validate(); - } - if (shippingAddress() != null) { - shippingAddress().validate(); - } - if (currentStatus() != null) { - currentStatus().validate(); - } - if (orderHistory() != null) { - orderHistory().forEach(e -> e.validate()); - } - if (deliveryTrackingInfo() != null) { - deliveryTrackingInfo().forEach(e -> e.validate()); - } - if (returnTrackingInfo() != null) { - returnTrackingInfo().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OrderProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OrderProperties.java new file mode 100644 index 000000000000..fabff91788f2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OrderProperties.java @@ -0,0 +1,228 @@ +// 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.azure.resourcemanager.databoxedge.models.Address; +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.JsonProperty; +import java.util.List; + +/** Order properties. */ +@Fluent +public final class OrderProperties { + /* + * It specify the order resource id. + */ + @JsonProperty(value = "orderId", access = JsonProperty.Access.WRITE_ONLY) + private String orderId; + + /* + * The contact details. + */ + @JsonProperty(value = "contactInformation", required = true) + private ContactDetails contactInformation; + + /* + * The shipping address. + */ + @JsonProperty(value = "shippingAddress") + private Address shippingAddress; + + /* + * Current status of the order. + */ + @JsonProperty(value = "currentStatus", access = JsonProperty.Access.WRITE_ONLY) + private OrderStatus currentStatus; + + /* + * List of status changes in the order. + */ + @JsonProperty(value = "orderHistory", access = JsonProperty.Access.WRITE_ONLY) + private List orderHistory; + + /* + * Serial number of the device. + */ + @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /* + * Tracking information for the package delivered to the customer whether it has an original or a replacement + * device. + */ + @JsonProperty(value = "deliveryTrackingInfo", access = JsonProperty.Access.WRITE_ONLY) + private List deliveryTrackingInfo; + + /* + * Tracking information for the package returned from the customer whether it has an original or a replacement + * device. + */ + @JsonProperty(value = "returnTrackingInfo", access = JsonProperty.Access.WRITE_ONLY) + private List returnTrackingInfo; + + /* + * ShipmentType of the order + */ + @JsonProperty(value = "shipmentType") + private ShipmentType shipmentType; + + /** Creates an instance of OrderProperties class. */ + public OrderProperties() { + } + + /** + * Get the orderId property: It specify the order resource id. + * + * @return the orderId value. + */ + public String orderId() { + return this.orderId; + } + + /** + * Get the contactInformation property: The contact details. + * + * @return the contactInformation value. + */ + public ContactDetails contactInformation() { + return this.contactInformation; + } + + /** + * Set the contactInformation property: The contact details. + * + * @param contactInformation the contactInformation value to set. + * @return the OrderProperties object itself. + */ + public OrderProperties withContactInformation(ContactDetails contactInformation) { + this.contactInformation = contactInformation; + return this; + } + + /** + * Get the shippingAddress property: The shipping address. + * + * @return the shippingAddress value. + */ + public Address shippingAddress() { + return this.shippingAddress; + } + + /** + * Set the shippingAddress property: The shipping address. + * + * @param shippingAddress the shippingAddress value to set. + * @return the OrderProperties object itself. + */ + public OrderProperties withShippingAddress(Address shippingAddress) { + this.shippingAddress = shippingAddress; + return this; + } + + /** + * Get the currentStatus property: Current status of the order. + * + * @return the currentStatus value. + */ + public OrderStatus currentStatus() { + return this.currentStatus; + } + + /** + * Get the orderHistory property: List of status changes in the order. + * + * @return the orderHistory value. + */ + public List orderHistory() { + return this.orderHistory; + } + + /** + * Get the serialNumber property: Serial number of the device. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the deliveryTrackingInfo property: Tracking information for the package delivered to the customer whether it + * has an original or a replacement device. + * + * @return the deliveryTrackingInfo value. + */ + public List deliveryTrackingInfo() { + return this.deliveryTrackingInfo; + } + + /** + * Get the returnTrackingInfo property: Tracking information for the package returned from the customer whether it + * has an original or a replacement device. + * + * @return the returnTrackingInfo value. + */ + 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 OrderProperties object itself. + */ + public OrderProperties withShipmentType(ShipmentType shipmentType) { + this.shipmentType = shipmentType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (contactInformation() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property contactInformation in model OrderProperties")); + } else { + contactInformation().validate(); + } + if (shippingAddress() != null) { + shippingAddress().validate(); + } + if (currentStatus() != null) { + currentStatus().validate(); + } + if (orderHistory() != null) { + orderHistory().forEach(e -> e.validate()); + } + if (deliveryTrackingInfo() != null) { + deliveryTrackingInfo().forEach(e -> e.validate()); + } + if (returnTrackingInfo() != null) { + returnTrackingInfo().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrderProperties.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/PeriodicTimerProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/PeriodicTimerProperties.java new file mode 100644 index 000000000000..3ae4eb40f36f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/PeriodicTimerProperties.java @@ -0,0 +1,129 @@ +// 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.azure.resourcemanager.databoxedge.models.PeriodicTimerSourceInfo; +import com.azure.resourcemanager.databoxedge.models.RoleSinkInfo; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Periodic timer trigger properties. */ +@Fluent +public final class PeriodicTimerProperties { + /* + * Periodic timer details. + */ + @JsonProperty(value = "sourceInfo", required = true) + private PeriodicTimerSourceInfo sourceInfo; + + /* + * Role Sink information. + */ + @JsonProperty(value = "sinkInfo", required = true) + private RoleSinkInfo sinkInfo; + + /* + * A custom context tag typically used to correlate the trigger against its usage. For example, if a periodic timer + * trigger is intended for certain specific IoT modules in the device, the tag can be the name or the image URL of + * the module. + */ + @JsonProperty(value = "customContextTag") + private String customContextTag; + + /** Creates an instance of PeriodicTimerProperties class. */ + public PeriodicTimerProperties() { + } + + /** + * Get the sourceInfo property: Periodic timer details. + * + * @return the sourceInfo value. + */ + public PeriodicTimerSourceInfo sourceInfo() { + return this.sourceInfo; + } + + /** + * Set the sourceInfo property: Periodic timer details. + * + * @param sourceInfo the sourceInfo value to set. + * @return the PeriodicTimerProperties object itself. + */ + public PeriodicTimerProperties withSourceInfo(PeriodicTimerSourceInfo sourceInfo) { + this.sourceInfo = sourceInfo; + return this; + } + + /** + * Get the sinkInfo property: Role Sink information. + * + * @return the sinkInfo value. + */ + public RoleSinkInfo sinkInfo() { + return this.sinkInfo; + } + + /** + * Set the sinkInfo property: Role Sink information. + * + * @param sinkInfo the sinkInfo value to set. + * @return the PeriodicTimerProperties object itself. + */ + public PeriodicTimerProperties withSinkInfo(RoleSinkInfo sinkInfo) { + this.sinkInfo = sinkInfo; + return this; + } + + /** + * Get the customContextTag property: A custom context tag typically used to correlate the trigger against its + * usage. For example, if a periodic timer trigger is intended for certain specific IoT modules in the device, the + * tag can be the name or the image URL of the module. + * + * @return the customContextTag value. + */ + public String customContextTag() { + return this.customContextTag; + } + + /** + * Set the customContextTag property: A custom context tag typically used to correlate the trigger against its + * usage. For example, if a periodic timer trigger is intended for certain specific IoT modules in the device, the + * tag can be the name or the image URL of the module. + * + * @param customContextTag the customContextTag value to set. + * @return the PeriodicTimerProperties object itself. + */ + public PeriodicTimerProperties withCustomContextTag(String customContextTag) { + this.customContextTag = customContextTag; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceInfo() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sourceInfo in model PeriodicTimerProperties")); + } else { + sourceInfo().validate(); + } + if (sinkInfo() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sinkInfo in model PeriodicTimerProperties")); + } else { + sinkInfo().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PeriodicTimerProperties.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ProactiveLogCollectionSettingsProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ProactiveLogCollectionSettingsProperties.java new file mode 100644 index 000000000000..200ae0ae4baf --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ProactiveLogCollectionSettingsProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.ProactiveDiagnosticsConsent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of proactive log collection settings. */ +@Fluent +public final class ProactiveLogCollectionSettingsProperties { + /* + * Proactive diagnostic collection consent flag + */ + @JsonProperty(value = "userConsent", required = true) + private ProactiveDiagnosticsConsent userConsent; + + /** Creates an instance of ProactiveLogCollectionSettingsProperties class. */ + public ProactiveLogCollectionSettingsProperties() { + } + + /** + * 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 ProactiveLogCollectionSettingsProperties object itself. + */ + public ProactiveLogCollectionSettingsProperties withUserConsent(ProactiveDiagnosticsConsent userConsent) { + this.userConsent = userConsent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (userConsent() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property userConsent in model ProactiveLogCollectionSettingsProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ProactiveLogCollectionSettingsProperties.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/RawCertificateData.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/RawCertificateData.java new file mode 100644 index 000000000000..8e193065bf57 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/RawCertificateData.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.AuthenticationType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Raw Certificate Data. */ +@Fluent +public final class RawCertificateData { + /* + * The authentication type. + */ + @JsonProperty(value = "authenticationType") + private AuthenticationType authenticationType; + + /* + * The base64 encoded certificate raw data. + */ + @JsonProperty(value = "certificate", required = true) + private String certificate; + + /** Creates an instance of RawCertificateData class. */ + public RawCertificateData() { + } + + /** + * Get the authenticationType property: The authentication type. + * + * @return the authenticationType value. + */ + public AuthenticationType authenticationType() { + return this.authenticationType; + } + + /** + * Set the authenticationType property: The authentication type. + * + * @param authenticationType the authenticationType value to set. + * @return the RawCertificateData object itself. + */ + public RawCertificateData withAuthenticationType(AuthenticationType authenticationType) { + this.authenticationType = authenticationType; + return this; + } + + /** + * Get the certificate property: The base64 encoded certificate raw data. + * + * @return the certificate value. + */ + public String certificate() { + return this.certificate; + } + + /** + * Set the certificate property: The base64 encoded certificate raw data. + * + * @param certificate the certificate value to set. + * @return the RawCertificateData object itself. + */ + public RawCertificateData withCertificate(String certificate) { + this.certificate = certificate; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (certificate() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property certificate in model RawCertificateData")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RawCertificateData.class); +} 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 06f52481c0a6..6d4aa3dbda9d 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,13 @@ package com.azure.resourcemanager.databoxedge.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; +import com.azure.resourcemanager.databoxedge.models.CloudEdgeManagementRole; import com.azure.resourcemanager.databoxedge.models.IoTRole; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.databoxedge.models.KubernetesRole; +import com.azure.resourcemanager.databoxedge.models.MecRole; +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,10 +23,32 @@ 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); + /* + * Metadata pertaining to creation and last modification of Role + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of RoleInner class. */ + public RoleInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of Role. + * + * @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/SecuritySettingsProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/SecuritySettingsProperties.java new file mode 100644 index 000000000000..57905d69506e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/SecuritySettingsProperties.java @@ -0,0 +1,68 @@ +// 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.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of security settings. */ +@Fluent +public final class SecuritySettingsProperties { + /* + * Device administrator password as an encrypted string (encrypted using RSA PKCS #1) is used to sign into the + * local web UI of the device. The Actual password should have at least 8 characters that are a combination of + * uppercase, lowercase, numeric, and special characters. + */ + @JsonProperty(value = "deviceAdminPassword", required = true) + private AsymmetricEncryptedSecret deviceAdminPassword; + + /** Creates an instance of SecuritySettingsProperties class. */ + public SecuritySettingsProperties() { + } + + /** + * Get the deviceAdminPassword property: Device administrator password as an encrypted string (encrypted using RSA + * PKCS #1) is used to sign into the local web UI of the device. The Actual password should have at least 8 + * characters that are a combination of uppercase, lowercase, numeric, and special characters. + * + * @return the deviceAdminPassword value. + */ + public AsymmetricEncryptedSecret deviceAdminPassword() { + return this.deviceAdminPassword; + } + + /** + * Set the deviceAdminPassword property: Device administrator password as an encrypted string (encrypted using RSA + * PKCS #1) is used to sign into the local web UI of the device. The Actual password should have at least 8 + * characters that are a combination of uppercase, lowercase, numeric, and special characters. + * + * @param deviceAdminPassword the deviceAdminPassword value to set. + * @return the SecuritySettingsProperties object itself. + */ + public SecuritySettingsProperties withDeviceAdminPassword(AsymmetricEncryptedSecret deviceAdminPassword) { + this.deviceAdminPassword = deviceAdminPassword; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deviceAdminPassword() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property deviceAdminPassword in model SecuritySettingsProperties")); + } else { + deviceAdminPassword().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SecuritySettingsProperties.class); +} 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 280d6bc63703..bd354ae6199f 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 @@ -5,7 +5,7 @@ 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.AzureContainerInfo; @@ -17,77 +17,45 @@ import com.azure.resourcemanager.databoxedge.models.ShareAccessProtocol; import com.azure.resourcemanager.databoxedge.models.ShareStatus; import com.azure.resourcemanager.databoxedge.models.UserAccessRight; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Represents a share on the Data Box Edge/Gateway device. */ -@JsonFlatten @Fluent -public class ShareInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ShareInner.class); - - /* - * Description for the share. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * Current status of the share. - */ - @JsonProperty(value = "properties.shareStatus", required = true) - private ShareStatus shareStatus; - - /* - * Current monitoring status of the share. - */ - @JsonProperty(value = "properties.monitoringStatus", required = true) - private MonitoringStatus monitoringStatus; - +public final class ShareInner extends ArmBaseModel { /* - * Azure container mapping for the share. + * The share properties. */ - @JsonProperty(value = "properties.azureContainerInfo") - private AzureContainerInfo azureContainerInfo; + @JsonProperty(value = "properties", required = true) + private ShareProperties innerProperties = new ShareProperties(); /* - * Access protocol to be used by the share. + * Metadata pertaining to creation and last modification of Share */ - @JsonProperty(value = "properties.accessProtocol", required = true) - private ShareAccessProtocol accessProtocol; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * Mapping of users and corresponding access rights on the share (required - * for SMB protocol). - */ - @JsonProperty(value = "properties.userAccessRights") - private List userAccessRights; - - /* - * List of IP addresses and corresponding access rights on the - * share(required for NFS protocol). - */ - @JsonProperty(value = "properties.clientAccessRights") - private List clientAccessRights; - - /* - * Details of the refresh job on this share. - */ - @JsonProperty(value = "properties.refreshDetails") - private RefreshDetails refreshDetails; + /** Creates an instance of ShareInner class. */ + public ShareInner() { + } - /* - * Share mount point to the role. + /** + * Get the innerProperties property: The share properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.shareMappings", access = JsonProperty.Access.WRITE_ONLY) - private List shareMappings; + private ShareProperties innerProperties() { + return this.innerProperties; + } - /* - * Data policy of the share. + /** + * Get the systemData property: Metadata pertaining to creation and last modification of Share. + * + * @return the systemData value. */ - @JsonProperty(value = "properties.dataPolicy") - private DataPolicy dataPolicy; + public SystemData systemData() { + return this.systemData; + } /** * Get the description property: Description for the share. @@ -95,7 +63,7 @@ public class ShareInner extends ArmBaseModel { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -105,7 +73,10 @@ public String description() { * @return the ShareInner object itself. */ public ShareInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new ShareProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -115,7 +86,7 @@ public ShareInner withDescription(String description) { * @return the shareStatus value. */ public ShareStatus shareStatus() { - return this.shareStatus; + return this.innerProperties() == null ? null : this.innerProperties().shareStatus(); } /** @@ -125,7 +96,10 @@ public ShareStatus shareStatus() { * @return the ShareInner object itself. */ public ShareInner withShareStatus(ShareStatus shareStatus) { - this.shareStatus = shareStatus; + if (this.innerProperties() == null) { + this.innerProperties = new ShareProperties(); + } + this.innerProperties().withShareStatus(shareStatus); return this; } @@ -135,7 +109,7 @@ public ShareInner withShareStatus(ShareStatus shareStatus) { * @return the monitoringStatus value. */ public MonitoringStatus monitoringStatus() { - return this.monitoringStatus; + return this.innerProperties() == null ? null : this.innerProperties().monitoringStatus(); } /** @@ -145,7 +119,10 @@ public MonitoringStatus monitoringStatus() { * @return the ShareInner object itself. */ public ShareInner withMonitoringStatus(MonitoringStatus monitoringStatus) { - this.monitoringStatus = monitoringStatus; + if (this.innerProperties() == null) { + this.innerProperties = new ShareProperties(); + } + this.innerProperties().withMonitoringStatus(monitoringStatus); return this; } @@ -155,7 +132,7 @@ public ShareInner withMonitoringStatus(MonitoringStatus monitoringStatus) { * @return the azureContainerInfo value. */ public AzureContainerInfo azureContainerInfo() { - return this.azureContainerInfo; + return this.innerProperties() == null ? null : this.innerProperties().azureContainerInfo(); } /** @@ -165,7 +142,10 @@ public AzureContainerInfo azureContainerInfo() { * @return the ShareInner object itself. */ public ShareInner withAzureContainerInfo(AzureContainerInfo azureContainerInfo) { - this.azureContainerInfo = azureContainerInfo; + if (this.innerProperties() == null) { + this.innerProperties = new ShareProperties(); + } + this.innerProperties().withAzureContainerInfo(azureContainerInfo); return this; } @@ -175,7 +155,7 @@ public ShareInner withAzureContainerInfo(AzureContainerInfo azureContainerInfo) * @return the accessProtocol value. */ public ShareAccessProtocol accessProtocol() { - return this.accessProtocol; + return this.innerProperties() == null ? null : this.innerProperties().accessProtocol(); } /** @@ -185,7 +165,10 @@ public ShareAccessProtocol accessProtocol() { * @return the ShareInner object itself. */ public ShareInner withAccessProtocol(ShareAccessProtocol accessProtocol) { - this.accessProtocol = accessProtocol; + if (this.innerProperties() == null) { + this.innerProperties = new ShareProperties(); + } + this.innerProperties().withAccessProtocol(accessProtocol); return this; } @@ -196,7 +179,7 @@ public ShareInner withAccessProtocol(ShareAccessProtocol accessProtocol) { * @return the userAccessRights value. */ public List userAccessRights() { - return this.userAccessRights; + return this.innerProperties() == null ? null : this.innerProperties().userAccessRights(); } /** @@ -207,7 +190,10 @@ public List userAccessRights() { * @return the ShareInner object itself. */ public ShareInner withUserAccessRights(List userAccessRights) { - this.userAccessRights = userAccessRights; + if (this.innerProperties() == null) { + this.innerProperties = new ShareProperties(); + } + this.innerProperties().withUserAccessRights(userAccessRights); return this; } @@ -218,7 +204,7 @@ public ShareInner withUserAccessRights(List userAccessRights) { * @return the clientAccessRights value. */ public List clientAccessRights() { - return this.clientAccessRights; + return this.innerProperties() == null ? null : this.innerProperties().clientAccessRights(); } /** @@ -229,7 +215,10 @@ public List clientAccessRights() { * @return the ShareInner object itself. */ public ShareInner withClientAccessRights(List clientAccessRights) { - this.clientAccessRights = clientAccessRights; + if (this.innerProperties() == null) { + this.innerProperties = new ShareProperties(); + } + this.innerProperties().withClientAccessRights(clientAccessRights); return this; } @@ -239,7 +228,7 @@ public ShareInner withClientAccessRights(List clientAccessRig * @return the refreshDetails value. */ public RefreshDetails refreshDetails() { - return this.refreshDetails; + return this.innerProperties() == null ? null : this.innerProperties().refreshDetails(); } /** @@ -249,7 +238,10 @@ public RefreshDetails refreshDetails() { * @return the ShareInner object itself. */ public ShareInner withRefreshDetails(RefreshDetails refreshDetails) { - this.refreshDetails = refreshDetails; + if (this.innerProperties() == null) { + this.innerProperties = new ShareProperties(); + } + this.innerProperties().withRefreshDetails(refreshDetails); return this; } @@ -259,7 +251,7 @@ public ShareInner withRefreshDetails(RefreshDetails refreshDetails) { * @return the shareMappings value. */ public List shareMappings() { - return this.shareMappings; + return this.innerProperties() == null ? null : this.innerProperties().shareMappings(); } /** @@ -268,7 +260,7 @@ public List shareMappings() { * @return the dataPolicy value. */ public DataPolicy dataPolicy() { - return this.dataPolicy; + return this.innerProperties() == null ? null : this.innerProperties().dataPolicy(); } /** @@ -278,7 +270,10 @@ public DataPolicy dataPolicy() { * @return the ShareInner object itself. */ public ShareInner withDataPolicy(DataPolicy dataPolicy) { - this.dataPolicy = dataPolicy; + if (this.innerProperties() == null) { + this.innerProperties = new ShareProperties(); + } + this.innerProperties().withDataPolicy(dataPolicy); return this; } @@ -290,35 +285,14 @@ public ShareInner withDataPolicy(DataPolicy dataPolicy) { @Override public void validate() { super.validate(); - if (shareStatus() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property shareStatus in model ShareInner")); - } - if (monitoringStatus() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property monitoringStatus in model ShareInner")); - } - if (azureContainerInfo() != null) { - azureContainerInfo().validate(); - } - if (accessProtocol() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property accessProtocol in model ShareInner")); - } - if (userAccessRights() != null) { - userAccessRights().forEach(e -> e.validate()); - } - if (clientAccessRights() != null) { - clientAccessRights().forEach(e -> e.validate()); - } - if (refreshDetails() != null) { - refreshDetails().validate(); - } - if (shareMappings() != null) { - shareMappings().forEach(e -> e.validate()); + new IllegalArgumentException("Missing required property innerProperties in model ShareInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ShareInner.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ShareProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ShareProperties.java new file mode 100644 index 000000000000..ec5a171eff72 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ShareProperties.java @@ -0,0 +1,321 @@ +// 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.azure.resourcemanager.databoxedge.models.AzureContainerInfo; +import com.azure.resourcemanager.databoxedge.models.ClientAccessRight; +import com.azure.resourcemanager.databoxedge.models.DataPolicy; +import com.azure.resourcemanager.databoxedge.models.MonitoringStatus; +import com.azure.resourcemanager.databoxedge.models.MountPointMap; +import com.azure.resourcemanager.databoxedge.models.RefreshDetails; +import com.azure.resourcemanager.databoxedge.models.ShareAccessProtocol; +import com.azure.resourcemanager.databoxedge.models.ShareStatus; +import com.azure.resourcemanager.databoxedge.models.UserAccessRight; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The share properties. */ +@Fluent +public final class ShareProperties { + /* + * Description for the share. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Current status of the share. + */ + @JsonProperty(value = "shareStatus", required = true) + private ShareStatus shareStatus; + + /* + * Current monitoring status of the share. + */ + @JsonProperty(value = "monitoringStatus", required = true) + private MonitoringStatus monitoringStatus; + + /* + * Azure container mapping for the share. + */ + @JsonProperty(value = "azureContainerInfo") + private AzureContainerInfo azureContainerInfo; + + /* + * Access protocol to be used by the share. + */ + @JsonProperty(value = "accessProtocol", required = true) + private ShareAccessProtocol accessProtocol; + + /* + * Mapping of users and corresponding access rights on the share (required for SMB protocol). + */ + @JsonProperty(value = "userAccessRights") + private List userAccessRights; + + /* + * List of IP addresses and corresponding access rights on the share(required for NFS protocol). + */ + @JsonProperty(value = "clientAccessRights") + private List clientAccessRights; + + /* + * Details of the refresh job on this share. + */ + @JsonProperty(value = "refreshDetails") + private RefreshDetails refreshDetails; + + /* + * Share mount point to the role. + */ + @JsonProperty(value = "shareMappings", access = JsonProperty.Access.WRITE_ONLY) + private List shareMappings; + + /* + * Data policy of the share. + */ + @JsonProperty(value = "dataPolicy") + private DataPolicy dataPolicy; + + /** Creates an instance of ShareProperties class. */ + public ShareProperties() { + } + + /** + * Get the description property: Description for the share. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description for the share. + * + * @param description the description value to set. + * @return the ShareProperties object itself. + */ + public ShareProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the shareStatus property: Current status of the share. + * + * @return the shareStatus value. + */ + public ShareStatus shareStatus() { + return this.shareStatus; + } + + /** + * Set the shareStatus property: Current status of the share. + * + * @param shareStatus the shareStatus value to set. + * @return the ShareProperties object itself. + */ + public ShareProperties withShareStatus(ShareStatus shareStatus) { + this.shareStatus = shareStatus; + return this; + } + + /** + * Get the monitoringStatus property: Current monitoring status of the share. + * + * @return the monitoringStatus value. + */ + public MonitoringStatus monitoringStatus() { + return this.monitoringStatus; + } + + /** + * Set the monitoringStatus property: Current monitoring status of the share. + * + * @param monitoringStatus the monitoringStatus value to set. + * @return the ShareProperties object itself. + */ + public ShareProperties withMonitoringStatus(MonitoringStatus monitoringStatus) { + this.monitoringStatus = monitoringStatus; + return this; + } + + /** + * Get the azureContainerInfo property: Azure container mapping for the share. + * + * @return the azureContainerInfo value. + */ + public AzureContainerInfo azureContainerInfo() { + return this.azureContainerInfo; + } + + /** + * Set the azureContainerInfo property: Azure container mapping for the share. + * + * @param azureContainerInfo the azureContainerInfo value to set. + * @return the ShareProperties object itself. + */ + public ShareProperties withAzureContainerInfo(AzureContainerInfo azureContainerInfo) { + this.azureContainerInfo = azureContainerInfo; + return this; + } + + /** + * Get the accessProtocol property: Access protocol to be used by the share. + * + * @return the accessProtocol value. + */ + public ShareAccessProtocol accessProtocol() { + return this.accessProtocol; + } + + /** + * Set the accessProtocol property: Access protocol to be used by the share. + * + * @param accessProtocol the accessProtocol value to set. + * @return the ShareProperties object itself. + */ + public ShareProperties withAccessProtocol(ShareAccessProtocol accessProtocol) { + this.accessProtocol = accessProtocol; + return this; + } + + /** + * Get the userAccessRights property: Mapping of users and corresponding access rights on the share (required for + * SMB protocol). + * + * @return the userAccessRights value. + */ + public List userAccessRights() { + return this.userAccessRights; + } + + /** + * Set the userAccessRights property: Mapping of users and corresponding access rights on the share (required for + * SMB protocol). + * + * @param userAccessRights the userAccessRights value to set. + * @return the ShareProperties object itself. + */ + public ShareProperties withUserAccessRights(List userAccessRights) { + this.userAccessRights = userAccessRights; + return this; + } + + /** + * Get the clientAccessRights property: List of IP addresses and corresponding access rights on the share(required + * for NFS protocol). + * + * @return the clientAccessRights value. + */ + public List clientAccessRights() { + return this.clientAccessRights; + } + + /** + * Set the clientAccessRights property: List of IP addresses and corresponding access rights on the share(required + * for NFS protocol). + * + * @param clientAccessRights the clientAccessRights value to set. + * @return the ShareProperties object itself. + */ + public ShareProperties withClientAccessRights(List clientAccessRights) { + this.clientAccessRights = clientAccessRights; + return this; + } + + /** + * Get the refreshDetails property: Details of the refresh job on this share. + * + * @return the refreshDetails value. + */ + public RefreshDetails refreshDetails() { + return this.refreshDetails; + } + + /** + * Set the refreshDetails property: Details of the refresh job on this share. + * + * @param refreshDetails the refreshDetails value to set. + * @return the ShareProperties object itself. + */ + public ShareProperties withRefreshDetails(RefreshDetails refreshDetails) { + this.refreshDetails = refreshDetails; + return this; + } + + /** + * Get the shareMappings property: Share mount point to the role. + * + * @return the shareMappings value. + */ + public List shareMappings() { + return this.shareMappings; + } + + /** + * Get the dataPolicy property: Data policy of the share. + * + * @return the dataPolicy value. + */ + public DataPolicy dataPolicy() { + return this.dataPolicy; + } + + /** + * Set the dataPolicy property: Data policy of the share. + * + * @param dataPolicy the dataPolicy value to set. + * @return the ShareProperties object itself. + */ + public ShareProperties withDataPolicy(DataPolicy dataPolicy) { + this.dataPolicy = dataPolicy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (shareStatus() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property shareStatus in model ShareProperties")); + } + if (monitoringStatus() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property monitoringStatus in model ShareProperties")); + } + if (azureContainerInfo() != null) { + azureContainerInfo().validate(); + } + if (accessProtocol() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property accessProtocol in model ShareProperties")); + } + if (userAccessRights() != null) { + userAccessRights().forEach(e -> e.validate()); + } + if (clientAccessRights() != null) { + clientAccessRights().forEach(e -> e.validate()); + } + if (refreshDetails() != null) { + refreshDetails().validate(); + } + if (shareMappings() != null) { + shareMappings().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ShareProperties.class); +} 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 734b0483e59f..4aacc06f1c52 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 @@ -5,69 +5,50 @@ 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.AccountType; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; import com.azure.resourcemanager.databoxedge.models.SslStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The storage account credential. */ -@JsonFlatten @Fluent -public class StorageAccountCredentialInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountCredentialInner.class); - - /* - * Alias for the storage account. - */ - @JsonProperty(value = "properties.alias", required = true) - private String alias; - - /* - * Username for the storage account. - */ - @JsonProperty(value = "properties.userName") - private String username; - - /* - * Encrypted storage key. - */ - @JsonProperty(value = "properties.accountKey") - private AsymmetricEncryptedSecret accountKey; - +public final class StorageAccountCredentialInner extends ArmBaseModel { /* - * Connection string for the storage account. Use this string if username - * and account key are not specified. + * The storage account credential properties. */ - @JsonProperty(value = "properties.connectionString") - private String connectionString; + @JsonProperty(value = "properties", required = true) + private StorageAccountCredentialProperties innerProperties = new StorageAccountCredentialProperties(); /* - * Signifies whether SSL needs to be enabled or not. + * Metadata pertaining to creation and last modification of StorageAccountCredential */ - @JsonProperty(value = "properties.sslStatus", required = true) - private SslStatus sslStatus; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * Blob end point for private clouds. - */ - @JsonProperty(value = "properties.blobDomainName") - private String blobDomainName; + /** Creates an instance of StorageAccountCredentialInner class. */ + public StorageAccountCredentialInner() { + } - /* - * Type of storage accessed on the storage account. + /** + * Get the innerProperties property: The storage account credential properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.accountType", required = true) - private AccountType accountType; + private StorageAccountCredentialProperties innerProperties() { + return this.innerProperties; + } - /* - * Id of the storage account. + /** + * Get the systemData property: Metadata pertaining to creation and last modification of StorageAccountCredential. + * + * @return the systemData value. */ - @JsonProperty(value = "properties.storageAccountId") - private String storageAccountId; + public SystemData systemData() { + return this.systemData; + } /** * Get the alias property: Alias for the storage account. @@ -75,7 +56,7 @@ public class StorageAccountCredentialInner extends ArmBaseModel { * @return the alias value. */ public String alias() { - return this.alias; + return this.innerProperties() == null ? null : this.innerProperties().alias(); } /** @@ -85,7 +66,10 @@ public String alias() { * @return the StorageAccountCredentialInner object itself. */ public StorageAccountCredentialInner withAlias(String alias) { - this.alias = alias; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountCredentialProperties(); + } + this.innerProperties().withAlias(alias); return this; } @@ -95,7 +79,7 @@ public StorageAccountCredentialInner withAlias(String alias) { * @return the username value. */ public String username() { - return this.username; + return this.innerProperties() == null ? null : this.innerProperties().username(); } /** @@ -105,7 +89,10 @@ public String username() { * @return the StorageAccountCredentialInner object itself. */ public StorageAccountCredentialInner withUsername(String username) { - this.username = username; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountCredentialProperties(); + } + this.innerProperties().withUsername(username); return this; } @@ -115,7 +102,7 @@ public StorageAccountCredentialInner withUsername(String username) { * @return the accountKey value. */ public AsymmetricEncryptedSecret accountKey() { - return this.accountKey; + return this.innerProperties() == null ? null : this.innerProperties().accountKey(); } /** @@ -125,7 +112,10 @@ public AsymmetricEncryptedSecret accountKey() { * @return the StorageAccountCredentialInner object itself. */ public StorageAccountCredentialInner withAccountKey(AsymmetricEncryptedSecret accountKey) { - this.accountKey = accountKey; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountCredentialProperties(); + } + this.innerProperties().withAccountKey(accountKey); return this; } @@ -136,7 +126,7 @@ public StorageAccountCredentialInner withAccountKey(AsymmetricEncryptedSecret ac * @return the connectionString value. */ public String connectionString() { - return this.connectionString; + return this.innerProperties() == null ? null : this.innerProperties().connectionString(); } /** @@ -147,7 +137,10 @@ public String connectionString() { * @return the StorageAccountCredentialInner object itself. */ public StorageAccountCredentialInner withConnectionString(String connectionString) { - this.connectionString = connectionString; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountCredentialProperties(); + } + this.innerProperties().withConnectionString(connectionString); return this; } @@ -157,7 +150,7 @@ public StorageAccountCredentialInner withConnectionString(String connectionStrin * @return the sslStatus value. */ public SslStatus sslStatus() { - return this.sslStatus; + return this.innerProperties() == null ? null : this.innerProperties().sslStatus(); } /** @@ -167,7 +160,10 @@ public SslStatus sslStatus() { * @return the StorageAccountCredentialInner object itself. */ public StorageAccountCredentialInner withSslStatus(SslStatus sslStatus) { - this.sslStatus = sslStatus; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountCredentialProperties(); + } + this.innerProperties().withSslStatus(sslStatus); return this; } @@ -177,7 +173,7 @@ public StorageAccountCredentialInner withSslStatus(SslStatus sslStatus) { * @return the blobDomainName value. */ public String blobDomainName() { - return this.blobDomainName; + return this.innerProperties() == null ? null : this.innerProperties().blobDomainName(); } /** @@ -187,7 +183,10 @@ public String blobDomainName() { * @return the StorageAccountCredentialInner object itself. */ public StorageAccountCredentialInner withBlobDomainName(String blobDomainName) { - this.blobDomainName = blobDomainName; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountCredentialProperties(); + } + this.innerProperties().withBlobDomainName(blobDomainName); return this; } @@ -197,7 +196,7 @@ public StorageAccountCredentialInner withBlobDomainName(String blobDomainName) { * @return the accountType value. */ public AccountType accountType() { - return this.accountType; + return this.innerProperties() == null ? null : this.innerProperties().accountType(); } /** @@ -207,7 +206,10 @@ public AccountType accountType() { * @return the StorageAccountCredentialInner object itself. */ public StorageAccountCredentialInner withAccountType(AccountType accountType) { - this.accountType = accountType; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountCredentialProperties(); + } + this.innerProperties().withAccountType(accountType); return this; } @@ -217,7 +219,7 @@ public StorageAccountCredentialInner withAccountType(AccountType accountType) { * @return the storageAccountId value. */ public String storageAccountId() { - return this.storageAccountId; + return this.innerProperties() == null ? null : this.innerProperties().storageAccountId(); } /** @@ -227,7 +229,10 @@ public String storageAccountId() { * @return the StorageAccountCredentialInner object itself. */ public StorageAccountCredentialInner withStorageAccountId(String storageAccountId) { - this.storageAccountId = storageAccountId; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountCredentialProperties(); + } + this.innerProperties().withStorageAccountId(storageAccountId); return this; } @@ -239,26 +244,15 @@ public StorageAccountCredentialInner withStorageAccountId(String storageAccountI @Override public void validate() { super.validate(); - if (alias() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property alias in model StorageAccountCredentialInner")); - } - if (accountKey() != null) { - accountKey().validate(); - } - if (sslStatus() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property sslStatus in model StorageAccountCredentialInner")); - } - if (accountType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property accountType in model StorageAccountCredentialInner")); + "Missing required property innerProperties in model StorageAccountCredentialInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(StorageAccountCredentialInner.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountCredentialProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountCredentialProperties.java new file mode 100644 index 000000000000..d066fa1cd5d1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountCredentialProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.AccountType; +import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.azure.resourcemanager.databoxedge.models.SslStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The storage account credential properties. */ +@Fluent +public final class StorageAccountCredentialProperties { + /* + * Alias for the storage account. + */ + @JsonProperty(value = "alias", required = true) + private String alias; + + /* + * Username for the storage account. + */ + @JsonProperty(value = "userName") + private String username; + + /* + * Encrypted storage key. + */ + @JsonProperty(value = "accountKey") + private AsymmetricEncryptedSecret accountKey; + + /* + * Connection string for the storage account. Use this string if username and account key are not specified. + */ + @JsonProperty(value = "connectionString") + private String connectionString; + + /* + * Signifies whether SSL needs to be enabled or not. + */ + @JsonProperty(value = "sslStatus", required = true) + private SslStatus sslStatus; + + /* + * Blob end point for private clouds. + */ + @JsonProperty(value = "blobDomainName") + private String blobDomainName; + + /* + * Type of storage accessed on the storage account. + */ + @JsonProperty(value = "accountType", required = true) + private AccountType accountType; + + /* + * Id of the storage account. + */ + @JsonProperty(value = "storageAccountId") + private String storageAccountId; + + /** Creates an instance of StorageAccountCredentialProperties class. */ + public StorageAccountCredentialProperties() { + } + + /** + * Get the alias property: Alias for the storage account. + * + * @return the alias value. + */ + public String alias() { + return this.alias; + } + + /** + * Set the alias property: Alias for the storage account. + * + * @param alias the alias value to set. + * @return the StorageAccountCredentialProperties object itself. + */ + public StorageAccountCredentialProperties withAlias(String alias) { + this.alias = alias; + return this; + } + + /** + * Get the username property: Username for the storage account. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: Username for the storage account. + * + * @param username the username value to set. + * @return the StorageAccountCredentialProperties object itself. + */ + public StorageAccountCredentialProperties withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the accountKey property: Encrypted storage key. + * + * @return the accountKey value. + */ + public AsymmetricEncryptedSecret accountKey() { + return this.accountKey; + } + + /** + * Set the accountKey property: Encrypted storage key. + * + * @param accountKey the accountKey value to set. + * @return the StorageAccountCredentialProperties object itself. + */ + public StorageAccountCredentialProperties withAccountKey(AsymmetricEncryptedSecret accountKey) { + this.accountKey = accountKey; + return this; + } + + /** + * Get the connectionString property: Connection string for the storage account. Use this string if username and + * account key are not specified. + * + * @return the connectionString value. + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set the connectionString property: Connection string for the storage account. Use this string if username and + * account key are not specified. + * + * @param connectionString the connectionString value to set. + * @return the StorageAccountCredentialProperties object itself. + */ + public StorageAccountCredentialProperties withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Get the sslStatus property: Signifies whether SSL needs to be enabled or not. + * + * @return the sslStatus value. + */ + public SslStatus sslStatus() { + return this.sslStatus; + } + + /** + * Set the sslStatus property: Signifies whether SSL needs to be enabled or not. + * + * @param sslStatus the sslStatus value to set. + * @return the StorageAccountCredentialProperties object itself. + */ + public StorageAccountCredentialProperties withSslStatus(SslStatus sslStatus) { + this.sslStatus = sslStatus; + return this; + } + + /** + * Get the blobDomainName property: Blob end point for private clouds. + * + * @return the blobDomainName value. + */ + public String blobDomainName() { + return this.blobDomainName; + } + + /** + * Set the blobDomainName property: Blob end point for private clouds. + * + * @param blobDomainName the blobDomainName value to set. + * @return the StorageAccountCredentialProperties object itself. + */ + public StorageAccountCredentialProperties withBlobDomainName(String blobDomainName) { + this.blobDomainName = blobDomainName; + return this; + } + + /** + * Get the accountType property: Type of storage accessed on the storage account. + * + * @return the accountType value. + */ + public AccountType accountType() { + return this.accountType; + } + + /** + * Set the accountType property: Type of storage accessed on the storage account. + * + * @param accountType the accountType value to set. + * @return the StorageAccountCredentialProperties object itself. + */ + public StorageAccountCredentialProperties withAccountType(AccountType accountType) { + this.accountType = accountType; + return this; + } + + /** + * Get the storageAccountId property: Id of the storage account. + * + * @return the storageAccountId value. + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set the storageAccountId property: Id of the storage account. + * + * @param storageAccountId the storageAccountId value to set. + * @return the StorageAccountCredentialProperties object itself. + */ + public StorageAccountCredentialProperties withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (alias() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property alias in model StorageAccountCredentialProperties")); + } + if (accountKey() != null) { + accountKey().validate(); + } + if (sslStatus() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sslStatus in model StorageAccountCredentialProperties")); + } + if (accountType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property accountType in model StorageAccountCredentialProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(StorageAccountCredentialProperties.class); +} 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 dabe5c653d0f..bb51bd2ca713 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 @@ -5,56 +5,49 @@ 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.DataPolicy; import com.azure.resourcemanager.databoxedge.models.StorageAccountStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a Storage Account on the Data Box Edge/Gateway device. */ -@JsonFlatten @Fluent -public class StorageAccountInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountInner.class); - - /* - * Description for the storage Account. - */ - @JsonProperty(value = "properties.description") - private String description; - +public final class StorageAccountInner extends ArmBaseModel { /* - * Current status of the storage account + * The Storage Account properties. */ - @JsonProperty(value = "properties.storageAccountStatus") - private StorageAccountStatus storageAccountStatus; + @JsonProperty(value = "properties", required = true) + private StorageAccountProperties innerProperties = new StorageAccountProperties(); /* - * Data policy of the storage Account. + * Metadata pertaining to creation and last modification of StorageAccount */ - @JsonProperty(value = "properties.dataPolicy") - private DataPolicy dataPolicy; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * Storage Account Credential Id - */ - @JsonProperty(value = "properties.storageAccountCredentialId") - private String storageAccountCredentialId; + /** Creates an instance of StorageAccountInner class. */ + public StorageAccountInner() { + } - /* - * BlobEndpoint of Storage Account + /** + * Get the innerProperties property: The Storage Account properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.blobEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String blobEndpoint; + private StorageAccountProperties innerProperties() { + return this.innerProperties; + } - /* - * The Container Count. Present only for Storage Accounts with DataPolicy - * set to Cloud. + /** + * Get the systemData property: Metadata pertaining to creation and last modification of StorageAccount. + * + * @return the systemData value. */ - @JsonProperty(value = "properties.containerCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer containerCount; + public SystemData systemData() { + return this.systemData; + } /** * Get the description property: Description for the storage Account. @@ -62,7 +55,7 @@ public class StorageAccountInner extends ArmBaseModel { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -72,7 +65,10 @@ public String description() { * @return the StorageAccountInner object itself. */ public StorageAccountInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -82,7 +78,7 @@ public StorageAccountInner withDescription(String description) { * @return the storageAccountStatus value. */ public StorageAccountStatus storageAccountStatus() { - return this.storageAccountStatus; + return this.innerProperties() == null ? null : this.innerProperties().storageAccountStatus(); } /** @@ -92,7 +88,10 @@ public StorageAccountStatus storageAccountStatus() { * @return the StorageAccountInner object itself. */ public StorageAccountInner withStorageAccountStatus(StorageAccountStatus storageAccountStatus) { - this.storageAccountStatus = storageAccountStatus; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountProperties(); + } + this.innerProperties().withStorageAccountStatus(storageAccountStatus); return this; } @@ -102,7 +101,7 @@ public StorageAccountInner withStorageAccountStatus(StorageAccountStatus storage * @return the dataPolicy value. */ public DataPolicy dataPolicy() { - return this.dataPolicy; + return this.innerProperties() == null ? null : this.innerProperties().dataPolicy(); } /** @@ -112,7 +111,10 @@ public DataPolicy dataPolicy() { * @return the StorageAccountInner object itself. */ public StorageAccountInner withDataPolicy(DataPolicy dataPolicy) { - this.dataPolicy = dataPolicy; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountProperties(); + } + this.innerProperties().withDataPolicy(dataPolicy); return this; } @@ -122,7 +124,7 @@ public StorageAccountInner withDataPolicy(DataPolicy dataPolicy) { * @return the storageAccountCredentialId value. */ public String storageAccountCredentialId() { - return this.storageAccountCredentialId; + return this.innerProperties() == null ? null : this.innerProperties().storageAccountCredentialId(); } /** @@ -132,7 +134,10 @@ public String storageAccountCredentialId() { * @return the StorageAccountInner object itself. */ public StorageAccountInner withStorageAccountCredentialId(String storageAccountCredentialId) { - this.storageAccountCredentialId = storageAccountCredentialId; + if (this.innerProperties() == null) { + this.innerProperties = new StorageAccountProperties(); + } + this.innerProperties().withStorageAccountCredentialId(storageAccountCredentialId); return this; } @@ -142,7 +147,7 @@ public StorageAccountInner withStorageAccountCredentialId(String storageAccountC * @return the blobEndpoint value. */ public String blobEndpoint() { - return this.blobEndpoint; + return this.innerProperties() == null ? null : this.innerProperties().blobEndpoint(); } /** @@ -152,7 +157,7 @@ public String blobEndpoint() { * @return the containerCount value. */ public Integer containerCount() { - return this.containerCount; + return this.innerProperties() == null ? null : this.innerProperties().containerCount(); } /** @@ -163,5 +168,15 @@ public Integer containerCount() { @Override public void validate() { super.validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model StorageAccountInner")); + } else { + innerProperties().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(StorageAccountInner.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountProperties.java new file mode 100644 index 000000000000..4bd8286341c0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountProperties.java @@ -0,0 +1,170 @@ +// 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.azure.resourcemanager.databoxedge.models.DataPolicy; +import com.azure.resourcemanager.databoxedge.models.StorageAccountStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The storage account properties. */ +@Fluent +public final class StorageAccountProperties { + /* + * Description for the storage Account. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Current status of the storage account + */ + @JsonProperty(value = "storageAccountStatus") + private StorageAccountStatus storageAccountStatus; + + /* + * Data policy of the storage Account. + */ + @JsonProperty(value = "dataPolicy", required = true) + private DataPolicy dataPolicy; + + /* + * Storage Account Credential Id + */ + @JsonProperty(value = "storageAccountCredentialId") + private String storageAccountCredentialId; + + /* + * BlobEndpoint of Storage Account + */ + @JsonProperty(value = "blobEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String blobEndpoint; + + /* + * The Container Count. Present only for Storage Accounts with DataPolicy set to Cloud. + */ + @JsonProperty(value = "containerCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer containerCount; + + /** Creates an instance of StorageAccountProperties class. */ + public StorageAccountProperties() { + } + + /** + * Get the description property: Description for the storage Account. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description for the storage Account. + * + * @param description the description value to set. + * @return the StorageAccountProperties object itself. + */ + public StorageAccountProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the storageAccountStatus property: Current status of the storage account. + * + * @return the storageAccountStatus value. + */ + public StorageAccountStatus storageAccountStatus() { + return this.storageAccountStatus; + } + + /** + * Set the storageAccountStatus property: Current status of the storage account. + * + * @param storageAccountStatus the storageAccountStatus value to set. + * @return the StorageAccountProperties object itself. + */ + public StorageAccountProperties withStorageAccountStatus(StorageAccountStatus storageAccountStatus) { + this.storageAccountStatus = storageAccountStatus; + return this; + } + + /** + * Get the dataPolicy property: Data policy of the storage Account. + * + * @return the dataPolicy value. + */ + public DataPolicy dataPolicy() { + return this.dataPolicy; + } + + /** + * Set the dataPolicy property: Data policy of the storage Account. + * + * @param dataPolicy the dataPolicy value to set. + * @return the StorageAccountProperties object itself. + */ + public StorageAccountProperties withDataPolicy(DataPolicy dataPolicy) { + this.dataPolicy = dataPolicy; + return this; + } + + /** + * Get the storageAccountCredentialId property: Storage Account Credential Id. + * + * @return the storageAccountCredentialId value. + */ + public String storageAccountCredentialId() { + return this.storageAccountCredentialId; + } + + /** + * Set the storageAccountCredentialId property: Storage Account Credential Id. + * + * @param storageAccountCredentialId the storageAccountCredentialId value to set. + * @return the StorageAccountProperties object itself. + */ + public StorageAccountProperties withStorageAccountCredentialId(String storageAccountCredentialId) { + this.storageAccountCredentialId = storageAccountCredentialId; + return this; + } + + /** + * Get the blobEndpoint property: BlobEndpoint of Storage Account. + * + * @return the blobEndpoint value. + */ + public String blobEndpoint() { + return this.blobEndpoint; + } + + /** + * Get the containerCount property: The Container Count. Present only for Storage Accounts with DataPolicy set to + * Cloud. + * + * @return the containerCount value. + */ + public Integer containerCount() { + return this.containerCount; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataPolicy() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataPolicy in model StorageAccountProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(StorageAccountProperties.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/SubscriptionProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/SubscriptionProperties.java new file mode 100644 index 000000000000..f68da738f598 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/SubscriptionProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.databoxedge.models.SubscriptionRegisteredFeatures; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The SubscriptionProperties model. */ +@Fluent +public final class SubscriptionProperties { + /* + * The tenantId property. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The locationPlacementId property. + */ + @JsonProperty(value = "locationPlacementId") + private String locationPlacementId; + + /* + * The quotaId property. + */ + @JsonProperty(value = "quotaId") + private String quotaId; + + /* + * The serializedDetails property. + */ + @JsonProperty(value = "serializedDetails") + private String serializedDetails; + + /* + * The registeredFeatures property. + */ + @JsonProperty(value = "registeredFeatures") + private List registeredFeatures; + + /** Creates an instance of SubscriptionProperties class. */ + public SubscriptionProperties() { + } + + /** + * 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 SubscriptionProperties object itself. + */ + public SubscriptionProperties 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 SubscriptionProperties object itself. + */ + public SubscriptionProperties 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 SubscriptionProperties object itself. + */ + public SubscriptionProperties 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 SubscriptionProperties object itself. + */ + public SubscriptionProperties 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 SubscriptionProperties object itself. + */ + public SubscriptionProperties 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/fluent/models/SupportPackageRequestProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/SupportPackageRequestProperties.java new file mode 100644 index 000000000000..679dc7e2f7a0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/SupportPackageRequestProperties.java @@ -0,0 +1,107 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The share properties. */ +@Fluent +public final class SupportPackageRequestProperties { + /* + * MinimumTimeStamp from where logs need to be collected + */ + @JsonProperty(value = "minimumTimeStamp") + private OffsetDateTime minimumTimestamp; + + /* + * Start of the timespan of the log collection + */ + @JsonProperty(value = "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 = "include") + private String include; + + /** Creates an instance of SupportPackageRequestProperties class. */ + public SupportPackageRequestProperties() { + } + + /** + * 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 SupportPackageRequestProperties object itself. + */ + public SupportPackageRequestProperties withMinimumTimestamp(OffsetDateTime minimumTimestamp) { + this.minimumTimestamp = minimumTimestamp; + return this; + } + + /** + * Get the maximumTimestamp property: Start of the timespan of the log collection. + * + * @return the maximumTimestamp value. + */ + public OffsetDateTime maximumTimestamp() { + return this.maximumTimestamp; + } + + /** + * Set the maximumTimestamp property: Start of the timespan of the log collection. + * + * @param maximumTimestamp the maximumTimestamp value to set. + * @return the SupportPackageRequestProperties object itself. + */ + public SupportPackageRequestProperties 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 SupportPackageRequestProperties object itself. + */ + public SupportPackageRequestProperties withInclude(String include) { + this.include = include; + 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/TriggerInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/TriggerInner.java index 6104763e1583..a60717330cfb 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,11 @@ package com.azure.resourcemanager.databoxedge.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.management.SystemData; 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; @@ -27,7 +27,24 @@ }) @Immutable public class TriggerInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggerInner.class); + /* + * Metadata pertaining to creation and last modification of Trigger + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of TriggerInner class. */ + public TriggerInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of Trigger. + * + * @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 b5be1f31758c..14df37fa7fee 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 @@ -5,128 +5,52 @@ 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.azure.core.management.SystemData; 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; import java.time.OffsetDateTime; import java.util.List; /** Details about ongoing updates and availability of updates on the device. */ -@JsonFlatten @Fluent -public class UpdateSummaryInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateSummaryInner.class); - - /* - * The current version of the device in format: 1.2.17312.13.", - */ - @JsonProperty(value = "properties.deviceVersionNumber") - private String deviceVersionNumber; - - /* - * The current version of the device in text format. - */ - @JsonProperty(value = "properties.friendlyDeviceVersionName") - private String friendlyDeviceVersionName; - - /* - * The last time when a scan was done on the device. - */ - @JsonProperty(value = "properties.deviceLastScannedDateTime") - private OffsetDateTime deviceLastScannedDateTime; - - /* - * The time when the last scan job was completed (success/cancelled/failed) - * on the appliance. - */ - @JsonProperty(value = "properties.lastCompletedScanJobDateTime") - private OffsetDateTime lastCompletedScanJobDateTime; - - /* - * The time when the last Download job was completed - * (success/cancelled/failed) on the appliance. - */ - @JsonProperty(value = "properties.lastCompletedDownloadJobDateTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastCompletedDownloadJobDateTime; - - /* - * The time when the last Install job was completed - * (success/cancelled/failed) on the appliance. - */ - @JsonProperty(value = "properties.lastCompletedInstallJobDateTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastCompletedInstallJobDateTime; - - /* - * The number of updates available for the current device version as per - * the last device scan. - */ - @JsonProperty(value = "properties.totalNumberOfUpdatesAvailable", access = JsonProperty.Access.WRITE_ONLY) - private Integer totalNumberOfUpdatesAvailable; - - /* - * The total number of items pending download. - */ - @JsonProperty(value = "properties.totalNumberOfUpdatesPendingDownload", access = JsonProperty.Access.WRITE_ONLY) - private Integer totalNumberOfUpdatesPendingDownload; - - /* - * The total number of items pending install. - */ - @JsonProperty(value = "properties.totalNumberOfUpdatesPendingInstall", access = JsonProperty.Access.WRITE_ONLY) - private Integer totalNumberOfUpdatesPendingInstall; - - /* - * Indicates if updates are available and at least one of the updates needs - * a reboot. - */ - @JsonProperty(value = "properties.rebootBehavior", access = JsonProperty.Access.WRITE_ONLY) - private InstallRebootBehavior rebootBehavior; - +public final class UpdateSummaryInner extends ArmBaseModel { /* - * The current update operation. + * The device update information summary. */ - @JsonProperty(value = "properties.ongoingUpdateOperation", access = JsonProperty.Access.WRITE_ONLY) - private UpdateOperation ongoingUpdateOperation; + @JsonProperty(value = "properties") + private UpdateSummaryProperties innerProperties; /* - * The job ID of the download job in progress. + * Metadata pertaining to creation and last modification of UpdateSummary */ - @JsonProperty(value = "properties.inProgressDownloadJobId", access = JsonProperty.Access.WRITE_ONLY) - private String inProgressDownloadJobId; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * The job ID of the install job in progress. - */ - @JsonProperty(value = "properties.inProgressInstallJobId", access = JsonProperty.Access.WRITE_ONLY) - private String inProgressInstallJobId; - - /* - * The time when the currently running download (if any) started. - */ - @JsonProperty(value = "properties.inProgressDownloadJobStartedDateTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime inProgressDownloadJobStartedDateTime; - - /* - * The time when the currently running install (if any) started. - */ - @JsonProperty(value = "properties.inProgressInstallJobStartedDateTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime inProgressInstallJobStartedDateTime; + /** Creates an instance of UpdateSummaryInner class. */ + public UpdateSummaryInner() { + } - /* - * The list of updates available for install. + /** + * Get the innerProperties property: The device update information summary. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.updateTitles", access = JsonProperty.Access.WRITE_ONLY) - private List updateTitles; + private UpdateSummaryProperties innerProperties() { + return this.innerProperties; + } - /* - * The total size of updates available for download in bytes. + /** + * Get the systemData property: Metadata pertaining to creation and last modification of UpdateSummary. + * + * @return the systemData value. */ - @JsonProperty(value = "properties.totalUpdateSizeInBytes", access = JsonProperty.Access.WRITE_ONLY) - private Double totalUpdateSizeInBytes; + public SystemData systemData() { + return this.systemData; + } /** * Get the deviceVersionNumber property: The current version of the device in format: 1.2.17312.13.",. @@ -134,7 +58,7 @@ public class UpdateSummaryInner extends ArmBaseModel { * @return the deviceVersionNumber value. */ public String deviceVersionNumber() { - return this.deviceVersionNumber; + return this.innerProperties() == null ? null : this.innerProperties().deviceVersionNumber(); } /** @@ -144,7 +68,10 @@ public String deviceVersionNumber() { * @return the UpdateSummaryInner object itself. */ public UpdateSummaryInner withDeviceVersionNumber(String deviceVersionNumber) { - this.deviceVersionNumber = deviceVersionNumber; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummaryProperties(); + } + this.innerProperties().withDeviceVersionNumber(deviceVersionNumber); return this; } @@ -154,7 +81,7 @@ public UpdateSummaryInner withDeviceVersionNumber(String deviceVersionNumber) { * @return the friendlyDeviceVersionName value. */ public String friendlyDeviceVersionName() { - return this.friendlyDeviceVersionName; + return this.innerProperties() == null ? null : this.innerProperties().friendlyDeviceVersionName(); } /** @@ -164,7 +91,10 @@ public String friendlyDeviceVersionName() { * @return the UpdateSummaryInner object itself. */ public UpdateSummaryInner withFriendlyDeviceVersionName(String friendlyDeviceVersionName) { - this.friendlyDeviceVersionName = friendlyDeviceVersionName; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummaryProperties(); + } + this.innerProperties().withFriendlyDeviceVersionName(friendlyDeviceVersionName); return this; } @@ -174,7 +104,7 @@ public UpdateSummaryInner withFriendlyDeviceVersionName(String friendlyDeviceVer * @return the deviceLastScannedDateTime value. */ public OffsetDateTime deviceLastScannedDateTime() { - return this.deviceLastScannedDateTime; + return this.innerProperties() == null ? null : this.innerProperties().deviceLastScannedDateTime(); } /** @@ -184,7 +114,10 @@ public OffsetDateTime deviceLastScannedDateTime() { * @return the UpdateSummaryInner object itself. */ public UpdateSummaryInner withDeviceLastScannedDateTime(OffsetDateTime deviceLastScannedDateTime) { - this.deviceLastScannedDateTime = deviceLastScannedDateTime; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummaryProperties(); + } + this.innerProperties().withDeviceLastScannedDateTime(deviceLastScannedDateTime); return this; } @@ -195,7 +128,7 @@ public UpdateSummaryInner withDeviceLastScannedDateTime(OffsetDateTime deviceLas * @return the lastCompletedScanJobDateTime value. */ public OffsetDateTime lastCompletedScanJobDateTime() { - return this.lastCompletedScanJobDateTime; + return this.innerProperties() == null ? null : this.innerProperties().lastCompletedScanJobDateTime(); } /** @@ -206,7 +139,33 @@ public OffsetDateTime lastCompletedScanJobDateTime() { * @return the UpdateSummaryInner object itself. */ public UpdateSummaryInner withLastCompletedScanJobDateTime(OffsetDateTime lastCompletedScanJobDateTime) { - this.lastCompletedScanJobDateTime = lastCompletedScanJobDateTime; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummaryProperties(); + } + this.innerProperties().withLastCompletedScanJobDateTime(lastCompletedScanJobDateTime); + return this; + } + + /** + * Get the lastSuccessfulScanJobTime property: Time when the last scan job is successfully completed. + * + * @return the lastSuccessfulScanJobTime value. + */ + public OffsetDateTime lastSuccessfulScanJobTime() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummaryProperties(); + } + this.innerProperties().withLastSuccessfulScanJobTime(lastSuccessfulScanJobTime); return this; } @@ -217,7 +176,51 @@ public UpdateSummaryInner withLastCompletedScanJobDateTime(OffsetDateTime lastCo * @return the lastCompletedDownloadJobDateTime value. */ public OffsetDateTime lastCompletedDownloadJobDateTime() { - return this.lastCompletedDownloadJobDateTime; + return this.innerProperties() == null ? null : this.innerProperties().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.innerProperties() == null ? null : this.innerProperties().lastCompletedDownloadJobId(); + } + + /** + * Get the lastDownloadJobStatus property: JobStatus of the last ran download job. + * + * @return the lastDownloadJobStatus value. + */ + public JobStatus lastDownloadJobStatus() { + return this.innerProperties() == null ? null : this.innerProperties().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.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummaryProperties(); + } + this.innerProperties().withLastSuccessfulInstallJobDateTime(lastSuccessfulInstallJobDateTime); + return this; } /** @@ -227,7 +230,25 @@ public OffsetDateTime lastCompletedDownloadJobDateTime() { * @return the lastCompletedInstallJobDateTime value. */ public OffsetDateTime lastCompletedInstallJobDateTime() { - return this.lastCompletedInstallJobDateTime; + return this.innerProperties() == null ? null : this.innerProperties().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.innerProperties() == null ? null : this.innerProperties().lastCompletedInstallJobId(); + } + + /** + * Get the lastInstallJobStatus property: JobStatus of the last ran install job. + * + * @return the lastInstallJobStatus value. + */ + public JobStatus lastInstallJobStatus() { + return this.innerProperties() == null ? null : this.innerProperties().lastInstallJobStatus(); } /** @@ -237,7 +258,7 @@ public OffsetDateTime lastCompletedInstallJobDateTime() { * @return the totalNumberOfUpdatesAvailable value. */ public Integer totalNumberOfUpdatesAvailable() { - return this.totalNumberOfUpdatesAvailable; + return this.innerProperties() == null ? null : this.innerProperties().totalNumberOfUpdatesAvailable(); } /** @@ -246,7 +267,7 @@ public Integer totalNumberOfUpdatesAvailable() { * @return the totalNumberOfUpdatesPendingDownload value. */ public Integer totalNumberOfUpdatesPendingDownload() { - return this.totalNumberOfUpdatesPendingDownload; + return this.innerProperties() == null ? null : this.innerProperties().totalNumberOfUpdatesPendingDownload(); } /** @@ -255,7 +276,7 @@ public Integer totalNumberOfUpdatesPendingDownload() { * @return the totalNumberOfUpdatesPendingInstall value. */ public Integer totalNumberOfUpdatesPendingInstall() { - return this.totalNumberOfUpdatesPendingInstall; + return this.innerProperties() == null ? null : this.innerProperties().totalNumberOfUpdatesPendingInstall(); } /** @@ -265,7 +286,7 @@ public Integer totalNumberOfUpdatesPendingInstall() { * @return the rebootBehavior value. */ public InstallRebootBehavior rebootBehavior() { - return this.rebootBehavior; + return this.innerProperties() == null ? null : this.innerProperties().rebootBehavior(); } /** @@ -274,7 +295,7 @@ public InstallRebootBehavior rebootBehavior() { * @return the ongoingUpdateOperation value. */ public UpdateOperation ongoingUpdateOperation() { - return this.ongoingUpdateOperation; + return this.innerProperties() == null ? null : this.innerProperties().ongoingUpdateOperation(); } /** @@ -283,7 +304,7 @@ public UpdateOperation ongoingUpdateOperation() { * @return the inProgressDownloadJobId value. */ public String inProgressDownloadJobId() { - return this.inProgressDownloadJobId; + return this.innerProperties() == null ? null : this.innerProperties().inProgressDownloadJobId(); } /** @@ -292,7 +313,7 @@ public String inProgressDownloadJobId() { * @return the inProgressInstallJobId value. */ public String inProgressInstallJobId() { - return this.inProgressInstallJobId; + return this.innerProperties() == null ? null : this.innerProperties().inProgressInstallJobId(); } /** @@ -302,7 +323,7 @@ public String inProgressInstallJobId() { * @return the inProgressDownloadJobStartedDateTime value. */ public OffsetDateTime inProgressDownloadJobStartedDateTime() { - return this.inProgressDownloadJobStartedDateTime; + return this.innerProperties() == null ? null : this.innerProperties().inProgressDownloadJobStartedDateTime(); } /** @@ -312,7 +333,7 @@ public OffsetDateTime inProgressDownloadJobStartedDateTime() { * @return the inProgressInstallJobStartedDateTime value. */ public OffsetDateTime inProgressInstallJobStartedDateTime() { - return this.inProgressInstallJobStartedDateTime; + return this.innerProperties() == null ? null : this.innerProperties().inProgressInstallJobStartedDateTime(); } /** @@ -321,7 +342,16 @@ public OffsetDateTime inProgressInstallJobStartedDateTime() { * @return the updateTitles value. */ public List updateTitles() { - return this.updateTitles; + return this.innerProperties() == null ? null : this.innerProperties().updateTitles(); + } + + /** + * Get the updates property: The list of updates available for install. + * + * @return the updates value. + */ + public List updates() { + return this.innerProperties() == null ? null : this.innerProperties().updates(); } /** @@ -330,7 +360,16 @@ public List updateTitles() { * @return the totalUpdateSizeInBytes value. */ public Double totalUpdateSizeInBytes() { - return this.totalUpdateSizeInBytes; + return this.innerProperties() == null ? null : this.innerProperties().totalUpdateSizeInBytes(); + } + + /** + * Get the totalTimeInMinutes property: The total time in Minutes. + * + * @return the totalTimeInMinutes value. + */ + public Integer totalTimeInMinutes() { + return this.innerProperties() == null ? null : this.innerProperties().totalTimeInMinutes(); } /** @@ -341,5 +380,8 @@ public Double totalUpdateSizeInBytes() { @Override public void validate() { super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UpdateSummaryProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UpdateSummaryProperties.java new file mode 100644 index 000000000000..60edbf453281 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UpdateSummaryProperties.java @@ -0,0 +1,486 @@ +// 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.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.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The device update information summary. */ +@Fluent +public final class UpdateSummaryProperties { + /* + * The current version of the device in format: 1.2.17312.13.", + */ + @JsonProperty(value = "deviceVersionNumber") + private String deviceVersionNumber; + + /* + * The current version of the device in text format. + */ + @JsonProperty(value = "friendlyDeviceVersionName") + private String friendlyDeviceVersionName; + + /* + * The last time when a scan was done on the device. + */ + @JsonProperty(value = "deviceLastScannedDateTime") + private OffsetDateTime deviceLastScannedDateTime; + + /* + * The time when the last scan job was completed (success/cancelled/failed) on the appliance. + */ + @JsonProperty(value = "lastCompletedScanJobDateTime") + private OffsetDateTime lastCompletedScanJobDateTime; + + /* + * Time when the last scan job is successfully completed. + */ + @JsonProperty(value = "lastSuccessfulScanJobTime") + private OffsetDateTime lastSuccessfulScanJobTime; + + /* + * The time when the last Download job was completed (success/cancelled/failed) on the appliance. + */ + @JsonProperty(value = "lastCompletedDownloadJobDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastCompletedDownloadJobDateTime; + + /* + * JobId of the last ran download job.(Can be success/cancelled/failed) + */ + @JsonProperty(value = "lastCompletedDownloadJobId", access = JsonProperty.Access.WRITE_ONLY) + private String lastCompletedDownloadJobId; + + /* + * JobStatus of the last ran download job. + */ + @JsonProperty(value = "lastDownloadJobStatus", access = JsonProperty.Access.WRITE_ONLY) + private JobStatus lastDownloadJobStatus; + + /* + * The time when the Last Install job was completed successfully on the appliance + */ + @JsonProperty(value = "lastSuccessfulInstallJobDateTime") + private OffsetDateTime lastSuccessfulInstallJobDateTime; + + /* + * The time when the last Install job was completed (success/cancelled/failed) on the appliance. + */ + @JsonProperty(value = "lastCompletedInstallJobDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastCompletedInstallJobDateTime; + + /* + * JobId of the last ran install job.(Can be success/cancelled/failed) + */ + @JsonProperty(value = "lastCompletedInstallJobId", access = JsonProperty.Access.WRITE_ONLY) + private String lastCompletedInstallJobId; + + /* + * JobStatus of the last ran install job. + */ + @JsonProperty(value = "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. + */ + @JsonProperty(value = "totalNumberOfUpdatesAvailable", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalNumberOfUpdatesAvailable; + + /* + * The total number of items pending download. + */ + @JsonProperty(value = "totalNumberOfUpdatesPendingDownload", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalNumberOfUpdatesPendingDownload; + + /* + * The total number of items pending install. + */ + @JsonProperty(value = "totalNumberOfUpdatesPendingInstall", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalNumberOfUpdatesPendingInstall; + + /* + * Indicates if updates are available and at least one of the updates needs a reboot. + */ + @JsonProperty(value = "rebootBehavior", access = JsonProperty.Access.WRITE_ONLY) + private InstallRebootBehavior rebootBehavior; + + /* + * The current update operation. + */ + @JsonProperty(value = "ongoingUpdateOperation", access = JsonProperty.Access.WRITE_ONLY) + private UpdateOperation ongoingUpdateOperation; + + /* + * The job ID of the download job in progress. + */ + @JsonProperty(value = "inProgressDownloadJobId", access = JsonProperty.Access.WRITE_ONLY) + private String inProgressDownloadJobId; + + /* + * The job ID of the install job in progress. + */ + @JsonProperty(value = "inProgressInstallJobId", access = JsonProperty.Access.WRITE_ONLY) + private String inProgressInstallJobId; + + /* + * The time when the currently running download (if any) started. + */ + @JsonProperty(value = "inProgressDownloadJobStartedDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime inProgressDownloadJobStartedDateTime; + + /* + * The time when the currently running install (if any) started. + */ + @JsonProperty(value = "inProgressInstallJobStartedDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime inProgressInstallJobStartedDateTime; + + /* + * The list of updates available for install. + */ + @JsonProperty(value = "updateTitles", access = JsonProperty.Access.WRITE_ONLY) + private List updateTitles; + + /* + * The list of updates available for install. + */ + @JsonProperty(value = "updates", access = JsonProperty.Access.WRITE_ONLY) + private List updates; + + /* + * The total size of updates available for download in bytes. + */ + @JsonProperty(value = "totalUpdateSizeInBytes", access = JsonProperty.Access.WRITE_ONLY) + private Double totalUpdateSizeInBytes; + + /* + * The total time in Minutes + */ + @JsonProperty(value = "totalTimeInMinutes", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalTimeInMinutes; + + /** Creates an instance of UpdateSummaryProperties class. */ + public UpdateSummaryProperties() { + } + + /** + * Get the deviceVersionNumber property: The current version of the device in format: 1.2.17312.13.",. + * + * @return the deviceVersionNumber value. + */ + public String deviceVersionNumber() { + return this.deviceVersionNumber; + } + + /** + * Set the deviceVersionNumber property: The current version of the device in format: 1.2.17312.13.",. + * + * @param deviceVersionNumber the deviceVersionNumber value to set. + * @return the UpdateSummaryProperties object itself. + */ + public UpdateSummaryProperties withDeviceVersionNumber(String deviceVersionNumber) { + this.deviceVersionNumber = deviceVersionNumber; + return this; + } + + /** + * Get the friendlyDeviceVersionName property: The current version of the device in text format. + * + * @return the friendlyDeviceVersionName value. + */ + public String friendlyDeviceVersionName() { + return this.friendlyDeviceVersionName; + } + + /** + * Set the friendlyDeviceVersionName property: The current version of the device in text format. + * + * @param friendlyDeviceVersionName the friendlyDeviceVersionName value to set. + * @return the UpdateSummaryProperties object itself. + */ + public UpdateSummaryProperties withFriendlyDeviceVersionName(String friendlyDeviceVersionName) { + this.friendlyDeviceVersionName = friendlyDeviceVersionName; + return this; + } + + /** + * Get the deviceLastScannedDateTime property: The last time when a scan was done on the device. + * + * @return the deviceLastScannedDateTime value. + */ + public OffsetDateTime deviceLastScannedDateTime() { + return this.deviceLastScannedDateTime; + } + + /** + * Set the deviceLastScannedDateTime property: The last time when a scan was done on the device. + * + * @param deviceLastScannedDateTime the deviceLastScannedDateTime value to set. + * @return the UpdateSummaryProperties object itself. + */ + public UpdateSummaryProperties withDeviceLastScannedDateTime(OffsetDateTime deviceLastScannedDateTime) { + this.deviceLastScannedDateTime = deviceLastScannedDateTime; + return this; + } + + /** + * Get the lastCompletedScanJobDateTime property: The time when the last scan job was completed + * (success/cancelled/failed) on the appliance. + * + * @return the lastCompletedScanJobDateTime value. + */ + public OffsetDateTime lastCompletedScanJobDateTime() { + return this.lastCompletedScanJobDateTime; + } + + /** + * Set the lastCompletedScanJobDateTime property: The time when the last scan job was completed + * (success/cancelled/failed) on the appliance. + * + * @param lastCompletedScanJobDateTime the lastCompletedScanJobDateTime value to set. + * @return the UpdateSummaryProperties object itself. + */ + public UpdateSummaryProperties withLastCompletedScanJobDateTime(OffsetDateTime lastCompletedScanJobDateTime) { + this.lastCompletedScanJobDateTime = lastCompletedScanJobDateTime; + 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 UpdateSummaryProperties object itself. + */ + public UpdateSummaryProperties 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. + * + * @return the lastCompletedDownloadJobDateTime value. + */ + 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 UpdateSummaryProperties object itself. + */ + public UpdateSummaryProperties 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. + * + * @return the lastCompletedInstallJobDateTime value. + */ + 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. + * + * @return the totalNumberOfUpdatesAvailable value. + */ + public Integer totalNumberOfUpdatesAvailable() { + return this.totalNumberOfUpdatesAvailable; + } + + /** + * Get the totalNumberOfUpdatesPendingDownload property: The total number of items pending download. + * + * @return the totalNumberOfUpdatesPendingDownload value. + */ + public Integer totalNumberOfUpdatesPendingDownload() { + return this.totalNumberOfUpdatesPendingDownload; + } + + /** + * Get the totalNumberOfUpdatesPendingInstall property: The total number of items pending install. + * + * @return the totalNumberOfUpdatesPendingInstall value. + */ + public Integer totalNumberOfUpdatesPendingInstall() { + return this.totalNumberOfUpdatesPendingInstall; + } + + /** + * 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; + } + + /** + * Get the ongoingUpdateOperation property: The current update operation. + * + * @return the ongoingUpdateOperation value. + */ + public UpdateOperation ongoingUpdateOperation() { + return this.ongoingUpdateOperation; + } + + /** + * Get the inProgressDownloadJobId property: The job ID of the download job in progress. + * + * @return the inProgressDownloadJobId value. + */ + public String inProgressDownloadJobId() { + return this.inProgressDownloadJobId; + } + + /** + * Get the inProgressInstallJobId property: The job ID of the install job in progress. + * + * @return the inProgressInstallJobId value. + */ + public String inProgressInstallJobId() { + return this.inProgressInstallJobId; + } + + /** + * Get the inProgressDownloadJobStartedDateTime property: The time when the currently running download (if any) + * started. + * + * @return the inProgressDownloadJobStartedDateTime value. + */ + public OffsetDateTime inProgressDownloadJobStartedDateTime() { + return this.inProgressDownloadJobStartedDateTime; + } + + /** + * Get the inProgressInstallJobStartedDateTime property: The time when the currently running install (if any) + * started. + * + * @return the inProgressInstallJobStartedDateTime value. + */ + public OffsetDateTime inProgressInstallJobStartedDateTime() { + return this.inProgressInstallJobStartedDateTime; + } + + /** + * Get the updateTitles property: The list of updates available for install. + * + * @return the updateTitles value. + */ + 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. + * + * @return the totalUpdateSizeInBytes value. + */ + 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. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void 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/UploadCertificateResponseInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UploadCertificateResponseInner.java index fb10dfc34f1d..7e09c2fd3b2b 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UploadCertificateResponseInner.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UploadCertificateResponseInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.databoxedge.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.models.AuthenticationType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The upload registration certificate response. */ @Fluent public final class UploadCertificateResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UploadCertificateResponseInner.class); - /* * Specifies authentication type. */ @@ -58,12 +54,15 @@ public final class UploadCertificateResponseInner { private String azureManagementEndpointAudience; /* - * Identifier of the target resource that is the recipient of the requested - * token. + * Identifier of the target resource that is the recipient of the requested token. */ @JsonProperty(value = "aadAudience", access = JsonProperty.Access.WRITE_ONLY) private String aadAudience; + /** Creates an instance of UploadCertificateResponseInner class. */ + public UploadCertificateResponseInner() { + } + /** * Get the authType property: Specifies authentication type. * 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 13a4f25dbe37..c38f72f1a525 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 @@ -5,40 +5,51 @@ 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.AsymmetricEncryptedSecret; import com.azure.resourcemanager.databoxedge.models.ShareAccessRight; import com.azure.resourcemanager.databoxedge.models.UserType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Represents a user who has access to one or more shares on the Data Box Edge/Gateway device. */ -@JsonFlatten @Fluent -public class UserInner extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserInner.class); - +public final class UserInner extends ArmBaseModel { /* - * The password details. + * The storage account credential properties. */ - @JsonProperty(value = "properties.encryptedPassword") - private AsymmetricEncryptedSecret encryptedPassword; + @JsonProperty(value = "properties", required = true) + private UserProperties innerProperties = new UserProperties(); /* - * List of shares that the user has rights on. This field should not be - * specified during user creation. + * Metadata pertaining to creation and last modification of User */ - @JsonProperty(value = "properties.shareAccessRights") - private List shareAccessRights; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * Type of the user. + /** Creates an instance of UserInner class. */ + public UserInner() { + } + + /** + * Get the innerProperties property: The storage account credential properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.userType", required = true) - private UserType userType; + private UserProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of User. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } /** * Get the encryptedPassword property: The password details. @@ -46,7 +57,7 @@ public class UserInner extends ArmBaseModel { * @return the encryptedPassword value. */ public AsymmetricEncryptedSecret encryptedPassword() { - return this.encryptedPassword; + return this.innerProperties() == null ? null : this.innerProperties().encryptedPassword(); } /** @@ -56,7 +67,10 @@ public AsymmetricEncryptedSecret encryptedPassword() { * @return the UserInner object itself. */ public UserInner withEncryptedPassword(AsymmetricEncryptedSecret encryptedPassword) { - this.encryptedPassword = encryptedPassword; + if (this.innerProperties() == null) { + this.innerProperties = new UserProperties(); + } + this.innerProperties().withEncryptedPassword(encryptedPassword); return this; } @@ -67,19 +81,7 @@ public UserInner withEncryptedPassword(AsymmetricEncryptedSecret encryptedPasswo * @return the shareAccessRights value. */ 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; + return this.innerProperties() == null ? null : this.innerProperties().shareAccessRights(); } /** @@ -88,7 +90,7 @@ public UserInner withShareAccessRights(List shareAccessRights) * @return the userType value. */ public UserType userType() { - return this.userType; + return this.innerProperties() == null ? null : this.innerProperties().userType(); } /** @@ -98,7 +100,10 @@ public UserType userType() { * @return the UserInner object itself. */ public UserInner withUserType(UserType userType) { - this.userType = userType; + if (this.innerProperties() == null) { + this.innerProperties = new UserProperties(); + } + this.innerProperties().withUserType(userType); return this; } @@ -110,16 +115,14 @@ public UserInner withUserType(UserType userType) { @Override public void validate() { super.validate(); - if (encryptedPassword() != null) { - encryptedPassword().validate(); - } - if (shareAccessRights() != null) { - shareAccessRights().forEach(e -> e.validate()); - } - if (userType() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property userType in model UserInner")); + new IllegalArgumentException("Missing required property innerProperties in model UserInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(UserInner.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UserProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UserProperties.java new file mode 100644 index 000000000000..6848bfab405d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UserProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.azure.resourcemanager.databoxedge.models.ShareAccessRight; +import com.azure.resourcemanager.databoxedge.models.UserType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The user properties. */ +@Fluent +public final class UserProperties { + /* + * The password details. + */ + @JsonProperty(value = "encryptedPassword") + private AsymmetricEncryptedSecret encryptedPassword; + + /* + * List of shares that the user has rights on. This field should not be specified during user creation. + */ + @JsonProperty(value = "shareAccessRights", access = JsonProperty.Access.WRITE_ONLY) + private List shareAccessRights; + + /* + * Type of the user. + */ + @JsonProperty(value = "userType", required = true) + private UserType userType; + + /** Creates an instance of UserProperties class. */ + public UserProperties() { + } + + /** + * Get the encryptedPassword property: The password details. + * + * @return the encryptedPassword value. + */ + public AsymmetricEncryptedSecret encryptedPassword() { + return this.encryptedPassword; + } + + /** + * Set the encryptedPassword property: The password details. + * + * @param encryptedPassword the encryptedPassword value to set. + * @return the UserProperties object itself. + */ + public UserProperties withEncryptedPassword(AsymmetricEncryptedSecret encryptedPassword) { + this.encryptedPassword = encryptedPassword; + return this; + } + + /** + * Get the shareAccessRights property: List of shares that the user has rights on. This field should not be + * specified during user creation. + * + * @return the shareAccessRights value. + */ + public List shareAccessRights() { + return this.shareAccessRights; + } + + /** + * Get the userType property: Type of the user. + * + * @return the userType value. + */ + public UserType userType() { + return this.userType; + } + + /** + * Set the userType property: Type of the user. + * + * @param userType the userType value to set. + * @return the UserProperties object itself. + */ + public UserProperties withUserType(UserType userType) { + this.userType = userType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryptedPassword() != null) { + encryptedPassword().validate(); + } + if (shareAccessRights() != null) { + shareAccessRights().forEach(e -> e.validate()); + } + if (userType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property userType in model UserProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UserProperties.class); +} 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 000000000000..afa11163d9ee --- /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 000000000000..cafc90b5f5c3 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonsClientImpl.java @@ -0,0 +1,1184 @@ +// 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.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 { + /** 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") + public 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 along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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 along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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 as paginated response with {@link + * PagedFlux}. + */ + @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 as paginated response with {@link + * PagedFlux}. + */ + @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 as paginated response with {@link + * PagedIterable}. + */ + @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 as paginated response with {@link + * PagedIterable}. + */ + @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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String deviceName, String roleName, String addonName, String resourceGroupName) { + return getWithResponseAsync(deviceName, roleName, addonName, resourceGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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 along with {@link Response}. + */ + @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(); + } + + /** + * 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 getWithResponse(deviceName, roleName, addonName, resourceGroupName, Context.NONE).getValue(); + } + + /** + * 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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 the {@link PollerFlux} for polling of role Addon. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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, this.client.getContext()); + } + + /** + * 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 the {@link PollerFlux} for polling of role Addon. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 the {@link SyncPoller} for polling of role Addon. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 the {@link SyncPoller} for polling of role Addon. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 on successful completion of {@link Mono}. + */ + @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 on successful completion of {@link Mono}. + */ + @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 {@link Response} on successful completion of {@link Mono}. + */ + @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 {@link Response} on successful completion of {@link Mono}. + */ + @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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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, this.client.getContext()); + } + + /** + * 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 A {@link Mono} that completes when a successful response is received. + */ + @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 A {@link Mono} that completes when a successful response is received. + */ + @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 URL to get the next list of items + *

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 along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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 URL to get the next list of items + *

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 along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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 000000000000..87e2017d4398 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonsImpl.java @@ -0,0 +1,109 @@ +// 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; + +public final class AddonsImpl implements Addons { + private static 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 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 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 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 a2a300d70750..5a72fc29ea83 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/AlertsClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AlertsClientImpl.java index 164ab87975d4..6b8a74482c6c 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AlertsClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AlertsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; 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.AlertsClient; import com.azure.resourcemanager.databoxedge.fluent.models.AlertInner; import com.azure.resourcemanager.databoxedge.models.AlertList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in AlertsClient. */ public final class AlertsClientImpl implements AlertsClient { - private final ClientLogger logger = new ClientLogger(AlertsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AlertsService service; @@ -57,7 +54,7 @@ public final class AlertsClientImpl implements AlertsClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface AlertsService { + public interface AlertsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -108,7 +105,8 @@ Mono> listByDataBoxEdgeDeviceNext( * @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 all the alerts for a Data Box Edge/Data Box Gateway device. + * @return all the alerts for a Data Box Edge/Data Box Gateway device along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -166,7 +164,8 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * @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 all the alerts for a Data Box Edge/Data Box Gateway device. + * @return all the alerts for a Data Box Edge/Data Box Gateway device along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -220,7 +219,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * @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 all the alerts for a Data Box Edge/Data Box Gateway device. + * @return all the alerts for a Data Box Edge/Data Box Gateway device as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, String resourceGroupName) { @@ -238,7 +237,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, St * @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 all the alerts for a Data Box Edge/Data Box Gateway device. + * @return all the alerts for a Data Box Edge/Data Box Gateway device as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -256,7 +255,8 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 all the alerts for a Data Box Edge/Data Box Gateway device. + * @return all the alerts for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName) { @@ -272,7 +272,8 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, Stri * @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 all the alerts for a Data Box Edge/Data Box Gateway device. + * @return all the alerts for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice( @@ -289,7 +290,7 @@ public PagedIterable listByDataBoxEdgeDevice( * @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 an alert by name. + * @return an alert by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String deviceName, String name, String resourceGroupName) { @@ -342,7 +343,7 @@ private Mono> getWithResponseAsync(String deviceName, Strin * @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 an alert by name. + * @return an alert by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -392,19 +393,12 @@ private Mono> getWithResponseAsync( * @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 an alert by name. + * @return an alert by name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String deviceName, String name, String resourceGroupName) { return getWithResponseAsync(deviceName, name, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -413,14 +407,16 @@ private Mono getAsync(String deviceName, String name, String resourc * @param deviceName The device name. * @param name The alert 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 an alert by name. + * @return an alert by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AlertInner get(String deviceName, String name, String resourceGroupName) { - return getAsync(deviceName, name, resourceGroupName).block(); + public Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); } /** @@ -429,26 +425,25 @@ public AlertInner get(String deviceName, String name, String resourceGroupName) * @param deviceName The device name. * @param name The alert 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 an alert by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); + public AlertInner get(String deviceName, String name, String resourceGroupName) { + return getWithResponse(deviceName, name, resourceGroupName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 alerts. + * @return collection of alerts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync(String nextLink) { @@ -480,12 +475,13 @@ private Mono> listByDataBoxEdgeDeviceNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 alerts. + * @return collection of alerts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AlertsImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AlertsImpl.java index f7056522d9b2..7557b33051b0 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AlertsImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AlertsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.AlertInner; import com.azure.resourcemanager.databoxedge.models.Alert; import com.azure.resourcemanager.databoxedge.models.Alerts; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AlertsImpl implements Alerts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AlertsImpl.class); private final AlertsClient innerClient; @@ -39,15 +38,6 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, String re return Utils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); } - public Alert get(String deviceName, String name, String resourceGroupName) { - AlertInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); - if (inner != null) { - return new AlertImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context) { Response inner = this.serviceClient().getWithResponse(deviceName, name, resourceGroupName, context); if (inner != null) { @@ -61,6 +51,15 @@ public Response getWithResponse(String deviceName, String name, String re } } + public Alert get(String deviceName, String name, String resourceGroupName) { + AlertInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); + if (inner != null) { + return new AlertImpl(inner, this.manager()); + } else { + return null; + } + } + private AlertsClient serviceClient() { return this.innerClient; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusClientImpl.java new file mode 100644 index 000000000000..1ef1fe5230e4 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusClientImpl.java @@ -0,0 +1,297 @@ +// 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.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.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.util.Context; +import com.azure.core.util.FluxUtil; +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 AvailableSkusClient. */ +public final class AvailableSkusClientImpl implements AvailableSkusClient { + /** The proxy service used to perform REST calls. */ + private final AvailableSkusService service; + + /** The service client containing this operation class. */ + private final DataBoxEdgeManagementClientImpl client; + + /** + * Initializes an instance of AvailableSkusClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AvailableSkusClientImpl(DataBoxEdgeManagementClientImpl client) { + this.service = + RestProxy.create(AvailableSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataBoxEdgeManagementClientAvailableSkus to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataBoxEdgeManagemen") + public interface AvailableSkusService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/availableSkus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @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); + } + + /** + * 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 along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + 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())); + } + + /** + * List all the available Skus and information related to them. + * + * @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 along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all the available Skus and information related to them. + * + * @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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List all the available Skus and information related to them. + * + * @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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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 along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @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 URL to get the next list of items + *

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 along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @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 000000000000..7130a764c9e8 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusImpl.java @@ -0,0 +1,45 @@ +// 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; + +public final class AvailableSkusImpl implements AvailableSkus { + private static 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 b59183a98d06..37fe8d812f08 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(); } @@ -50,6 +55,10 @@ public List days() { } } + public String resourceGroupName() { + return resourceGroupName; + } + public BandwidthScheduleInner innerModel() { return this.innerObject; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthSchedulesClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthSchedulesClientImpl.java index b5b6e2f4466c..e04cebf4dc37 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthSchedulesClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthSchedulesClientImpl.java @@ -29,7 +29,6 @@ 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.BandwidthSchedulesClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in BandwidthSchedulesClient. */ public final class BandwidthSchedulesClientImpl implements BandwidthSchedulesClient { - private final ClientLogger logger = new ClientLogger(BandwidthSchedulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BandwidthSchedulesService service; @@ -66,7 +63,7 @@ public final class BandwidthSchedulesClientImpl implements BandwidthSchedulesCli */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface BandwidthSchedulesService { + public interface BandwidthSchedulesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -150,7 +147,8 @@ Mono> listByDataBoxEdgeDeviceNext( * @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 all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + * @return all the bandwidth schedules for a Data Box Edge/Data Box Gateway device along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -208,7 +206,8 @@ private Mono> listByDataBoxEdgeDeviceSingl * @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 all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + * @return all the bandwidth schedules for a Data Box Edge/Data Box Gateway device along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -262,7 +261,8 @@ private Mono> listByDataBoxEdgeDeviceSingl * @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 all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + * @return all the bandwidth schedules for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -281,7 +281,8 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + * @return all the bandwidth schedules for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -299,7 +300,8 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + * @return all the bandwidth schedules for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName) { @@ -315,7 +317,8 @@ public PagedIterable listByDataBoxEdgeDevice(String devi * @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 all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + * @return all the bandwidth schedules for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice( @@ -332,7 +335,8 @@ public PagedIterable listByDataBoxEdgeDevice( * @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 properties of the specified bandwidth schedule. + * @return the properties of the specified bandwidth schedule along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -386,7 +390,8 @@ private Mono> getWithResponseAsync( * @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 properties of the specified bandwidth schedule. + * @return the properties of the specified bandwidth schedule along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -436,19 +441,12 @@ private Mono> getWithResponseAsync( * @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 properties of the specified bandwidth schedule. + * @return the properties of the specified bandwidth schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String deviceName, String name, String resourceGroupName) { return getWithResponseAsync(deviceName, name, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -457,14 +455,16 @@ private Mono getAsync(String deviceName, String name, St * @param deviceName The device name. * @param name The bandwidth schedule 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 properties of the specified bandwidth schedule. + * @return the properties of the specified bandwidth schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BandwidthScheduleInner get(String deviceName, String name, String resourceGroupName) { - return getAsync(deviceName, name, resourceGroupName).block(); + public Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); } /** @@ -473,16 +473,14 @@ public BandwidthScheduleInner get(String deviceName, String name, String resourc * @param deviceName The device name. * @param name The bandwidth schedule 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 properties of the specified bandwidth schedule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); + public BandwidthScheduleInner get(String deviceName, String name, String resourceGroupName) { + return getWithResponse(deviceName, name, resourceGroupName, Context.NONE).getValue(); } /** @@ -495,7 +493,7 @@ public Response getWithResponse( * @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 bandwidth schedule details. + * @return the bandwidth schedule details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -556,7 +554,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 bandwidth schedule details. + * @return the bandwidth schedule details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -613,9 +611,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 bandwidth schedule details. + * @return the {@link PollerFlux} for polling of the bandwidth schedule details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BandwidthScheduleInner> beginCreateOrUpdateAsync( String deviceName, String name, String resourceGroupName, BandwidthScheduleInner parameters) { Mono>> mono = @@ -627,7 +625,7 @@ private PollerFlux, BandwidthScheduleInner> b this.client.getHttpPipeline(), BandwidthScheduleInner.class, BandwidthScheduleInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -641,9 +639,9 @@ private PollerFlux, BandwidthScheduleInner> b * @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 bandwidth schedule details. + * @return the {@link PollerFlux} for polling of the bandwidth schedule details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BandwidthScheduleInner> beginCreateOrUpdateAsync( String deviceName, String name, String resourceGroupName, BandwidthScheduleInner parameters, Context context) { context = this.client.mergeContext(context); @@ -669,9 +667,9 @@ private PollerFlux, BandwidthScheduleInner> b * @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 bandwidth schedule details. + * @return the {@link SyncPoller} for polling of the bandwidth schedule details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BandwidthScheduleInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, BandwidthScheduleInner parameters) { return beginCreateOrUpdateAsync(deviceName, name, resourceGroupName, parameters).getSyncPoller(); @@ -688,9 +686,9 @@ public SyncPoller, BandwidthScheduleInner> be * @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 bandwidth schedule details. + * @return the {@link SyncPoller} for polling of the bandwidth schedule details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BandwidthScheduleInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, BandwidthScheduleInner parameters, Context context) { return beginCreateOrUpdateAsync(deviceName, name, resourceGroupName, parameters, context).getSyncPoller(); @@ -706,7 +704,7 @@ public SyncPoller, BandwidthScheduleInner> be * @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 bandwidth schedule details. + * @return the bandwidth schedule details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -727,7 +725,7 @@ private Mono createOrUpdateAsync( * @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 bandwidth schedule details. + * @return the bandwidth schedule details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -783,7 +781,7 @@ public BandwidthScheduleInner createOrUpdate( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -837,7 +835,7 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -887,15 +885,16 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName) { Mono>> mono = deleteWithResponseAsync(deviceName, name, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -908,9 +907,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -929,9 +928,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName) { return beginDeleteAsync(deviceName, name, resourceGroupName).getSyncPoller(); } @@ -946,9 +945,9 @@ public SyncPoller, Void> beginDelete(String deviceName, String * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String deviceName, String name, String resourceGroupName, Context context) { return beginDeleteAsync(deviceName, name, resourceGroupName, context).getSyncPoller(); @@ -963,7 +962,7 @@ public SyncPoller, Void> beginDelete( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName) { @@ -982,7 +981,7 @@ private Mono deleteAsync(String deviceName, String name, String resourceGr * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName, Context context) { @@ -1025,11 +1024,13 @@ public void delete(String deviceName, String name, String resourceGroupName, Con /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the collection of bandwidth schedules. + * @return the collection of bandwidth schedules along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync(String nextLink) { @@ -1061,12 +1062,14 @@ private Mono> listByDataBoxEdgeDeviceNextS /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the collection of bandwidth schedules. + * @return the collection of bandwidth schedules along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthSchedulesImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthSchedulesImpl.java index 38ff9d5efed1..fa29d7de6402 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthSchedulesImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/BandwidthSchedulesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.BandwidthScheduleInner; import com.azure.resourcemanager.databoxedge.models.BandwidthSchedule; import com.azure.resourcemanager.databoxedge.models.BandwidthSchedules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BandwidthSchedulesImpl implements BandwidthSchedules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BandwidthSchedulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BandwidthSchedulesImpl.class); private final BandwidthSchedulesClient innerClient; @@ -41,15 +40,6 @@ public PagedIterable listByDataBoxEdgeDevice( return Utils.mapPage(inner, inner1 -> new BandwidthScheduleImpl(inner1, this.manager())); } - public BandwidthSchedule get(String deviceName, String name, String resourceGroupName) { - BandwidthScheduleInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); - if (inner != null) { - return new BandwidthScheduleImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String deviceName, String name, String resourceGroupName, Context context) { Response inner = @@ -65,6 +55,15 @@ public Response getWithResponse( } } + public BandwidthSchedule get(String deviceName, String name, String resourceGroupName) { + BandwidthScheduleInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); + if (inner != null) { + return new BandwidthScheduleImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String deviceName, String name, String resourceGroupName) { this.serviceClient().delete(deviceName, name, resourceGroupName); } @@ -76,7 +75,7 @@ public void delete(String deviceName, String name, String resourceGroupName, Con public BandwidthSchedule getById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -85,7 +84,7 @@ public BandwidthSchedule getById(String id) { } String name = Utils.getValueFromIdByName(id, "bandwidthSchedules"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -94,7 +93,7 @@ public BandwidthSchedule getById(String id) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -106,7 +105,7 @@ public BandwidthSchedule getById(String id) { public Response getByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -115,7 +114,7 @@ public Response getByIdWithResponse(String id, Context contex } String name = Utils.getValueFromIdByName(id, "bandwidthSchedules"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -124,7 +123,7 @@ public Response getByIdWithResponse(String id, Context contex } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -136,7 +135,7 @@ public Response getByIdWithResponse(String id, Context contex public void deleteById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -145,7 +144,7 @@ public void deleteById(String id) { } String name = Utils.getValueFromIdByName(id, "bandwidthSchedules"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -154,7 +153,7 @@ public void deleteById(String id) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -166,7 +165,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -175,7 +174,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String name = Utils.getValueFromIdByName(id, "bandwidthSchedules"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -184,7 +183,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 62a6d67316a5..cee791508a73 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(); } @@ -45,6 +50,10 @@ public OffsetDateTime createdDateTime() { return this.innerModel().createdDateTime(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ContainerInner innerModel() { return this.innerObject; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainersClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainersClientImpl.java index e8a58da33395..b428d1b51213 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainersClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainersClientImpl.java @@ -30,7 +30,6 @@ 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.ContainersClient; @@ -42,8 +41,6 @@ /** An instance of this class provides access to all the operations defined in ContainersClient. */ public final class ContainersClientImpl implements ContainersClient { - private final ClientLogger logger = new ClientLogger(ContainersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ContainersService service; @@ -67,7 +64,7 @@ public final class ContainersClientImpl implements ContainersClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface ContainersService { + public interface ContainersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -174,7 +171,8 @@ Mono> listByStorageAccountNext( * @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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByStorageAccountSinglePageAsync( @@ -238,7 +236,8 @@ private Mono> listByStorageAccountSinglePageAsync( * @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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByStorageAccountSinglePageAsync( @@ -298,7 +297,8 @@ private Mono> listByStorageAccountSinglePageAsync( * @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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByStorageAccountAsync( @@ -318,7 +318,8 @@ private PagedFlux listByStorageAccountAsync( * @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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByStorageAccountAsync( @@ -337,7 +338,8 @@ private PagedFlux listByStorageAccountAsync( * @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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByStorageAccount( @@ -355,7 +357,8 @@ public PagedIterable listByStorageAccount( * @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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByStorageAccount( @@ -374,7 +377,7 @@ public PagedIterable listByStorageAccount( * @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 container by name. + * @return a container by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -434,7 +437,7 @@ private Mono> getWithResponseAsync( * @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 container by name. + * @return a container by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -490,20 +493,13 @@ private Mono> getWithResponseAsync( * @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 container by name. + * @return a container by name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String deviceName, String storageAccountName, String containerName, String resourceGroupName) { return getWithResponseAsync(deviceName, storageAccountName, containerName, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -513,15 +509,16 @@ private Mono getAsync( * @param storageAccountName The Storage Account Name. * @param containerName The container 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 container by name. + * @return a container by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerInner get( - String deviceName, String storageAccountName, String containerName, String resourceGroupName) { - return getAsync(deviceName, storageAccountName, containerName, resourceGroupName).block(); + public Response getWithResponse( + String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, storageAccountName, containerName, resourceGroupName, context).block(); } /** @@ -531,16 +528,16 @@ public ContainerInner get( * @param storageAccountName The Storage Account Name. * @param containerName The container 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 container by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, storageAccountName, containerName, resourceGroupName, context).block(); + public ContainerInner get( + String deviceName, String storageAccountName, String containerName, String resourceGroupName) { + return getWithResponse(deviceName, storageAccountName, containerName, resourceGroupName, Context.NONE) + .getValue(); } /** @@ -554,7 +551,8 @@ public Response getWithResponse( * @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 represents a container on the Data Box Edge/Gateway device. + * @return represents a container on the Data Box Edge/Gateway device along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -625,7 +623,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 represents a container on the Data Box Edge/Gateway device. + * @return represents a container on the Data Box Edge/Gateway device along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -693,9 +692,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 represents a container on the Data Box Edge/Gateway device. + * @return the {@link PollerFlux} for polling of represents a container on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ContainerInner> beginCreateOrUpdateAsync( String deviceName, String storageAccountName, @@ -708,7 +707,11 @@ private PollerFlux, ContainerInner> beginCreateOrUpda return this .client .getLroResult( - mono, this.client.getHttpPipeline(), ContainerInner.class, ContainerInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + ContainerInner.class, + ContainerInner.class, + this.client.getContext()); } /** @@ -723,9 +726,9 @@ private PollerFlux, ContainerInner> beginCreateOrUpda * @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 represents a container on the Data Box Edge/Gateway device. + * @return the {@link PollerFlux} for polling of represents a container on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ContainerInner> beginCreateOrUpdateAsync( String deviceName, String storageAccountName, @@ -754,9 +757,9 @@ private PollerFlux, ContainerInner> beginCreateOrUpda * @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 represents a container on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a container on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ContainerInner> beginCreateOrUpdate( String deviceName, String storageAccountName, @@ -779,9 +782,9 @@ public SyncPoller, ContainerInner> beginCreateOrUpdat * @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 represents a container on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a container on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ContainerInner> beginCreateOrUpdate( String deviceName, String storageAccountName, @@ -805,7 +808,7 @@ public SyncPoller, ContainerInner> beginCreateOrUpdat * @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 represents a container on the Data Box Edge/Gateway device. + * @return represents a container on the Data Box Edge/Gateway device on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -831,7 +834,7 @@ private Mono createOrUpdateAsync( * @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 represents a container on the Data Box Edge/Gateway device. + * @return represents a container on the Data Box Edge/Gateway device on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -906,7 +909,7 @@ public ContainerInner createOrUpdate( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -966,7 +969,7 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1022,16 +1025,17 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String storageAccountName, String containerName, String resourceGroupName) { Mono>> mono = deleteWithResponseAsync(deviceName, storageAccountName, containerName, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1045,9 +1049,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -1068,9 +1072,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String deviceName, String storageAccountName, String containerName, String resourceGroupName) { return beginDeleteAsync(deviceName, storageAccountName, containerName, resourceGroupName).getSyncPoller(); @@ -1087,9 +1091,9 @@ public SyncPoller, Void> beginDelete( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context) { return beginDeleteAsync(deviceName, storageAccountName, containerName, resourceGroupName, context) @@ -1106,7 +1110,7 @@ public SyncPoller, Void> beginDelete( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1127,7 +1131,7 @@ private Mono deleteAsync( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1181,7 +1185,7 @@ public void delete( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> refreshWithResponseAsync( @@ -1241,7 +1245,7 @@ private Mono>> refreshWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> refreshWithResponseAsync( @@ -1297,16 +1301,17 @@ private Mono>> refreshWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRefreshAsync( String deviceName, String storageAccountName, String containerName, String resourceGroupName) { Mono>> mono = refreshWithResponseAsync(deviceName, storageAccountName, containerName, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1320,9 +1325,9 @@ private PollerFlux, Void> beginRefreshAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRefreshAsync( String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -1343,9 +1348,9 @@ private PollerFlux, Void> beginRefreshAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRefresh( String deviceName, String storageAccountName, String containerName, String resourceGroupName) { return beginRefreshAsync(deviceName, storageAccountName, containerName, resourceGroupName).getSyncPoller(); @@ -1362,9 +1367,9 @@ public SyncPoller, Void> beginRefresh( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRefresh( String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context) { return beginRefreshAsync(deviceName, storageAccountName, containerName, resourceGroupName, context) @@ -1381,7 +1386,7 @@ public SyncPoller, Void> beginRefresh( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono refreshAsync( @@ -1402,7 +1407,7 @@ private Mono refreshAsync( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono refreshAsync( @@ -1449,11 +1454,13 @@ public void refresh( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByStorageAccountNextSinglePageAsync(String nextLink) { @@ -1485,12 +1492,14 @@ private Mono> listByStorageAccountNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByStorageAccountNextSinglePageAsync( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainersImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainersImpl.java index 07badf7f7f93..9c78e7e275cb 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainersImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainersImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.ContainerInner; import com.azure.resourcemanager.databoxedge.models.Container; import com.azure.resourcemanager.databoxedge.models.Containers; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ContainersImpl implements Containers { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ContainersImpl.class); private final ContainersClient innerClient; @@ -42,16 +41,6 @@ public PagedIterable listByStorageAccount( return Utils.mapPage(inner, inner1 -> new ContainerImpl(inner1, this.manager())); } - public Container get(String deviceName, String storageAccountName, String containerName, String resourceGroupName) { - ContainerInner inner = - this.serviceClient().get(deviceName, storageAccountName, containerName, resourceGroupName); - if (inner != null) { - return new ContainerImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context) { Response inner = @@ -69,6 +58,16 @@ public Response getWithResponse( } } + public Container get(String deviceName, String storageAccountName, String containerName, String resourceGroupName) { + ContainerInner inner = + this.serviceClient().get(deviceName, storageAccountName, containerName, resourceGroupName); + if (inner != null) { + return new ContainerImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String deviceName, String storageAccountName, String containerName, String resourceGroupName) { this.serviceClient().delete(deviceName, storageAccountName, containerName, resourceGroupName); } @@ -90,7 +89,7 @@ public void refresh( public Container getById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -99,7 +98,7 @@ public Container getById(String id) { } String storageAccountName = Utils.getValueFromIdByName(id, "storageAccounts"); if (storageAccountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -107,14 +106,14 @@ public Container getById(String id) { } String containerName = Utils.getValueFromIdByName(id, "containers"); if (containerName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'containers'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -128,7 +127,7 @@ public Container getById(String id) { public Response getByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -137,7 +136,7 @@ public Response getByIdWithResponse(String id, Context context) { } String storageAccountName = Utils.getValueFromIdByName(id, "storageAccounts"); if (storageAccountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -145,14 +144,14 @@ public Response getByIdWithResponse(String id, Context context) { } String containerName = Utils.getValueFromIdByName(id, "containers"); if (containerName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'containers'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -164,7 +163,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -173,7 +172,7 @@ public void deleteById(String id) { } String storageAccountName = Utils.getValueFromIdByName(id, "storageAccounts"); if (storageAccountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -181,14 +180,14 @@ public void deleteById(String id) { } String containerName = Utils.getValueFromIdByName(id, "containers"); if (containerName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'containers'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -200,7 +199,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -209,7 +208,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String storageAccountName = Utils.getValueFromIdByName(id, "storageAccounts"); if (storageAccountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -217,14 +216,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String containerName = Utils.getValueFromIdByName(id, "containers"); if (containerName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'containers'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 000000000000..4f1fe4896297 --- /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 9951f5372aee..9d78e1437ccb 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 @@ -4,8 +4,14 @@ package com.azure.resourcemanager.databoxedge.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceExtendedInfoInner; +import com.azure.resourcemanager.databoxedge.models.ClusterWitnessType; 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; @@ -31,6 +37,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String encryptionKeyThumbprint() { return this.innerModel().encryptionKeyThumbprint(); } @@ -43,6 +53,59 @@ 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 ClusterWitnessType clusterWitnessType() { + return this.innerModel().clusterWitnessType(); + } + + public String fileShareWitnessLocation() { + return this.innerModel().fileShareWitnessLocation(); + } + + public String fileShareWitnessUsername() { + return this.innerModel().fileShareWitnessUsername(); + } + + public String cloudWitnessStorageAccountName() { + return this.innerModel().cloudWitnessStorageAccountName(); + } + + public String cloudWitnessContainerName() { + return this.innerModel().cloudWitnessContainerName(); + } + + public String cloudWitnessStorageEndpoint() { + return this.innerModel().cloudWitnessStorageEndpoint(); + } + 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 0788a103b05c..8513a8bcf305 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()); } @@ -129,6 +166,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public DataBoxEdgeDeviceInner innerModel() { return this.innerObject; } @@ -153,7 +194,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 +204,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,14 +276,22 @@ public void downloadUpdates(Context context) { serviceManager.devices().downloadUpdates(deviceName, resourceGroupName, context); } - public DataBoxEdgeDeviceExtendedInfo getExtendedInformation() { - return serviceManager.devices().getExtendedInformation(deviceName, resourceGroupName); + public Response generateCertificateWithResponse(Context context) { + return serviceManager.devices().generateCertificateWithResponse(deviceName, resourceGroupName, context); + } + + public GenerateCertResponse generateCertificate() { + return serviceManager.devices().generateCertificate(deviceName, resourceGroupName); } public Response getExtendedInformationWithResponse(Context context) { return serviceManager.devices().getExtendedInformationWithResponse(deviceName, resourceGroupName, context); } + public DataBoxEdgeDeviceExtendedInfo getExtendedInformation() { + return serviceManager.devices().getExtendedInformation(deviceName, resourceGroupName); + } + public void installUpdates() { serviceManager.devices().installUpdates(deviceName, resourceGroupName); } @@ -257,8 +308,15 @@ public void scanForUpdates(Context context) { serviceManager.devices().scanForUpdates(deviceName, resourceGroupName, context); } - public UploadCertificateResponse uploadCertificate(UploadCertificateRequest parameters) { - return serviceManager.devices().uploadCertificate(deviceName, resourceGroupName, parameters); + public Response updateExtendedInformationWithResponse( + DataBoxEdgeDeviceExtendedInfoPatch parameters, Context context) { + return serviceManager + .devices() + .updateExtendedInformationWithResponse(deviceName, resourceGroupName, parameters, context); + } + + public DataBoxEdgeDeviceExtendedInfo updateExtendedInformation(DataBoxEdgeDeviceExtendedInfoPatch parameters) { + return serviceManager.devices().updateExtendedInformation(deviceName, resourceGroupName, parameters); } public Response uploadCertificateWithResponse( @@ -268,6 +326,10 @@ public Response uploadCertificateWithResponse( .uploadCertificateWithResponse(deviceName, resourceGroupName, parameters, context); } + public UploadCertificateResponse uploadCertificate(UploadCertificateRequest parameters) { + return serviceManager.devices().uploadCertificate(deviceName, resourceGroupName, parameters); + } + public DataBoxEdgeDeviceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -298,23 +360,23 @@ public DataBoxEdgeDeviceImpl withEtag(String etag) { return this; } - public DataBoxEdgeDeviceImpl withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus) { - this.innerModel().withDataBoxEdgeDeviceStatus(dataBoxEdgeDeviceStatus); - return this; - } - - public DataBoxEdgeDeviceImpl withDescription(String description) { - this.innerModel().withDescription(description); - return this; + public DataBoxEdgeDeviceImpl withIdentity(ResourceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateParameters.withIdentity(identity); + 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/DataBoxEdgeManagementClientBuilder.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeManagementClientBuilder.java index 243dc1659fd7..883a8526a35e 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeManagementClientBuilder.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeManagementClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public DataBoxEdgeManagementClientBuilder environment(AzureEnvironment environme } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the DataBoxEdgeManagementClientBuilder. */ - public DataBoxEdgeManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public DataBoxEdgeManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the DataBoxEdgeManagementClientBuilder. */ - public DataBoxEdgeManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public DataBoxEdgeManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -120,27 +119,26 @@ public DataBoxEdgeManagementClientBuilder serializerAdapter(SerializerAdapter se * @return an instance of DataBoxEdgeManagementClientImpl. */ public DataBoxEdgeManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); DataBoxEdgeManagementClientImpl client = new DataBoxEdgeManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } 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 0bd69b360138..56c9fd90c56b 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 @@ -15,27 +15,34 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; 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.DeviceCapacityChecksClient; +import com.azure.resourcemanager.databoxedge.fluent.DeviceCapacityInfoesClient; 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; @@ -44,15 +51,12 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** Initializes a new instance of the DataBoxEdgeManagementClientImpl type. */ @ServiceClient(builder = DataBoxEdgeManagementClientBuilder.class) public final class DataBoxEdgeManagementClientImpl implements DataBoxEdgeManagementClient { - private final ClientLogger logger = new ClientLogger(DataBoxEdgeManagementClientImpl.class); - /** The subscription ID. */ private final String subscriptionId; @@ -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,42 @@ public BandwidthSchedulesClient getBandwidthSchedules() { return this.bandwidthSchedules; } + /** The DeviceCapacityChecksClient object to access its operations. */ + private final DeviceCapacityChecksClient deviceCapacityChecks; + + /** + * Gets the DeviceCapacityChecksClient object to access its operations. + * + * @return the DeviceCapacityChecksClient object. + */ + public DeviceCapacityChecksClient getDeviceCapacityChecks() { + return this.deviceCapacityChecks; + } + + /** The DeviceCapacityInfoesClient object to access its operations. */ + private final DeviceCapacityInfoesClient deviceCapacityInfoes; + + /** + * Gets the DeviceCapacityInfoesClient object to access its operations. + * + * @return the DeviceCapacityInfoesClient object. + */ + public DeviceCapacityInfoesClient getDeviceCapacityInfoes() { + return this.deviceCapacityInfoes; + } + + /** 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 +285,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 +369,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 +415,29 @@ public SkusClient getSkus() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2019-08-01"; + this.apiVersion = "2022-03-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.deviceCapacityChecks = new DeviceCapacityChecksClientImpl(this); + this.deviceCapacityInfoes = new DeviceCapacityInfoesClientImpl(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); } /** @@ -374,10 +456,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -441,7 +520,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -500,4 +579,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(DataBoxEdgeManagementClientImpl.class); } 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 52a889e6252b..052366788c0b 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/DeviceCapacityChecksClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityChecksClientImpl.java new file mode 100644 index 000000000000..05fb41bf6fb1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityChecksClientImpl.java @@ -0,0 +1,441 @@ +// 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.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.databoxedge.fluent.DeviceCapacityChecksClient; +import com.azure.resourcemanager.databoxedge.models.DeviceCapacityRequestInfo; +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 DeviceCapacityChecksClient. */ +public final class DeviceCapacityChecksClientImpl implements DeviceCapacityChecksClient { + /** The proxy service used to perform REST calls. */ + private final DeviceCapacityChecksService service; + + /** The service client containing this operation class. */ + private final DataBoxEdgeManagementClientImpl client; + + /** + * Initializes an instance of DeviceCapacityChecksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DeviceCapacityChecksClientImpl(DataBoxEdgeManagementClientImpl client) { + this.service = + RestProxy + .create(DeviceCapacityChecksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataBoxEdgeManagementClientDeviceCapacityChecks to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataBoxEdgeManagemen") + public interface DeviceCapacityChecksService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/deviceCapacityCheck") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> checkResourceCreationFeasibility( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("deviceName") String deviceName, + @QueryParam("capacityName") String capacityName, + @BodyParam("application/json") DeviceCapacityRequestInfo deviceCapacityRequestInfo, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param capacityName The capacity 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> checkResourceCreationFeasibilityWithResponseAsync( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (deviceCapacityRequestInfo == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter deviceCapacityRequestInfo is required and cannot be null.")); + } else { + deviceCapacityRequestInfo.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .checkResourceCreationFeasibility( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + deviceName, + capacityName, + deviceCapacityRequestInfo, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param capacityName The capacity 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> checkResourceCreationFeasibilityWithResponseAsync( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } + if (deviceCapacityRequestInfo == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter deviceCapacityRequestInfo is required and cannot be null.")); + } else { + deviceCapacityRequestInfo.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .checkResourceCreationFeasibility( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + deviceName, + capacityName, + deviceCapacityRequestInfo, + accept, + context); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param capacityName The capacity 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginCheckResourceCreationFeasibilityAsync( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName) { + Mono>> mono = + checkResourceCreationFeasibilityWithResponseAsync( + resourceGroupName, deviceName, deviceCapacityRequestInfo, capacityName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginCheckResourceCreationFeasibilityAsync( + String resourceGroupName, String deviceName, DeviceCapacityRequestInfo deviceCapacityRequestInfo) { + final String capacityName = null; + Mono>> mono = + checkResourceCreationFeasibilityWithResponseAsync( + resourceGroupName, deviceName, deviceCapacityRequestInfo, capacityName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param capacityName The capacity 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginCheckResourceCreationFeasibilityAsync( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + checkResourceCreationFeasibilityWithResponseAsync( + resourceGroupName, deviceName, deviceCapacityRequestInfo, capacityName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCheckResourceCreationFeasibility( + String resourceGroupName, String deviceName, DeviceCapacityRequestInfo deviceCapacityRequestInfo) { + final String capacityName = null; + return beginCheckResourceCreationFeasibilityAsync( + resourceGroupName, deviceName, deviceCapacityRequestInfo, capacityName) + .getSyncPoller(); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param capacityName The capacity 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCheckResourceCreationFeasibility( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName, + Context context) { + return beginCheckResourceCreationFeasibilityAsync( + resourceGroupName, deviceName, deviceCapacityRequestInfo, capacityName, context) + .getSyncPoller(); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param capacityName The capacity 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkResourceCreationFeasibilityAsync( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName) { + return beginCheckResourceCreationFeasibilityAsync( + resourceGroupName, deviceName, deviceCapacityRequestInfo, capacityName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkResourceCreationFeasibilityAsync( + String resourceGroupName, String deviceName, DeviceCapacityRequestInfo deviceCapacityRequestInfo) { + final String capacityName = null; + return beginCheckResourceCreationFeasibilityAsync( + resourceGroupName, deviceName, deviceCapacityRequestInfo, capacityName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param capacityName The capacity 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkResourceCreationFeasibilityAsync( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName, + Context context) { + return beginCheckResourceCreationFeasibilityAsync( + resourceGroupName, deviceName, deviceCapacityRequestInfo, capacityName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @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 checkResourceCreationFeasibility( + String resourceGroupName, String deviceName, DeviceCapacityRequestInfo deviceCapacityRequestInfo) { + final String capacityName = null; + checkResourceCreationFeasibilityAsync(resourceGroupName, deviceName, deviceCapacityRequestInfo, capacityName) + .block(); + } + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param capacityName The capacity 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 checkResourceCreationFeasibility( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName, + Context context) { + checkResourceCreationFeasibilityAsync( + resourceGroupName, deviceName, deviceCapacityRequestInfo, capacityName, context) + .block(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityChecksImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityChecksImpl.java new file mode 100644 index 000000000000..390e153db492 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityChecksImpl.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.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.databoxedge.fluent.DeviceCapacityChecksClient; +import com.azure.resourcemanager.databoxedge.models.DeviceCapacityChecks; +import com.azure.resourcemanager.databoxedge.models.DeviceCapacityRequestInfo; + +public final class DeviceCapacityChecksImpl implements DeviceCapacityChecks { + private static final ClientLogger LOGGER = new ClientLogger(DeviceCapacityChecksImpl.class); + + private final DeviceCapacityChecksClient innerClient; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + public DeviceCapacityChecksImpl( + DeviceCapacityChecksClient innerClient, + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void checkResourceCreationFeasibility( + String resourceGroupName, String deviceName, DeviceCapacityRequestInfo deviceCapacityRequestInfo) { + this.serviceClient().checkResourceCreationFeasibility(resourceGroupName, deviceName, deviceCapacityRequestInfo); + } + + public void checkResourceCreationFeasibility( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName, + Context context) { + this + .serviceClient() + .checkResourceCreationFeasibility( + resourceGroupName, deviceName, deviceCapacityRequestInfo, capacityName, context); + } + + private DeviceCapacityChecksClient 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/DeviceCapacityInfoImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityInfoImpl.java new file mode 100644 index 000000000000..36906ca142e2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityInfoImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.databoxedge.fluent.models.DeviceCapacityInfoInner; +import com.azure.resourcemanager.databoxedge.models.ClusterCapacityViewData; +import com.azure.resourcemanager.databoxedge.models.ClusterStorageViewData; +import com.azure.resourcemanager.databoxedge.models.DeviceCapacityInfo; +import com.azure.resourcemanager.databoxedge.models.HostCapacity; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; + +public final class DeviceCapacityInfoImpl implements DeviceCapacityInfo { + private DeviceCapacityInfoInner innerObject; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + DeviceCapacityInfoImpl( + DeviceCapacityInfoInner 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 OffsetDateTime timestamp() { + return this.innerModel().timestamp(); + } + + public ClusterStorageViewData clusterStorageCapacityInfo() { + return this.innerModel().clusterStorageCapacityInfo(); + } + + public ClusterCapacityViewData clusterComputeCapacityInfo() { + return this.innerModel().clusterComputeCapacityInfo(); + } + + public Map nodeCapacityInfos() { + Map inner = this.innerModel().nodeCapacityInfos(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public DeviceCapacityInfoInner 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/SkusClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityInfoesClientImpl.java similarity index 53% 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/DeviceCapacityInfoesClientImpl.java index fab5218a5709..57107ebc7534 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/DeviceCapacityInfoesClientImpl.java @@ -16,72 +16,72 @@ 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.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.DeviceCapacityInfoesClient; +import com.azure.resourcemanager.databoxedge.fluent.models.DeviceCapacityInfoInner; 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 DeviceCapacityInfoesClient. */ +public final class DeviceCapacityInfoesClientImpl implements DeviceCapacityInfoesClient { /** The proxy service used to perform REST calls. */ - private final SkusService service; + private final DeviceCapacityInfoesService service; /** The service client containing this operation class. */ private final DataBoxEdgeManagementClientImpl client; /** - * Initializes an instance of SkusClientImpl. + * Initializes an instance of DeviceCapacityInfoesClientImpl. * * @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()); + DeviceCapacityInfoesClientImpl(DataBoxEdgeManagementClientImpl client) { + this.service = + RestProxy + .create(DeviceCapacityInfoesService.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 DataBoxEdgeManagementClientDeviceCapacityInfoes to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface SkusService { + public interface DeviceCapacityInfoesService { @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/skus") + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" + + "/dataBoxEdgeDevices/{deviceName}/deviceCapacityInfo/default") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> getDeviceCapacityInfo( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, + @PathParam("deviceName") String deviceName, @HeaderParam("Accept") String accept, Context context); } /** - * List all the available Skus in the region and information related to them. + * Gets the properties of the specified device capacity info. * - * @param filter Specify $filter='location eq <location>' to filter on location. + * @param resourceGroupName The resource group name. + * @param deviceName The device 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 list of SKU Information objects. + * @return the properties of the specified device capacity info along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter) { + private Mono> getDeviceCapacityInfoWithResponseAsync( + String resourceGroupName, String deviceName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -94,37 +94,44 @@ private Mono> listSinglePageAsync(String fil 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 (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .list( + .getDeviceCapacityInfo( this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), - filter, + deviceName, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the available Skus in the region and information related to them. + * Gets the properties of the specified device capacity info. * - * @param filter Specify $filter='location eq <location>' to filter on location. + * @param resourceGroupName The resource group name. + * @param deviceName The device 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 list of SKU Information objects. + * @return the properties of the specified device capacity info along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Context context) { + private Mono> getDeviceCapacityInfoWithResponseAsync( + String resourceGroupName, String deviceName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -137,89 +144,71 @@ private Mono> listSinglePageAsync(String fil 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 (deviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( + .getDeviceCapacityInfo( this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), - filter, + deviceName, accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + context); } /** - * List all the available Skus in the region and information related to them. + * Gets the properties of the specified device capacity info. * - * @param filter Specify $filter='location eq <location>' to filter on location. + * @param resourceGroupName The resource group name. + * @param deviceName The device 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 list of SKU Information objects. + * @return the properties of the specified device capacity info on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(filter)); - } - - /** - * List all the available Skus in the region 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)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeviceCapacityInfoAsync(String resourceGroupName, String deviceName) { + return getDeviceCapacityInfoWithResponseAsync(resourceGroupName, deviceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List all the available Skus in the region and information related to them. + * Gets the properties of the specified device capacity info. * - * @param filter Specify $filter='location eq <location>' to filter on location. + * @param resourceGroupName The resource group name. + * @param deviceName The device 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 list of SKU Information objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, context)); - } - - /** - * List all the available Skus in the region 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. + * @return the properties of the specified device capacity info along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String filter = null; - return new PagedIterable<>(listAsync(filter)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceCapacityInfoWithResponse( + String resourceGroupName, String deviceName, Context context) { + return getDeviceCapacityInfoWithResponseAsync(resourceGroupName, deviceName, context).block(); } /** - * List all the available Skus in the region and information related to them. + * Gets the properties of the specified device capacity info. * - * @param filter Specify $filter='location eq <location>' to filter on location. - * @param context The context to associate with this operation. + * @param resourceGroupName The resource group name. + * @param deviceName The device 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 list of SKU Information objects. + * @return the properties of the specified device capacity info. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Context context) { - return new PagedIterable<>(listAsync(filter, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DeviceCapacityInfoInner getDeviceCapacityInfo(String resourceGroupName, String deviceName) { + return getDeviceCapacityInfoWithResponse(resourceGroupName, deviceName, Context.NONE).getValue(); } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityInfoesImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityInfoesImpl.java new file mode 100644 index 000000000000..d6ad86bff10f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityInfoesImpl.java @@ -0,0 +1,61 @@ +// 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.DeviceCapacityInfoesClient; +import com.azure.resourcemanager.databoxedge.fluent.models.DeviceCapacityInfoInner; +import com.azure.resourcemanager.databoxedge.models.DeviceCapacityInfo; +import com.azure.resourcemanager.databoxedge.models.DeviceCapacityInfoes; + +public final class DeviceCapacityInfoesImpl implements DeviceCapacityInfoes { + private static final ClientLogger LOGGER = new ClientLogger(DeviceCapacityInfoesImpl.class); + + private final DeviceCapacityInfoesClient innerClient; + + private final com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager; + + public DeviceCapacityInfoesImpl( + DeviceCapacityInfoesClient innerClient, + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getDeviceCapacityInfoWithResponse( + String resourceGroupName, String deviceName, Context context) { + Response inner = + this.serviceClient().getDeviceCapacityInfoWithResponse(resourceGroupName, deviceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeviceCapacityInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeviceCapacityInfo getDeviceCapacityInfo(String resourceGroupName, String deviceName) { + DeviceCapacityInfoInner inner = this.serviceClient().getDeviceCapacityInfo(resourceGroupName, deviceName); + if (inner != null) { + return new DeviceCapacityInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + private DeviceCapacityInfoesClient 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/DevicesClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DevicesClientImpl.java index e5634b63af14..30f48f8530e6 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 @@ -31,15 +31,16 @@ 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.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; @@ -50,8 +51,6 @@ /** An instance of this class provides access to all the operations defined in DevicesClient. */ public final class DevicesClientImpl implements DevicesClient { - private final ClientLogger logger = new ClientLogger(DevicesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DevicesService service; @@ -74,7 +73,7 @@ public final class DevicesClientImpl implements DevicesClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface DevicesService { + public interface DevicesService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices") @ExpectedResponses({200}) @@ -123,7 +122,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 +178,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 +269,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" @@ -315,7 +345,8 @@ Mono> listByResourceGroupNext( * @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 all the Data Box Edge/Data Box Gateway devices in a subscription. + * @return all the Data Box Edge/Data Box Gateway devices in a subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String expand) { @@ -364,7 +395,8 @@ private Mono> listSinglePageAsync(String e * @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 all the Data Box Edge/Data Box Gateway devices in a subscription. + * @return all the Data Box Edge/Data Box Gateway devices in a subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String expand, Context context) { @@ -409,7 +441,8 @@ private Mono> listSinglePageAsync(String e * @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 all the Data Box Edge/Data Box Gateway devices in a subscription. + * @return all the Data Box Edge/Data Box Gateway devices in a subscription as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String expand) { @@ -422,7 +455,8 @@ private PagedFlux listAsync(String expand) { * * @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 all the Data Box Edge/Data Box Gateway devices in a subscription. + * @return all the Data Box Edge/Data Box Gateway devices in a subscription as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -440,7 +474,8 @@ private PagedFlux listAsync() { * @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 all the Data Box Edge/Data Box Gateway devices in a subscription. + * @return all the Data Box Edge/Data Box Gateway devices in a subscription as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String expand, Context context) { @@ -454,7 +489,8 @@ private PagedFlux listAsync(String expand, Context conte * * @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 all the Data Box Edge/Data Box Gateway devices in a subscription. + * @return all the Data Box Edge/Data Box Gateway devices in a subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -471,7 +507,8 @@ public PagedIterable list() { * @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 all the Data Box Edge/Data Box Gateway devices in a subscription. + * @return all the Data Box Edge/Data Box Gateway devices in a subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String expand, Context context) { @@ -487,7 +524,8 @@ public PagedIterable list(String expand, Context context * @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 all the Data Box Edge/Data Box Gateway devices in a resource group. + * @return all the Data Box Edge/Data Box Gateway devices in a resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -543,7 +581,8 @@ private Mono> listByResourceGroupSinglePag * @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 all the Data Box Edge/Data Box Gateway devices in a resource group. + * @return all the Data Box Edge/Data Box Gateway devices in a resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -595,7 +634,8 @@ private Mono> listByResourceGroupSinglePag * @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 all the Data Box Edge/Data Box Gateway devices in a resource group. + * @return all the Data Box Edge/Data Box Gateway devices in a resource group as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand) { @@ -611,7 +651,8 @@ private PagedFlux listByResourceGroupAsync(String resour * @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 all the Data Box Edge/Data Box Gateway devices in a resource group. + * @return all the Data Box Edge/Data Box Gateway devices in a resource group as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -631,7 +672,8 @@ private PagedFlux listByResourceGroupAsync(String resour * @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 all the Data Box Edge/Data Box Gateway devices in a resource group. + * @return all the Data Box Edge/Data Box Gateway devices in a resource group as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -648,7 +690,8 @@ private PagedFlux listByResourceGroupAsync( * @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 all the Data Box Edge/Data Box Gateway devices in a resource group. + * @return all the Data Box Edge/Data Box Gateway devices in a resource group as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -666,7 +709,8 @@ public PagedIterable listByResourceGroup(String resource * @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 all the Data Box Edge/Data Box Gateway devices in a resource group. + * @return all the Data Box Edge/Data Box Gateway devices in a resource group as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( @@ -682,7 +726,8 @@ public PagedIterable listByResourceGroup( * @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 properties of the Data Box Edge/Data Box Gateway device. + * @return the properties of the Data Box Edge/Data Box Gateway device along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -731,7 +776,8 @@ private Mono> getByResourceGroupWithResponseAsy * @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 properties of the Data Box Edge/Data Box Gateway device. + * @return the properties of the Data Box Edge/Data Box Gateway device along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -776,19 +822,12 @@ private Mono> getByResourceGroupWithResponseAsy * @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 properties of the Data Box Edge/Data Box Gateway device. + * @return the properties of the Data Box Edge/Data Box Gateway device on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String deviceName) { return getByResourceGroupWithResponseAsync(resourceGroupName, deviceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -796,14 +835,16 @@ private Mono getByResourceGroupAsync(String resourceGrou * * @param resourceGroupName The resource group name. * @param deviceName The device 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 properties of the Data Box Edge/Data Box Gateway device. + * @return the properties of the Data Box Edge/Data Box Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataBoxEdgeDeviceInner getByResourceGroup(String resourceGroupName, String deviceName) { - return getByResourceGroupAsync(resourceGroupName, deviceName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String deviceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, deviceName, context).block(); } /** @@ -811,16 +852,14 @@ public DataBoxEdgeDeviceInner getByResourceGroup(String resourceGroupName, Strin * * @param resourceGroupName The resource group name. * @param deviceName The device 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 properties of the Data Box Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String deviceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, deviceName, context).block(); + public DataBoxEdgeDeviceInner getByResourceGroup(String resourceGroupName, String deviceName) { + return getByResourceGroupWithResponse(resourceGroupName, deviceName, Context.NONE).getValue(); } /** @@ -832,10 +871,10 @@ public Response getByResourceGroupWithResponse( * @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. + * @return the Data Box Edge/Gateway device along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice) { if (this.client.getEndpoint() == null) { return Mono @@ -889,10 +928,10 @@ private Mono>> createOrUpdateWithResponseAsync( * @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. + * @return the Data Box Edge/Gateway device along with {@link Response} on successful completion of {@link Mono}. */ @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 @@ -942,103 +981,13 @@ private Mono>> createOrUpdateWithResponseAsync( * @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. - * - * @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. + * @return the Data Box Edge/Gateway device on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice) { - return beginCreateOrUpdateAsync(deviceName, resourceGroupName, dataBoxEdgeDevice) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return createOrUpdateWithResponseAsync(deviceName, resourceGroupName, dataBoxEdgeDevice) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1051,14 +1000,12 @@ private Mono createOrUpdateAsync( * @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. + * @return the Data Box Edge/Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( + public Response createOrUpdateWithResponse( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context) { - return beginCreateOrUpdateAsync(deviceName, resourceGroupName, dataBoxEdgeDevice, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return createOrUpdateWithResponseAsync(deviceName, resourceGroupName, dataBoxEdgeDevice, context).block(); } /** @@ -1075,25 +1022,7 @@ private Mono createOrUpdateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public DataBoxEdgeDeviceInner createOrUpdate( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice) { - return createOrUpdateAsync(deviceName, resourceGroupName, dataBoxEdgeDevice).block(); - } - - /** - * 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 DataBoxEdgeDeviceInner createOrUpdate( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context) { - return createOrUpdateAsync(deviceName, resourceGroupName, dataBoxEdgeDevice, context).block(); + return createOrUpdateWithResponse(deviceName, resourceGroupName, dataBoxEdgeDevice, Context.NONE).getValue(); } /** @@ -1104,7 +1033,7 @@ public DataBoxEdgeDeviceInner createOrUpdate( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String deviceName) { @@ -1152,7 +1081,7 @@ private Mono>> deleteWithResponseAsync(String resource * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1197,14 +1126,15 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deviceName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, deviceName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1216,9 +1146,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String deviceName, Context context) { context = this.client.mergeContext(context); @@ -1236,9 +1166,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String deviceName) { return beginDeleteAsync(resourceGroupName, deviceName).getSyncPoller(); } @@ -1252,9 +1182,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String deviceName, Context context) { return beginDeleteAsync(resourceGroupName, deviceName, context).getSyncPoller(); @@ -1268,7 +1198,7 @@ public SyncPoller, Void> beginDelete( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String deviceName) { @@ -1284,7 +1214,7 @@ private Mono deleteAsync(String resourceGroupName, String deviceName) { * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String deviceName, Context context) { @@ -1331,7 +1261,7 @@ public void delete(String resourceGroupName, String deviceName, Context context) * @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. + * @return the Data Box Edge/Gateway device along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1387,7 +1317,7 @@ private Mono> updateWithResponseAsync( * @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. + * @return the Data Box Edge/Gateway device along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1439,20 +1369,13 @@ private Mono> updateWithResponseAsync( * @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. + * @return the Data Box Edge/Gateway device on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( String deviceName, String resourceGroupName, DataBoxEdgeDevicePatch parameters) { return updateWithResponseAsync(deviceName, resourceGroupName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1461,15 +1384,16 @@ private Mono updateAsync( * @param deviceName The device name. * @param resourceGroupName The resource group name. * @param parameters The resource parameters. + * @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. + * @return the Data Box Edge/Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataBoxEdgeDeviceInner update( - String deviceName, String resourceGroupName, DataBoxEdgeDevicePatch parameters) { - return updateAsync(deviceName, resourceGroupName, parameters).block(); + public Response updateWithResponse( + String deviceName, String resourceGroupName, DataBoxEdgeDevicePatch parameters, Context context) { + return updateWithResponseAsync(deviceName, resourceGroupName, parameters, context).block(); } /** @@ -1478,16 +1402,15 @@ public DataBoxEdgeDeviceInner update( * @param deviceName The device name. * @param resourceGroupName The resource group name. * @param parameters The resource parameters. - * @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 Response updateWithResponse( - String deviceName, String resourceGroupName, DataBoxEdgeDevicePatch parameters, Context context) { - return updateWithResponseAsync(deviceName, resourceGroupName, parameters, context).block(); + public DataBoxEdgeDeviceInner update( + String deviceName, String resourceGroupName, DataBoxEdgeDevicePatch parameters) { + return updateWithResponse(deviceName, resourceGroupName, parameters, Context.NONE).getValue(); } /** @@ -1498,7 +1421,7 @@ public Response updateWithResponse( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> downloadUpdatesWithResponseAsync( @@ -1547,7 +1470,7 @@ private Mono>> downloadUpdatesWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> downloadUpdatesWithResponseAsync( @@ -1592,14 +1515,15 @@ private Mono>> downloadUpdatesWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDownloadUpdatesAsync(String deviceName, String resourceGroupName) { Mono>> mono = downloadUpdatesWithResponseAsync(deviceName, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1611,9 +1535,9 @@ private PollerFlux, Void> beginDownloadUpdatesAsync(String devi * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDownloadUpdatesAsync( String deviceName, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -1632,9 +1556,9 @@ private PollerFlux, Void> beginDownloadUpdatesAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDownloadUpdates(String deviceName, String resourceGroupName) { return beginDownloadUpdatesAsync(deviceName, resourceGroupName).getSyncPoller(); } @@ -1648,9 +1572,9 @@ public SyncPoller, Void> beginDownloadUpdates(String deviceName * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDownloadUpdates( String deviceName, String resourceGroupName, Context context) { return beginDownloadUpdatesAsync(deviceName, resourceGroupName, context).getSyncPoller(); @@ -1664,7 +1588,7 @@ public SyncPoller, Void> beginDownloadUpdates( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono downloadUpdatesAsync(String deviceName, String resourceGroupName) { @@ -1682,7 +1606,7 @@ private Mono downloadUpdatesAsync(String deviceName, String resourceGroupN * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono downloadUpdatesAsync(String deviceName, String resourceGroupName, Context context) { @@ -1721,14 +1645,159 @@ 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 along with {@link Response} on successful completion of {@link + * Mono}. + */ + @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 along with {@link Response} on successful completion of {@link + * Mono}. + */ + @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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generateCertificateAsync(String deviceName, String resourceGroupName) { + return generateCertificateWithResponseAsync(deviceName, resourceGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response generateCertificateWithResponse( + String deviceName, String resourceGroupName, Context context) { + return generateCertificateWithResponseAsync(deviceName, resourceGroupName, context).block(); + } + + /** + * 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 generateCertificateWithResponse(deviceName, resourceGroupName, Context.NONE).getValue(); + } + + /** + * 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 along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getExtendedInformationWithResponseAsync( @@ -1769,7 +1838,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 +1846,8 @@ 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 along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getExtendedInformationWithResponseAsync( @@ -1815,59 +1885,54 @@ 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 on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getExtendedInformationAsync( String deviceName, String resourceGroupName) { return getExtendedInformationWithResponseAsync(deviceName, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * 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. + * @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. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceName, String resourceGroupName) { - return getExtendedInformationAsync(deviceName, resourceGroupName).block(); + public Response getExtendedInformationWithResponse( + String deviceName, String resourceGroupName, Context context) { + return getExtendedInformationWithResponseAsync(deviceName, resourceGroupName, context).block(); } /** - * 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. - * @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. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getExtendedInformationWithResponse( - String deviceName, String resourceGroupName, Context context) { - return getExtendedInformationWithResponseAsync(deviceName, resourceGroupName, context).block(); + public DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceName, String resourceGroupName) { + return getExtendedInformationWithResponse(deviceName, resourceGroupName, Context.NONE).getValue(); } /** @@ -1878,7 +1943,7 @@ public Response getExtendedInformationWithRe * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> installUpdatesWithResponseAsync( @@ -1927,7 +1992,7 @@ private Mono>> installUpdatesWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> installUpdatesWithResponseAsync( @@ -1972,14 +2037,15 @@ private Mono>> installUpdatesWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginInstallUpdatesAsync(String deviceName, String resourceGroupName) { Mono>> mono = installUpdatesWithResponseAsync(deviceName, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1991,9 +2057,9 @@ private PollerFlux, Void> beginInstallUpdatesAsync(String devic * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginInstallUpdatesAsync( String deviceName, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -2011,9 +2077,9 @@ private PollerFlux, Void> beginInstallUpdatesAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginInstallUpdates(String deviceName, String resourceGroupName) { return beginInstallUpdatesAsync(deviceName, resourceGroupName).getSyncPoller(); } @@ -2027,9 +2093,9 @@ public SyncPoller, Void> beginInstallUpdates(String deviceName, * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginInstallUpdates( String deviceName, String resourceGroupName, Context context) { return beginInstallUpdatesAsync(deviceName, resourceGroupName, context).getSyncPoller(); @@ -2043,7 +2109,7 @@ public SyncPoller, Void> beginInstallUpdates( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono installUpdatesAsync(String deviceName, String resourceGroupName) { @@ -2061,7 +2127,7 @@ private Mono installUpdatesAsync(String deviceName, String resourceGroupNa * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono installUpdatesAsync(String deviceName, String resourceGroupName, Context context) { @@ -2107,7 +2173,8 @@ public void installUpdates(String deviceName, String resourceGroupName, Context * @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 network settings of the specified Data Box Edge/Data Box Gateway device. + * @return the network settings of the specified Data Box Edge/Data Box Gateway device along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getNetworkSettingsWithResponseAsync( @@ -2156,7 +2223,8 @@ private Mono> getNetworkSettingsWithResponseAsync * @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 network settings of the specified Data Box Edge/Data Box Gateway device. + * @return the network settings of the specified Data Box Edge/Data Box Gateway device along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getNetworkSettingsWithResponseAsync( @@ -2201,19 +2269,13 @@ private Mono> getNetworkSettingsWithResponseAsync * @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 network settings of the specified Data Box Edge/Data Box Gateway device. + * @return the network settings of the specified Data Box Edge/Data Box Gateway device on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getNetworkSettingsAsync(String deviceName, String resourceGroupName) { return getNetworkSettingsWithResponseAsync(deviceName, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2221,14 +2283,16 @@ private Mono getNetworkSettingsAsync(String deviceName, St * * @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 network settings of the specified Data Box Edge/Data Box Gateway device. + * @return the network settings of the specified Data Box Edge/Data Box Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkSettingsInner getNetworkSettings(String deviceName, String resourceGroupName) { - return getNetworkSettingsAsync(deviceName, resourceGroupName).block(); + public Response getNetworkSettingsWithResponse( + String deviceName, String resourceGroupName, Context context) { + return getNetworkSettingsWithResponseAsync(deviceName, resourceGroupName, context).block(); } /** @@ -2236,16 +2300,14 @@ public NetworkSettingsInner getNetworkSettings(String deviceName, String resourc * * @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 network settings of the specified Data Box Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getNetworkSettingsWithResponse( - String deviceName, String resourceGroupName, Context context) { - return getNetworkSettingsWithResponseAsync(deviceName, resourceGroupName, context).block(); + public NetworkSettingsInner getNetworkSettings(String deviceName, String resourceGroupName) { + return getNetworkSettingsWithResponse(deviceName, resourceGroupName, Context.NONE).getValue(); } /** @@ -2256,7 +2318,7 @@ public Response getNetworkSettingsWithResponse( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> scanForUpdatesWithResponseAsync( @@ -2305,7 +2367,7 @@ private Mono>> scanForUpdatesWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> scanForUpdatesWithResponseAsync( @@ -2350,14 +2412,15 @@ private Mono>> scanForUpdatesWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginScanForUpdatesAsync(String deviceName, String resourceGroupName) { Mono>> mono = scanForUpdatesWithResponseAsync(deviceName, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2369,9 +2432,9 @@ private PollerFlux, Void> beginScanForUpdatesAsync(String devic * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginScanForUpdatesAsync( String deviceName, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -2389,9 +2452,9 @@ private PollerFlux, Void> beginScanForUpdatesAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginScanForUpdates(String deviceName, String resourceGroupName) { return beginScanForUpdatesAsync(deviceName, resourceGroupName).getSyncPoller(); } @@ -2405,9 +2468,9 @@ public SyncPoller, Void> beginScanForUpdates(String deviceName, * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginScanForUpdates( String deviceName, String resourceGroupName, Context context) { return beginScanForUpdatesAsync(deviceName, resourceGroupName, context).getSyncPoller(); @@ -2421,7 +2484,7 @@ public SyncPoller, Void> beginScanForUpdates( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono scanForUpdatesAsync(String deviceName, String resourceGroupName) { @@ -2439,7 +2502,7 @@ private Mono scanForUpdatesAsync(String deviceName, String resourceGroupNa * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono scanForUpdatesAsync(String deviceName, String resourceGroupName, Context context) { @@ -2486,7 +2549,7 @@ public void scanForUpdates(String deviceName, String resourceGroupName, Context * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateSecuritySettingsWithResponseAsync( @@ -2543,7 +2606,7 @@ private Mono>> createOrUpdateSecuritySettingsWithRespo * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateSecuritySettingsWithResponseAsync( @@ -2596,16 +2659,17 @@ private Mono>> createOrUpdateSecuritySettingsWithRespo * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginCreateOrUpdateSecuritySettingsAsync( String deviceName, String resourceGroupName, SecuritySettings securitySettings) { Mono>> mono = createOrUpdateSecuritySettingsWithResponseAsync(deviceName, resourceGroupName, securitySettings); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2618,9 +2682,9 @@ private PollerFlux, Void> beginCreateOrUpdateSecuritySettingsAs * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginCreateOrUpdateSecuritySettingsAsync( String deviceName, String resourceGroupName, SecuritySettings securitySettings, Context context) { context = this.client.mergeContext(context); @@ -2640,9 +2704,9 @@ private PollerFlux, Void> beginCreateOrUpdateSecuritySettingsAs * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginCreateOrUpdateSecuritySettings( String deviceName, String resourceGroupName, SecuritySettings securitySettings) { return beginCreateOrUpdateSecuritySettingsAsync(deviceName, resourceGroupName, securitySettings) @@ -2659,9 +2723,9 @@ public SyncPoller, Void> beginCreateOrUpdateSecuritySettings( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginCreateOrUpdateSecuritySettings( String deviceName, String resourceGroupName, SecuritySettings securitySettings, Context context) { return beginCreateOrUpdateSecuritySettingsAsync(deviceName, resourceGroupName, securitySettings, context) @@ -2677,7 +2741,7 @@ public SyncPoller, Void> beginCreateOrUpdateSecuritySettings( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateSecuritySettingsAsync( @@ -2697,7 +2761,7 @@ private Mono createOrUpdateSecuritySettingsAsync( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateSecuritySettingsAsync( @@ -2740,6 +2804,172 @@ 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 along with {@link + * Response} on successful completion of {@link Mono}. + */ + @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 along with {@link + * Response} on successful completion of {@link Mono}. + */ + @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 on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateExtendedInformationAsync( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters) { + return updateExtendedInformationWithResponseAsync(deviceName, resourceGroupName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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 along with {@link + * Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateExtendedInformationWithResponse( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters, Context context) { + return updateExtendedInformationWithResponseAsync(deviceName, resourceGroupName, parameters, 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) + public DataBoxEdgeDeviceExtendedInfoInner updateExtendedInformation( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters) { + return updateExtendedInformationWithResponse(deviceName, resourceGroupName, parameters, Context.NONE) + .getValue(); + } + /** * 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. @@ -2749,7 +2979,8 @@ public void createOrUpdateSecuritySettings( * @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 information about the availability of updates based on the last scan of the device. + * @return information about the availability of updates based on the last scan of the device along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUpdateSummaryWithResponseAsync( @@ -2799,7 +3030,8 @@ private Mono> getUpdateSummaryWithResponseAsync( * @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 information about the availability of updates based on the last scan of the device. + * @return information about the availability of updates based on the last scan of the device along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUpdateSummaryWithResponseAsync( @@ -2845,19 +3077,13 @@ private Mono> getUpdateSummaryWithResponseAsync( * @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 information about the availability of updates based on the last scan of the device. + * @return information about the availability of updates based on the last scan of the device on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getUpdateSummaryAsync(String deviceName, String resourceGroupName) { return getUpdateSummaryWithResponseAsync(deviceName, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2866,14 +3092,17 @@ private Mono getUpdateSummaryAsync(String deviceName, String * * @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 information about the availability of updates based on the last scan of the device. + * @return information about the availability of updates based on the last scan of the device along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateSummaryInner getUpdateSummary(String deviceName, String resourceGroupName) { - return getUpdateSummaryAsync(deviceName, resourceGroupName).block(); + public Response getUpdateSummaryWithResponse( + String deviceName, String resourceGroupName, Context context) { + return getUpdateSummaryWithResponseAsync(deviceName, resourceGroupName, context).block(); } /** @@ -2882,16 +3111,14 @@ public UpdateSummaryInner getUpdateSummary(String deviceName, String resourceGro * * @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 information about the availability of updates based on the last scan of the device. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getUpdateSummaryWithResponse( - String deviceName, String resourceGroupName, Context context) { - return getUpdateSummaryWithResponseAsync(deviceName, resourceGroupName, context).block(); + public UpdateSummaryInner getUpdateSummary(String deviceName, String resourceGroupName) { + return getUpdateSummaryWithResponse(deviceName, resourceGroupName, Context.NONE).getValue(); } /** @@ -2903,7 +3130,8 @@ public Response getUpdateSummaryWithResponse( * @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 upload registration certificate response. + * @return the upload registration certificate response along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> uploadCertificateWithResponseAsync( @@ -2959,7 +3187,8 @@ private Mono> uploadCertificateWithResp * @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 upload registration certificate response. + * @return the upload registration certificate response along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> uploadCertificateWithResponseAsync( @@ -3011,20 +3240,13 @@ private Mono> uploadCertificateWithResp * @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 upload registration certificate response. + * @return the upload registration certificate response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono uploadCertificateAsync( String deviceName, String resourceGroupName, UploadCertificateRequest parameters) { return uploadCertificateWithResponseAsync(deviceName, resourceGroupName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3033,15 +3255,16 @@ private Mono uploadCertificateAsync( * @param deviceName The device name. * @param resourceGroupName The resource group name. * @param parameters The upload certificate request. + * @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 upload registration certificate response. + * @return the upload registration certificate response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UploadCertificateResponseInner uploadCertificate( - String deviceName, String resourceGroupName, UploadCertificateRequest parameters) { - return uploadCertificateAsync(deviceName, resourceGroupName, parameters).block(); + public Response uploadCertificateWithResponse( + String deviceName, String resourceGroupName, UploadCertificateRequest parameters, Context context) { + return uploadCertificateWithResponseAsync(deviceName, resourceGroupName, parameters, context).block(); } /** @@ -3050,26 +3273,27 @@ public UploadCertificateResponseInner uploadCertificate( * @param deviceName The device name. * @param resourceGroupName The resource group name. * @param parameters The upload certificate request. - * @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 upload registration certificate response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response uploadCertificateWithResponse( - String deviceName, String resourceGroupName, UploadCertificateRequest parameters, Context context) { - return uploadCertificateWithResponseAsync(deviceName, resourceGroupName, parameters, context).block(); + public UploadCertificateResponseInner uploadCertificate( + String deviceName, String resourceGroupName, UploadCertificateRequest parameters) { + return uploadCertificateWithResponse(deviceName, resourceGroupName, parameters, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the collection of Data Box Edge/Gateway devices. + * @return the collection of Data Box Edge/Gateway devices along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -3101,12 +3325,14 @@ private Mono> listBySubscriptionNextSingle /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the collection of Data Box Edge/Gateway devices. + * @return the collection of Data Box Edge/Gateway devices along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( @@ -3138,11 +3364,13 @@ private Mono> listBySubscriptionNextSingle /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the collection of Data Box Edge/Gateway devices. + * @return the collection of Data Box Edge/Gateway devices along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -3174,12 +3402,14 @@ private Mono> listByResourceGroupNextSingl /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the collection of Data Box Edge/Gateway devices. + * @return the collection of Data Box Edge/Gateway devices along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( 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 4cef08e00fdf..09e05bcab369 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,21 +12,23 @@ 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; import com.azure.resourcemanager.databoxedge.models.UploadCertificateRequest; import com.azure.resourcemanager.databoxedge.models.UploadCertificateResponse; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DevicesImpl implements Devices { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DevicesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DevicesImpl.class); private final DevicesClient innerClient; @@ -60,15 +62,6 @@ public PagedIterable listByResourceGroup( return Utils.mapPage(inner, inner1 -> new DataBoxEdgeDeviceImpl(inner1, this.manager())); } - public DataBoxEdgeDevice getByResourceGroup(String resourceGroupName, String deviceName) { - DataBoxEdgeDeviceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, deviceName); - if (inner != null) { - return new DataBoxEdgeDeviceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String deviceName, Context context) { Response inner = @@ -84,6 +77,15 @@ public Response getByResourceGroupWithResponse( } } + public DataBoxEdgeDevice getByResourceGroup(String resourceGroupName, String deviceName) { + DataBoxEdgeDeviceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, deviceName); + if (inner != null) { + return new DataBoxEdgeDeviceImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String deviceName) { this.serviceClient().delete(resourceGroupName, deviceName); } @@ -100,11 +102,25 @@ public void downloadUpdates(String deviceName, String resourceGroupName, Context this.serviceClient().downloadUpdates(deviceName, resourceGroupName, context); } - public DataBoxEdgeDeviceExtendedInfo getExtendedInformation(String deviceName, String resourceGroupName) { - DataBoxEdgeDeviceExtendedInfoInner inner = - this.serviceClient().getExtendedInformation(deviceName, resourceGroupName); + public Response generateCertificateWithResponse( + String deviceName, String resourceGroupName, Context context) { + Response inner = + this.serviceClient().generateCertificateWithResponse(deviceName, resourceGroupName, context); if (inner != null) { - return new DataBoxEdgeDeviceExtendedInfoImpl(inner, this.manager()); + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new GenerateCertResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + 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; } @@ -125,6 +141,16 @@ public Response getExtendedInformationWithRespons } } + public DataBoxEdgeDeviceExtendedInfo getExtendedInformation(String deviceName, String resourceGroupName) { + DataBoxEdgeDeviceExtendedInfoInner inner = + this.serviceClient().getExtendedInformation(deviceName, resourceGroupName); + if (inner != null) { + return new DataBoxEdgeDeviceExtendedInfoImpl(inner, this.manager()); + } else { + return null; + } + } + public void installUpdates(String deviceName, String resourceGroupName) { this.serviceClient().installUpdates(deviceName, resourceGroupName); } @@ -133,15 +159,6 @@ public void installUpdates(String deviceName, String resourceGroupName, Context this.serviceClient().installUpdates(deviceName, resourceGroupName, context); } - public NetworkSettings getNetworkSettings(String deviceName, String resourceGroupName) { - NetworkSettingsInner inner = this.serviceClient().getNetworkSettings(deviceName, resourceGroupName); - if (inner != null) { - return new NetworkSettingsImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getNetworkSettingsWithResponse( String deviceName, String resourceGroupName, Context context) { Response inner = @@ -157,6 +174,15 @@ public Response getNetworkSettingsWithResponse( } } + public NetworkSettings getNetworkSettings(String deviceName, String resourceGroupName) { + NetworkSettingsInner inner = this.serviceClient().getNetworkSettings(deviceName, resourceGroupName); + if (inner != null) { + return new NetworkSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + public void scanForUpdates(String deviceName, String resourceGroupName) { this.serviceClient().scanForUpdates(deviceName, resourceGroupName); } @@ -175,10 +201,29 @@ public void createOrUpdateSecuritySettings( this.serviceClient().createOrUpdateSecuritySettings(deviceName, resourceGroupName, securitySettings, context); } - public UpdateSummary getUpdateSummary(String deviceName, String resourceGroupName) { - UpdateSummaryInner inner = this.serviceClient().getUpdateSummary(deviceName, resourceGroupName); + 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 UpdateSummaryImpl(inner, this.manager()); + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataBoxEdgeDeviceExtendedInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + 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; } @@ -199,12 +244,10 @@ public Response getUpdateSummaryWithResponse( } } - public UploadCertificateResponse uploadCertificate( - String deviceName, String resourceGroupName, UploadCertificateRequest parameters) { - UploadCertificateResponseInner inner = - this.serviceClient().uploadCertificate(deviceName, resourceGroupName, parameters); + public UpdateSummary getUpdateSummary(String deviceName, String resourceGroupName) { + UpdateSummaryInner inner = this.serviceClient().getUpdateSummary(deviceName, resourceGroupName); if (inner != null) { - return new UploadCertificateResponseImpl(inner, this.manager()); + return new UpdateSummaryImpl(inner, this.manager()); } else { return null; } @@ -225,10 +268,21 @@ public Response uploadCertificateWithResponse( } } + public UploadCertificateResponse uploadCertificate( + String deviceName, String resourceGroupName, UploadCertificateRequest parameters) { + UploadCertificateResponseInner inner = + this.serviceClient().uploadCertificate(deviceName, resourceGroupName, parameters); + if (inner != null) { + return new UploadCertificateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public DataBoxEdgeDevice getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -236,7 +290,7 @@ public DataBoxEdgeDevice getById(String id) { } String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -249,7 +303,7 @@ public DataBoxEdgeDevice getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -257,7 +311,7 @@ public Response getByIdWithResponse(String id, Context contex } String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -270,7 +324,7 @@ public Response getByIdWithResponse(String id, Context contex public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -278,7 +332,7 @@ public void deleteById(String id) { } String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -291,7 +345,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -299,7 +353,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 000000000000..e614ef59309a --- /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 000000000000..23718621ded5 --- /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 000000000000..24a408db5d94 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticSettingsClientImpl.java @@ -0,0 +1,1068 @@ +// 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.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 { + /** 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") + public 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 along with + * {@link Response} on successful completion of {@link Mono}. + */ + @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 along with + * {@link Response} on successful completion of {@link Mono}. + */ + @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 on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDiagnosticProactiveLogCollectionSettingsAsync( + String deviceName, String resourceGroupName) { + return getDiagnosticProactiveLogCollectionSettingsWithResponseAsync(deviceName, resourceGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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 along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + getDiagnosticProactiveLogCollectionSettingsWithResponse( + String deviceName, String resourceGroupName, Context context) { + return getDiagnosticProactiveLogCollectionSettingsWithResponseAsync(deviceName, resourceGroupName, context) + .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. + * @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 getDiagnosticProactiveLogCollectionSettingsWithResponse(deviceName, resourceGroupName, Context.NONE) + .getValue(); + } + + /** + * 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 along with {@link Response} on successful + * completion of {@link Mono}. + */ + @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 along with {@link Response} on successful + * completion of {@link Mono}. + */ + @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 {@link PollerFlux} for polling of the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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, + this.client.getContext()); + } + + /** + * 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 {@link PollerFlux} for polling of the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of the diagnostic proactive log collection settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 on successful completion of {@link Mono}. + */ + @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 on successful completion of {@link Mono}. + */ + @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 along with + * {@link Response} on successful completion of {@link Mono}. + */ + @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 along with + * {@link Response} on successful completion of {@link Mono}. + */ + @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 on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDiagnosticRemoteSupportSettingsAsync( + String deviceName, String resourceGroupName) { + return getDiagnosticRemoteSupportSettingsWithResponseAsync(deviceName, resourceGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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 along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDiagnosticRemoteSupportSettingsWithResponse( + String deviceName, String resourceGroupName, Context context) { + return getDiagnosticRemoteSupportSettingsWithResponseAsync(deviceName, resourceGroupName, 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) + public DiagnosticRemoteSupportSettingsInner getDiagnosticRemoteSupportSettings( + String deviceName, String resourceGroupName) { + return getDiagnosticRemoteSupportSettingsWithResponse(deviceName, resourceGroupName, Context.NONE).getValue(); + } + + /** + * 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 along with {@link Response} on successful completion of {@link + * Mono}. + */ + @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 along with {@link Response} on successful completion of {@link + * Mono}. + */ + @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 {@link PollerFlux} for polling of the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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, + this.client.getContext()); + } + + /** + * 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 {@link PollerFlux} for polling of the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of the remote support settings of a device. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 on successful completion of {@link Mono}. + */ + @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 on successful completion of {@link Mono}. + */ + @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 000000000000..1b3df7cb7656 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DiagnosticSettingsImpl.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.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; + +public final class DiagnosticSettingsImpl implements DiagnosticSettings { + private static 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 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 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 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 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 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 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 000000000000..8e14440f13e7 --- /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/JobsClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/JobsClientImpl.java index d2e85f1bd36d..6b8afe15dcae 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/JobsClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/JobsClientImpl.java @@ -21,15 +21,12 @@ import com.azure.core.management.exception.ManagementException; 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.JobsClient; import com.azure.resourcemanager.databoxedge.fluent.models.JobInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in JobsClient. */ public final class JobsClientImpl implements JobsClient { - private final ClientLogger logger = new ClientLogger(JobsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final JobsService service; @@ -52,7 +49,7 @@ public final class JobsClientImpl implements JobsClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface JobsService { + public interface JobsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -79,7 +76,8 @@ Mono> get( * @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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String deviceName, String name, String resourceGroupName) { @@ -132,7 +130,8 @@ private Mono> getWithResponseAsync(String deviceName, String * @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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -182,19 +181,13 @@ private Mono> getWithResponseAsync( * @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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String deviceName, String name, String resourceGroupName) { return getWithResponseAsync(deviceName, name, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -203,14 +196,16 @@ private Mono getAsync(String deviceName, String name, String resourceG * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner get(String deviceName, String name, String resourceGroupName) { - return getAsync(deviceName, name, resourceGroupName).block(); + public Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); } /** @@ -219,15 +214,13 @@ public JobInner get(String deviceName, String name, String resourceGroupName) { * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); + public JobInner get(String deviceName, String name, String resourceGroupName) { + return getWithResponse(deviceName, name, resourceGroupName, Context.NONE).getValue(); } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/JobsImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/JobsImpl.java index 09f0860fa2a5..70dab203c8be 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/JobsImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/JobsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.JobInner; import com.azure.resourcemanager.databoxedge.models.Job; import com.azure.resourcemanager.databoxedge.models.Jobs; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class JobsImpl implements Jobs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(JobsImpl.class); private final JobsClient innerClient; @@ -26,15 +25,6 @@ public JobsImpl(JobsClient innerClient, com.azure.resourcemanager.databoxedge.Da this.serviceManager = serviceManager; } - public Job get(String deviceName, String name, String resourceGroupName) { - JobInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context) { Response inner = this.serviceClient().getWithResponse(deviceName, name, resourceGroupName, context); if (inner != null) { @@ -48,6 +38,15 @@ public Response getWithResponse(String deviceName, String name, String reso } } + public Job get(String deviceName, String name, String resourceGroupName) { + JobInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); + if (inner != null) { + return new JobImpl(inner, this.manager()); + } else { + return null; + } + } + private JobsClient serviceClient() { return this.innerClient; } 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 000000000000..79660c5c0fa8 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringConfigsClientImpl.java @@ -0,0 +1,1163 @@ +// 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.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 { + /** 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") + public 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 along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @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 along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @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 as paginated response with {@link PagedFlux}. + */ + @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 as paginated response with {@link PagedFlux}. + */ + @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 as paginated response with {@link PagedIterable}. + */ + @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 as paginated response with {@link PagedIterable}. + */ + @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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String deviceName, String roleName, String resourceGroupName) { + return getWithResponseAsync(deviceName, roleName, resourceGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String deviceName, String roleName, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, roleName, resourceGroupName, context).block(); + } + + /** + * 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 getWithResponse(deviceName, roleName, resourceGroupName, Context.NONE).getValue(); + } + + /** + * 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 along with {@link Response} on successful completion of {@link + * Mono}. + */ + @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 along with {@link Response} on successful completion of {@link + * Mono}. + */ + @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 {@link PollerFlux} for polling of the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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, + this.client.getContext()); + } + + /** + * 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 {@link PollerFlux} for polling of the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of the metric setting details for the role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 on successful completion of {@link Mono}. + */ + @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 on successful completion of {@link Mono}. + */ + @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 {@link Response} on successful completion of {@link Mono}. + */ + @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 {@link Response} on successful completion of {@link Mono}. + */ + @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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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, this.client.getContext()); + } + + /** + * 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 A {@link Mono} that completes when a successful response is received. + */ + @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 A {@link Mono} that completes when a successful response is received. + */ + @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 URL to get the next list of items + *

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 along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @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 URL to get the next list of items + *

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 along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @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 000000000000..f2054d0f10d9 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringConfigsImpl.java @@ -0,0 +1,114 @@ +// 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; + +public final class MonitoringConfigsImpl implements MonitoringConfigs { + private static 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 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 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 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 000000000000..b20fb9a92a83 --- /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 6c074033a324..16adc2cfa260 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 b7f42114ba7a..ed42b9c79fbd 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; 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.NodesClient; import com.azure.resourcemanager.databoxedge.fluent.models.NodeInner; import com.azure.resourcemanager.databoxedge.models.NodeList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in NodesClient. */ public final class NodesClientImpl implements NodesClient { - private final ClientLogger logger = new ClientLogger(NodesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final NodesService service; @@ -57,7 +54,7 @@ public final class NodesClientImpl implements NodesClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface NodesService { + public interface NodesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -72,6 +69,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); } /** @@ -82,7 +89,8 @@ Mono> listByDataBoxEdgeDevice( * @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 all the nodes currently configured under this Data Box Edge device. + * @return all the nodes currently configured under this Data Box Edge device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -122,7 +130,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())); } @@ -135,7 +148,8 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * @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 all the nodes currently configured under this Data Box Edge device. + * @return all the nodes currently configured under this Data Box Edge device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -173,7 +187,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)); } /** @@ -184,11 +203,14 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * @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 all the nodes currently configured under this Data Box Edge device. + * @return all the nodes currently configured under this Data Box Edge device as paginated response with {@link + * PagedFlux}. */ @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)); } /** @@ -200,12 +222,15 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, Str * @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 all the nodes currently configured under this Data Box Edge device. + * @return all the nodes currently configured under this Data Box Edge device as paginated response with {@link + * PagedFlux}. */ @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)); } /** @@ -216,7 +241,8 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 all the nodes currently configured under this Data Box Edge device. + * @return all the nodes currently configured under this Data Box Edge device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName) { @@ -232,11 +258,87 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, Strin * @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 all the nodes currently configured under this Data Box Edge device. + * @return all the nodes currently configured under this Data Box Edge device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) 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 URL to get the next list of items + *

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 along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @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 URL to get the next list of items + *

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 along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @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/NodesImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/NodesImpl.java index 4a84120f484d..263e80551352 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/NodesImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/NodesImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.NodeInner; import com.azure.resourcemanager.databoxedge.models.Node; import com.azure.resourcemanager.databoxedge.models.Nodes; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class NodesImpl implements Nodes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NodesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(NodesImpl.class); private final NodesClient innerClient; 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 55d451dd95a3..055b5d979806 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/OperationsClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsClientImpl.java index dd5743253264..59f044a21be2 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; 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.OperationsClient; import com.azure.resourcemanager.databoxedge.fluent.models.OperationInner; import com.azure.resourcemanager.databoxedge.models.OperationsList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -58,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.DataBoxEdge/operations") @ExpectedResponses({200}) @@ -85,7 +82,8 @@ Mono> listNext( * * @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 list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +116,8 @@ private Mono> listSinglePageAsync() { * @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 list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +147,8 @@ private Mono> listSinglePageAsync(Context context) * * @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 list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +162,8 @@ private PagedFlux listAsync() { * @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 list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +176,8 @@ private PagedFlux listAsync(Context context) { * * @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 list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +191,8 @@ public PagedIterable list() { * @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 list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -199,11 +202,13 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -234,12 +239,14 @@ private Mono> listNextSinglePageAsync(String nextL /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsImpl.java index de9581a37419..eccbada36f94 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.OperationInner; import com.azure.resourcemanager.databoxedge.models.Operation; import com.azure.resourcemanager.databoxedge.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsStatusClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsStatusClientImpl.java index 01b7a751eef1..49fcc122e8fb 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsStatusClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsStatusClientImpl.java @@ -21,15 +21,12 @@ import com.azure.core.management.exception.ManagementException; 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.OperationsStatusClient; import com.azure.resourcemanager.databoxedge.fluent.models.JobInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsStatusClient. */ public final class OperationsStatusClientImpl implements OperationsStatusClient { - private final ClientLogger logger = new ClientLogger(OperationsStatusClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsStatusService service; @@ -53,7 +50,7 @@ public final class OperationsStatusClientImpl implements OperationsStatusClient */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface OperationsStatusService { + public interface OperationsStatusService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -80,7 +77,8 @@ Mono> get( * @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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String deviceName, String name, String resourceGroupName) { @@ -133,7 +131,8 @@ private Mono> getWithResponseAsync(String deviceName, String * @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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -183,19 +182,13 @@ private Mono> getWithResponseAsync( * @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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String deviceName, String name, String resourceGroupName) { return getWithResponseAsync(deviceName, name, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -204,14 +197,16 @@ private Mono getAsync(String deviceName, String name, String resourceG * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner get(String deviceName, String name, String resourceGroupName) { - return getAsync(deviceName, name, resourceGroupName).block(); + public Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); } /** @@ -220,15 +215,13 @@ public JobInner get(String deviceName, String name, String resourceGroupName) { * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); + public JobInner get(String deviceName, String name, String resourceGroupName) { + return getWithResponse(deviceName, name, resourceGroupName, Context.NONE).getValue(); } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsStatusImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsStatusImpl.java index f6130df64b5a..8c2d002813a1 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsStatusImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsStatusImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.JobInner; import com.azure.resourcemanager.databoxedge.models.Job; import com.azure.resourcemanager.databoxedge.models.OperationsStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsStatusImpl implements OperationsStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsStatusImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsStatusImpl.class); private final OperationsStatusClient innerClient; @@ -27,15 +26,6 @@ public OperationsStatusImpl( this.serviceManager = serviceManager; } - public Job get(String deviceName, String name, String resourceGroupName) { - JobInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context) { Response inner = this.serviceClient().getWithResponse(deviceName, name, resourceGroupName, context); if (inner != null) { @@ -49,6 +39,15 @@ public Response getWithResponse(String deviceName, String name, String reso } } + public Job get(String deviceName, String name, String resourceGroupName) { + JobInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); + if (inner != null) { + return new JobImpl(inner, this.manager()); + } else { + return null; + } + } + private OperationsStatusClient serviceClient() { return this.innerClient; } 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 fc67d033c293..023b5c8a986f 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,18 @@ public String type() { return this.innerModel().type(); } + public String kind() { + return this.innerModel().kind(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String orderId() { + return this.innerModel().orderId(); + } + public ContactDetails contactInformation() { return this.innerModel().contactInformation(); } @@ -78,6 +92,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 e9fffd594014..5f3da1d6ab47 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; @@ -29,10 +30,10 @@ 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.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; @@ -41,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in OrdersClient. */ public final class OrdersClientImpl implements OrdersClient { - private final ClientLogger logger = new ClientLogger(OrdersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OrdersService service; @@ -65,7 +64,7 @@ public final class OrdersClientImpl implements OrdersClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface OrdersService { + public interface OrdersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -127,6 +126,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}) @@ -146,7 +160,7 @@ Mono> listByDataBoxEdgeDeviceNext( * @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 order entities. + * @return list of order entities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -204,7 +218,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * @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 order entities. + * @return list of order entities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -258,7 +272,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * @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 order entities. + * @return list of order entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, String resourceGroupName) { @@ -276,7 +290,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, St * @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 order entities. + * @return list of order entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -294,7 +308,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 order entities. + * @return list of order entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName) { @@ -310,7 +324,7 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, Stri * @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 order entities. + * @return list of order entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice( @@ -326,7 +340,7 @@ public PagedIterable listByDataBoxEdgeDevice( * @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 order by name. + * @return a specific order by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String deviceName, String resourceGroupName) { @@ -374,7 +388,7 @@ private Mono> getWithResponseAsync(String deviceName, Strin * @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 order by name. + * @return a specific order by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -419,19 +433,11 @@ private Mono> getWithResponseAsync( * @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 order by name. + * @return a specific order by name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String deviceName, String resourceGroupName) { - return getWithResponseAsync(deviceName, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(deviceName, resourceGroupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -439,14 +445,15 @@ private Mono getAsync(String deviceName, String resourceGroupName) { * * @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 a specific order by name. + * @return a specific order by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OrderInner get(String deviceName, String resourceGroupName) { - return getAsync(deviceName, resourceGroupName).block(); + public Response getWithResponse(String deviceName, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, resourceGroupName, context).block(); } /** @@ -454,15 +461,14 @@ public OrderInner get(String deviceName, String resourceGroupName) { * * @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 a specific order by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String deviceName, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, resourceGroupName, context).block(); + public OrderInner get(String deviceName, String resourceGroupName) { + return getWithResponse(deviceName, resourceGroupName, Context.NONE).getValue(); } /** @@ -474,7 +480,7 @@ public Response getWithResponse(String deviceName, String resourceGr * @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 order details. + * @return the order details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -530,7 +536,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 order details. + * @return the order details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -582,16 +588,16 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 order details. + * @return the {@link PollerFlux} for polling of the order details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OrderInner> beginCreateOrUpdateAsync( String deviceName, String resourceGroupName, OrderInner order) { Mono>> mono = createOrUpdateWithResponseAsync(deviceName, resourceGroupName, order); return this .client .getLroResult( - mono, this.client.getHttpPipeline(), OrderInner.class, OrderInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), OrderInner.class, OrderInner.class, this.client.getContext()); } /** @@ -604,9 +610,9 @@ private PollerFlux, OrderInner> beginCreateOrUpdateAsync( * @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 order details. + * @return the {@link PollerFlux} for polling of the order details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OrderInner> beginCreateOrUpdateAsync( String deviceName, String resourceGroupName, OrderInner order, Context context) { context = this.client.mergeContext(context); @@ -627,9 +633,9 @@ private PollerFlux, OrderInner> beginCreateOrUpdateAsync( * @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 order details. + * @return the {@link SyncPoller} for polling of the order details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OrderInner> beginCreateOrUpdate( String deviceName, String resourceGroupName, OrderInner order) { return beginCreateOrUpdateAsync(deviceName, resourceGroupName, order).getSyncPoller(); @@ -645,9 +651,9 @@ public SyncPoller, OrderInner> beginCreateOrUpdate( * @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 order details. + * @return the {@link SyncPoller} for polling of the order details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OrderInner> beginCreateOrUpdate( String deviceName, String resourceGroupName, OrderInner order, Context context) { return beginCreateOrUpdateAsync(deviceName, resourceGroupName, order, context).getSyncPoller(); @@ -662,7 +668,7 @@ public SyncPoller, OrderInner> beginCreateOrUpdate( * @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 order details. + * @return the order details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String deviceName, String resourceGroupName, OrderInner order) { @@ -681,7 +687,7 @@ private Mono createOrUpdateAsync(String deviceName, String resourceG * @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 order details. + * @return the order details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -732,7 +738,7 @@ public OrderInner createOrUpdate(String deviceName, String resourceGroupName, Or * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String deviceName, String resourceGroupName) { @@ -780,7 +786,7 @@ private Mono>> deleteWithResponseAsync(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 the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -825,14 +831,15 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String deviceName, String resourceGroupName) { Mono>> mono = deleteWithResponseAsync(deviceName, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -844,9 +851,9 @@ private PollerFlux, Void> beginDeleteAsync(String deviceName, S * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -864,9 +871,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String deviceName, String resourceGroupName) { return beginDeleteAsync(deviceName, resourceGroupName).getSyncPoller(); } @@ -880,9 +887,9 @@ public SyncPoller, Void> beginDelete(String deviceName, String * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String deviceName, String resourceGroupName, Context context) { return beginDeleteAsync(deviceName, resourceGroupName, context).getSyncPoller(); @@ -896,7 +903,7 @@ public SyncPoller, Void> beginDelete( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String resourceGroupName) { @@ -912,7 +919,7 @@ private Mono deleteAsync(String deviceName, String resourceGroupName) { * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String resourceGroupName, Context context) { @@ -950,14 +957,157 @@ 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listDCAccessCodeAsync(String deviceName, String resourceGroupName) { + return listDCAccessCodeWithResponseAsync(deviceName, resourceGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listDCAccessCodeWithResponse( + String deviceName, String resourceGroupName, Context context) { + return listDCAccessCodeWithResponseAsync(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) + public DCAccessCodeInner listDCAccessCode(String deviceName, String resourceGroupName) { + return listDCAccessCodeWithResponse(deviceName, resourceGroupName, Context.NONE).getValue(); + } + /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 order entities. + * @return list of order entities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync(String nextLink) { @@ -989,12 +1139,13 @@ private Mono> listByDataBoxEdgeDeviceNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 order entities. + * @return list of order entities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync( 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 21a46ee61b67..cd99795e1ea0 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,13 +10,14 @@ 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; public final class OrdersImpl implements Orders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OrdersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OrdersImpl.class); private final OrdersClient innerClient; @@ -39,15 +40,6 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, String re return Utils.mapPage(inner, inner1 -> new OrderImpl(inner1, this.manager())); } - public Order get(String deviceName, String resourceGroupName) { - OrderInner inner = this.serviceClient().get(deviceName, resourceGroupName); - if (inner != null) { - return new OrderImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String deviceName, String resourceGroupName, Context context) { Response inner = this.serviceClient().getWithResponse(deviceName, resourceGroupName, context); if (inner != null) { @@ -61,6 +53,15 @@ public Response getWithResponse(String deviceName, String resourceGroupNa } } + public Order get(String deviceName, String resourceGroupName) { + OrderInner inner = this.serviceClient().get(deviceName, resourceGroupName); + if (inner != null) { + return new OrderImpl(inner, this.manager()); + } else { + return null; + } + } + public Order createOrUpdate(String deviceName, String resourceGroupName, OrderInner order) { OrderInner inner = this.serviceClient().createOrUpdate(deviceName, resourceGroupName, order); if (inner != null) { @@ -87,6 +88,30 @@ public void delete(String deviceName, String resourceGroupName, Context context) this.serviceClient().delete(deviceName, resourceGroupName, context); } + 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; + } + } + + 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; + } + } + 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 280fcda9d7ef..b492c1b819ee 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/RolesClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/RolesClientImpl.java index feeda948c656..720ea325cb8e 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/RolesClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/RolesClientImpl.java @@ -29,7 +29,6 @@ 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.RolesClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in RolesClient. */ public final class RolesClientImpl implements RolesClient { - private final ClientLogger logger = new ClientLogger(RolesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final RolesService service; @@ -65,7 +62,7 @@ public final class RolesClientImpl implements RolesClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface RolesService { + public interface RolesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -149,7 +146,8 @@ Mono> listByDataBoxEdgeDeviceNext( * @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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -207,7 +205,8 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * @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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -261,7 +260,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * @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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, String resourceGroupName) { @@ -279,7 +278,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, Str * @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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -297,7 +296,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName) { @@ -313,7 +312,7 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, Strin * @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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice( @@ -330,7 +329,7 @@ public PagedIterable listByDataBoxEdgeDevice( * @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 role by name. + * @return a specific role by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String deviceName, String name, String resourceGroupName) { @@ -383,7 +382,7 @@ private Mono> getWithResponseAsync(String deviceName, String * @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 role by name. + * @return a specific role by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -433,19 +432,12 @@ private Mono> getWithResponseAsync( * @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 role by name. + * @return a specific role by name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String deviceName, String name, String resourceGroupName) { return getWithResponseAsync(deviceName, name, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -454,14 +446,16 @@ private Mono getAsync(String deviceName, String name, String resource * @param deviceName The device name. * @param name 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 specific role by name. + * @return a specific role by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RoleInner get(String deviceName, String name, String resourceGroupName) { - return getAsync(deviceName, name, resourceGroupName).block(); + public Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); } /** @@ -470,16 +464,14 @@ public RoleInner get(String deviceName, String name, String resourceGroupName) { * @param deviceName The device name. * @param name 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 specific role by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); + public RoleInner get(String deviceName, String name, String resourceGroupName) { + return getWithResponse(deviceName, name, resourceGroupName, Context.NONE).getValue(); } /** @@ -492,7 +484,7 @@ public Response getWithResponse( * @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 compute role. + * @return compute role along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -553,7 +545,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 compute role. + * @return compute role along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -610,9 +602,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 compute role. + * @return the {@link PollerFlux} for polling of compute role. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, RoleInner> beginCreateOrUpdateAsync( String deviceName, String name, String resourceGroupName, RoleInner role) { Mono>> mono = @@ -620,7 +612,7 @@ private PollerFlux, RoleInner> beginCreateOrUpdateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), RoleInner.class, RoleInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), RoleInner.class, RoleInner.class, this.client.getContext()); } /** @@ -634,9 +626,9 @@ private PollerFlux, RoleInner> beginCreateOrUpdateAsync( * @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 compute role. + * @return the {@link PollerFlux} for polling of compute role. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, RoleInner> beginCreateOrUpdateAsync( String deviceName, String name, String resourceGroupName, RoleInner role, Context context) { context = this.client.mergeContext(context); @@ -658,9 +650,9 @@ private PollerFlux, RoleInner> beginCreateOrUpdateAsync( * @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 compute role. + * @return the {@link SyncPoller} for polling of compute role. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, RoleInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, RoleInner role) { return beginCreateOrUpdateAsync(deviceName, name, resourceGroupName, role).getSyncPoller(); @@ -677,9 +669,9 @@ public SyncPoller, RoleInner> beginCreateOrUpdate( * @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 compute role. + * @return the {@link SyncPoller} for polling of compute role. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, RoleInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, RoleInner role, Context context) { return beginCreateOrUpdateAsync(deviceName, name, resourceGroupName, role, context).getSyncPoller(); @@ -695,7 +687,7 @@ public SyncPoller, RoleInner> beginCreateOrUpdate( * @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 compute role. + * @return compute role on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -716,7 +708,7 @@ private Mono createOrUpdateAsync( * @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 compute role. + * @return compute role on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -771,7 +763,7 @@ public RoleInner createOrUpdate( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -825,7 +817,7 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -875,15 +867,16 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName) { Mono>> mono = deleteWithResponseAsync(deviceName, name, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -896,9 +889,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -917,9 +910,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName) { return beginDeleteAsync(deviceName, name, resourceGroupName).getSyncPoller(); } @@ -934,9 +927,9 @@ public SyncPoller, Void> beginDelete(String deviceName, String * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String deviceName, String name, String resourceGroupName, Context context) { return beginDeleteAsync(deviceName, name, resourceGroupName, context).getSyncPoller(); @@ -951,7 +944,7 @@ public SyncPoller, Void> beginDelete( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName) { @@ -970,7 +963,7 @@ private Mono deleteAsync(String deviceName, String name, String resourceGr * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName, Context context) { @@ -1013,11 +1006,13 @@ public void delete(String deviceName, String name, String resourceGroupName, Con /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync(String nextLink) { @@ -1049,12 +1044,14 @@ private Mono> listByDataBoxEdgeDeviceNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/RolesImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/RolesImpl.java index 46f66e726c6b..14bb14c81b69 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/RolesImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/RolesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.RoleInner; import com.azure.resourcemanager.databoxedge.models.Role; import com.azure.resourcemanager.databoxedge.models.Roles; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class RolesImpl implements Roles { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RolesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(RolesImpl.class); private final RolesClient innerClient; @@ -38,15 +37,6 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, String res return Utils.mapPage(inner, inner1 -> new RoleImpl(inner1, this.manager())); } - public Role get(String deviceName, String name, String resourceGroupName) { - RoleInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); - if (inner != null) { - return new RoleImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context) { Response inner = this.serviceClient().getWithResponse(deviceName, name, resourceGroupName, context); if (inner != null) { @@ -60,6 +50,15 @@ public Response getWithResponse(String deviceName, String name, String res } } + public Role get(String deviceName, String name, String resourceGroupName) { + RoleInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); + if (inner != null) { + return new RoleImpl(inner, this.manager()); + } else { + return null; + } + } + public Role createOrUpdate(String deviceName, String name, String resourceGroupName, RoleInner role) { RoleInner inner = this.serviceClient().createOrUpdate(deviceName, name, resourceGroupName, role); if (inner != null) { 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 6c18dafcb907..4de125bb0ec3 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(); } @@ -91,6 +96,10 @@ public DataPolicy dataPolicy() { return this.innerModel().dataPolicy(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ShareInner innerModel() { return this.innerObject; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SharesClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SharesClientImpl.java index 303bf87103f2..5121c4ca8601 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SharesClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SharesClientImpl.java @@ -30,7 +30,6 @@ 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.SharesClient; @@ -42,8 +41,6 @@ /** An instance of this class provides access to all the operations defined in SharesClient. */ public final class SharesClientImpl implements SharesClient { - private final ClientLogger logger = new ClientLogger(SharesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SharesService service; @@ -66,7 +63,7 @@ public final class SharesClientImpl implements SharesClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface SharesService { + public interface SharesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -166,7 +163,8 @@ Mono> listByDataBoxEdgeDeviceNext( * @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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -224,7 +222,8 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * @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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -278,7 +277,8 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * @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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, String resourceGroupName) { @@ -296,7 +296,8 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, St * @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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -314,7 +315,8 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName) { @@ -330,7 +332,8 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, Stri * @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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice( @@ -347,7 +350,7 @@ public PagedIterable listByDataBoxEdgeDevice( * @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 share by name. + * @return a share by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String deviceName, String name, String resourceGroupName) { @@ -400,7 +403,7 @@ private Mono> getWithResponseAsync(String deviceName, Strin * @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 share by name. + * @return a share by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -450,19 +453,12 @@ private Mono> getWithResponseAsync( * @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 share by name. + * @return a share by name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String deviceName, String name, String resourceGroupName) { return getWithResponseAsync(deviceName, name, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -471,14 +467,16 @@ private Mono getAsync(String deviceName, String name, String resourc * @param deviceName The device name. * @param name The share 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 share by name. + * @return a share by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ShareInner get(String deviceName, String name, String resourceGroupName) { - return getAsync(deviceName, name, resourceGroupName).block(); + public Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); } /** @@ -487,16 +485,14 @@ public ShareInner get(String deviceName, String name, String resourceGroupName) * @param deviceName The device name. * @param name The share 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 share by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); + public ShareInner get(String deviceName, String name, String resourceGroupName) { + return getWithResponse(deviceName, name, resourceGroupName, Context.NONE).getValue(); } /** @@ -509,7 +505,8 @@ public Response getWithResponse( * @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 represents a share on the Data Box Edge/Gateway device. + * @return represents a share on the Data Box Edge/Gateway device along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -570,7 +567,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 represents a share on the Data Box Edge/Gateway device. + * @return represents a share on the Data Box Edge/Gateway device along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -627,9 +625,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 represents a share on the Data Box Edge/Gateway device. + * @return the {@link PollerFlux} for polling of represents a share on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ShareInner> beginCreateOrUpdateAsync( String deviceName, String name, String resourceGroupName, ShareInner share) { Mono>> mono = @@ -637,7 +635,7 @@ private PollerFlux, ShareInner> beginCreateOrUpdateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), ShareInner.class, ShareInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), ShareInner.class, ShareInner.class, this.client.getContext()); } /** @@ -651,9 +649,9 @@ private PollerFlux, ShareInner> beginCreateOrUpdateAsync( * @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 represents a share on the Data Box Edge/Gateway device. + * @return the {@link PollerFlux} for polling of represents a share on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ShareInner> beginCreateOrUpdateAsync( String deviceName, String name, String resourceGroupName, ShareInner share, Context context) { context = this.client.mergeContext(context); @@ -675,9 +673,9 @@ private PollerFlux, ShareInner> beginCreateOrUpdateAsync( * @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 represents a share on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a share on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ShareInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, ShareInner share) { return beginCreateOrUpdateAsync(deviceName, name, resourceGroupName, share).getSyncPoller(); @@ -694,9 +692,9 @@ public SyncPoller, ShareInner> beginCreateOrUpdate( * @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 represents a share on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a share on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ShareInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, ShareInner share, Context context) { return beginCreateOrUpdateAsync(deviceName, name, resourceGroupName, share, context).getSyncPoller(); @@ -712,7 +710,7 @@ public SyncPoller, ShareInner> beginCreateOrUpdate( * @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 represents a share on the Data Box Edge/Gateway device. + * @return represents a share on the Data Box Edge/Gateway device on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -733,7 +731,7 @@ private Mono createOrUpdateAsync( * @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 represents a share on the Data Box Edge/Gateway device. + * @return represents a share on the Data Box Edge/Gateway device on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -788,7 +786,7 @@ public ShareInner createOrUpdate( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -842,7 +840,7 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -892,15 +890,16 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName) { Mono>> mono = deleteWithResponseAsync(deviceName, name, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -913,9 +912,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -934,9 +933,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName) { return beginDeleteAsync(deviceName, name, resourceGroupName).getSyncPoller(); } @@ -951,9 +950,9 @@ public SyncPoller, Void> beginDelete(String deviceName, String * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String deviceName, String name, String resourceGroupName, Context context) { return beginDeleteAsync(deviceName, name, resourceGroupName, context).getSyncPoller(); @@ -968,7 +967,7 @@ public SyncPoller, Void> beginDelete( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName) { @@ -987,7 +986,7 @@ private Mono deleteAsync(String deviceName, String name, String resourceGr * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName, Context context) { @@ -1036,7 +1035,7 @@ public void delete(String deviceName, String name, String resourceGroupName, Con * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> refreshWithResponseAsync( @@ -1090,7 +1089,7 @@ private Mono>> refreshWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> refreshWithResponseAsync( @@ -1140,15 +1139,16 @@ private Mono>> refreshWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRefreshAsync( String deviceName, String name, String resourceGroupName) { Mono>> mono = refreshWithResponseAsync(deviceName, name, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1161,9 +1161,9 @@ private PollerFlux, Void> beginRefreshAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRefreshAsync( String deviceName, String name, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -1182,9 +1182,9 @@ private PollerFlux, Void> beginRefreshAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRefresh(String deviceName, String name, String resourceGroupName) { return beginRefreshAsync(deviceName, name, resourceGroupName).getSyncPoller(); } @@ -1199,9 +1199,9 @@ public SyncPoller, Void> beginRefresh(String deviceName, String * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRefresh( String deviceName, String name, String resourceGroupName, Context context) { return beginRefreshAsync(deviceName, name, resourceGroupName, context).getSyncPoller(); @@ -1216,7 +1216,7 @@ public SyncPoller, Void> beginRefresh( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono refreshAsync(String deviceName, String name, String resourceGroupName) { @@ -1235,7 +1235,7 @@ private Mono refreshAsync(String deviceName, String name, String resourceG * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono refreshAsync(String deviceName, String name, String resourceGroupName, Context context) { @@ -1278,11 +1278,13 @@ public void refresh(String deviceName, String name, String resourceGroupName, Co /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync(String nextLink) { @@ -1314,12 +1316,14 @@ private Mono> listByDataBoxEdgeDeviceNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SharesImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SharesImpl.java index c20595f413a7..5f387d516070 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SharesImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SharesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.ShareInner; import com.azure.resourcemanager.databoxedge.models.Share; import com.azure.resourcemanager.databoxedge.models.Shares; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SharesImpl implements Shares { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SharesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SharesImpl.class); private final SharesClient innerClient; @@ -39,15 +38,6 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, String re return Utils.mapPage(inner, inner1 -> new ShareImpl(inner1, this.manager())); } - public Share get(String deviceName, String name, String resourceGroupName) { - ShareInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); - if (inner != null) { - return new ShareImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context) { Response inner = this.serviceClient().getWithResponse(deviceName, name, resourceGroupName, context); if (inner != null) { @@ -61,6 +51,15 @@ public Response getWithResponse(String deviceName, String name, String re } } + public Share get(String deviceName, String name, String resourceGroupName) { + ShareInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); + if (inner != null) { + return new ShareImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String deviceName, String name, String resourceGroupName) { this.serviceClient().delete(deviceName, name, resourceGroupName); } @@ -80,7 +79,7 @@ public void refresh(String deviceName, String name, String resourceGroupName, Co public Share getById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -89,14 +88,14 @@ public Share getById(String id) { } String name = Utils.getValueFromIdByName(id, "shares"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'shares'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -108,7 +107,7 @@ public Share getById(String id) { public Response getByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -117,14 +116,14 @@ public Response getByIdWithResponse(String id, Context context) { } String name = Utils.getValueFromIdByName(id, "shares"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'shares'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -136,7 +135,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -145,14 +144,14 @@ public void deleteById(String id) { } String name = Utils.getValueFromIdByName(id, "shares"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'shares'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -164,7 +163,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -173,14 +172,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String name = Utils.getValueFromIdByName(id, "shares"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'shares'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 3c1882a1cafe..000000000000 --- 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 bfd8e11d56e8..05aeaa8bd760 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(); } @@ -61,6 +66,10 @@ public String storageAccountId() { return this.innerModel().storageAccountId(); } + public String resourceGroupName() { + return resourceGroupName; + } + public StorageAccountCredentialInner innerModel() { return this.innerObject; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialsClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialsClientImpl.java index 7e6139fd759c..1ab9bc867fa7 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialsClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialsClientImpl.java @@ -29,7 +29,6 @@ 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.StorageAccountCredentialsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in StorageAccountCredentialsClient. */ public final class StorageAccountCredentialsClientImpl implements StorageAccountCredentialsClient { - private final ClientLogger logger = new ClientLogger(StorageAccountCredentialsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final StorageAccountCredentialsService service; @@ -68,7 +65,7 @@ public final class StorageAccountCredentialsClientImpl implements StorageAccount */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface StorageAccountCredentialsService { + public interface StorageAccountCredentialsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -152,7 +149,8 @@ Mono> listByDataBoxEdgeDeviceNext( * @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 all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * @return all the storage account credentials in a Data Box Edge/Data Box Gateway device along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -210,7 +208,8 @@ private Mono> listByDataBoxEdgeDevi * @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 all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * @return all the storage account credentials in a Data Box Edge/Data Box Gateway device along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -264,7 +263,8 @@ private Mono> listByDataBoxEdgeDevi * @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 all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * @return all the storage account credentials in a Data Box Edge/Data Box Gateway device as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -283,7 +283,8 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * @return all the storage account credentials in a Data Box Edge/Data Box Gateway device as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -301,7 +302,8 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * @return all the storage account credentials in a Data Box Edge/Data Box Gateway device as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice( @@ -318,7 +320,8 @@ public PagedIterable listByDataBoxEdgeDevice( * @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 all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * @return all the storage account credentials in a Data Box Edge/Data Box Gateway device as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice( @@ -335,7 +338,8 @@ public PagedIterable listByDataBoxEdgeDevice( * @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 properties of the specified storage account credential. + * @return the properties of the specified storage account credential along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -389,7 +393,8 @@ private Mono> getWithResponseAsync( * @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 properties of the specified storage account credential. + * @return the properties of the specified storage account credential along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -439,19 +444,12 @@ private Mono> getWithResponseAsync( * @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 properties of the specified storage account credential. + * @return the properties of the specified storage account credential on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String deviceName, String name, String resourceGroupName) { return getWithResponseAsync(deviceName, name, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -460,14 +458,16 @@ private Mono getAsync(String deviceName, String n * @param deviceName The device name. * @param name The storage account credential 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 properties of the specified storage account credential. + * @return the properties of the specified storage account credential along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageAccountCredentialInner get(String deviceName, String name, String resourceGroupName) { - return getAsync(deviceName, name, resourceGroupName).block(); + public Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); } /** @@ -476,16 +476,14 @@ public StorageAccountCredentialInner get(String deviceName, String name, String * @param deviceName The device name. * @param name The storage account credential 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 properties of the specified storage account credential. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); + public StorageAccountCredentialInner get(String deviceName, String name, String resourceGroupName) { + return getWithResponse(deviceName, name, resourceGroupName, Context.NONE).getValue(); } /** @@ -498,7 +496,7 @@ public Response getWithResponse( * @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 storage account credential. + * @return the storage account credential along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -564,7 +562,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 storage account credential. + * @return the storage account credential along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -627,9 +625,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 storage account credential. + * @return the {@link PollerFlux} for polling of the storage account credential. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageAccountCredentialInner> beginCreateOrUpdateAsync( String deviceName, @@ -645,7 +643,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), StorageAccountCredentialInner.class, StorageAccountCredentialInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -659,9 +657,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 storage account credential. + * @return the {@link PollerFlux} for polling of the storage account credential. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageAccountCredentialInner> beginCreateOrUpdateAsync( String deviceName, @@ -692,9 +690,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 storage account credential. + * @return the {@link SyncPoller} for polling of the storage account credential. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageAccountCredentialInner> beginCreateOrUpdate( String deviceName, String name, @@ -714,9 +712,9 @@ public SyncPoller, StorageAccountCrede * @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 storage account credential. + * @return the {@link SyncPoller} for polling of the storage account credential. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageAccountCredentialInner> beginCreateOrUpdate( String deviceName, String name, @@ -737,7 +735,7 @@ public SyncPoller, StorageAccountCrede * @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 storage account credential. + * @return the storage account credential on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -761,7 +759,7 @@ private Mono createOrUpdateAsync( * @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 storage account credential. + * @return the storage account credential on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -828,7 +826,7 @@ public StorageAccountCredentialInner createOrUpdate( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -882,7 +880,7 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -932,15 +930,16 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName) { Mono>> mono = deleteWithResponseAsync(deviceName, name, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -953,9 +952,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -974,9 +973,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName) { return beginDeleteAsync(deviceName, name, resourceGroupName).getSyncPoller(); } @@ -991,9 +990,9 @@ public SyncPoller, Void> beginDelete(String deviceName, String * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String deviceName, String name, String resourceGroupName, Context context) { return beginDeleteAsync(deviceName, name, resourceGroupName, context).getSyncPoller(); @@ -1008,7 +1007,7 @@ public SyncPoller, Void> beginDelete( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName) { @@ -1027,7 +1026,7 @@ private Mono deleteAsync(String deviceName, String name, String resourceGr * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName, Context context) { @@ -1070,11 +1069,13 @@ public void delete(String deviceName, String name, String resourceGroupName, Con /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the collection of storage account credentials. + * @return the collection of storage account credentials along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync( @@ -1107,12 +1108,14 @@ private Mono> listByDataBoxEdgeDevi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the collection of storage account credentials. + * @return the collection of storage account credentials along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialsImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialsImpl.java index 70b9f23b4565..8a1caf02d9b1 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialsImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountCredentialsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.StorageAccountCredentialInner; import com.azure.resourcemanager.databoxedge.models.StorageAccountCredential; import com.azure.resourcemanager.databoxedge.models.StorageAccountCredentials; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class StorageAccountCredentialsImpl implements StorageAccountCredentials { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountCredentialsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(StorageAccountCredentialsImpl.class); private final StorageAccountCredentialsClient innerClient; @@ -43,15 +42,6 @@ public PagedIterable listByDataBoxEdgeDevice( return Utils.mapPage(inner, inner1 -> new StorageAccountCredentialImpl(inner1, this.manager())); } - public StorageAccountCredential get(String deviceName, String name, String resourceGroupName) { - StorageAccountCredentialInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); - if (inner != null) { - return new StorageAccountCredentialImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String deviceName, String name, String resourceGroupName, Context context) { Response inner = @@ -67,6 +57,15 @@ public Response getWithResponse( } } + public StorageAccountCredential get(String deviceName, String name, String resourceGroupName) { + StorageAccountCredentialInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); + if (inner != null) { + return new StorageAccountCredentialImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String deviceName, String name, String resourceGroupName) { this.serviceClient().delete(deviceName, name, resourceGroupName); } @@ -78,7 +77,7 @@ public void delete(String deviceName, String name, String resourceGroupName, Con public StorageAccountCredential getById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -87,7 +86,7 @@ public StorageAccountCredential getById(String id) { } String name = Utils.getValueFromIdByName(id, "storageAccountCredentials"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -97,7 +96,7 @@ public StorageAccountCredential getById(String id) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -109,7 +108,7 @@ public StorageAccountCredential getById(String id) { public Response getByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -118,7 +117,7 @@ public Response getByIdWithResponse(String id, Context } String name = Utils.getValueFromIdByName(id, "storageAccountCredentials"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -128,7 +127,7 @@ public Response getByIdWithResponse(String id, Context } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -140,7 +139,7 @@ public Response getByIdWithResponse(String id, Context public void deleteById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -149,7 +148,7 @@ public void deleteById(String id) { } String name = Utils.getValueFromIdByName(id, "storageAccountCredentials"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -159,7 +158,7 @@ public void deleteById(String id) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -171,7 +170,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -180,7 +179,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String name = Utils.getValueFromIdByName(id, "storageAccountCredentials"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -190,7 +189,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 d7bad901d5c5..e194c0be3c02 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(); } @@ -51,6 +56,10 @@ public Integer containerCount() { return this.innerModel().containerCount(); } + public String resourceGroupName() { + return resourceGroupName; + } + public StorageAccountInner innerModel() { return this.innerObject; } @@ -146,6 +155,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 +170,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 c5c1de48f611..31a088be4d81 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 @@ -29,7 +29,6 @@ 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.StorageAccountsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in StorageAccountsClient. */ public final class StorageAccountsClientImpl implements StorageAccountsClient { - private final ClientLogger logger = new ClientLogger(StorageAccountsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final StorageAccountsService service; @@ -66,7 +63,7 @@ public final class StorageAccountsClientImpl implements StorageAccountsClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface StorageAccountsService { + public interface StorageAccountsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -143,14 +140,15 @@ 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. * @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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -200,7 +198,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. @@ -208,7 +206,8 @@ private Mono> listByDataBoxEdgeDeviceSinglePa * @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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -255,14 +254,15 @@ 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. * @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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, String resourceGroupName) { @@ -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. @@ -280,7 +280,8 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String devic * @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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -291,14 +292,15 @@ 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. * @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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName) { @@ -306,7 +308,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. @@ -314,7 +316,8 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceN * @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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice( @@ -331,7 +334,7 @@ public PagedIterable listByDataBoxEdgeDevice( * @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 StorageAccount by name. + * @return a StorageAccount by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -386,7 +389,7 @@ private Mono> getWithResponseAsync( * @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 StorageAccount by name. + * @return a StorageAccount by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -437,19 +440,12 @@ private Mono> getWithResponseAsync( * @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 StorageAccount by name. + * @return a StorageAccount by name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String deviceName, String storageAccountName, String resourceGroupName) { return getWithResponseAsync(deviceName, storageAccountName, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -458,14 +454,16 @@ private Mono getAsync(String deviceName, String storageAcco * @param deviceName The device name. * @param storageAccountName The storage account 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 StorageAccount by name. + * @return a StorageAccount by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageAccountInner get(String deviceName, String storageAccountName, String resourceGroupName) { - return getAsync(deviceName, storageAccountName, resourceGroupName).block(); + public Response getWithResponse( + String deviceName, String storageAccountName, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, storageAccountName, resourceGroupName, context).block(); } /** @@ -474,16 +472,14 @@ public StorageAccountInner get(String deviceName, String storageAccountName, Str * @param deviceName The device name. * @param storageAccountName The storage account 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 StorageAccount by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String deviceName, String storageAccountName, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, storageAccountName, resourceGroupName, context).block(); + public StorageAccountInner get(String deviceName, String storageAccountName, String resourceGroupName) { + return getWithResponse(deviceName, storageAccountName, resourceGroupName, Context.NONE).getValue(); } /** @@ -496,7 +492,8 @@ public Response getWithResponse( * @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 represents a Storage Account on the Data Box Edge/Gateway device. + * @return represents a Storage Account on the Data Box Edge/Gateway device along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -558,7 +555,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 represents a Storage Account on the Data Box Edge/Gateway device. + * @return represents a Storage Account on the Data Box Edge/Gateway device along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -620,9 +618,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 represents a Storage Account on the Data Box Edge/Gateway device. + * @return the {@link PollerFlux} for polling of represents a Storage Account on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageAccountInner> beginCreateOrUpdateAsync( String deviceName, String storageAccountName, String resourceGroupName, StorageAccountInner storageAccount) { Mono>> mono = @@ -634,7 +632,7 @@ private PollerFlux, StorageAccountInner> beginCr this.client.getHttpPipeline(), StorageAccountInner.class, StorageAccountInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -648,9 +646,9 @@ private PollerFlux, StorageAccountInner> beginCr * @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 represents a Storage Account on the Data Box Edge/Gateway device. + * @return the {@link PollerFlux} for polling of represents a Storage Account on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageAccountInner> beginCreateOrUpdateAsync( String deviceName, String storageAccountName, @@ -676,9 +674,9 @@ private PollerFlux, StorageAccountInner> beginCr * @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 represents a Storage Account on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a Storage Account on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageAccountInner> beginCreateOrUpdate( String deviceName, String storageAccountName, String resourceGroupName, StorageAccountInner storageAccount) { return beginCreateOrUpdateAsync(deviceName, storageAccountName, resourceGroupName, storageAccount) @@ -696,9 +694,9 @@ public SyncPoller, StorageAccountInner> beginCre * @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 represents a Storage Account on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a Storage Account on the Data Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageAccountInner> beginCreateOrUpdate( String deviceName, String storageAccountName, @@ -719,7 +717,8 @@ public SyncPoller, StorageAccountInner> beginCre * @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 represents a Storage Account on the Data Box Edge/Gateway device. + * @return represents a Storage Account on the Data Box Edge/Gateway device on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -740,7 +739,8 @@ private Mono createOrUpdateAsync( * @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 represents a Storage Account on the Data Box Edge/Gateway device. + * @return represents a Storage Account on the Data Box Edge/Gateway device on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -804,7 +804,7 @@ public StorageAccountInner createOrUpdate( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -859,7 +859,7 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -910,16 +910,17 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String storageAccountName, String resourceGroupName) { Mono>> mono = deleteWithResponseAsync(deviceName, storageAccountName, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -932,9 +933,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String storageAccountName, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -954,9 +955,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String deviceName, String storageAccountName, String resourceGroupName) { return beginDeleteAsync(deviceName, storageAccountName, resourceGroupName).getSyncPoller(); @@ -972,9 +973,9 @@ public SyncPoller, Void> beginDelete( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String deviceName, String storageAccountName, String resourceGroupName, Context context) { return beginDeleteAsync(deviceName, storageAccountName, resourceGroupName, context).getSyncPoller(); @@ -989,7 +990,7 @@ public SyncPoller, Void> beginDelete( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String storageAccountName, String resourceGroupName) { @@ -1008,7 +1009,7 @@ private Mono deleteAsync(String deviceName, String storageAccountName, Str * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1052,11 +1053,13 @@ public void delete(String deviceName, String storageAccountName, String resource /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync(String nextLink) { @@ -1088,12 +1091,14 @@ private Mono> listByDataBoxEdgeDeviceNextSing /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountsImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountsImpl.java index 2fa6f464276f..8236957c9fc1 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountsImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/StorageAccountsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.StorageAccountInner; import com.azure.resourcemanager.databoxedge.models.StorageAccount; import com.azure.resourcemanager.databoxedge.models.StorageAccounts; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class StorageAccountsImpl implements StorageAccounts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(StorageAccountsImpl.class); private final StorageAccountsClient innerClient; @@ -41,15 +40,6 @@ public PagedIterable listByDataBoxEdgeDevice( return Utils.mapPage(inner, inner1 -> new StorageAccountImpl(inner1, this.manager())); } - public StorageAccount get(String deviceName, String storageAccountName, String resourceGroupName) { - StorageAccountInner inner = this.serviceClient().get(deviceName, storageAccountName, resourceGroupName); - if (inner != null) { - return new StorageAccountImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String deviceName, String storageAccountName, String resourceGroupName, Context context) { Response inner = @@ -65,6 +55,15 @@ public Response getWithResponse( } } + public StorageAccount get(String deviceName, String storageAccountName, String resourceGroupName) { + StorageAccountInner inner = this.serviceClient().get(deviceName, storageAccountName, resourceGroupName); + if (inner != null) { + return new StorageAccountImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String deviceName, String storageAccountName, String resourceGroupName) { this.serviceClient().delete(deviceName, storageAccountName, resourceGroupName); } @@ -76,7 +75,7 @@ public void delete(String deviceName, String storageAccountName, String resource public StorageAccount getById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -85,7 +84,7 @@ public StorageAccount getById(String id) { } String storageAccountName = Utils.getValueFromIdByName(id, "storageAccounts"); if (storageAccountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -93,7 +92,7 @@ public StorageAccount getById(String id) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -105,7 +104,7 @@ public StorageAccount getById(String id) { public Response getByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -114,7 +113,7 @@ public Response getByIdWithResponse(String id, Context context) } String storageAccountName = Utils.getValueFromIdByName(id, "storageAccounts"); if (storageAccountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -122,7 +121,7 @@ public Response getByIdWithResponse(String id, Context context) } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -134,7 +133,7 @@ public Response getByIdWithResponse(String id, Context context) public void deleteById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -143,7 +142,7 @@ public void deleteById(String id) { } String storageAccountName = Utils.getValueFromIdByName(id, "storageAccounts"); if (storageAccountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -151,7 +150,7 @@ public void deleteById(String id) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -163,7 +162,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -172,7 +171,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String storageAccountName = Utils.getValueFromIdByName(id, "storageAccounts"); if (storageAccountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -180,7 +179,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 000000000000..5f2048751f0a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SupportPackagesClientImpl.java @@ -0,0 +1,360 @@ +// 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.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 { + /** 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") + public 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 {@link Response} on successful completion of {@link Mono}. + */ + @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 {@link Response} on successful completion of {@link Mono}. + */ + @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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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, this.client.getContext()); + } + + /** + * 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 A {@link Mono} that completes when a successful response is received. + */ + @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 A {@link Mono} that completes when a successful response is received. + */ + @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 000000000000..f49a75aa2547 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SupportPackagesImpl.java @@ -0,0 +1,48 @@ +// 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; + +public final class SupportPackagesImpl implements SupportPackages { + private static 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 32887e6f7617..e397c77effea 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/TriggersClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggersClientImpl.java index f7bb679d8f8f..ad3a405c13f9 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggersClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggersClientImpl.java @@ -29,7 +29,6 @@ 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.TriggersClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in TriggersClient. */ public final class TriggersClientImpl implements TriggersClient { - private final ClientLogger logger = new ClientLogger(TriggersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final TriggersService service; @@ -65,7 +62,7 @@ public final class TriggersClientImpl implements TriggersClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface TriggersService { + public interface TriggersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -151,7 +148,8 @@ Mono> listByDataBoxEdgeDeviceNext( * @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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -211,7 +209,8 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync * @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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -267,7 +266,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync * @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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -285,7 +284,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, String resourceGroupName) { @@ -305,7 +304,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, * @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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -323,7 +322,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName) { @@ -341,7 +340,7 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, St * @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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice( @@ -358,7 +357,7 @@ public PagedIterable listByDataBoxEdgeDevice( * @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 trigger by name. + * @return a specific trigger by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -412,7 +411,7 @@ private Mono> getWithResponseAsync( * @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 trigger by name. + * @return a specific trigger by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -462,19 +461,12 @@ private Mono> getWithResponseAsync( * @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 trigger by name. + * @return a specific trigger by name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String deviceName, String name, String resourceGroupName) { return getWithResponseAsync(deviceName, name, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -483,14 +475,16 @@ private Mono getAsync(String deviceName, String name, String resou * @param deviceName The device name. * @param name The trigger 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 trigger by name. + * @return a specific trigger by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TriggerInner get(String deviceName, String name, String resourceGroupName) { - return getAsync(deviceName, name, resourceGroupName).block(); + public Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); } /** @@ -499,16 +493,14 @@ public TriggerInner get(String deviceName, String name, String resourceGroupName * @param deviceName The device name. * @param name The trigger 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 trigger by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); + public TriggerInner get(String deviceName, String name, String resourceGroupName) { + return getWithResponse(deviceName, name, resourceGroupName, Context.NONE).getValue(); } /** @@ -521,7 +513,7 @@ public Response getWithResponse( * @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 trigger details. + * @return trigger details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -582,7 +574,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 trigger details. + * @return trigger details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -639,9 +631,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 trigger details. + * @return the {@link PollerFlux} for polling of trigger details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, TriggerInner> beginCreateOrUpdateAsync( String deviceName, String name, String resourceGroupName, TriggerInner trigger) { Mono>> mono = @@ -649,7 +641,7 @@ private PollerFlux, TriggerInner> beginCreateOrUpdateAs return this .client .getLroResult( - mono, this.client.getHttpPipeline(), TriggerInner.class, TriggerInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), TriggerInner.class, TriggerInner.class, this.client.getContext()); } /** @@ -663,9 +655,9 @@ private PollerFlux, TriggerInner> beginCreateOrUpdateAs * @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 trigger details. + * @return the {@link PollerFlux} for polling of trigger details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, TriggerInner> beginCreateOrUpdateAsync( String deviceName, String name, String resourceGroupName, TriggerInner trigger, Context context) { context = this.client.mergeContext(context); @@ -687,9 +679,9 @@ private PollerFlux, TriggerInner> beginCreateOrUpdateAs * @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 trigger details. + * @return the {@link SyncPoller} for polling of trigger details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TriggerInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, TriggerInner trigger) { return beginCreateOrUpdateAsync(deviceName, name, resourceGroupName, trigger).getSyncPoller(); @@ -706,9 +698,9 @@ public SyncPoller, TriggerInner> beginCreateOrUpdate( * @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 trigger details. + * @return the {@link SyncPoller} for polling of trigger details. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TriggerInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, TriggerInner trigger, Context context) { return beginCreateOrUpdateAsync(deviceName, name, resourceGroupName, trigger, context).getSyncPoller(); @@ -724,7 +716,7 @@ public SyncPoller, TriggerInner> beginCreateOrUpdate( * @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 trigger details. + * @return trigger details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -745,7 +737,7 @@ private Mono createOrUpdateAsync( * @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 trigger details. + * @return trigger details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -800,7 +792,7 @@ public TriggerInner createOrUpdate( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -854,7 +846,7 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -904,15 +896,16 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName) { Mono>> mono = deleteWithResponseAsync(deviceName, name, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -925,9 +918,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -946,9 +939,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName) { return beginDeleteAsync(deviceName, name, resourceGroupName).getSyncPoller(); } @@ -963,9 +956,9 @@ public SyncPoller, Void> beginDelete(String deviceName, String * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String deviceName, String name, String resourceGroupName, Context context) { return beginDeleteAsync(deviceName, name, resourceGroupName, context).getSyncPoller(); @@ -980,7 +973,7 @@ public SyncPoller, Void> beginDelete( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName) { @@ -999,7 +992,7 @@ private Mono deleteAsync(String deviceName, String name, String resourceGr * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName, Context context) { @@ -1042,11 +1035,13 @@ public void delete(String deviceName, String name, String resourceGroupName, Con /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync(String nextLink) { @@ -1078,12 +1073,14 @@ private Mono> listByDataBoxEdgeDeviceNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggersImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggersImpl.java index 1704d40ff57a..bf8923e186b1 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggersImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggersImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.TriggerInner; import com.azure.resourcemanager.databoxedge.models.Trigger; import com.azure.resourcemanager.databoxedge.models.Triggers; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class TriggersImpl implements Triggers { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(TriggersImpl.class); private final TriggersClient innerClient; @@ -40,15 +39,6 @@ public PagedIterable listByDataBoxEdgeDevice( return Utils.mapPage(inner, inner1 -> new TriggerImpl(inner1, this.manager())); } - public Trigger get(String deviceName, String name, String resourceGroupName) { - TriggerInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); - if (inner != null) { - return new TriggerImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String deviceName, String name, String resourceGroupName, Context context) { Response inner = @@ -64,6 +54,15 @@ public Response getWithResponse( } } + public Trigger get(String deviceName, String name, String resourceGroupName) { + TriggerInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); + if (inner != null) { + return new TriggerImpl(inner, this.manager()); + } else { + return null; + } + } + public Trigger createOrUpdate(String deviceName, String name, String resourceGroupName, TriggerInner trigger) { TriggerInner inner = this.serviceClient().createOrUpdate(deviceName, name, resourceGroupName, trigger); if (inner != null) { 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 97e31e15efd1..25f4cc110b90 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 9bfa8220558a..2e9c2671f93b 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(); } @@ -47,6 +52,10 @@ public UserType userType() { return this.innerModel().userType(); } + public String resourceGroupName() { + return resourceGroupName; + } + public UserInner innerModel() { return this.innerObject; } @@ -150,9 +159,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 8992b1db93da..6d8862239670 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 @@ -29,7 +29,6 @@ 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.UsersClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in UsersClient. */ public final class UsersClientImpl implements UsersClient { - private final ClientLogger logger = new ClientLogger(UsersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final UsersService service; @@ -65,7 +62,7 @@ public final class UsersClientImpl implements UsersClient { */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - private interface UsersService { + public interface UsersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" @@ -147,11 +144,12 @@ 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. - * @return all the users registered on a Data Box Edge/Data Box Gateway device. + * @return all the users registered on a Data Box Edge/Data Box Gateway device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -206,12 +204,13 @@ 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the users registered on a Data Box Edge/Data Box Gateway device. + * @return all the users registered on a Data Box Edge/Data Box Gateway device along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceSinglePageAsync( @@ -263,11 +262,12 @@ 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. - * @return all the users registered on a Data Box Edge/Data Box Gateway device. + * @return all the users registered on a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -285,7 +285,8 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 all the users registered on a Data Box Edge/Data Box Gateway device. + * @return all the users registered on a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, String resourceGroupName) { @@ -300,12 +301,13 @@ 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the users registered on a Data Box Edge/Data Box Gateway device. + * @return all the users registered on a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( @@ -323,7 +325,8 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( * @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 all the users registered on a Data Box Edge/Data Box Gateway device. + * @return all the users registered on a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName) { @@ -336,12 +339,13 @@ 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the users registered on a Data Box Edge/Data Box Gateway device. + * @return all the users registered on a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDataBoxEdgeDevice( @@ -358,7 +362,8 @@ public PagedIterable listByDataBoxEdgeDevice( * @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 properties of the specified user. + * @return the properties of the specified user along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String deviceName, String name, String resourceGroupName) { @@ -411,7 +416,8 @@ private Mono> getWithResponseAsync(String deviceName, String * @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 properties of the specified user. + * @return the properties of the specified user along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -461,19 +467,12 @@ private Mono> getWithResponseAsync( * @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 properties of the specified user. + * @return the properties of the specified user on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String deviceName, String name, String resourceGroupName) { return getWithResponseAsync(deviceName, name, resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -482,14 +481,16 @@ private Mono getAsync(String deviceName, String name, String resource * @param deviceName The device name. * @param name The user 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 properties of the specified user. + * @return the properties of the specified user along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UserInner get(String deviceName, String name, String resourceGroupName) { - return getAsync(deviceName, name, resourceGroupName).block(); + public Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context) { + return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); } /** @@ -498,16 +499,14 @@ public UserInner get(String deviceName, String name, String resourceGroupName) { * @param deviceName The device name. * @param name The user 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 properties of the specified user. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context) { - return getWithResponseAsync(deviceName, name, resourceGroupName, context).block(); + public UserInner get(String deviceName, String name, String resourceGroupName) { + return getWithResponse(deviceName, name, resourceGroupName, Context.NONE).getValue(); } /** @@ -520,7 +519,8 @@ public Response getWithResponse( * @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 represents a user who has access to one or more shares on the Data Box Edge/Gateway device. + * @return represents a user who has access to one or more shares on the Data Box Edge/Gateway device along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -581,7 +581,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 represents a user who has access to one or more shares on the Data Box Edge/Gateway device. + * @return represents a user who has access to one or more shares on the Data Box Edge/Gateway device along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -638,9 +639,10 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 represents a user who has access to one or more shares on the Data Box Edge/Gateway device. + * @return the {@link PollerFlux} for polling of represents a user who has access to one or more shares on the Data + * Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, UserInner> beginCreateOrUpdateAsync( String deviceName, String name, String resourceGroupName, UserInner user) { Mono>> mono = @@ -648,7 +650,7 @@ private PollerFlux, UserInner> beginCreateOrUpdateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class, this.client.getContext()); } /** @@ -662,9 +664,10 @@ private PollerFlux, UserInner> beginCreateOrUpdateAsync( * @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 represents a user who has access to one or more shares on the Data Box Edge/Gateway device. + * @return the {@link PollerFlux} for polling of represents a user who has access to one or more shares on the Data + * Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, UserInner> beginCreateOrUpdateAsync( String deviceName, String name, String resourceGroupName, UserInner user, Context context) { context = this.client.mergeContext(context); @@ -686,9 +689,10 @@ private PollerFlux, UserInner> beginCreateOrUpdateAsync( * @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 represents a user who has access to one or more shares on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a user who has access to one or more shares on the Data + * Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, UserInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, UserInner user) { return beginCreateOrUpdateAsync(deviceName, name, resourceGroupName, user).getSyncPoller(); @@ -705,9 +709,10 @@ public SyncPoller, UserInner> beginCreateOrUpdate( * @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 represents a user who has access to one or more shares on the Data Box Edge/Gateway device. + * @return the {@link SyncPoller} for polling of represents a user who has access to one or more shares on the Data + * Box Edge/Gateway device. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, UserInner> beginCreateOrUpdate( String deviceName, String name, String resourceGroupName, UserInner user, Context context) { return beginCreateOrUpdateAsync(deviceName, name, resourceGroupName, user, context).getSyncPoller(); @@ -723,7 +728,8 @@ public SyncPoller, UserInner> beginCreateOrUpdate( * @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 represents a user who has access to one or more shares on the Data Box Edge/Gateway device. + * @return represents a user who has access to one or more shares on the Data Box Edge/Gateway device on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -744,7 +750,8 @@ private Mono createOrUpdateAsync( * @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 represents a user who has access to one or more shares on the Data Box Edge/Gateway device. + * @return represents a user who has access to one or more shares on the Data Box Edge/Gateway device on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -799,7 +806,7 @@ public UserInner createOrUpdate( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -853,7 +860,7 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -903,15 +910,16 @@ private Mono>> deleteWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName) { Mono>> mono = deleteWithResponseAsync(deviceName, name, resourceGroupName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -924,9 +932,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName, Context context) { context = this.client.mergeContext(context); @@ -945,9 +953,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String deviceName, String name, String resourceGroupName) { return beginDeleteAsync(deviceName, name, resourceGroupName).getSyncPoller(); } @@ -962,9 +970,9 @@ public SyncPoller, Void> beginDelete(String deviceName, String * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String deviceName, String name, String resourceGroupName, Context context) { return beginDeleteAsync(deviceName, name, resourceGroupName, context).getSyncPoller(); @@ -979,7 +987,7 @@ public SyncPoller, Void> beginDelete( * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName) { @@ -998,7 +1006,7 @@ private Mono deleteAsync(String deviceName, String name, String resourceGr * @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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String deviceName, String name, String resourceGroupName, Context context) { @@ -1041,11 +1049,12 @@ public void delete(String deviceName, String name, String resourceGroupName, Con /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 users. + * @return collection of users along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync(String nextLink) { @@ -1077,12 +1086,13 @@ private Mono> listByDataBoxEdgeDeviceNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 users. + * @return collection of users along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDataBoxEdgeDeviceNextSinglePageAsync( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UsersImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UsersImpl.java index 6e5d758f3a3f..68a279fd2088 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UsersImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/UsersImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.databoxedge.fluent.models.UserInner; import com.azure.resourcemanager.databoxedge.models.User; import com.azure.resourcemanager.databoxedge.models.Users; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class UsersImpl implements Users { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(UsersImpl.class); private final UsersClient innerClient; @@ -39,15 +38,6 @@ public PagedIterable listByDataBoxEdgeDevice( return Utils.mapPage(inner, inner1 -> new UserImpl(inner1, this.manager())); } - public User get(String deviceName, String name, String resourceGroupName) { - UserInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); - if (inner != null) { - return new UserImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context) { Response inner = this.serviceClient().getWithResponse(deviceName, name, resourceGroupName, context); if (inner != null) { @@ -61,6 +51,15 @@ public Response getWithResponse(String deviceName, String name, String res } } + public User get(String deviceName, String name, String resourceGroupName) { + UserInner inner = this.serviceClient().get(deviceName, name, resourceGroupName); + if (inner != null) { + return new UserImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String deviceName, String name, String resourceGroupName) { this.serviceClient().delete(deviceName, name, resourceGroupName); } @@ -72,7 +71,7 @@ public void delete(String deviceName, String name, String resourceGroupName, Con public User getById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -81,14 +80,14 @@ public User getById(String id) { } String name = Utils.getValueFromIdByName(id, "users"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -100,7 +99,7 @@ public User getById(String id) { public Response getByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -109,14 +108,14 @@ public Response getByIdWithResponse(String id, Context context) { } String name = Utils.getValueFromIdByName(id, "users"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -128,7 +127,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -137,14 +136,14 @@ public void deleteById(String id) { } String name = Utils.getValueFromIdByName(id, "users"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -156,7 +155,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String deviceName = Utils.getValueFromIdByName(id, "dataBoxEdgeDevices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -165,14 +164,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String name = Utils.getValueFromIdByName(id, "users"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 000000000000..43644dec35fa --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AccessLevel.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Access level allowed for this remote application type. */ +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); + } + + /** + * Gets known AccessLevel values. + * + * @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/AccountType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AccountType.java index ec8698119ebf..5fd1234a80c2 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AccountType.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AccountType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AccountType. */ +/** Type of storage accessed on the storage account. */ public final class AccountType extends ExpandableStringEnum { /** Static value GeneralPurposeStorage for AccountType. */ public static final AccountType GENERAL_PURPOSE_STORAGE = fromString("GeneralPurposeStorage"); @@ -27,7 +27,11 @@ public static AccountType fromString(String name) { return fromString(name, AccountType.class); } - /** @return known AccountType values. */ + /** + * Gets known AccountType values. + * + * @return known AccountType values. + */ public static Collection values() { return values(AccountType.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 000000000000..bb4ffa1428bd --- /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: Metadata pertaining to creation and last modification of Addon. + * + * @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 000000000000..a77446ddb801 --- /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.resourcemanager.databoxedge.fluent.models.AddonInner; +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 { + /* + * 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; + + /** Creates an instance of AddonList class. */ + public AddonList() { + } + + /** + * 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 000000000000..f04724d250f4 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonState.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Addon Provisioning State. */ +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); + } + + /** + * Gets known AddonState values. + * + * @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 000000000000..cfd71e0e69ae --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonType.java @@ -0,0 +1,38 @@ +// 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; + +/** Addon type. */ +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); + } + + /** + * Gets known AddonType values. + * + * @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 000000000000..eea1fe1f42b0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Addons.java @@ -0,0 +1,137 @@ +// 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 as paginated response with {@link + * PagedIterable}. + */ + 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 as paginated response with {@link + * PagedIterable}. + */ + 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. + * @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 along with {@link Response}. + */ + Response getWithResponse( + String deviceName, String roleName, String addonName, 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); + + /** + * 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 182dc4b24e94..c6cee7a205bc 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 @@ -6,18 +6,15 @@ 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 shipping address of the customer. */ @Fluent public final class Address { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Address.class); - /* * The address line1. */ - @JsonProperty(value = "addressLine1", required = true) + @JsonProperty(value = "addressLine1") private String addressLine1; /* @@ -35,19 +32,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; /* @@ -56,6 +53,10 @@ public final class Address { @JsonProperty(value = "country", required = true) private String country; + /** Creates an instance of Address class. */ + public Address() { + } + /** * Get the addressLine1 property: The address line1. * @@ -202,28 +203,12 @@ 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property country in model Address")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Address.class); } 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 7e1f872b4d8d..64f0e8ddb95a 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: Metadata pertaining to creation and last modification of Alert. + * + * @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/AlertErrorDetails.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AlertErrorDetails.java index 84b6373fec1b..1fb56a1a1dac 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AlertErrorDetails.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AlertErrorDetails.java @@ -5,15 +5,11 @@ 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; /** Error details for the alert. */ @Immutable public final class AlertErrorDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertErrorDetails.class); - /* * Error code. */ @@ -32,6 +28,10 @@ public final class AlertErrorDetails { @JsonProperty(value = "occurrences", access = JsonProperty.Access.WRITE_ONLY) private Integer occurrences; + /** Creates an instance of AlertErrorDetails class. */ + public AlertErrorDetails() { + } + /** * Get the errorCode property: Error code. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AlertList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AlertList.java index 3e582202120e..65ccd6cad27b 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AlertList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AlertList.java @@ -5,17 +5,13 @@ 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.AlertInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Collection of alerts. */ @Immutable public final class AlertList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertList.class); - /* * The value. */ @@ -28,6 +24,10 @@ public final class AlertList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of AlertList class. */ + public AlertList() { + } + /** * Get the value property: The value. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AlertSeverity.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AlertSeverity.java index c326648c2014..822866f3ec07 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AlertSeverity.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AlertSeverity.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AlertSeverity. */ +/** Severity of the alert. */ public final class AlertSeverity extends ExpandableStringEnum { /** Static value Informational for AlertSeverity. */ public static final AlertSeverity INFORMATIONAL = fromString("Informational"); @@ -30,7 +30,11 @@ public static AlertSeverity fromString(String name) { return fromString(name, AlertSeverity.class); } - /** @return known AlertSeverity values. */ + /** + * Gets known AlertSeverity values. + * + * @return known AlertSeverity values. + */ public static Collection values() { return values(AlertSeverity.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Alerts.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Alerts.java index fbc14d539f4a..02723a922f00 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Alerts.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Alerts.java @@ -18,7 +18,8 @@ public interface Alerts { * @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 all the alerts for a Data Box Edge/Data Box Gateway device. + * @return all the alerts for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -31,7 +32,8 @@ public interface Alerts { * @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 all the alerts for a Data Box Edge/Data Box Gateway device. + * @return all the alerts for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName, Context context); @@ -41,12 +43,13 @@ public interface Alerts { * @param deviceName The device name. * @param name The alert 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 an alert by name. + * @return an alert by name along with {@link Response}. */ - Alert get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets an alert by name. @@ -54,11 +57,10 @@ public interface Alerts { * @param deviceName The device name. * @param name The alert 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 an alert by name. */ - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + Alert get(String deviceName, String name, String resourceGroupName); } 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 000000000000..a13e9bce31b6 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ArcAddon.java @@ -0,0 +1,185 @@ +// 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.azure.resourcemanager.databoxedge.fluent.models.AddonInner; +import com.azure.resourcemanager.databoxedge.fluent.models.ArcAddonProperties; +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") +@Fluent +public final class ArcAddon extends AddonInner { + /* + * Properties specific to Arc addon. + */ + @JsonProperty(value = "properties", required = true) + private ArcAddonProperties innerProperties = new ArcAddonProperties(); + + /** Creates an instance of ArcAddon class. */ + public ArcAddon() { + } + + /** + * Get the innerProperties property: Properties specific to Arc addon. + * + * @return the innerProperties value. + */ + private ArcAddonProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the subscriptionId property: Arc resource subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcAddonProperties(); + } + this.innerProperties().withSubscriptionId(subscriptionId); + return this; + } + + /** + * Get the resourceGroupName property: Arc resource group name. + * + * @return the resourceGroupName value. + */ + public String resourceGroupName() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcAddonProperties(); + } + this.innerProperties().withResourceGroupName(resourceGroupName); + return this; + } + + /** + * Get the resourceName property: Arc resource Name. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcAddonProperties(); + } + this.innerProperties().withResourceName(resourceName); + return this; + } + + /** + * Get the resourceLocation property: Arc resource location. + * + * @return the resourceLocation value. + */ + public String resourceLocation() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcAddonProperties(); + } + this.innerProperties().withResourceLocation(resourceLocation); + return this; + } + + /** + * Get the version property: Arc resource version. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Get the hostPlatform property: Host OS supported by the Arc addon. + * + * @return the hostPlatform value. + */ + public PlatformType hostPlatform() { + return this.innerProperties() == null ? null : this.innerProperties().hostPlatform(); + } + + /** + * Get the hostPlatformType property: Platform where the runtime is hosted. + * + * @return the hostPlatformType value. + */ + public HostPlatformType hostPlatformType() { + return this.innerProperties() == null ? null : this.innerProperties().hostPlatformType(); + } + + /** + * Get the provisioningState property: Addon Provisioning State. + * + * @return the provisioningState value. + */ + public AddonState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model ArcAddon")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ArcAddon.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ArmBaseModel.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ArmBaseModel.java index 3e0d42a7b61c..f9c1a9a88ceb 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ArmBaseModel.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ArmBaseModel.java @@ -6,13 +6,13 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Represents the base class for all object models. */ @Immutable public class ArmBaseModel extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmBaseModel.class); + /** Creates an instance of ArmBaseModel class. */ + public ArmBaseModel() { + } /** * Validates the instance. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AsymmetricEncryptedSecret.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AsymmetricEncryptedSecret.java index 4f5598dc807b..408149c8e018 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AsymmetricEncryptedSecret.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AsymmetricEncryptedSecret.java @@ -6,14 +6,11 @@ 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; /** Represent the secrets intended for encryption with asymmetric key pair. */ @Fluent public final class AsymmetricEncryptedSecret { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AsymmetricEncryptedSecret.class); - /* * The value of the secret. */ @@ -21,8 +18,7 @@ public final class AsymmetricEncryptedSecret { private String value; /* - * Thumbprint certificate used to encrypt \"Value\". If the value is - * unencrypted, it will be null. + * Thumbprint certificate used to encrypt \"Value\". If the value is unencrypted, it will be null. */ @JsonProperty(value = "encryptionCertThumbprint") private String encryptionCertThumbprint; @@ -33,6 +29,10 @@ public final class AsymmetricEncryptedSecret { @JsonProperty(value = "encryptionAlgorithm", required = true) private EncryptionAlgorithm encryptionAlgorithm; + /** Creates an instance of AsymmetricEncryptedSecret class. */ + public AsymmetricEncryptedSecret() { + } + /** * Get the value property: The value of the secret. * @@ -102,15 +102,17 @@ public AsymmetricEncryptedSecret withEncryptionAlgorithm(EncryptionAlgorithm enc */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model AsymmetricEncryptedSecret")); } if (encryptionAlgorithm() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property encryptionAlgorithm in model AsymmetricEncryptedSecret")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AsymmetricEncryptedSecret.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Authentication.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Authentication.java index 3a30ccd8fd48..c0bf2ecf53b6 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Authentication.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Authentication.java @@ -5,21 +5,21 @@ 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; /** Authentication mechanism for IoT devices. */ @Fluent public final class Authentication { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Authentication.class); - /* * Symmetric key for authentication. */ @JsonProperty(value = "symmetricKey") private SymmetricKey symmetricKey; + /** Creates an instance of Authentication class. */ + public Authentication() { + } + /** * Get the symmetricKey property: Symmetric key for authentication. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AuthenticationType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AuthenticationType.java index 94b60bc06892..03921cab0f14 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AuthenticationType.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AuthenticationType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AuthenticationType. */ +/** The authentication type. */ public final class AuthenticationType extends ExpandableStringEnum { /** Static value Invalid for AuthenticationType. */ public static final AuthenticationType INVALID = fromString("Invalid"); @@ -27,7 +27,11 @@ public static AuthenticationType fromString(String name) { return fromString(name, AuthenticationType.class); } - /** @return known AuthenticationType values. */ + /** + * Gets known AuthenticationType values. + * + * @return known AuthenticationType values. + */ public static Collection values() { return values(AuthenticationType.class); } 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 63% 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 1af91b41addc..b1f105a367fb 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. + * @return list of SKU Information objects as paginated response with {@link PagedIterable}. */ - 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. + * @return list of SKU Information objects as paginated response with {@link PagedIterable}. */ - 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/AzureContainerDataFormat.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AzureContainerDataFormat.java index 27643bf2704a..832e74e6e243 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AzureContainerDataFormat.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AzureContainerDataFormat.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AzureContainerDataFormat. */ +/** Storage format used for the file represented by the share. */ public final class AzureContainerDataFormat extends ExpandableStringEnum { /** Static value BlockBlob for AzureContainerDataFormat. */ public static final AzureContainerDataFormat BLOCK_BLOB = fromString("BlockBlob"); @@ -30,7 +30,11 @@ public static AzureContainerDataFormat fromString(String name) { return fromString(name, AzureContainerDataFormat.class); } - /** @return known AzureContainerDataFormat values. */ + /** + * Gets known AzureContainerDataFormat values. + * + * @return known AzureContainerDataFormat values. + */ public static Collection values() { return values(AzureContainerDataFormat.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AzureContainerInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AzureContainerInfo.java index a2c2b6bd32c7..6e1169183a3c 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AzureContainerInfo.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AzureContainerInfo.java @@ -6,14 +6,11 @@ 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; /** Azure container mapping of the endpoint. */ @Fluent public final class AzureContainerInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureContainerInfo.class); - /* * ID of the storage account credential used to access storage. */ @@ -21,8 +18,8 @@ public final class AzureContainerInfo { private String storageAccountCredentialId; /* - * Container name (Based on the data format specified, this represents the - * name of Azure Files/Page blob/Block blob). + * Container name (Based on the data format specified, this represents the name of Azure Files/Page blob/Block + * blob). */ @JsonProperty(value = "containerName", required = true) private String containerName; @@ -33,6 +30,10 @@ public final class AzureContainerInfo { @JsonProperty(value = "dataFormat", required = true) private AzureContainerDataFormat dataFormat; + /** Creates an instance of AzureContainerInfo class. */ + public AzureContainerInfo() { + } + /** * Get the storageAccountCredentialId property: ID of the storage account credential used to access storage. * @@ -102,21 +103,23 @@ public AzureContainerInfo withDataFormat(AzureContainerDataFormat dataFormat) { */ public void validate() { if (storageAccountCredentialId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property storageAccountCredentialId in model AzureContainerInfo")); } if (containerName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property containerName in model AzureContainerInfo")); } if (dataFormat() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property dataFormat in model AzureContainerInfo")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureContainerInfo.class); } 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 bec185f0c828..7171c7835241 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: Metadata pertaining to creation and last modification of BandwidthSchedule. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the start property: The start time of the schedule in UTC. * @@ -59,6 +67,13 @@ public interface BandwidthSchedule { */ List days(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.BandwidthScheduleInner object. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedules.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedules.java index 411f3d9486d7..6e5b5702a6ca 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedules.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedules.java @@ -18,7 +18,8 @@ public interface BandwidthSchedules { * @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 all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + * @return all the bandwidth schedules for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -31,7 +32,8 @@ public interface BandwidthSchedules { * @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 all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + * @return all the bandwidth schedules for a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice( String deviceName, String resourceGroupName, Context context); @@ -42,12 +44,14 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The bandwidth schedule 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 properties of the specified bandwidth schedule. + * @return the properties of the specified bandwidth schedule along with {@link Response}. */ - BandwidthSchedule get(String deviceName, String name, String resourceGroupName); + Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context); /** * Gets the properties of the specified bandwidth schedule. @@ -55,14 +59,12 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The bandwidth schedule 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 properties of the specified bandwidth schedule. */ - Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context); + BandwidthSchedule get(String deviceName, String name, String resourceGroupName); /** * Deletes the specified bandwidth schedule. @@ -96,7 +98,7 @@ Response getWithResponse( * @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 properties of the specified bandwidth schedule. + * @return the properties of the specified bandwidth schedule along with {@link Response}. */ BandwidthSchedule getById(String id); @@ -108,7 +110,7 @@ Response getWithResponse( * @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 properties of the specified bandwidth schedule. + * @return the properties of the specified bandwidth schedule along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedulesList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedulesList.java index b9858657e9d3..cd7f5229f498 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedulesList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedulesList.java @@ -5,17 +5,13 @@ 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.BandwidthScheduleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The collection of bandwidth schedules. */ @Immutable public final class BandwidthSchedulesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BandwidthSchedulesList.class); - /* * The list of bandwidth schedules. */ @@ -28,6 +24,10 @@ public final class BandwidthSchedulesList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of BandwidthSchedulesList class. */ + public BandwidthSchedulesList() { + } + /** * Get the value property: The list of bandwidth schedules. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClientAccessRight.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClientAccessRight.java index ac5d2741846e..b10e7d8bbab2 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClientAccessRight.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClientAccessRight.java @@ -6,14 +6,11 @@ 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 mapping between a particular client IP and the type of access client has on the NFS share. */ @Fluent public final class ClientAccessRight { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientAccessRight.class); - /* * IP of the client. */ @@ -26,6 +23,10 @@ public final class ClientAccessRight { @JsonProperty(value = "accessPermission", required = true) private ClientPermissionType accessPermission; + /** Creates an instance of ClientAccessRight class. */ + public ClientAccessRight() { + } + /** * Get the client property: IP of the client. * @@ -73,15 +74,17 @@ public ClientAccessRight withAccessPermission(ClientPermissionType accessPermiss */ public void validate() { if (client() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property client in model ClientAccessRight")); } if (accessPermission() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property accessPermission in model ClientAccessRight")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ClientAccessRight.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClientPermissionType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClientPermissionType.java index d04e644ad1af..3d685e31870a 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClientPermissionType.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClientPermissionType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ClientPermissionType. */ +/** Type of access to be allowed for the client. */ public final class ClientPermissionType extends ExpandableStringEnum { /** Static value NoAccess for ClientPermissionType. */ public static final ClientPermissionType NO_ACCESS = fromString("NoAccess"); @@ -30,7 +30,11 @@ public static ClientPermissionType fromString(String name) { return fromString(name, ClientPermissionType.class); } - /** @return known ClientPermissionType values. */ + /** + * Gets known ClientPermissionType values. + * + * @return known ClientPermissionType values. + */ public static Collection values() { return values(ClientPermissionType.class); } 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 000000000000..d876452910b9 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/CloudEdgeManagementRole.java @@ -0,0 +1,97 @@ +// 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.resourcemanager.databoxedge.fluent.models.CloudEdgeManagementRoleProperties; +import com.azure.resourcemanager.databoxedge.fluent.models.RoleInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The preview of Virtual Machine Cloud Management from the Azure supports deploying and managing VMs on your Azure + * Stack Edge device from Azure Portal. For more information, refer to: + * https://docs.microsoft.com/en-us/azure/databox-online/azure-stack-edge-gpu-virtual-machine-overview By using this + * feature, you agree to the preview legal terms. See the + * https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/ for additional details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("CloudEdgeManagement") +@Fluent +public final class CloudEdgeManagementRole extends RoleInner { + /* + * Properties specific to CloudEdgeManagementRole role. + */ + @JsonProperty(value = "properties") + private CloudEdgeManagementRoleProperties innerProperties; + + /** Creates an instance of CloudEdgeManagementRole class. */ + public CloudEdgeManagementRole() { + } + + /** + * Get the innerProperties property: Properties specific to CloudEdgeManagementRole role. + * + * @return the innerProperties value. + */ + private CloudEdgeManagementRoleProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the localManagementStatus property: Local Edge Management Status. + * + * @return the localManagementStatus value. + */ + public RoleStatus localManagementStatus() { + return this.innerProperties() == null ? null : this.innerProperties().localManagementStatus(); + } + + /** + * Get the edgeProfile property: Edge Profile of the resource. + * + * @return the edgeProfile value. + */ + public EdgeProfile edgeProfile() { + return this.innerProperties() == null ? null : this.innerProperties().edgeProfile(); + } + + /** + * Get the roleStatus property: Role status. + * + * @return the roleStatus value. + */ + public RoleStatus roleStatus() { + return this.innerProperties() == null ? null : this.innerProperties().roleStatus(); + } + + /** + * Set the roleStatus property: Role status. + * + * @param roleStatus the roleStatus value to set. + * @return the CloudEdgeManagementRole object itself. + */ + public CloudEdgeManagementRole withRoleStatus(RoleStatus roleStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new CloudEdgeManagementRoleProperties(); + } + this.innerProperties().withRoleStatus(roleStatus); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterCapacityViewData.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterCapacityViewData.java new file mode 100644 index 000000000000..c10f05023629 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterCapacityViewData.java @@ -0,0 +1,161 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Cluster Compute Data. */ +@Fluent +public final class ClusterCapacityViewData { + /* + * The FQDN of the cluster. + */ + @JsonProperty(value = "fqdn") + private String fqdn; + + /* + * The cluster's GPU capacity. + */ + @JsonProperty(value = "gpuCapacity") + private ClusterGpuCapacity gpuCapacity; + + /* + * The cluster's memory capacity. + */ + @JsonProperty(value = "memoryCapacity") + private ClusterMemoryCapacity memoryCapacity; + + /* + * The last time at which the ClusterCapacityViewData was set. + */ + @JsonProperty(value = "lastRefreshedTime") + private OffsetDateTime lastRefreshedTime; + + /* + * The total # of vCPUs provisioned by non-HPN VM per appliance. + */ + @JsonProperty(value = "totalProvisionedNonHpnCores") + private Long totalProvisionedNonHpnCores; + + /** Creates an instance of ClusterCapacityViewData class. */ + public ClusterCapacityViewData() { + } + + /** + * Get the fqdn property: The FQDN of the cluster. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Set the fqdn property: The FQDN of the cluster. + * + * @param fqdn the fqdn value to set. + * @return the ClusterCapacityViewData object itself. + */ + public ClusterCapacityViewData withFqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * Get the gpuCapacity property: The cluster's GPU capacity. + * + * @return the gpuCapacity value. + */ + public ClusterGpuCapacity gpuCapacity() { + return this.gpuCapacity; + } + + /** + * Set the gpuCapacity property: The cluster's GPU capacity. + * + * @param gpuCapacity the gpuCapacity value to set. + * @return the ClusterCapacityViewData object itself. + */ + public ClusterCapacityViewData withGpuCapacity(ClusterGpuCapacity gpuCapacity) { + this.gpuCapacity = gpuCapacity; + return this; + } + + /** + * Get the memoryCapacity property: The cluster's memory capacity. + * + * @return the memoryCapacity value. + */ + public ClusterMemoryCapacity memoryCapacity() { + return this.memoryCapacity; + } + + /** + * Set the memoryCapacity property: The cluster's memory capacity. + * + * @param memoryCapacity the memoryCapacity value to set. + * @return the ClusterCapacityViewData object itself. + */ + public ClusterCapacityViewData withMemoryCapacity(ClusterMemoryCapacity memoryCapacity) { + this.memoryCapacity = memoryCapacity; + return this; + } + + /** + * Get the lastRefreshedTime property: The last time at which the ClusterCapacityViewData was set. + * + * @return the lastRefreshedTime value. + */ + public OffsetDateTime lastRefreshedTime() { + return this.lastRefreshedTime; + } + + /** + * Set the lastRefreshedTime property: The last time at which the ClusterCapacityViewData was set. + * + * @param lastRefreshedTime the lastRefreshedTime value to set. + * @return the ClusterCapacityViewData object itself. + */ + public ClusterCapacityViewData withLastRefreshedTime(OffsetDateTime lastRefreshedTime) { + this.lastRefreshedTime = lastRefreshedTime; + return this; + } + + /** + * Get the totalProvisionedNonHpnCores property: The total # of vCPUs provisioned by non-HPN VM per appliance. + * + * @return the totalProvisionedNonHpnCores value. + */ + public Long totalProvisionedNonHpnCores() { + return this.totalProvisionedNonHpnCores; + } + + /** + * Set the totalProvisionedNonHpnCores property: The total # of vCPUs provisioned by non-HPN VM per appliance. + * + * @param totalProvisionedNonHpnCores the totalProvisionedNonHpnCores value to set. + * @return the ClusterCapacityViewData object itself. + */ + public ClusterCapacityViewData withTotalProvisionedNonHpnCores(Long totalProvisionedNonHpnCores) { + this.totalProvisionedNonHpnCores = totalProvisionedNonHpnCores; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (gpuCapacity() != null) { + gpuCapacity().validate(); + } + if (memoryCapacity() != null) { + memoryCapacity().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterGpuCapacity.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterGpuCapacity.java new file mode 100644 index 000000000000..493545dd90c3 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterGpuCapacity.java @@ -0,0 +1,154 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** Cluster GPU Data. */ +@Fluent +public final class ClusterGpuCapacity { + /* + * The cluster GPU Type. + */ + @JsonProperty(value = "gpuType") + private String gpuType; + + /* + * The used GPU units count in the cluster. + */ + @JsonProperty(value = "gpuUsedUnitsCount") + private Integer gpuUsedUnitsCount; + + /* + * The free GPU units count in the cluster. + */ + @JsonProperty(value = "gpuFreeUnitsCount") + private Integer gpuFreeUnitsCount; + + /* + * The GPU units count reserved for failover in the cluster. + */ + @JsonProperty(value = "gpuReservedForFailoverUnitsCount") + private Integer gpuReservedForFailoverUnitsCount; + + /* + * The total GPU units count in the cluster. + */ + @JsonProperty(value = "gpuTotalUnitsCount") + private Integer gpuTotalUnitsCount; + + /** Creates an instance of ClusterGpuCapacity class. */ + public ClusterGpuCapacity() { + } + + /** + * Get the gpuType property: The cluster GPU Type. + * + * @return the gpuType value. + */ + public String gpuType() { + return this.gpuType; + } + + /** + * Set the gpuType property: The cluster GPU Type. + * + * @param gpuType the gpuType value to set. + * @return the ClusterGpuCapacity object itself. + */ + public ClusterGpuCapacity withGpuType(String gpuType) { + this.gpuType = gpuType; + return this; + } + + /** + * Get the gpuUsedUnitsCount property: The used GPU units count in the cluster. + * + * @return the gpuUsedUnitsCount value. + */ + public Integer gpuUsedUnitsCount() { + return this.gpuUsedUnitsCount; + } + + /** + * Set the gpuUsedUnitsCount property: The used GPU units count in the cluster. + * + * @param gpuUsedUnitsCount the gpuUsedUnitsCount value to set. + * @return the ClusterGpuCapacity object itself. + */ + public ClusterGpuCapacity withGpuUsedUnitsCount(Integer gpuUsedUnitsCount) { + this.gpuUsedUnitsCount = gpuUsedUnitsCount; + return this; + } + + /** + * Get the gpuFreeUnitsCount property: The free GPU units count in the cluster. + * + * @return the gpuFreeUnitsCount value. + */ + public Integer gpuFreeUnitsCount() { + return this.gpuFreeUnitsCount; + } + + /** + * Set the gpuFreeUnitsCount property: The free GPU units count in the cluster. + * + * @param gpuFreeUnitsCount the gpuFreeUnitsCount value to set. + * @return the ClusterGpuCapacity object itself. + */ + public ClusterGpuCapacity withGpuFreeUnitsCount(Integer gpuFreeUnitsCount) { + this.gpuFreeUnitsCount = gpuFreeUnitsCount; + return this; + } + + /** + * Get the gpuReservedForFailoverUnitsCount property: The GPU units count reserved for failover in the cluster. + * + * @return the gpuReservedForFailoverUnitsCount value. + */ + public Integer gpuReservedForFailoverUnitsCount() { + return this.gpuReservedForFailoverUnitsCount; + } + + /** + * Set the gpuReservedForFailoverUnitsCount property: The GPU units count reserved for failover in the cluster. + * + * @param gpuReservedForFailoverUnitsCount the gpuReservedForFailoverUnitsCount value to set. + * @return the ClusterGpuCapacity object itself. + */ + public ClusterGpuCapacity withGpuReservedForFailoverUnitsCount(Integer gpuReservedForFailoverUnitsCount) { + this.gpuReservedForFailoverUnitsCount = gpuReservedForFailoverUnitsCount; + return this; + } + + /** + * Get the gpuTotalUnitsCount property: The total GPU units count in the cluster. + * + * @return the gpuTotalUnitsCount value. + */ + public Integer gpuTotalUnitsCount() { + return this.gpuTotalUnitsCount; + } + + /** + * Set the gpuTotalUnitsCount property: The total GPU units count in the cluster. + * + * @param gpuTotalUnitsCount the gpuTotalUnitsCount value to set. + * @return the ClusterGpuCapacity object itself. + */ + public ClusterGpuCapacity withGpuTotalUnitsCount(Integer gpuTotalUnitsCount) { + this.gpuTotalUnitsCount = gpuTotalUnitsCount; + 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/ClusterMemoryCapacity.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterMemoryCapacity.java new file mode 100644 index 000000000000..5850f925ddc1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterMemoryCapacity.java @@ -0,0 +1,258 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** NodeCapacityInfo defines the required information to determine the placement of a VM. */ +@Fluent +public final class ClusterMemoryCapacity { + /* + * The free memory in the cluster in MB. + */ + @JsonProperty(value = "clusterFreeMemoryMb") + private Double clusterFreeMemoryMb; + + /* + * The used memory in the cluster in MB. + */ + @JsonProperty(value = "clusterUsedMemoryMb") + private Double clusterUsedMemoryMb; + + /* + * The failover memory in the cluster in MB. + */ + @JsonProperty(value = "clusterFailoverMemoryMb") + private Double clusterFailoverMemoryMb; + + /* + * The fragmentation memory in the cluster in MB. + */ + @JsonProperty(value = "clusterFragmentationMemoryMb") + private Double clusterFragmentationMemoryMb; + + /* + * The memory reserved for Hyper-V in the cluster in MB. + */ + @JsonProperty(value = "clusterHypervReserveMemoryMb") + private Double clusterHypervReserveMemoryMb; + + /* + * The memory of the Infra VM in the cluster in MB. + */ + @JsonProperty(value = "clusterInfraVmMemoryMb") + private Double clusterInfraVmMemoryMb; + + /* + * The total memory in the cluster in MB. + */ + @JsonProperty(value = "clusterTotalMemoryMb") + private Double clusterTotalMemoryMb; + + /* + * The non-failover memory in the cluster in MB. + */ + @JsonProperty(value = "clusterNonFailoverVmMb") + private Double clusterNonFailoverVmMb; + + /* + * The memory used by VMs in the cluster in MB. + */ + @JsonProperty(value = "clusterMemoryUsedByVmsMb") + private Double clusterMemoryUsedByVmsMb; + + /** Creates an instance of ClusterMemoryCapacity class. */ + public ClusterMemoryCapacity() { + } + + /** + * Get the clusterFreeMemoryMb property: The free memory in the cluster in MB. + * + * @return the clusterFreeMemoryMb value. + */ + public Double clusterFreeMemoryMb() { + return this.clusterFreeMemoryMb; + } + + /** + * Set the clusterFreeMemoryMb property: The free memory in the cluster in MB. + * + * @param clusterFreeMemoryMb the clusterFreeMemoryMb value to set. + * @return the ClusterMemoryCapacity object itself. + */ + public ClusterMemoryCapacity withClusterFreeMemoryMb(Double clusterFreeMemoryMb) { + this.clusterFreeMemoryMb = clusterFreeMemoryMb; + return this; + } + + /** + * Get the clusterUsedMemoryMb property: The used memory in the cluster in MB. + * + * @return the clusterUsedMemoryMb value. + */ + public Double clusterUsedMemoryMb() { + return this.clusterUsedMemoryMb; + } + + /** + * Set the clusterUsedMemoryMb property: The used memory in the cluster in MB. + * + * @param clusterUsedMemoryMb the clusterUsedMemoryMb value to set. + * @return the ClusterMemoryCapacity object itself. + */ + public ClusterMemoryCapacity withClusterUsedMemoryMb(Double clusterUsedMemoryMb) { + this.clusterUsedMemoryMb = clusterUsedMemoryMb; + return this; + } + + /** + * Get the clusterFailoverMemoryMb property: The failover memory in the cluster in MB. + * + * @return the clusterFailoverMemoryMb value. + */ + public Double clusterFailoverMemoryMb() { + return this.clusterFailoverMemoryMb; + } + + /** + * Set the clusterFailoverMemoryMb property: The failover memory in the cluster in MB. + * + * @param clusterFailoverMemoryMb the clusterFailoverMemoryMb value to set. + * @return the ClusterMemoryCapacity object itself. + */ + public ClusterMemoryCapacity withClusterFailoverMemoryMb(Double clusterFailoverMemoryMb) { + this.clusterFailoverMemoryMb = clusterFailoverMemoryMb; + return this; + } + + /** + * Get the clusterFragmentationMemoryMb property: The fragmentation memory in the cluster in MB. + * + * @return the clusterFragmentationMemoryMb value. + */ + public Double clusterFragmentationMemoryMb() { + return this.clusterFragmentationMemoryMb; + } + + /** + * Set the clusterFragmentationMemoryMb property: The fragmentation memory in the cluster in MB. + * + * @param clusterFragmentationMemoryMb the clusterFragmentationMemoryMb value to set. + * @return the ClusterMemoryCapacity object itself. + */ + public ClusterMemoryCapacity withClusterFragmentationMemoryMb(Double clusterFragmentationMemoryMb) { + this.clusterFragmentationMemoryMb = clusterFragmentationMemoryMb; + return this; + } + + /** + * Get the clusterHypervReserveMemoryMb property: The memory reserved for Hyper-V in the cluster in MB. + * + * @return the clusterHypervReserveMemoryMb value. + */ + public Double clusterHypervReserveMemoryMb() { + return this.clusterHypervReserveMemoryMb; + } + + /** + * Set the clusterHypervReserveMemoryMb property: The memory reserved for Hyper-V in the cluster in MB. + * + * @param clusterHypervReserveMemoryMb the clusterHypervReserveMemoryMb value to set. + * @return the ClusterMemoryCapacity object itself. + */ + public ClusterMemoryCapacity withClusterHypervReserveMemoryMb(Double clusterHypervReserveMemoryMb) { + this.clusterHypervReserveMemoryMb = clusterHypervReserveMemoryMb; + return this; + } + + /** + * Get the clusterInfraVmMemoryMb property: The memory of the Infra VM in the cluster in MB. + * + * @return the clusterInfraVmMemoryMb value. + */ + public Double clusterInfraVmMemoryMb() { + return this.clusterInfraVmMemoryMb; + } + + /** + * Set the clusterInfraVmMemoryMb property: The memory of the Infra VM in the cluster in MB. + * + * @param clusterInfraVmMemoryMb the clusterInfraVmMemoryMb value to set. + * @return the ClusterMemoryCapacity object itself. + */ + public ClusterMemoryCapacity withClusterInfraVmMemoryMb(Double clusterInfraVmMemoryMb) { + this.clusterInfraVmMemoryMb = clusterInfraVmMemoryMb; + return this; + } + + /** + * Get the clusterTotalMemoryMb property: The total memory in the cluster in MB. + * + * @return the clusterTotalMemoryMb value. + */ + public Double clusterTotalMemoryMb() { + return this.clusterTotalMemoryMb; + } + + /** + * Set the clusterTotalMemoryMb property: The total memory in the cluster in MB. + * + * @param clusterTotalMemoryMb the clusterTotalMemoryMb value to set. + * @return the ClusterMemoryCapacity object itself. + */ + public ClusterMemoryCapacity withClusterTotalMemoryMb(Double clusterTotalMemoryMb) { + this.clusterTotalMemoryMb = clusterTotalMemoryMb; + return this; + } + + /** + * Get the clusterNonFailoverVmMb property: The non-failover memory in the cluster in MB. + * + * @return the clusterNonFailoverVmMb value. + */ + public Double clusterNonFailoverVmMb() { + return this.clusterNonFailoverVmMb; + } + + /** + * Set the clusterNonFailoverVmMb property: The non-failover memory in the cluster in MB. + * + * @param clusterNonFailoverVmMb the clusterNonFailoverVmMb value to set. + * @return the ClusterMemoryCapacity object itself. + */ + public ClusterMemoryCapacity withClusterNonFailoverVmMb(Double clusterNonFailoverVmMb) { + this.clusterNonFailoverVmMb = clusterNonFailoverVmMb; + return this; + } + + /** + * Get the clusterMemoryUsedByVmsMb property: The memory used by VMs in the cluster in MB. + * + * @return the clusterMemoryUsedByVmsMb value. + */ + public Double clusterMemoryUsedByVmsMb() { + return this.clusterMemoryUsedByVmsMb; + } + + /** + * Set the clusterMemoryUsedByVmsMb property: The memory used by VMs in the cluster in MB. + * + * @param clusterMemoryUsedByVmsMb the clusterMemoryUsedByVmsMb value to set. + * @return the ClusterMemoryCapacity object itself. + */ + public ClusterMemoryCapacity withClusterMemoryUsedByVmsMb(Double clusterMemoryUsedByVmsMb) { + this.clusterMemoryUsedByVmsMb = clusterMemoryUsedByVmsMb; + 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/ClusterStorageViewData.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterStorageViewData.java new file mode 100644 index 000000000000..e5f78ab68ba5 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterStorageViewData.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.fasterxml.jackson.annotation.JsonProperty; + +/** Cluster Storage Data. */ +@Fluent +public final class ClusterStorageViewData { + /* + * Total storage on the cluster in MB. + */ + @JsonProperty(value = "clusterTotalStorageMb") + private Double clusterTotalStorageMb; + + /* + * The available or free storage on the cluster in MB. + */ + @JsonProperty(value = "clusterFreeStorageMb") + private Double clusterFreeStorageMb; + + /** Creates an instance of ClusterStorageViewData class. */ + public ClusterStorageViewData() { + } + + /** + * Get the clusterTotalStorageMb property: Total storage on the cluster in MB. + * + * @return the clusterTotalStorageMb value. + */ + public Double clusterTotalStorageMb() { + return this.clusterTotalStorageMb; + } + + /** + * Set the clusterTotalStorageMb property: Total storage on the cluster in MB. + * + * @param clusterTotalStorageMb the clusterTotalStorageMb value to set. + * @return the ClusterStorageViewData object itself. + */ + public ClusterStorageViewData withClusterTotalStorageMb(Double clusterTotalStorageMb) { + this.clusterTotalStorageMb = clusterTotalStorageMb; + return this; + } + + /** + * Get the clusterFreeStorageMb property: The available or free storage on the cluster in MB. + * + * @return the clusterFreeStorageMb value. + */ + public Double clusterFreeStorageMb() { + return this.clusterFreeStorageMb; + } + + /** + * Set the clusterFreeStorageMb property: The available or free storage on the cluster in MB. + * + * @param clusterFreeStorageMb the clusterFreeStorageMb value to set. + * @return the ClusterStorageViewData object itself. + */ + public ClusterStorageViewData withClusterFreeStorageMb(Double clusterFreeStorageMb) { + this.clusterFreeStorageMb = clusterFreeStorageMb; + 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/ClusterWitnessType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterWitnessType.java new file mode 100644 index 000000000000..0204a2e543de --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterWitnessType.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Cluster Witness Type. */ +public final class ClusterWitnessType extends ExpandableStringEnum { + /** Static value None for ClusterWitnessType. */ + public static final ClusterWitnessType NONE = fromString("None"); + + /** Static value Cloud for ClusterWitnessType. */ + public static final ClusterWitnessType CLOUD = fromString("Cloud"); + + /** Static value FileShare for ClusterWitnessType. */ + public static final ClusterWitnessType FILE_SHARE = fromString("FileShare"); + + /** + * Creates or finds a ClusterWitnessType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterWitnessType. + */ + @JsonCreator + public static ClusterWitnessType fromString(String name) { + return fromString(name, ClusterWitnessType.class); + } + + /** + * Gets known ClusterWitnessType values. + * + * @return known ClusterWitnessType values. + */ + public static Collection values() { + return values(ClusterWitnessType.class); + } +} 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 000000000000..10040566260d --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** Cni configuration. */ +@Immutable +public final class CniConfig { + /* + * 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; + + /** Creates an instance of CniConfig class. */ + public CniConfig() { + } + + /** + * 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 000000000000..b6ebd066961c --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** Compute infrastructure Resource. */ +@Fluent +public final class ComputeResource { + /* + * Processor count + */ + @JsonProperty(value = "processorCount", required = true) + private int processorCount; + + /* + * Memory in GB + */ + @JsonProperty(value = "memoryInGB", required = true) + private long memoryInGB; + + /** Creates an instance of ComputeResource class. */ + public ComputeResource() { + } + + /** + * 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/ContactDetails.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ContactDetails.java index e11200db9c6d..6aa58536f37f 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ContactDetails.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ContactDetails.java @@ -6,15 +6,12 @@ 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; /** Contains all the contact details of the customer. */ @Fluent public final class ContactDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ContactDetails.class); - /* * The contact person name. */ @@ -39,6 +36,10 @@ public final class ContactDetails { @JsonProperty(value = "emailList", required = true) private List emailList; + /** Creates an instance of ContactDetails class. */ + public ContactDetails() { + } + /** * Get the contactPerson property: The contact person name. * @@ -126,24 +127,26 @@ public ContactDetails withEmailList(List emailList) { */ public void validate() { if (contactPerson() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property contactPerson in model ContactDetails")); } if (companyName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property companyName in model ContactDetails")); } if (phone() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property phone in model ContactDetails")); } if (emailList() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property emailList in model ContactDetails")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ContactDetails.class); } 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 16bdbdc4cebc..fbf07259891b 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: Metadata pertaining to creation and last modification of Container. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the containerStatus property: Current status of the container. * @@ -59,6 +67,13 @@ public interface Container { */ OffsetDateTime createdDateTime(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.ContainerInner object. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ContainerList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ContainerList.java index 1518c047f0c2..99df42d31a11 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ContainerList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ContainerList.java @@ -5,17 +5,13 @@ 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.ContainerInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Collection of all the containers on the Data Box Edge/Gateway device. */ @Immutable public final class ContainerList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerList.class); - /* * The list of containers. */ @@ -28,6 +24,10 @@ public final class ContainerList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ContainerList class. */ + public ContainerList() { + } + /** * Get the value property: The list of containers. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ContainerStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ContainerStatus.java index 3b32fd51a131..8772dacf2003 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ContainerStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ContainerStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ContainerStatus. */ +/** Current status of the container. */ public final class ContainerStatus extends ExpandableStringEnum { /** Static value OK for ContainerStatus. */ public static final ContainerStatus OK = fromString("OK"); @@ -36,7 +36,11 @@ public static ContainerStatus fromString(String name) { return fromString(name, ContainerStatus.class); } - /** @return known ContainerStatus values. */ + /** + * Gets known ContainerStatus values. + * + * @return known ContainerStatus values. + */ public static Collection values() { return values(ContainerStatus.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Containers.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Containers.java index f524f69684ca..7e71c21c50a5 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Containers.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Containers.java @@ -19,7 +19,8 @@ public interface Containers { * @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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByStorageAccount( String deviceName, String storageAccountName, String resourceGroupName); @@ -34,7 +35,8 @@ PagedIterable listByStorageAccount( * @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 containers on the Data Box Edge/Gateway device. + * @return collection of all the containers on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByStorageAccount( String deviceName, String storageAccountName, String resourceGroupName, Context context); @@ -46,12 +48,14 @@ PagedIterable listByStorageAccount( * @param storageAccountName The Storage Account Name. * @param containerName The container 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 container by name. + * @return a container by name along with {@link Response}. */ - Container get(String deviceName, String storageAccountName, String containerName, String resourceGroupName); + Response getWithResponse( + String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context); /** * Gets a container by name. @@ -60,14 +64,12 @@ PagedIterable listByStorageAccount( * @param storageAccountName The Storage Account Name. * @param containerName The container 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 container by name. */ - Response getWithResponse( - String deviceName, String storageAccountName, String containerName, String resourceGroupName, Context context); + Container get(String deviceName, String storageAccountName, String containerName, String resourceGroupName); /** * Deletes the container on the Data Box Edge/Data Box Gateway device. @@ -132,7 +134,7 @@ void refresh( * @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 container by name. + * @return a container by name along with {@link Response}. */ Container getById(String id); @@ -144,7 +146,7 @@ void refresh( * @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 container by name. + * @return a container by name along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 000000000000..7a7c187332a3 --- /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 d89a15ec7d0b..a80cec4df8fe 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. * @@ -177,6 +227,13 @@ public interface DataBoxEdgeDevice { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceInner object. * @@ -238,10 +295,8 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku, DefinitionStages.WithEtag, - DefinitionStages.WithDataBoxEdgeDeviceStatus, - DefinitionStages.WithDescription, - DefinitionStages.WithModelDescription, - DefinitionStages.WithFriendlyName { + DefinitionStages.WithIdentity, + DefinitionStages.WithDataResidency { /** * Executes the create request. * @@ -289,45 +344,25 @@ 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 dataResidency. */ + interface WithDataResidency { /** - * Specifies the description property: The Description of the Data Box Edge/Gateway device.. + * Specifies the dataResidency property: The details of data-residency related properties for this resource. * - * @param description The Description of the Data Box Edge/Gateway device. + * @param dataResidency The details of data-residency related properties for this resource. * @return the next definition stage. */ - WithCreate withDescription(String description); - } - /** The stage of the DataBoxEdgeDevice definition allowing to specify modelDescription. */ - interface WithModelDescription { - /** - * Specifies the modelDescription property: The description of the Data Box Edge/Gateway device model.. - * - * @param modelDescription The description of the Data Box Edge/Gateway device model. - * @return the next definition stage. - */ - WithCreate withModelDescription(String modelDescription); - } - /** The stage of the DataBoxEdgeDevice definition allowing to specify friendlyName. */ - interface WithFriendlyName { - /** - * Specifies the friendlyName property: The Data Box Edge/Gateway device name.. - * - * @param friendlyName The Data Box Edge/Gateway device name. - * @return the next definition stage. - */ - WithCreate withFriendlyName(String friendlyName); + WithCreate withDataResidency(DataResidency dataResidency); } } /** @@ -338,7 +373,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 +401,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,25 +456,46 @@ interface WithTags { void downloadUpdates(Context context); /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * 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 additional information for the specified Data Box Edge/Data Box Gateway device. + * @return used in activation key generation flow along with {@link Response}. */ - DataBoxEdgeDeviceExtendedInfo getExtendedInformation(); + Response generateCertificateWithResponse(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 used in activation key generation flow. + */ + GenerateCertResponse generateCertificate(); + + /** + * 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 along with {@link + * Response}. */ Response getExtendedInformationWithResponse(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(); + /** * Installs the updates on the Data Box Edge/Data Box Gateway device. * @@ -457,15 +533,29 @@ interface WithTags { void scanForUpdates(Context context); /** - * Uploads registration certificate for the device. + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. * - * @param parameters The upload certificate request. + * @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 the upload registration certificate response. + * @return additional information for the specified Data Box Edge/Data Box Gateway device along with {@link + * Response}. */ - UploadCertificateResponse uploadCertificate(UploadCertificateRequest parameters); + Response updateExtendedInformationWithResponse( + DataBoxEdgeDeviceExtendedInfoPatch parameters, 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); /** * Uploads registration certificate for the device. @@ -475,8 +565,19 @@ interface WithTags { * @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 upload registration certificate response. + * @return the upload registration certificate response along with {@link Response}. */ Response uploadCertificateWithResponse( UploadCertificateRequest parameters, Context context); + + /** + * Uploads registration certificate for the device. + * + * @param parameters The upload certificate request. + * @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 upload registration certificate response. + */ + UploadCertificateResponse uploadCertificate(UploadCertificateRequest parameters); } 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 3c5993c0bb9d..677423e742c9 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 @@ -4,7 +4,9 @@ package com.azure.resourcemanager.databoxedge.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceExtendedInfoInner; +import java.util.Map; /** An immutable client-side representation of DataBoxEdgeDeviceExtendedInfo. */ public interface DataBoxEdgeDeviceExtendedInfo { @@ -29,6 +31,13 @@ public interface DataBoxEdgeDeviceExtendedInfo { */ String type(); + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of DataBoxEdgeDevice. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the encryptionKeyThumbprint property: The digital signature of encrypted certificate. * @@ -51,6 +60,91 @@ 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 clusterWitnessType property: Cluster Witness Type. + * + * @return the clusterWitnessType value. + */ + ClusterWitnessType clusterWitnessType(); + + /** + * Gets the fileShareWitnessLocation property: The witness location of file share. + * + * @return the fileShareWitnessLocation value. + */ + String fileShareWitnessLocation(); + + /** + * Gets the fileShareWitnessUsername property: The username of file share. + * + * @return the fileShareWitnessUsername value. + */ + String fileShareWitnessUsername(); + + /** + * Gets the cloudWitnessStorageAccountName property: The Cloud Witness Storage account name. + * + * @return the cloudWitnessStorageAccountName value. + */ + String cloudWitnessStorageAccountName(); + + /** + * Gets the cloudWitnessContainerName property: The Container for cloud witness in the storage account. + * + * @return the cloudWitnessContainerName value. + */ + String cloudWitnessContainerName(); + + /** + * Gets the cloudWitnessStorageEndpoint property: The Azure service endpoint of the cloud witness storage account. + * + * @return the cloudWitnessStorageEndpoint value. + */ + String cloudWitnessStorageEndpoint(); + /** * 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 000000000000..036b66943f78 --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** The Data Box Edge/Gateway device extended info patch. */ +@Fluent +public final class DataBoxEdgeDeviceExtendedInfoPatch { + /* + * 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; + + /** Creates an instance of DataBoxEdgeDeviceExtendedInfoPatch class. */ + public DataBoxEdgeDeviceExtendedInfoPatch() { + } + + /** + * 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 000000000000..9efd3647c6e9 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceKind.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The kind of the device. */ +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); + } + + /** + * Gets known DataBoxEdgeDeviceKind values. + * + * @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/DataBoxEdgeDeviceList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceList.java index cdc2a34287a8..569b07525437 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceList.java @@ -5,17 +5,13 @@ 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.DataBoxEdgeDeviceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The collection of Data Box Edge/Gateway devices. */ @Immutable public final class DataBoxEdgeDeviceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxEdgeDeviceList.class); - /* * The list of Data Box Edge/Gateway devices. */ @@ -28,6 +24,10 @@ public final class DataBoxEdgeDeviceList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of DataBoxEdgeDeviceList class. */ + public DataBoxEdgeDeviceList() { + } + /** * Get the value property: The list of Data Box Edge/Gateway devices. * 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 ab437d4707f9..fe01a9dda372 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,37 @@ 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.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDevicePropertiesPatch; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** The Data Box Edge/Gateway device patch. */ @Fluent public final 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; + + /* + * The properties associated with the Data Box Edge/Gateway resource + */ + @JsonProperty(value = "properties") + private DataBoxEdgeDevicePropertiesPatch innerProperties; + + /** Creates an instance of DataBoxEdgeDevicePatch class. */ + public DataBoxEdgeDevicePatch() { + } + /** * Get the tags property: The tags attached to the Data Box Edge/Gateway resource. * @@ -41,11 +56,69 @@ 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 innerProperties property: The properties associated with the Data Box Edge/Gateway resource. + * + * @return the innerProperties value. + */ + private DataBoxEdgeDevicePropertiesPatch innerProperties() { + return this.innerProperties; + } + + /** + * Get the edgeProfile property: Edge Profile property of the Data Box Edge/Gateway device. + * + * @return the edgeProfile value. + */ + public EdgeProfilePatch edgeProfile() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new DataBoxEdgeDevicePropertiesPatch(); + } + this.innerProperties().withEdgeProfile(edgeProfile); + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceStatus.java index 4691260820b1..bfd2935dc8df 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DataBoxEdgeDeviceStatus. */ +/** The status of the Data Box Edge/Gateway device. */ public final class DataBoxEdgeDeviceStatus extends ExpandableStringEnum { /** Static value ReadyToSetup for DataBoxEdgeDeviceStatus. */ public static final DataBoxEdgeDeviceStatus READY_TO_SETUP = fromString("ReadyToSetup"); @@ -42,7 +42,11 @@ public static DataBoxEdgeDeviceStatus fromString(String name) { return fromString(name, DataBoxEdgeDeviceStatus.class); } - /** @return known DataBoxEdgeDeviceStatus values. */ + /** + * Gets known DataBoxEdgeDeviceStatus values. + * + * @return known DataBoxEdgeDeviceStatus values. + */ public static Collection values() { return values(DataBoxEdgeDeviceStatus.class); } 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 9812b27f45da..3eb6d458f43e 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 75% 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 08c1420a730f..fdd3bca93e2b 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 @@ -5,22 +5,18 @@ 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.ResourceTypeSkuInner; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeSkuInner; 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 { /* * 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 @@ -28,12 +24,16 @@ public final class SkuInformationList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of DataBoxEdgeSkuList class. */ + public DataBoxEdgeSkuList() { + } + /** * Get the value property: List of ResourceType Sku. * * @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/DataPolicy.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataPolicy.java index d524bbb7e673..b1c6411b674e 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataPolicy.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataPolicy.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DataPolicy. */ +/** Data policy of the share. */ public final class DataPolicy extends ExpandableStringEnum { /** Static value Cloud for DataPolicy. */ public static final DataPolicy CLOUD = fromString("Cloud"); @@ -27,7 +27,11 @@ public static DataPolicy fromString(String name) { return fromString(name, DataPolicy.class); } - /** @return known DataPolicy values. */ + /** + * Gets known DataPolicy values. + * + * @return known DataPolicy values. + */ public static Collection values() { return values(DataPolicy.class); } 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 000000000000..c002ecd710d2 --- /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.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 { + /* + * DataResidencyType enum + */ + @JsonProperty(value = "type") + private DataResidencyType type; + + /** Creates an instance of DataResidency class. */ + public DataResidency() { + } + + /** + * 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 000000000000..dc2ad3c38289 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataResidencyType.java @@ -0,0 +1,38 @@ +// 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; + +/** DataResidencyType enum. */ +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); + } + + /** + * Gets known DataResidencyType values. + * + * @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/DayOfWeek.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DayOfWeek.java index b5738bb2abf6..ca26e17905fb 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DayOfWeek.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DayOfWeek.java @@ -42,7 +42,11 @@ public static DayOfWeek fromString(String name) { return fromString(name, DayOfWeek.class); } - /** @return known DayOfWeek values. */ + /** + * Gets known DayOfWeek values. + * + * @return known DayOfWeek values. + */ public static Collection values() { return values(DayOfWeek.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityChecks.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityChecks.java new file mode 100644 index 000000000000..272e2f52535b --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityChecks.java @@ -0,0 +1,42 @@ +// 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 DeviceCapacityChecks. */ +public interface DeviceCapacityChecks { + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @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 checkResourceCreationFeasibility( + String resourceGroupName, String deviceName, DeviceCapacityRequestInfo deviceCapacityRequestInfo); + + /** + * Posts the device capacity request info to check feasibility. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param capacityName The capacity 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 checkResourceCreationFeasibility( + String resourceGroupName, + String deviceName, + DeviceCapacityRequestInfo deviceCapacityRequestInfo, + String capacityName, + Context context); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityInfo.java new file mode 100644 index 000000000000..2cfbe4ef169b --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityInfo.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.management.SystemData; +import com.azure.resourcemanager.databoxedge.fluent.models.DeviceCapacityInfoInner; +import java.time.OffsetDateTime; +import java.util.Map; + +/** An immutable client-side representation of DeviceCapacityInfo. */ +public interface DeviceCapacityInfo { + /** + * 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: Metadata pertaining to device capacity info. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the timestamp property: Timestamp of request in UTC. + * + * @return the timestamp value. + */ + OffsetDateTime timestamp(); + + /** + * Gets the clusterStorageCapacityInfo property: Cluster capacity data for storage resources (CSV). + * + * @return the clusterStorageCapacityInfo value. + */ + ClusterStorageViewData clusterStorageCapacityInfo(); + + /** + * Gets the clusterComputeCapacityInfo property: Cluster capacity data for compute resources (Memory and GPU). + * + * @return the clusterComputeCapacityInfo value. + */ + ClusterCapacityViewData clusterComputeCapacityInfo(); + + /** + * Gets the nodeCapacityInfos property: The dictionary of individual node names and node capacities in the cluster. + * + * @return the nodeCapacityInfos value. + */ + Map nodeCapacityInfos(); + + /** + * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.DeviceCapacityInfoInner object. + * + * @return the inner object. + */ + DeviceCapacityInfoInner innerModel(); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityInfoes.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityInfoes.java new file mode 100644 index 000000000000..d71f5a7b5cb5 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityInfoes.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.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of DeviceCapacityInfoes. */ +public interface DeviceCapacityInfoes { + /** + * Gets the properties of the specified device capacity info. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device 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 properties of the specified device capacity info along with {@link Response}. + */ + Response getDeviceCapacityInfoWithResponse( + String resourceGroupName, String deviceName, Context context); + + /** + * Gets the properties of the specified device capacity info. + * + * @param resourceGroupName The resource group name. + * @param deviceName The device 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 properties of the specified device capacity info. + */ + DeviceCapacityInfo getDeviceCapacityInfo(String resourceGroupName, String deviceName); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityRequestInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityRequestInfo.java new file mode 100644 index 000000000000..dc4ca42595c5 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceCapacityRequestInfo.java @@ -0,0 +1,102 @@ +// 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.azure.resourcemanager.databoxedge.fluent.models.DeviceCapacityRequestInfoProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Object for Capturing DeviceCapacityRequestInfo. */ +@Fluent +public final class DeviceCapacityRequestInfo { + /* + * The properties of the Device Capacity Request. + */ + @JsonProperty(value = "properties", required = true) + private DeviceCapacityRequestInfoProperties innerProperties = new DeviceCapacityRequestInfoProperties(); + + /** Creates an instance of DeviceCapacityRequestInfo class. */ + public DeviceCapacityRequestInfo() { + } + + /** + * Get the innerProperties property: The properties of the Device Capacity Request. + * + * @return the innerProperties value. + */ + private DeviceCapacityRequestInfoProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the vmPlacementQuery property: Array containing the sizes of the VMs for checking if its feasible to create + * them on the appliance. + * + * @return the vmPlacementQuery value. + */ + public List> vmPlacementQuery() { + return this.innerProperties() == null ? null : this.innerProperties().vmPlacementQuery(); + } + + /** + * Set the vmPlacementQuery property: Array containing the sizes of the VMs for checking if its feasible to create + * them on the appliance. + * + * @param vmPlacementQuery the vmPlacementQuery value to set. + * @return the DeviceCapacityRequestInfo object itself. + */ + public DeviceCapacityRequestInfo withVmPlacementQuery(List> vmPlacementQuery) { + if (this.innerProperties() == null) { + this.innerProperties = new DeviceCapacityRequestInfoProperties(); + } + this.innerProperties().withVmPlacementQuery(vmPlacementQuery); + return this; + } + + /** + * Get the vmPlacementResults property: Array of the VMs of the sizes in VmSizes can be provisioned on the + * appliance. + * + * @return the vmPlacementResults value. + */ + public List vmPlacementResults() { + return this.innerProperties() == null ? null : this.innerProperties().vmPlacementResults(); + } + + /** + * Set the vmPlacementResults property: Array of the VMs of the sizes in VmSizes can be provisioned on the + * appliance. + * + * @param vmPlacementResults the vmPlacementResults value to set. + * @return the DeviceCapacityRequestInfo object itself. + */ + public DeviceCapacityRequestInfo withVmPlacementResults(List vmPlacementResults) { + if (this.innerProperties() == null) { + this.innerProperties = new DeviceCapacityRequestInfoProperties(); + } + this.innerProperties().withVmPlacementResults(vmPlacementResults); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model DeviceCapacityRequestInfo")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DeviceCapacityRequestInfo.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceType.java index e73380754653..d720088b480b 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceType.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DeviceType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DeviceType. */ +/** The type of the Data Box Edge/Gateway device. */ public final class DeviceType extends ExpandableStringEnum { /** Static value DataBoxEdgeDevice for DeviceType. */ public static final DeviceType DATA_BOX_EDGE_DEVICE = fromString("DataBoxEdgeDevice"); @@ -24,7 +24,11 @@ public static DeviceType fromString(String name) { return fromString(name, DeviceType.class); } - /** @return known DeviceType values. */ + /** + * Gets known DeviceType values. + * + * @return known DeviceType values. + */ public static Collection values() { return values(DeviceType.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 a5cd9893b45e..46548981b91e 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 @@ -15,7 +15,8 @@ public interface Devices { * * @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 all the Data Box Edge/Data Box Gateway devices in a subscription. + * @return all the Data Box Edge/Data Box Gateway devices in a subscription as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -28,7 +29,8 @@ public interface Devices { * @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 all the Data Box Edge/Data Box Gateway devices in a subscription. + * @return all the Data Box Edge/Data Box Gateway devices in a subscription as paginated response with {@link + * PagedIterable}. */ PagedIterable list(String expand, Context context); @@ -39,7 +41,8 @@ public interface Devices { * @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 all the Data Box Edge/Data Box Gateway devices in a resource group. + * @return all the Data Box Edge/Data Box Gateway devices in a resource group as paginated response with {@link + * PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -53,7 +56,8 @@ public interface Devices { * @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 all the Data Box Edge/Data Box Gateway devices in a resource group. + * @return all the Data Box Edge/Data Box Gateway devices in a resource group as paginated response with {@link + * PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context); @@ -62,26 +66,26 @@ public interface Devices { * * @param resourceGroupName The resource group name. * @param deviceName The device 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 properties of the Data Box Edge/Data Box Gateway device. + * @return the properties of the Data Box Edge/Data Box Gateway device along with {@link Response}. */ - DataBoxEdgeDevice getByResourceGroup(String resourceGroupName, String deviceName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String deviceName, Context context); /** * Gets the properties of the Data Box Edge/Data Box Gateway device. * * @param resourceGroupName The resource group name. * @param deviceName The device 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 properties of the Data Box Edge/Data Box Gateway device. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String deviceName, Context context); + DataBoxEdgeDevice getByResourceGroup(String resourceGroupName, String deviceName); /** * Deletes the Data Box Edge/Data Box Gateway device. @@ -130,19 +134,33 @@ 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. + * @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 used in activation key generation flow along with {@link Response}. */ - DataBoxEdgeDeviceExtendedInfo getExtendedInformation(String deviceName, String resourceGroupName); + Response generateCertificateWithResponse( + 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 used in activation key generation flow. + */ + GenerateCertResponse generateCertificate(String deviceName, String resourceGroupName); + + /** + * 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,11 +168,24 @@ 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 along with {@link + * Response}. */ Response getExtendedInformationWithResponse( 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); + /** * Installs the updates on the Data Box Edge/Data Box Gateway device. * @@ -183,26 +214,26 @@ Response getExtendedInformationWithResponse( * * @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 network settings of the specified Data Box Edge/Data Box Gateway device. + * @return the network settings of the specified Data Box Edge/Data Box Gateway device along with {@link Response}. */ - NetworkSettings getNetworkSettings(String deviceName, String resourceGroupName); + Response getNetworkSettingsWithResponse( + String deviceName, String resourceGroupName, Context context); /** * Gets the network 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 network settings of the specified Data Box Edge/Data Box Gateway device. */ - Response getNetworkSettingsWithResponse( - String deviceName, String resourceGroupName, Context context); + NetworkSettings getNetworkSettings(String deviceName, String resourceGroupName); /** * Scans for updates on a Data Box Edge/Data Box Gateway device. @@ -253,18 +284,50 @@ 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. + * @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 along with {@link + * Response}. + */ + Response updateExtendedInformationWithResponse( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters, 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 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. * * @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 information about the availability of updates based on the last scan of the device. + * @return information about the availability of updates based on the last scan of the device along with {@link + * Response}. */ - UpdateSummary getUpdateSummary(String deviceName, String resourceGroupName); + Response getUpdateSummaryWithResponse(String deviceName, String resourceGroupName, Context context); /** * Gets information about the availability of updates based on the last scan of the device. It also gets information @@ -272,13 +335,12 @@ void createOrUpdateSecuritySettings( * * @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 information about the availability of updates based on the last scan of the device. */ - Response getUpdateSummaryWithResponse(String deviceName, String resourceGroupName, Context context); + UpdateSummary getUpdateSummary(String deviceName, String resourceGroupName); /** * Uploads registration certificate for the device. @@ -286,13 +348,14 @@ void createOrUpdateSecuritySettings( * @param deviceName The device name. * @param resourceGroupName The resource group name. * @param parameters The upload certificate request. + * @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 upload registration certificate response. + * @return the upload registration certificate response along with {@link Response}. */ - UploadCertificateResponse uploadCertificate( - String deviceName, String resourceGroupName, UploadCertificateRequest parameters); + Response uploadCertificateWithResponse( + String deviceName, String resourceGroupName, UploadCertificateRequest parameters, Context context); /** * Uploads registration certificate for the device. @@ -300,14 +363,13 @@ UploadCertificateResponse uploadCertificate( * @param deviceName The device name. * @param resourceGroupName The resource group name. * @param parameters The upload certificate request. - * @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 upload registration certificate response. */ - Response uploadCertificateWithResponse( - String deviceName, String resourceGroupName, UploadCertificateRequest parameters, Context context); + UploadCertificateResponse uploadCertificate( + String deviceName, String resourceGroupName, UploadCertificateRequest parameters); /** * Gets the properties of the Data Box Edge/Data Box Gateway device. @@ -316,7 +378,7 @@ Response uploadCertificateWithResponse( * @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 properties of the Data Box Edge/Data Box Gateway device. + * @return the properties of the Data Box Edge/Data Box Gateway device along with {@link Response}. */ DataBoxEdgeDevice getById(String id); @@ -328,7 +390,7 @@ Response uploadCertificateWithResponse( * @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 properties of the Data Box Edge/Data Box Gateway device. + * @return the properties of the Data Box Edge/Data Box Gateway device along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 000000000000..6b645342995d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DiagnosticProactiveLogCollectionSettings.java @@ -0,0 +1,55 @@ +// 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: Metadata pertaining to creation and last modification of + * 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 000000000000..910ca97d6e01 --- /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: Represents resource creation and updation time. + * + * @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 000000000000..af24139d512e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DiagnosticSettings.java @@ -0,0 +1,136 @@ +// 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. + * @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 along with + * {@link Response}. + */ + Response getDiagnosticProactiveLogCollectionSettingsWithResponse( + String deviceName, String resourceGroupName, 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 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); + + /** + * 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. + * @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 along with + * {@link Response}. + */ + Response getDiagnosticRemoteSupportSettingsWithResponse( + String deviceName, String resourceGroupName, 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); + + /** + * 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/DownloadPhase.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DownloadPhase.java index 6857cd252d7d..b286e36668a8 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DownloadPhase.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DownloadPhase.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DownloadPhase. */ +/** The download phase. */ public final class DownloadPhase extends ExpandableStringEnum { /** Static value Unknown for DownloadPhase. */ public static final DownloadPhase UNKNOWN = fromString("Unknown"); @@ -33,7 +33,11 @@ public static DownloadPhase fromString(String name) { return fromString(name, DownloadPhase.class); } - /** @return known DownloadPhase values. */ + /** + * Gets known DownloadPhase values. + * + * @return known DownloadPhase values. + */ public static Collection values() { return values(DownloadPhase.class); } 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 000000000000..6e87b494d77a --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** Details about Edge Profile for the resource. */ +@Fluent +public final class EdgeProfile { + /* + * Edge Profile Subscription + */ + @JsonProperty(value = "subscription") + private EdgeProfileSubscription subscription; + + /** Creates an instance of EdgeProfile class. */ + public EdgeProfile() { + } + + /** + * 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 000000000000..3f706bb2fe5f --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** The Data Box Edge/Gateway Edge Profile patch. */ +@Fluent +public final class EdgeProfilePatch { + /* + * The Data Box Edge/Gateway Edge Profile Subscription patch + */ + @JsonProperty(value = "subscription") + private EdgeProfileSubscriptionPatch subscription; + + /** Creates an instance of EdgeProfilePatch class. */ + public EdgeProfilePatch() { + } + + /** + * 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 000000000000..b414b7385c6f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfileSubscription.java @@ -0,0 +1,289 @@ +// 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.resourcemanager.databoxedge.fluent.models.SubscriptionProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Subscription details for the Edge Profile. */ +@Fluent +public final class EdgeProfileSubscription { + /* + * 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 properties property. + */ + @JsonProperty(value = "properties") + private SubscriptionProperties innerProperties; + + /** Creates an instance of EdgeProfileSubscription class. */ + public EdgeProfileSubscription() { + } + + /** + * 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 innerProperties property: The properties property. + * + * @return the innerProperties value. + */ + private SubscriptionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the tenantId property: The tenantId property. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + + /** + * Get the locationPlacementId property: The locationPlacementId property. + * + * @return the locationPlacementId value. + */ + public String locationPlacementId() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionProperties(); + } + this.innerProperties().withLocationPlacementId(locationPlacementId); + return this; + } + + /** + * Get the quotaId property: The quotaId property. + * + * @return the quotaId value. + */ + public String quotaId() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionProperties(); + } + this.innerProperties().withQuotaId(quotaId); + return this; + } + + /** + * Get the serializedDetails property: The serializedDetails property. + * + * @return the serializedDetails value. + */ + public String serializedDetails() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionProperties(); + } + this.innerProperties().withSerializedDetails(serializedDetails); + return this; + } + + /** + * Get the registeredFeatures property: The registeredFeatures property. + * + * @return the registeredFeatures value. + */ + public List registeredFeatures() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionProperties(); + } + this.innerProperties().withRegisteredFeatures(registeredFeatures); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().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 000000000000..b78cd39985c6 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EdgeProfileSubscriptionPatch.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.fasterxml.jackson.annotation.JsonProperty; + +/** The Data Box Edge/Gateway Edge Profile Subscription patch. */ +@Fluent +public final class EdgeProfileSubscriptionPatch { + /* + * The path ID that uniquely identifies the subscription of the edge profile. + */ + @JsonProperty(value = "id") + private String id; + + /** Creates an instance of EdgeProfileSubscriptionPatch class. */ + public EdgeProfileSubscriptionPatch() { + } + + /** + * 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/EncryptionAlgorithm.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EncryptionAlgorithm.java index 2ad36344cdc8..c089125b3c62 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EncryptionAlgorithm.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EncryptionAlgorithm.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EncryptionAlgorithm. */ +/** The algorithm used to encrypt "Value". */ public final class EncryptionAlgorithm extends ExpandableStringEnum { /** Static value None for EncryptionAlgorithm. */ public static final EncryptionAlgorithm NONE = fromString("None"); @@ -30,7 +30,11 @@ public static EncryptionAlgorithm fromString(String name) { return fromString(name, EncryptionAlgorithm.class); } - /** @return known EncryptionAlgorithm values. */ + /** + * Gets known EncryptionAlgorithm values. + * + * @return known EncryptionAlgorithm values. + */ public static Collection values() { return values(EncryptionAlgorithm.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EtcdInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EtcdInfo.java new file mode 100644 index 000000000000..d1c462fa003e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/EtcdInfo.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.fasterxml.jackson.annotation.JsonProperty; + +/** Etcd configuration. */ +@Immutable +public final class EtcdInfo { + /* + * Etcd type + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * Etcd version + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /** Creates an instance of EtcdInfo class. */ + public EtcdInfo() { + } + + /** + * Get the type property: Etcd type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the version property: Etcd 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/FileEventTrigger.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/FileEventTrigger.java index 430a2e8475e3..83377d9cb24e 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/FileEventTrigger.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/FileEventTrigger.java @@ -5,10 +5,9 @@ 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.FileTriggerProperties; import com.azure.resourcemanager.databoxedge.fluent.models.TriggerInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,31 +15,26 @@ /** Trigger details. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("FileEvent") -@JsonFlatten @Fluent -public class FileEventTrigger extends TriggerInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FileEventTrigger.class); - +public final class FileEventTrigger extends TriggerInner { /* - * File event source details. + * File trigger properties. */ - @JsonProperty(value = "properties.sourceInfo", required = true) - private FileSourceInfo sourceInfo; + @JsonProperty(value = "properties", required = true) + private FileTriggerProperties innerProperties = new FileTriggerProperties(); - /* - * Role sink info. - */ - @JsonProperty(value = "properties.sinkInfo", required = true) - private RoleSinkInfo sinkInfo; + /** Creates an instance of FileEventTrigger class. */ + public FileEventTrigger() { + } - /* - * A custom context tag typically used to correlate the trigger against its - * usage. For example, if a periodic timer trigger is intended for certain - * specific IoT modules in the device, the tag can be the name or the image - * URL of the module. + /** + * Get the innerProperties property: File trigger properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.customContextTag") - private String customContextTag; + private FileTriggerProperties innerProperties() { + return this.innerProperties; + } /** * Get the sourceInfo property: File event source details. @@ -48,7 +42,7 @@ public class FileEventTrigger extends TriggerInner { * @return the sourceInfo value. */ public FileSourceInfo sourceInfo() { - return this.sourceInfo; + return this.innerProperties() == null ? null : this.innerProperties().sourceInfo(); } /** @@ -58,7 +52,10 @@ public FileSourceInfo sourceInfo() { * @return the FileEventTrigger object itself. */ public FileEventTrigger withSourceInfo(FileSourceInfo sourceInfo) { - this.sourceInfo = sourceInfo; + if (this.innerProperties() == null) { + this.innerProperties = new FileTriggerProperties(); + } + this.innerProperties().withSourceInfo(sourceInfo); return this; } @@ -68,7 +65,7 @@ public FileEventTrigger withSourceInfo(FileSourceInfo sourceInfo) { * @return the sinkInfo value. */ public RoleSinkInfo sinkInfo() { - return this.sinkInfo; + return this.innerProperties() == null ? null : this.innerProperties().sinkInfo(); } /** @@ -78,7 +75,10 @@ public RoleSinkInfo sinkInfo() { * @return the FileEventTrigger object itself. */ public FileEventTrigger withSinkInfo(RoleSinkInfo sinkInfo) { - this.sinkInfo = sinkInfo; + if (this.innerProperties() == null) { + this.innerProperties = new FileTriggerProperties(); + } + this.innerProperties().withSinkInfo(sinkInfo); return this; } @@ -90,7 +90,7 @@ public FileEventTrigger withSinkInfo(RoleSinkInfo sinkInfo) { * @return the customContextTag value. */ public String customContextTag() { - return this.customContextTag; + return this.innerProperties() == null ? null : this.innerProperties().customContextTag(); } /** @@ -102,7 +102,10 @@ public String customContextTag() { * @return the FileEventTrigger object itself. */ public FileEventTrigger withCustomContextTag(String customContextTag) { - this.customContextTag = customContextTag; + if (this.innerProperties() == null) { + this.innerProperties = new FileTriggerProperties(); + } + this.innerProperties().withCustomContextTag(customContextTag); return this; } @@ -114,19 +117,15 @@ public FileEventTrigger withCustomContextTag(String customContextTag) { @Override public void validate() { super.validate(); - if (sourceInfo() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property sourceInfo in model FileEventTrigger")); + new IllegalArgumentException( + "Missing required property innerProperties in model FileEventTrigger")); } else { - sourceInfo().validate(); - } - if (sinkInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property sinkInfo in model FileEventTrigger")); - } else { - sinkInfo().validate(); + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(FileEventTrigger.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/FileSourceInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/FileSourceInfo.java index 46b987de3f9a..11f677914530 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/FileSourceInfo.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/FileSourceInfo.java @@ -6,20 +6,21 @@ 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; /** File source details. */ @Fluent public final class FileSourceInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FileSourceInfo.class); - /* * File share ID. */ @JsonProperty(value = "shareId", required = true) private String shareId; + /** Creates an instance of FileSourceInfo class. */ + public FileSourceInfo() { + } + /** * Get the shareId property: File share ID. * @@ -47,9 +48,11 @@ public FileSourceInfo withShareId(String shareId) { */ public void validate() { if (shareId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property shareId in model FileSourceInfo")); } } + + private static final ClientLogger LOGGER = new ClientLogger(FileSourceInfo.class); } 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 000000000000..e6cb1ac69734 --- /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/HostCapacity.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/HostCapacity.java new file mode 100644 index 000000000000..1d66852ba7ab --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/HostCapacity.java @@ -0,0 +1,201 @@ +// 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Host Capacity Data. */ +@Fluent +public final class HostCapacity { + /* + * The name of the host. + */ + @JsonProperty(value = "hostName") + private String hostname; + + /* + * The available memory on the host accounting for VM placement size and any host VM reservations. + */ + @JsonProperty(value = "effectiveAvailableMemoryMbOnHost") + private Long effectiveAvailableMemoryMbOnHost; + + /* + * The available amount of GPUs on the host to use after accounting for GPUS used by reservations on the host. + */ + @JsonProperty(value = "availableGpuCount") + private Integer availableGpuCount; + + /* + * The VM used memory per VmId. + */ + @JsonProperty(value = "vmUsedMemory") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map vmUsedMemory; + + /* + * The GPU type of the VM. + */ + @JsonProperty(value = "gpuType") + private String gpuType; + + /* + * The numa nodes information for Hpn VMs. + */ + @JsonProperty(value = "numaNodesData") + private List numaNodesData; + + /** Creates an instance of HostCapacity class. */ + public HostCapacity() { + } + + /** + * Get the hostname property: The name of the host. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname property: The name of the host. + * + * @param hostname the hostname value to set. + * @return the HostCapacity object itself. + */ + public HostCapacity withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get the effectiveAvailableMemoryMbOnHost property: The available memory on the host accounting for VM placement + * size and any host VM reservations. + * + * @return the effectiveAvailableMemoryMbOnHost value. + */ + public Long effectiveAvailableMemoryMbOnHost() { + return this.effectiveAvailableMemoryMbOnHost; + } + + /** + * Set the effectiveAvailableMemoryMbOnHost property: The available memory on the host accounting for VM placement + * size and any host VM reservations. + * + * @param effectiveAvailableMemoryMbOnHost the effectiveAvailableMemoryMbOnHost value to set. + * @return the HostCapacity object itself. + */ + public HostCapacity withEffectiveAvailableMemoryMbOnHost(Long effectiveAvailableMemoryMbOnHost) { + this.effectiveAvailableMemoryMbOnHost = effectiveAvailableMemoryMbOnHost; + return this; + } + + /** + * Get the availableGpuCount property: The available amount of GPUs on the host to use after accounting for GPUS + * used by reservations on the host. + * + * @return the availableGpuCount value. + */ + public Integer availableGpuCount() { + return this.availableGpuCount; + } + + /** + * Set the availableGpuCount property: The available amount of GPUs on the host to use after accounting for GPUS + * used by reservations on the host. + * + * @param availableGpuCount the availableGpuCount value to set. + * @return the HostCapacity object itself. + */ + public HostCapacity withAvailableGpuCount(Integer availableGpuCount) { + this.availableGpuCount = availableGpuCount; + return this; + } + + /** + * Get the vmUsedMemory property: The VM used memory per VmId. + * + * @return the vmUsedMemory value. + */ + public Map vmUsedMemory() { + return this.vmUsedMemory; + } + + /** + * Set the vmUsedMemory property: The VM used memory per VmId. + * + * @param vmUsedMemory the vmUsedMemory value to set. + * @return the HostCapacity object itself. + */ + public HostCapacity withVmUsedMemory(Map vmUsedMemory) { + this.vmUsedMemory = vmUsedMemory; + return this; + } + + /** + * Get the gpuType property: The GPU type of the VM. + * + * @return the gpuType value. + */ + public String gpuType() { + return this.gpuType; + } + + /** + * Set the gpuType property: The GPU type of the VM. + * + * @param gpuType the gpuType value to set. + * @return the HostCapacity object itself. + */ + public HostCapacity withGpuType(String gpuType) { + this.gpuType = gpuType; + return this; + } + + /** + * Get the numaNodesData property: The numa nodes information for Hpn VMs. + * + * @return the numaNodesData value. + */ + public List numaNodesData() { + return this.numaNodesData; + } + + /** + * Set the numaNodesData property: The numa nodes information for Hpn VMs. + * + * @param numaNodesData the numaNodesData value to set. + * @return the HostCapacity object itself. + */ + public HostCapacity withNumaNodesData(List numaNodesData) { + this.numaNodesData = numaNodesData; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vmUsedMemory() != null) { + vmUsedMemory() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (numaNodesData() != null) { + numaNodesData().forEach(e -> e.validate()); + } + } +} 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 000000000000..9aebd312366c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/HostPlatformType.java @@ -0,0 +1,38 @@ +// 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; + +/** Platform where the runtime is hosted. */ +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); + } + + /** + * Gets known HostPlatformType values. + * + * @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 000000000000..a49a6f0545a1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ImageRepositoryCredential.java @@ -0,0 +1,120 @@ +// 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.JsonProperty; + +/** Image repository credential. */ +@Fluent +public final class ImageRepositoryCredential { + /* + * 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; + + /** Creates an instance of ImageRepositoryCredential class. */ + public ImageRepositoryCredential() { + } + + /** + * 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(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ImageRepositoryCredential.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/InstallRebootBehavior.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/InstallRebootBehavior.java index f79383e5d216..4cc3f13ca61b 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/InstallRebootBehavior.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/InstallRebootBehavior.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for InstallRebootBehavior. */ +/** Indicates if updates are available and at least one of the updates needs a reboot. */ public final class InstallRebootBehavior extends ExpandableStringEnum { /** Static value NeverReboots for InstallRebootBehavior. */ public static final InstallRebootBehavior NEVER_REBOOTS = fromString("NeverReboots"); @@ -30,7 +30,11 @@ public static InstallRebootBehavior fromString(String name) { return fromString(name, InstallRebootBehavior.class); } - /** @return known InstallRebootBehavior values. */ + /** + * Gets known InstallRebootBehavior values. + * + * @return known InstallRebootBehavior values. + */ public static Collection values() { return values(InstallRebootBehavior.class); } 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 000000000000..1097b2321b15 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/InstallationImpact.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Impact of Installing an updateType. */ +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); + } + + /** + * Gets known InstallationImpact values. + * + * @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 000000000000..afcfd434e5ba --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTAddon.java @@ -0,0 +1,139 @@ +// 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.azure.resourcemanager.databoxedge.fluent.models.AddonInner; +import com.azure.resourcemanager.databoxedge.fluent.models.IoTAddonProperties; +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") +@Fluent +public final class IoTAddon extends AddonInner { + /* + * Properties specific to IOT addon. + */ + @JsonProperty(value = "properties", required = true) + private IoTAddonProperties innerProperties = new IoTAddonProperties(); + + /** Creates an instance of IoTAddon class. */ + public IoTAddon() { + } + + /** + * Get the innerProperties property: Properties specific to IOT addon. + * + * @return the innerProperties value. + */ + private IoTAddonProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the ioTDeviceDetails property: IoT device metadata to which appliance needs to be connected. + * + * @return the ioTDeviceDetails value. + */ + public IoTDeviceInfo ioTDeviceDetails() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new IoTAddonProperties(); + } + this.innerProperties().withIoTDeviceDetails(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.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new IoTAddonProperties(); + } + this.innerProperties().withIoTEdgeDeviceDetails(ioTEdgeDeviceDetails); + return this; + } + + /** + * Get the version property: Version of IoT running on the appliance. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Get the hostPlatform property: Host OS supported by the IoT addon. + * + * @return the hostPlatform value. + */ + public PlatformType hostPlatform() { + return this.innerProperties() == null ? null : this.innerProperties().hostPlatform(); + } + + /** + * Get the hostPlatformType property: Platform where the runtime is hosted. + * + * @return the hostPlatformType value. + */ + public HostPlatformType hostPlatformType() { + return this.innerProperties() == null ? null : this.innerProperties().hostPlatformType(); + } + + /** + * Get the provisioningState property: Addon Provisioning State. + * + * @return the provisioningState value. + */ + public AddonState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model IoTAddon")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IoTAddon.class); +} 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 74f9a70b2393..7dc6b4b2b4c1 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 @@ -6,14 +6,11 @@ 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; /** Metadata of IoT device/IoT Edge device to be configured. */ @Fluent public final class IoTDeviceInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IoTDeviceInfo.class); - /* * ID of the IoT device/edge device. */ @@ -33,11 +30,15 @@ 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; + /** Creates an instance of IoTDeviceInfo class. */ + public IoTDeviceInfo() { + } + /** * Get the deviceId property: ID of the IoT device/edge device. * @@ -99,7 +100,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 +109,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. @@ -125,12 +126,12 @@ public IoTDeviceInfo withAuthentication(Authentication authentication) { */ public void validate() { if (deviceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property deviceId in model IoTDeviceInfo")); } if (ioTHostHub() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property ioTHostHub in model IoTDeviceInfo")); } @@ -138,4 +139,6 @@ public void validate() { authentication().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(IoTDeviceInfo.class); } 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 000000000000..7be41d0a3508 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/IoTEdgeAgentInfo.java @@ -0,0 +1,121 @@ +// 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.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 { + /* + * 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; + + /** Creates an instance of IoTEdgeAgentInfo class. */ + public IoTEdgeAgentInfo() { + } + + /** + * 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(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IoTEdgeAgentInfo.class); +} 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 1075a2480e11..ee496d6f5f40 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 @@ -5,10 +5,8 @@ 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.IoTRoleProperties; 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; @@ -17,40 +15,26 @@ /** Compute role. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("IOT") -@JsonFlatten @Fluent -public class IoTRole extends RoleInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IoTRole.class); - - /* - * Host OS supported by the IoT role. - */ - @JsonProperty(value = "properties.hostPlatform") - private PlatformType hostPlatform; - - /* - * IoT device metadata to which data box edge device needs to be connected. - */ - @JsonProperty(value = "properties.ioTDeviceDetails") - private IoTDeviceInfo ioTDeviceDetails; - +public final class IoTRole extends RoleInner { /* - * IoT edge device to which the IoT role needs to be configured. + * Properties specific to IoT role. */ - @JsonProperty(value = "properties.ioTEdgeDeviceDetails") - private IoTDeviceInfo ioTEdgeDeviceDetails; + @JsonProperty(value = "properties") + private IoTRoleProperties innerProperties; - /* - * Mount points of shares in role(s). - */ - @JsonProperty(value = "properties.shareMappings") - private List shareMappings; + /** Creates an instance of IoTRole class. */ + public IoTRole() { + } - /* - * Role status. + /** + * Get the innerProperties property: Properties specific to IoT role. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.roleStatus") - private RoleStatus roleStatus; + private IoTRoleProperties innerProperties() { + return this.innerProperties; + } /** * Get the hostPlatform property: Host OS supported by the IoT role. @@ -58,7 +42,7 @@ public class IoTRole extends RoleInner { * @return the hostPlatform value. */ public PlatformType hostPlatform() { - return this.hostPlatform; + return this.innerProperties() == null ? null : this.innerProperties().hostPlatform(); } /** @@ -68,7 +52,10 @@ public PlatformType hostPlatform() { * @return the IoTRole object itself. */ public IoTRole withHostPlatform(PlatformType hostPlatform) { - this.hostPlatform = hostPlatform; + if (this.innerProperties() == null) { + this.innerProperties = new IoTRoleProperties(); + } + this.innerProperties().withHostPlatform(hostPlatform); return this; } @@ -78,7 +65,7 @@ public IoTRole withHostPlatform(PlatformType hostPlatform) { * @return the ioTDeviceDetails value. */ public IoTDeviceInfo ioTDeviceDetails() { - return this.ioTDeviceDetails; + return this.innerProperties() == null ? null : this.innerProperties().ioTDeviceDetails(); } /** @@ -88,7 +75,10 @@ public IoTDeviceInfo ioTDeviceDetails() { * @return the IoTRole object itself. */ public IoTRole withIoTDeviceDetails(IoTDeviceInfo ioTDeviceDetails) { - this.ioTDeviceDetails = ioTDeviceDetails; + if (this.innerProperties() == null) { + this.innerProperties = new IoTRoleProperties(); + } + this.innerProperties().withIoTDeviceDetails(ioTDeviceDetails); return this; } @@ -98,7 +88,7 @@ public IoTRole withIoTDeviceDetails(IoTDeviceInfo ioTDeviceDetails) { * @return the ioTEdgeDeviceDetails value. */ public IoTDeviceInfo ioTEdgeDeviceDetails() { - return this.ioTEdgeDeviceDetails; + return this.innerProperties() == null ? null : this.innerProperties().ioTEdgeDeviceDetails(); } /** @@ -108,7 +98,10 @@ public IoTDeviceInfo ioTEdgeDeviceDetails() { * @return the IoTRole object itself. */ public IoTRole withIoTEdgeDeviceDetails(IoTDeviceInfo ioTEdgeDeviceDetails) { - this.ioTEdgeDeviceDetails = ioTEdgeDeviceDetails; + if (this.innerProperties() == null) { + this.innerProperties = new IoTRoleProperties(); + } + this.innerProperties().withIoTEdgeDeviceDetails(ioTEdgeDeviceDetails); return this; } @@ -118,7 +111,7 @@ public IoTRole withIoTEdgeDeviceDetails(IoTDeviceInfo ioTEdgeDeviceDetails) { * @return the shareMappings value. */ public List shareMappings() { - return this.shareMappings; + return this.innerProperties() == null ? null : this.innerProperties().shareMappings(); } /** @@ -128,7 +121,65 @@ public List shareMappings() { * @return the IoTRole object itself. */ public IoTRole withShareMappings(List shareMappings) { - this.shareMappings = shareMappings; + if (this.innerProperties() == null) { + this.innerProperties = new IoTRoleProperties(); + } + this.innerProperties().withShareMappings(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.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new IoTRoleProperties(); + } + this.innerProperties().withIoTEdgeAgentInfo(ioTEdgeAgentInfo); + return this; + } + + /** + * Get the hostPlatformType property: Platform where the Iot runtime is hosted. + * + * @return the hostPlatformType value. + */ + public HostPlatformType hostPlatformType() { + return this.innerProperties() == null ? null : this.innerProperties().hostPlatformType(); + } + + /** + * Get the computeResource property: Resource allocation. + * + * @return the computeResource value. + */ + public ComputeResource computeResource() { + return this.innerProperties() == null ? null : this.innerProperties().computeResource(); + } + + /** + * Set the computeResource property: Resource allocation. + * + * @param computeResource the computeResource value to set. + * @return the IoTRole object itself. + */ + public IoTRole withComputeResource(ComputeResource computeResource) { + if (this.innerProperties() == null) { + this.innerProperties = new IoTRoleProperties(); + } + this.innerProperties().withComputeResource(computeResource); return this; } @@ -138,7 +189,7 @@ public IoTRole withShareMappings(List shareMappings) { * @return the roleStatus value. */ public RoleStatus roleStatus() { - return this.roleStatus; + return this.innerProperties() == null ? null : this.innerProperties().roleStatus(); } /** @@ -148,7 +199,10 @@ public RoleStatus roleStatus() { * @return the IoTRole object itself. */ public IoTRole withRoleStatus(RoleStatus roleStatus) { - this.roleStatus = roleStatus; + if (this.innerProperties() == null) { + this.innerProperties = new IoTRoleProperties(); + } + this.innerProperties().withRoleStatus(roleStatus); return this; } @@ -160,14 +214,8 @@ public IoTRole withRoleStatus(RoleStatus roleStatus) { @Override public void validate() { super.validate(); - if (ioTDeviceDetails() != null) { - ioTDeviceDetails().validate(); - } - if (ioTEdgeDeviceDetails() != null) { - ioTEdgeDeviceDetails().validate(); - } - if (shareMappings() != null) { - shareMappings().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Ipv4Config.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Ipv4Config.java index d53978304161..3faf13c72014 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Ipv4Config.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Ipv4Config.java @@ -5,15 +5,11 @@ 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; /** Details related to the IPv4 address configuration. */ @Immutable public final class Ipv4Config { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Ipv4Config.class); - /* * The IPv4 address of the network adapter. */ @@ -32,6 +28,10 @@ public final class Ipv4Config { @JsonProperty(value = "gateway", access = JsonProperty.Access.WRITE_ONLY) private String gateway; + /** Creates an instance of Ipv4Config class. */ + public Ipv4Config() { + } + /** * Get the ipAddress property: The IPv4 address of the network adapter. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Ipv6Config.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Ipv6Config.java index 98cd90d65a6c..0564be8d510e 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Ipv6Config.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Ipv6Config.java @@ -5,15 +5,11 @@ 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; /** Details related to the IPv6 address configuration. */ @Immutable public final class Ipv6Config { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Ipv6Config.class); - /* * The IPv6 address of the network adapter. */ @@ -32,6 +28,10 @@ public final class Ipv6Config { @JsonProperty(value = "gateway", access = JsonProperty.Access.WRITE_ONLY) private String gateway; + /** Creates an instance of Ipv6Config class. */ + public Ipv6Config() { + } + /** * Get the ipAddress property: The IPv6 address of the network adapter. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobErrorDetails.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobErrorDetails.java index 4de80561e7c2..8ca30b7ba4be 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobErrorDetails.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobErrorDetails.java @@ -5,16 +5,12 @@ 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 job error information containing the list of job errors. */ @Immutable public final class JobErrorDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobErrorDetails.class); - /* * The error details. */ @@ -33,6 +29,10 @@ public final class JobErrorDetails { @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; + /** Creates an instance of JobErrorDetails class. */ + public JobErrorDetails() { + } + /** * Get the errorDetails property: The error details. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobErrorItem.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobErrorItem.java index 208e33cea1d1..155045975053 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobErrorItem.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobErrorItem.java @@ -5,16 +5,12 @@ 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 job error items. */ @Immutable public final class JobErrorItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobErrorItem.class); - /* * The recommended actions. */ @@ -33,6 +29,10 @@ public final class JobErrorItem { @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; + /** Creates an instance of JobErrorItem class. */ + public JobErrorItem() { + } + /** * Get the recommendations property: The recommended actions. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobStatus.java index f42b37bcbc3d..ce6d618ec131 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for JobStatus. */ +/** The current status of the job. */ public final class JobStatus extends ExpandableStringEnum { /** Static value Invalid for JobStatus. */ public static final JobStatus INVALID = fromString("Invalid"); @@ -42,7 +42,11 @@ public static JobStatus fromString(String name) { return fromString(name, JobStatus.class); } - /** @return known JobStatus values. */ + /** + * Gets known JobStatus values. + * + * @return known JobStatus values. + */ public static Collection values() { return values(JobStatus.class); } 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 06a1b3820e58..3a117c8df83b 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for JobType. */ +/** The type of the job. */ public final class JobType extends ExpandableStringEnum { /** Static value Invalid for JobType. */ public static final JobType INVALID = fromString("Invalid"); @@ -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. * @@ -39,7 +48,11 @@ public static JobType fromString(String name) { return fromString(name, JobType.class); } - /** @return known JobType values. */ + /** + * Gets known JobType values. + * + * @return known JobType values. + */ public static Collection values() { return values(JobType.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Jobs.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Jobs.java index 7c6e8fe2ed92..a93f36752860 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Jobs.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Jobs.java @@ -15,12 +15,13 @@ public interface Jobs { * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device along with {@link Response}. */ - Job get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. @@ -28,11 +29,10 @@ public interface Jobs { * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. */ - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + Job get(String deviceName, String name, String resourceGroupName); } 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 000000000000..75ec7228536f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KeyVaultSyncStatus.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * For changing or to initiate the resync to key-vault set the status to KeyVaultSyncPending, rest of the status will + * not be applicable. + */ +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); + } + + /** + * Gets known KeyVaultSyncStatus values. + * + * @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 000000000000..6d87371545b2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesClusterInfo.java @@ -0,0 +1,95 @@ +// 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.JsonProperty; +import java.util.List; + +/** Kubernetes cluster configuration. */ +@Fluent +public final class KubernetesClusterInfo { + /* + * 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; + + /** Creates an instance of KubernetesClusterInfo class. */ + public KubernetesClusterInfo() { + } + + /** + * 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")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KubernetesClusterInfo.class); +} 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 000000000000..d05a86a726f1 --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** Kubernetes node IP configuration. */ +@Fluent +public final class KubernetesIpConfiguration { + /* + * 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; + + /** Creates an instance of KubernetesIpConfiguration class. */ + public KubernetesIpConfiguration() { + } + + /** + * 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 000000000000..b85e22ef60d8 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesNodeType.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Node type - Master/Worker. */ +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); + } + + /** + * Gets known KubernetesNodeType values. + * + * @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 000000000000..a06563bd9390 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRole.java @@ -0,0 +1,172 @@ +// 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.resourcemanager.databoxedge.fluent.models.KubernetesRoleProperties; +import com.azure.resourcemanager.databoxedge.fluent.models.RoleInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The limited preview of Kubernetes Cluster Management from the Azure supports: 1. Using a simple turn-key option in + * Azure Portal, deploy a Kubernetes cluster on your Azure Stack Edge device. 2. Configure Kubernetes cluster running on + * your device with Arc enabled Kubernetes with a click of a button in the Azure Portal. Azure Arc enables organizations + * to view, manage, and govern their on-premises Kubernetes clusters using the Azure Portal, command line tools, and + * APIs. 3. Easily configure Persistent Volumes using SMB and NFS shares for storing container data. For more + * information, refer to the document here: + * https://databoxupdatepackages.blob.core.windows.net/documentation/Microsoft-Azure-Stack-Edge-K8-Cloud-Management-20210323.pdf + * Or Demo: + * https://databoxupdatepackages.blob.core.windows.net/documentation/Microsoft-Azure-Stack-Edge-K8S-Cloud-Management-20210323.mp4 + * By using this feature, you agree to the preview legal terms. See the + * https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("Kubernetes") +@Fluent +public final class KubernetesRole extends RoleInner { + /* + * Properties specific to Kubernetes role. + */ + @JsonProperty(value = "properties") + private KubernetesRoleProperties innerProperties; + + /** Creates an instance of KubernetesRole class. */ + public KubernetesRole() { + } + + /** + * Get the innerProperties property: Properties specific to Kubernetes role. + * + * @return the innerProperties value. + */ + private KubernetesRoleProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the hostPlatform property: Host OS supported by the Kubernetes role. + * + * @return the hostPlatform value. + */ + public PlatformType hostPlatform() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new KubernetesRoleProperties(); + } + this.innerProperties().withHostPlatform(hostPlatform); + return this; + } + + /** + * Get the provisioningState property: State of Kubernetes deployment. + * + * @return the provisioningState value. + */ + public KubernetesState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the hostPlatformType property: Platform where the runtime is hosted. + * + * @return the hostPlatformType value. + */ + public HostPlatformType hostPlatformType() { + return this.innerProperties() == null ? null : this.innerProperties().hostPlatformType(); + } + + /** + * Get the kubernetesClusterInfo property: Kubernetes cluster configuration. + * + * @return the kubernetesClusterInfo value. + */ + public KubernetesClusterInfo kubernetesClusterInfo() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new KubernetesRoleProperties(); + } + this.innerProperties().withKubernetesClusterInfo(kubernetesClusterInfo); + return this; + } + + /** + * Get the kubernetesRoleResources property: Kubernetes role resources. + * + * @return the kubernetesRoleResources value. + */ + public KubernetesRoleResources kubernetesRoleResources() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new KubernetesRoleProperties(); + } + this.innerProperties().withKubernetesRoleResources(kubernetesRoleResources); + return this; + } + + /** + * Get the roleStatus property: Role status. + * + * @return the roleStatus value. + */ + public RoleStatus roleStatus() { + return this.innerProperties() == null ? null : this.innerProperties().roleStatus(); + } + + /** + * Set the roleStatus property: Role status. + * + * @param roleStatus the roleStatus value to set. + * @return the KubernetesRole object itself. + */ + public KubernetesRole withRoleStatus(RoleStatus roleStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new KubernetesRoleProperties(); + } + this.innerProperties().withRoleStatus(roleStatus); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().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 000000000000..85bb4010b642 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleCompute.java @@ -0,0 +1,88 @@ +// 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.JsonProperty; + +/** Kubernetes role compute resource. */ +@Fluent +public final class KubernetesRoleCompute { + /* + * 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; + + /** Creates an instance of KubernetesRoleCompute class. */ + public KubernetesRoleCompute() { + } + + /** + * 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")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KubernetesRoleCompute.class); +} 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 000000000000..1a486c8c0f91 --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** Kubernetes role network resource. */ +@Immutable +public final class KubernetesRoleNetwork { + /* + * 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; + + /** Creates an instance of KubernetesRoleNetwork class. */ + public KubernetesRoleNetwork() { + } + + /** + * 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 000000000000..698d61f01cef --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesRoleResources.java @@ -0,0 +1,107 @@ +// 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.JsonProperty; + +/** Kubernetes role resources. */ +@Fluent +public final class KubernetesRoleResources { + /* + * 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; + + /** Creates an instance of KubernetesRoleResources class. */ + public KubernetesRoleResources() { + } + + /** + * 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(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KubernetesRoleResources.class); +} 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 000000000000..698bcc8cf825 --- /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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Kubernetes role storage resource. */ +@Fluent +public final class KubernetesRoleStorage { + /* + * 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; + + /** Creates an instance of KubernetesRoleStorage class. */ + public KubernetesRoleStorage() { + } + + /** + * 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 000000000000..0e4dd623aa9a --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** Kubernetes storage class info. */ +@Immutable +public final class KubernetesRoleStorageClassInfo { + /* + * 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; + + /** Creates an instance of KubernetesRoleStorageClassInfo class. */ + public KubernetesRoleStorageClassInfo() { + } + + /** + * 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 000000000000..9ebeb649a6fe --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesState.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** State of Kubernetes deployment. */ +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); + } + + /** + * Gets known KubernetesState values. + * + * @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 000000000000..12c9999ee168 --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** Load balancer configuration. */ +@Immutable +public final class LoadBalancerConfig { + /* + * 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; + + /** Creates an instance of LoadBalancerConfig class. */ + public LoadBalancerConfig() { + } + + /** + * 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 000000000000..ab20ec759867 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MecRole.java @@ -0,0 +1,142 @@ +// 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.resourcemanager.databoxedge.fluent.models.MecRoleProperties; +import com.azure.resourcemanager.databoxedge.fluent.models.RoleInner; +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") +@Fluent +public final class MecRole extends RoleInner { + /* + * Properties specific to MEC role. + */ + @JsonProperty(value = "properties") + private MecRoleProperties innerProperties; + + /** Creates an instance of MecRole class. */ + public MecRole() { + } + + /** + * Get the innerProperties property: Properties specific to MEC role. + * + * @return the innerProperties value. + */ + private MecRoleProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the connectionString property: Activation key of the MEC. + * + * @return the connectionString value. + */ + public AsymmetricEncryptedSecret connectionString() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new MecRoleProperties(); + } + this.innerProperties().withConnectionString(connectionString); + return this; + } + + /** + * Get the controllerEndpoint property: Controller Endpoint. + * + * @return the controllerEndpoint value. + */ + public String controllerEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().controllerEndpoint(); + } + + /** + * Set the controllerEndpoint property: Controller Endpoint. + * + * @param controllerEndpoint the controllerEndpoint value to set. + * @return the MecRole object itself. + */ + public MecRole withControllerEndpoint(String controllerEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new MecRoleProperties(); + } + this.innerProperties().withControllerEndpoint(controllerEndpoint); + return this; + } + + /** + * Get the resourceUniqueId property: Unique Id of the Resource. + * + * @return the resourceUniqueId value. + */ + public String resourceUniqueId() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new MecRoleProperties(); + } + this.innerProperties().withResourceUniqueId(resourceUniqueId); + return this; + } + + /** + * Get the roleStatus property: Role status. + * + * @return the roleStatus value. + */ + public RoleStatus roleStatus() { + return this.innerProperties() == null ? null : this.innerProperties().roleStatus(); + } + + /** + * Set the roleStatus property: Role status. + * + * @param roleStatus the roleStatus value to set. + * @return the MecRole object itself. + */ + public MecRole withRoleStatus(RoleStatus roleStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new MecRoleProperties(); + } + this.innerProperties().withRoleStatus(roleStatus); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricAggregationType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricAggregationType.java index c59e711a8a72..61c5a4fb4634 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricAggregationType.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricAggregationType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for MetricAggregationType. */ +/** Metric aggregation type. */ public final class MetricAggregationType extends ExpandableStringEnum { /** Static value NotSpecified for MetricAggregationType. */ public static final MetricAggregationType NOT_SPECIFIED = fromString("NotSpecified"); @@ -42,7 +42,11 @@ public static MetricAggregationType fromString(String name) { return fromString(name, MetricAggregationType.class); } - /** @return known MetricAggregationType values. */ + /** + * Gets known MetricAggregationType values. + * + * @return known MetricAggregationType values. + */ public static Collection values() { return values(MetricAggregationType.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCategory.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCategory.java index 284b56037e6f..28c4aed8420e 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCategory.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCategory.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for MetricCategory. */ +/** Metric category. */ public final class MetricCategory extends ExpandableStringEnum { /** Static value Capacity for MetricCategory. */ public static final MetricCategory CAPACITY = fromString("Capacity"); @@ -27,7 +27,11 @@ public static MetricCategory fromString(String name) { return fromString(name, MetricCategory.class); } - /** @return known MetricCategory values. */ + /** + * Gets known MetricCategory values. + * + * @return known MetricCategory values. + */ public static Collection values() { return values(MetricCategory.class); } 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 000000000000..8a43cf0ae308 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricConfiguration.java @@ -0,0 +1,146 @@ +// 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.JsonProperty; +import java.util.List; + +/** Metric configuration. */ +@Fluent +public final class MetricConfiguration { + /* + * 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; + + /** Creates an instance of MetricConfiguration class. */ + public MetricConfiguration() { + } + + /** + * 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()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MetricConfiguration.class); +} 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 000000000000..e803b469cccc --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCounter.java @@ -0,0 +1,143 @@ +// 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.JsonProperty; +import java.util.List; + +/** The metric counter. */ +@Fluent +public final class MetricCounter { + /* + * 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; + + /** Creates an instance of MetricCounter class. */ + public MetricCounter() { + } + + /** + * 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()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MetricCounter.class); +} 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 000000000000..e59e645e72b2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricCounterSet.java @@ -0,0 +1,61 @@ +// 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.JsonProperty; +import java.util.List; + +/** The metric counter set. */ +@Fluent +public final class MetricCounterSet { + /* + * The counters that should be collected in this set. + */ + @JsonProperty(value = "counters", required = true) + private List counters; + + /** Creates an instance of MetricCounterSet class. */ + public MetricCounterSet() { + } + + /** + * 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()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MetricCounterSet.class); +} 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 000000000000..651d8a961860 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricDimension.java @@ -0,0 +1,89 @@ +// 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.JsonProperty; + +/** The metric dimension. */ +@Fluent +public final class MetricDimension { + /* + * The dimension type. + */ + @JsonProperty(value = "sourceType", required = true) + private String sourceType; + + /* + * The dimension value. + */ + @JsonProperty(value = "sourceName", required = true) + private String sourceName; + + /** Creates an instance of MetricDimension class. */ + public MetricDimension() { + } + + /** + * 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")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MetricDimension.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricDimensionV1.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricDimensionV1.java index de135540394f..934d9ac7f8f9 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricDimensionV1.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricDimensionV1.java @@ -5,15 +5,11 @@ 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; /** Metric Dimension v1. */ @Fluent public final class MetricDimensionV1 { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricDimensionV1.class); - /* * Name of the metrics dimension. */ @@ -32,6 +28,10 @@ public final class MetricDimensionV1 { @JsonProperty(value = "toBeExportedForShoebox") private Boolean toBeExportedForShoebox; + /** Creates an instance of MetricDimensionV1 class. */ + public MetricDimensionV1() { + } + /** * Get the name property: Name of the metrics dimension. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricSpecificationV1.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricSpecificationV1.java index 4f9dcc6bc5c2..55e2fe203b39 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricSpecificationV1.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricSpecificationV1.java @@ -5,16 +5,12 @@ 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 specification version 1. */ @Fluent public final class MetricSpecificationV1 { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricSpecificationV1.class); - /* * Name of the metric. */ @@ -81,6 +77,10 @@ public final class MetricSpecificationV1 { @JsonProperty(value = "supportedAggregationTypes") private List supportedAggregationTypes; + /** Creates an instance of MetricSpecificationV1 class. */ + public MetricSpecificationV1() { + } + /** * Get the name property: Name of the metric. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricUnit.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricUnit.java index 76682a918810..f50d2e5c902e 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricUnit.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricUnit.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for MetricUnit. */ +/** Metric units. */ public final class MetricUnit extends ExpandableStringEnum { /** Static value NotSpecified for MetricUnit. */ public static final MetricUnit NOT_SPECIFIED = fromString("NotSpecified"); @@ -45,7 +45,11 @@ public static MetricUnit fromString(String name) { return fromString(name, MetricUnit.class); } - /** @return known MetricUnit values. */ + /** + * Gets known MetricUnit values. + * + * @return known MetricUnit values. + */ public static Collection values() { return values(MetricUnit.class); } 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 000000000000..6cc7a3f85a64 --- /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 as paginated response with {@link PagedIterable}. + */ + 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 as paginated response with {@link PagedIterable}. + */ + 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. + * @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 along with {@link Response}. + */ + Response getWithResponse( + 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); + + /** + * 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 000000000000..3dfb5e67d1a7 --- /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: Metadata pertaining to creation and last modification of MonitoringConfiguration. + * + * @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 000000000000..5825ea6215fb --- /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.resourcemanager.databoxedge.fluent.models.MonitoringMetricConfigurationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of metric configurations. */ +@Immutable +public final class MonitoringMetricConfigurationList { + /* + * 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; + + /** Creates an instance of MonitoringMetricConfigurationList class. */ + public MonitoringMetricConfigurationList() { + } + + /** + * 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/MonitoringStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringStatus.java index 345a31b40f92..496436353c51 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MonitoringStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for MonitoringStatus. */ +/** Current monitoring status of the share. */ public final class MonitoringStatus extends ExpandableStringEnum { /** Static value Enabled for MonitoringStatus. */ public static final MonitoringStatus ENABLED = fromString("Enabled"); @@ -27,7 +27,11 @@ public static MonitoringStatus fromString(String name) { return fromString(name, MonitoringStatus.class); } - /** @return known MonitoringStatus values. */ + /** + * Gets known MonitoringStatus values. + * + * @return known MonitoringStatus values. + */ public static Collection values() { return values(MonitoringStatus.class); } 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 fa1596437206..4a7bb7548c76 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 @@ -6,14 +6,11 @@ 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 share mount point. */ @Fluent public final class MountPointMap { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MountPointMap.class); - /* * ID of the share mounted to the role VM. */ @@ -32,12 +29,22 @@ 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. */ @JsonProperty(value = "roleType", access = JsonProperty.Access.WRITE_ONLY) private RoleTypes roleType; + /** Creates an instance of MountPointMap class. */ + public MountPointMap() { + } + /** * Get the shareId property: ID of the share mounted to the role VM. * @@ -76,6 +83,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. * @@ -92,9 +108,11 @@ public RoleTypes roleType() { */ public void validate() { if (shareId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property shareId in model MountPointMap")); } } + + private static final ClientLogger LOGGER = new ClientLogger(MountPointMap.class); } 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 000000000000..8cb65ee2b351 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MountType.java @@ -0,0 +1,38 @@ +// 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; + +/** Mounting type. */ +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); + } + + /** + * Gets known MountType values. + * + * @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 000000000000..0f0e64405300 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MsiIdentityType.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Identity type. */ +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); + } + + /** + * Gets known MsiIdentityType values. + * + * @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/NetworkAdapter.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapter.java index 0fe6285db7f6..fc267fad4630 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapter.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapter.java @@ -5,16 +5,12 @@ 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; /** Represents the networkAdapter on a device. */ @Fluent public final class NetworkAdapter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkAdapter.class); - /* * Instance ID of network adapter. */ @@ -105,6 +101,10 @@ public final class NetworkAdapter { @JsonProperty(value = "dnsServers", access = JsonProperty.Access.WRITE_ONLY) private List dnsServers; + /** Creates an instance of NetworkAdapter class. */ + public NetworkAdapter() { + } + /** * Get the adapterId property: Instance ID of network adapter. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterDhcpStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterDhcpStatus.java index 134269dc8c5d..d1e14eff784a 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterDhcpStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterDhcpStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for NetworkAdapterDhcpStatus. */ +/** Value indicating whether this adapter has DHCP enabled. */ public final class NetworkAdapterDhcpStatus extends ExpandableStringEnum { /** Static value Disabled for NetworkAdapterDhcpStatus. */ public static final NetworkAdapterDhcpStatus DISABLED = fromString("Disabled"); @@ -27,7 +27,11 @@ public static NetworkAdapterDhcpStatus fromString(String name) { return fromString(name, NetworkAdapterDhcpStatus.class); } - /** @return known NetworkAdapterDhcpStatus values. */ + /** + * Gets known NetworkAdapterDhcpStatus values. + * + * @return known NetworkAdapterDhcpStatus values. + */ public static Collection values() { return values(NetworkAdapterDhcpStatus.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterPosition.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterPosition.java index f3ee8664921d..0007e45d0d10 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterPosition.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterPosition.java @@ -5,15 +5,11 @@ 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 network adapter position. */ @Immutable public final class NetworkAdapterPosition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkAdapterPosition.class); - /* * The network group. */ @@ -26,6 +22,10 @@ public final class NetworkAdapterPosition { @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY) private Integer port; + /** Creates an instance of NetworkAdapterPosition class. */ + public NetworkAdapterPosition() { + } + /** * Get the networkGroup property: The network group. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterRdmaStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterRdmaStatus.java index 120898e5f2d1..8edd42ef29ee 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterRdmaStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterRdmaStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for NetworkAdapterRdmaStatus. */ +/** Value indicating whether this adapter is RDMA capable. */ public final class NetworkAdapterRdmaStatus extends ExpandableStringEnum { /** Static value Incapable for NetworkAdapterRdmaStatus. */ public static final NetworkAdapterRdmaStatus INCAPABLE = fromString("Incapable"); @@ -27,7 +27,11 @@ public static NetworkAdapterRdmaStatus fromString(String name) { return fromString(name, NetworkAdapterRdmaStatus.class); } - /** @return known NetworkAdapterRdmaStatus values. */ + /** + * Gets known NetworkAdapterRdmaStatus values. + * + * @return known NetworkAdapterRdmaStatus values. + */ public static Collection values() { return values(NetworkAdapterRdmaStatus.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterStatus.java index 7355e4617110..96ffd632e170 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkAdapterStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for NetworkAdapterStatus. */ +/** Value indicating whether this adapter is valid. */ public final class NetworkAdapterStatus extends ExpandableStringEnum { /** Static value Inactive for NetworkAdapterStatus. */ public static final NetworkAdapterStatus INACTIVE = fromString("Inactive"); @@ -27,7 +27,11 @@ public static NetworkAdapterStatus fromString(String name) { return fromString(name, NetworkAdapterStatus.class); } - /** @return known NetworkAdapterStatus values. */ + /** + * Gets known NetworkAdapterStatus values. + * + * @return known NetworkAdapterStatus values. + */ public static Collection values() { return values(NetworkAdapterStatus.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkGroup.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkGroup.java index 92d67f4a5583..463d4e8e884f 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkGroup.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NetworkGroup.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for NetworkGroup. */ +/** The network group. */ public final class NetworkGroup extends ExpandableStringEnum { /** Static value None for NetworkGroup. */ public static final NetworkGroup NONE = fromString("None"); @@ -30,7 +30,11 @@ public static NetworkGroup fromString(String name) { return fromString(name, NetworkGroup.class); } - /** @return known NetworkGroup values. */ + /** + * Gets known NetworkGroup values. + * + * @return known NetworkGroup values. + */ public static Collection values() { return values(NetworkGroup.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 e225b9116773..cef4076bf105 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: Metadata pertaining to creation and last modification of NetworkSettings. + * + * @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 000000000000..8ee741067043 --- /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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Kubernetes node info. */ +@Fluent +public final class NodeInfo { + /* + * 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; + + /** Creates an instance of NodeInfo class. */ + public NodeInfo() { + } + + /** + * 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 5898dde5532d..39040e2bbaa4 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 @@ -5,23 +5,29 @@ 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.NodeInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Collection of Nodes. */ @Immutable public final class NodeList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NodeList.class); - /* * The list of Nodes. */ @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; + + /** Creates an instance of NodeList class. */ + public NodeList() { + } + /** * 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/NodeStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NodeStatus.java index 5cea2803fc1e..b7e225cc0519 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NodeStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NodeStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for NodeStatus. */ +/** The current status of the individual node. */ public final class NodeStatus extends ExpandableStringEnum { /** Static value Unknown for NodeStatus. */ public static final NodeStatus UNKNOWN = fromString("Unknown"); @@ -36,7 +36,11 @@ public static NodeStatus fromString(String name) { return fromString(name, NodeStatus.class); } - /** @return known NodeStatus values. */ + /** + * Gets known NodeStatus values. + * + * @return known NodeStatus values. + */ public static Collection values() { return values(NodeStatus.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Nodes.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Nodes.java index eda51ed2a76f..fcf481d2eb71 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Nodes.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Nodes.java @@ -17,7 +17,8 @@ public interface Nodes { * @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 all the nodes currently configured under this Data Box Edge device. + * @return all the nodes currently configured under this Data Box Edge device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -30,7 +31,8 @@ public interface Nodes { * @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 all the nodes currently configured under this Data Box Edge device. + * @return all the nodes currently configured under this Data Box Edge device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName, Context context); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NumaNodeData.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NumaNodeData.java new file mode 100644 index 000000000000..e405e131f7ab --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/NumaNodeData.java @@ -0,0 +1,207 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** NUMA node data. */ +@Fluent +public final class NumaNodeData { + /* + * The NUMA node index. + */ + @JsonProperty(value = "numaNodeIndex") + private Integer numaNodeIndex; + + /* + * The total memory on the NUMA node. + */ + @JsonProperty(value = "totalMemoryInMb") + private Long totalMemoryInMb; + + /* + * The logical cores per core count. + */ + @JsonProperty(value = "logicalCoreCountPerCore") + private Integer logicalCoreCountPerCore; + + /* + * The effective available memory on the NUMA node in MB. + */ + @JsonProperty(value = "effectiveAvailableMemoryInMb") + private Long effectiveAvailableMemoryInMb; + + /* + * The free VCPU indices for the Hpn VMs. + */ + @JsonProperty(value = "freeVCpuIndexesForHpn") + private List freeVCpuIndexesForHpn; + + /* + * The VCPU indices for Hpn VMs + */ + @JsonProperty(value = "vCpuIndexesForHpn") + private List vCpuIndexesForHpn; + + /* + * The VCPU indices for the root. + */ + @JsonProperty(value = "vCpuIndexesForRoot") + private List vCpuIndexesForRoot; + + /** Creates an instance of NumaNodeData class. */ + public NumaNodeData() { + } + + /** + * Get the numaNodeIndex property: The NUMA node index. + * + * @return the numaNodeIndex value. + */ + public Integer numaNodeIndex() { + return this.numaNodeIndex; + } + + /** + * Set the numaNodeIndex property: The NUMA node index. + * + * @param numaNodeIndex the numaNodeIndex value to set. + * @return the NumaNodeData object itself. + */ + public NumaNodeData withNumaNodeIndex(Integer numaNodeIndex) { + this.numaNodeIndex = numaNodeIndex; + return this; + } + + /** + * Get the totalMemoryInMb property: The total memory on the NUMA node. + * + * @return the totalMemoryInMb value. + */ + public Long totalMemoryInMb() { + return this.totalMemoryInMb; + } + + /** + * Set the totalMemoryInMb property: The total memory on the NUMA node. + * + * @param totalMemoryInMb the totalMemoryInMb value to set. + * @return the NumaNodeData object itself. + */ + public NumaNodeData withTotalMemoryInMb(Long totalMemoryInMb) { + this.totalMemoryInMb = totalMemoryInMb; + return this; + } + + /** + * Get the logicalCoreCountPerCore property: The logical cores per core count. + * + * @return the logicalCoreCountPerCore value. + */ + public Integer logicalCoreCountPerCore() { + return this.logicalCoreCountPerCore; + } + + /** + * Set the logicalCoreCountPerCore property: The logical cores per core count. + * + * @param logicalCoreCountPerCore the logicalCoreCountPerCore value to set. + * @return the NumaNodeData object itself. + */ + public NumaNodeData withLogicalCoreCountPerCore(Integer logicalCoreCountPerCore) { + this.logicalCoreCountPerCore = logicalCoreCountPerCore; + return this; + } + + /** + * Get the effectiveAvailableMemoryInMb property: The effective available memory on the NUMA node in MB. + * + * @return the effectiveAvailableMemoryInMb value. + */ + public Long effectiveAvailableMemoryInMb() { + return this.effectiveAvailableMemoryInMb; + } + + /** + * Set the effectiveAvailableMemoryInMb property: The effective available memory on the NUMA node in MB. + * + * @param effectiveAvailableMemoryInMb the effectiveAvailableMemoryInMb value to set. + * @return the NumaNodeData object itself. + */ + public NumaNodeData withEffectiveAvailableMemoryInMb(Long effectiveAvailableMemoryInMb) { + this.effectiveAvailableMemoryInMb = effectiveAvailableMemoryInMb; + return this; + } + + /** + * Get the freeVCpuIndexesForHpn property: The free VCPU indices for the Hpn VMs. + * + * @return the freeVCpuIndexesForHpn value. + */ + public List freeVCpuIndexesForHpn() { + return this.freeVCpuIndexesForHpn; + } + + /** + * Set the freeVCpuIndexesForHpn property: The free VCPU indices for the Hpn VMs. + * + * @param freeVCpuIndexesForHpn the freeVCpuIndexesForHpn value to set. + * @return the NumaNodeData object itself. + */ + public NumaNodeData withFreeVCpuIndexesForHpn(List freeVCpuIndexesForHpn) { + this.freeVCpuIndexesForHpn = freeVCpuIndexesForHpn; + return this; + } + + /** + * Get the vCpuIndexesForHpn property: The VCPU indices for Hpn VMs. + * + * @return the vCpuIndexesForHpn value. + */ + public List vCpuIndexesForHpn() { + return this.vCpuIndexesForHpn; + } + + /** + * Set the vCpuIndexesForHpn property: The VCPU indices for Hpn VMs. + * + * @param vCpuIndexesForHpn the vCpuIndexesForHpn value to set. + * @return the NumaNodeData object itself. + */ + public NumaNodeData withVCpuIndexesForHpn(List vCpuIndexesForHpn) { + this.vCpuIndexesForHpn = vCpuIndexesForHpn; + return this; + } + + /** + * Get the vCpuIndexesForRoot property: The VCPU indices for the root. + * + * @return the vCpuIndexesForRoot value. + */ + public List vCpuIndexesForRoot() { + return this.vCpuIndexesForRoot; + } + + /** + * Set the vCpuIndexesForRoot property: The VCPU indices for the root. + * + * @param vCpuIndexesForRoot the vCpuIndexesForRoot value to set. + * @return the NumaNodeData object itself. + */ + public NumaNodeData withVCpuIndexesForRoot(List vCpuIndexesForRoot) { + this.vCpuIndexesForRoot = vCpuIndexesForRoot; + 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/Operation.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Operation.java index 773d19cfaec2..a9c9adb65da0 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/OperationDisplay.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OperationDisplay.java index db4728c54a7b..b6759c7521b4 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OperationDisplay.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OperationDisplay.java @@ -5,15 +5,11 @@ 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; /** Operation display properties. */ @Fluent public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Provider name. */ @@ -38,6 +34,10 @@ public final class OperationDisplay { @JsonProperty(value = "description") private String description; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the provider property: Provider name. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Operations.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Operations.java index 2ca754c52ec3..5f5e05373221 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Operations.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Operations.java @@ -14,7 +14,8 @@ public interface Operations { * * @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 list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ public interface Operations { * @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 list of operations used for the discovery of available provider operations. + * @return the list of operations used for the discovery of available provider operations as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OperationsList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OperationsList.java index f1855e5bab60..da9433921199 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OperationsList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OperationsList.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of operations used for the discovery of available provider operations. */ @Fluent public final class OperationsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsList.class); - /* * The value. */ @@ -28,6 +25,10 @@ public final class OperationsList { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of OperationsList class. */ + public OperationsList() { + } + /** * Get the value property: The value. * @@ -75,11 +76,13 @@ public OperationsList withNextLink(String nextLink) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model OperationsList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(OperationsList.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OperationsStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OperationsStatus.java index bc4912e87118..829c76e507b5 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OperationsStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OperationsStatus.java @@ -15,12 +15,13 @@ public interface OperationsStatus { * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. + * @return the details of a specified job on a Data Box Edge/Data Box Gateway device along with {@link Response}. */ - Job get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. @@ -28,11 +29,10 @@ public interface OperationsStatus { * @param deviceName The device name. * @param name The job 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 details of a specified job on a Data Box Edge/Data Box Gateway device. */ - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + Job get(String deviceName, String name, String resourceGroupName); } 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 a4546284bf4b..eee2546759f4 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,27 @@ public interface Order { */ String type(); + /** + * Gets the kind property: It specify the order api version. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of Order. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the orderId property: It specify the order resource id. + * + * @return the orderId value. + */ + String orderId(); + /** * Gets the contactInformation property: The contact details. * @@ -81,6 +103,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/OrderList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderList.java index 0f570ed21ae1..6ca995a32e0c 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderList.java @@ -5,17 +5,13 @@ 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.OrderInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of order entities. */ @Immutable public final class OrderList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OrderList.class); - /* * The list of orders. */ @@ -28,6 +24,10 @@ public final class OrderList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of OrderList class. */ + public OrderList() { + } + /** * Get the value property: The list of orders. * 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 ba3c467e57f5..76e1d46072ca 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 @@ -8,13 +8,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OrderState. */ +/** Status of the order as per the allowed status types. */ 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. * @@ -63,7 +72,11 @@ public static OrderState fromString(String name) { return fromString(name, OrderState.class); } - /** @return known OrderState values. */ + /** + * Gets known OrderState values. + * + * @return known OrderState values. + */ public static Collection values() { return values(OrderState.class); } 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 917d42558898..3c0eeca6cc4a 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 @@ -6,7 +6,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; @@ -14,8 +14,6 @@ /** Represents a single status change. */ @Fluent public final class OrderStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OrderStatus.class); - /* * Status of the order as per the allowed status types. */ @@ -34,13 +32,24 @@ 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; + /** Creates an instance of OrderStatus class. */ + public OrderStatus() { + } + /** * Get the status property: Status of the order as per the allowed status types. * @@ -90,6 +99,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. @@ -107,9 +125,14 @@ public Map additionalOrderDetails() { */ public void validate() { if (status() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property status in model OrderStatus")); } + if (trackingInformation() != null) { + trackingInformation().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(OrderStatus.class); } 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 3825466359ce..8552d4c26462 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 @@ -19,7 +19,7 @@ public interface Orders { * @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 order entities. + * @return list of order entities as paginated response with {@link PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -32,7 +32,7 @@ public interface Orders { * @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 order entities. + * @return list of order entities as paginated response with {@link PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName, Context context); @@ -41,25 +41,25 @@ public interface Orders { * * @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 a specific order by name. + * @return a specific order by name along with {@link Response}. */ - Order get(String deviceName, String resourceGroupName); + Response getWithResponse(String deviceName, String resourceGroupName, Context context); /** * Gets a specific order by name. * * @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 a specific order by name. */ - Response getWithResponse(String deviceName, String resourceGroupName, Context context); + Order get(String deviceName, String resourceGroupName); /** * Creates or updates an order. @@ -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. + * @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 along with {@link Response}. + */ + Response listDCAccessCodeWithResponse(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); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PeriodicTimerEventTrigger.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PeriodicTimerEventTrigger.java index 0b88eed6d675..e63368f32684 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PeriodicTimerEventTrigger.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PeriodicTimerEventTrigger.java @@ -5,10 +5,9 @@ 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.PeriodicTimerProperties; import com.azure.resourcemanager.databoxedge.fluent.models.TriggerInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,31 +15,26 @@ /** Trigger details. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("PeriodicTimerEvent") -@JsonFlatten @Fluent -public class PeriodicTimerEventTrigger extends TriggerInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PeriodicTimerEventTrigger.class); - +public final class PeriodicTimerEventTrigger extends TriggerInner { /* - * Periodic timer details. + * Periodic timer trigger properties. */ - @JsonProperty(value = "properties.sourceInfo", required = true) - private PeriodicTimerSourceInfo sourceInfo; + @JsonProperty(value = "properties", required = true) + private PeriodicTimerProperties innerProperties = new PeriodicTimerProperties(); - /* - * Role Sink information. - */ - @JsonProperty(value = "properties.sinkInfo", required = true) - private RoleSinkInfo sinkInfo; + /** Creates an instance of PeriodicTimerEventTrigger class. */ + public PeriodicTimerEventTrigger() { + } - /* - * A custom context tag typically used to correlate the trigger against its - * usage. For example, if a periodic timer trigger is intended for certain - * specific IoT modules in the device, the tag can be the name or the image - * URL of the module. + /** + * Get the innerProperties property: Periodic timer trigger properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.customContextTag") - private String customContextTag; + private PeriodicTimerProperties innerProperties() { + return this.innerProperties; + } /** * Get the sourceInfo property: Periodic timer details. @@ -48,7 +42,7 @@ public class PeriodicTimerEventTrigger extends TriggerInner { * @return the sourceInfo value. */ public PeriodicTimerSourceInfo sourceInfo() { - return this.sourceInfo; + return this.innerProperties() == null ? null : this.innerProperties().sourceInfo(); } /** @@ -58,7 +52,10 @@ public PeriodicTimerSourceInfo sourceInfo() { * @return the PeriodicTimerEventTrigger object itself. */ public PeriodicTimerEventTrigger withSourceInfo(PeriodicTimerSourceInfo sourceInfo) { - this.sourceInfo = sourceInfo; + if (this.innerProperties() == null) { + this.innerProperties = new PeriodicTimerProperties(); + } + this.innerProperties().withSourceInfo(sourceInfo); return this; } @@ -68,7 +65,7 @@ public PeriodicTimerEventTrigger withSourceInfo(PeriodicTimerSourceInfo sourceIn * @return the sinkInfo value. */ public RoleSinkInfo sinkInfo() { - return this.sinkInfo; + return this.innerProperties() == null ? null : this.innerProperties().sinkInfo(); } /** @@ -78,7 +75,10 @@ public RoleSinkInfo sinkInfo() { * @return the PeriodicTimerEventTrigger object itself. */ public PeriodicTimerEventTrigger withSinkInfo(RoleSinkInfo sinkInfo) { - this.sinkInfo = sinkInfo; + if (this.innerProperties() == null) { + this.innerProperties = new PeriodicTimerProperties(); + } + this.innerProperties().withSinkInfo(sinkInfo); return this; } @@ -90,7 +90,7 @@ public PeriodicTimerEventTrigger withSinkInfo(RoleSinkInfo sinkInfo) { * @return the customContextTag value. */ public String customContextTag() { - return this.customContextTag; + return this.innerProperties() == null ? null : this.innerProperties().customContextTag(); } /** @@ -102,7 +102,10 @@ public String customContextTag() { * @return the PeriodicTimerEventTrigger object itself. */ public PeriodicTimerEventTrigger withCustomContextTag(String customContextTag) { - this.customContextTag = customContextTag; + if (this.innerProperties() == null) { + this.innerProperties = new PeriodicTimerProperties(); + } + this.innerProperties().withCustomContextTag(customContextTag); return this; } @@ -114,21 +117,15 @@ public PeriodicTimerEventTrigger withCustomContextTag(String customContextTag) { @Override public void validate() { super.validate(); - if (sourceInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceInfo in model PeriodicTimerEventTrigger")); - } else { - sourceInfo().validate(); - } - if (sinkInfo() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property sinkInfo in model PeriodicTimerEventTrigger")); + "Missing required property innerProperties in model PeriodicTimerEventTrigger")); } else { - sinkInfo().validate(); + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(PeriodicTimerEventTrigger.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PeriodicTimerSourceInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PeriodicTimerSourceInfo.java index 27f37c75c755..0fa82cfb29f2 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PeriodicTimerSourceInfo.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PeriodicTimerSourceInfo.java @@ -6,27 +6,22 @@ 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; /** Periodic timer event source. */ @Fluent public final class PeriodicTimerSourceInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PeriodicTimerSourceInfo.class); - /* - * The time of the day that results in a valid trigger. Schedule is - * computed with reference to the time specified upto seconds. If timezone - * is not specified the time will considered to be in device timezone. The - * value will always be returned as UTC time. + * The time of the day that results in a valid trigger. Schedule is computed with reference to the time specified + * upto seconds. If timezone is not specified the time will considered to be in device timezone. The value will + * always be returned as UTC time. */ @JsonProperty(value = "startTime", required = true) private OffsetDateTime startTime; /* - * Periodic frequency at which timer event needs to be raised. Supports - * daily, hourly, minutes, and seconds. + * Periodic frequency at which timer event needs to be raised. Supports daily, hourly, minutes, and seconds. */ @JsonProperty(value = "schedule", required = true) private String schedule; @@ -37,6 +32,10 @@ public final class PeriodicTimerSourceInfo { @JsonProperty(value = "topic") private String topic; + /** Creates an instance of PeriodicTimerSourceInfo class. */ + public PeriodicTimerSourceInfo() { + } + /** * Get the startTime property: The time of the day that results in a valid trigger. Schedule is computed with * reference to the time specified upto seconds. If timezone is not specified the time will considered to be in @@ -110,16 +109,18 @@ public PeriodicTimerSourceInfo withTopic(String topic) { */ public void validate() { if (startTime() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property startTime in model PeriodicTimerSourceInfo")); } if (schedule() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property schedule in model PeriodicTimerSourceInfo")); } } + + private static final ClientLogger LOGGER = new ClientLogger(PeriodicTimerSourceInfo.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PlatformType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PlatformType.java index 741fcfa287af..7eba2dfadd50 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PlatformType.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PlatformType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PlatformType. */ +/** Host OS supported by the Arc addon. */ public final class PlatformType extends ExpandableStringEnum { /** Static value Windows for PlatformType. */ public static final PlatformType WINDOWS = fromString("Windows"); @@ -27,7 +27,11 @@ public static PlatformType fromString(String name) { return fromString(name, PlatformType.class); } - /** @return known PlatformType values. */ + /** + * Gets known PlatformType values. + * + * @return known PlatformType values. + */ public static Collection values() { return values(PlatformType.class); } 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 000000000000..c296a012eb70 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PosixComplianceStatus.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** If provisioned storage is posix compliant. */ +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); + } + + /** + * Gets known PosixComplianceStatus values. + * + * @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 000000000000..d1fe5baff673 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ProactiveDiagnosticsConsent.java @@ -0,0 +1,38 @@ +// 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; + +/** Proactive diagnostic collection consent flag. */ +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); + } + + /** + * Gets known ProactiveDiagnosticsConsent values. + * + * @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/RefreshDetails.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RefreshDetails.java index 3efc2b962b82..235ca5e33b06 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RefreshDetails.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RefreshDetails.java @@ -5,47 +5,44 @@ 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 refresh job on the share or container. */ @Fluent public final class RefreshDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RefreshDetails.class); - /* - * If a refresh job is currently in progress on this share or container, - * this field indicates the ARM resource ID of that job. The field is empty - * if no job is in progress. + * If a refresh job is currently in progress on this share or container, this field indicates the ARM resource ID + * of that job. The field is empty if no job is in progress. */ @JsonProperty(value = "inProgressRefreshJobId") private String inProgressRefreshJobId; /* - * Indicates the completed time for the last refresh job on this particular - * share or container, if any.This could be a failed job or a successful - * job. + * Indicates the completed time for the last refresh job on this particular share or container, if any.This could + * be a failed job or a successful job. */ @JsonProperty(value = "lastCompletedRefreshJobTimeInUTC") private OffsetDateTime lastCompletedRefreshJobTimeInUtc; /* - * Indicates the relative path of the error xml for the last refresh job on - * this particular share or container, if any. This could be a failed job - * or a successful job. + * Indicates the relative path of the error xml for the last refresh job on this particular share or container, if + * any. This could be a failed job or a successful job. */ @JsonProperty(value = "errorManifestFile") private String errorManifestFile; /* - * Indicates the id of the last refresh job on this particular share or - * container,if any. This could be a failed job or a successful job. + * Indicates the id of the last refresh job on this particular share or container,if any. This could be a failed + * job or a successful job. */ @JsonProperty(value = "lastJob") private String lastJob; + /** Creates an instance of RefreshDetails class. */ + public RefreshDetails() { + } + /** * Get the inProgressRefreshJobId property: If a refresh job is currently in progress on this share or container, * this field indicates the ARM resource ID of that job. The field is empty if no job is in progress. 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 000000000000..45fab03bb998 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RemoteApplicationType.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Remote application type. */ +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); + } + + /** + * Gets known RemoteApplicationType values. + * + * @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 000000000000..2c4f990ad6a4 --- /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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** RemoteApplicationType for which remote support settings is being modified. */ +@Fluent +public final class RemoteSupportSettings { + /* + * 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; + + /** Creates an instance of RemoteSupportSettings class. */ + public RemoteSupportSettings() { + } + + /** + * 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 000000000000..c2e94b488828 --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** Msi identity details of the resource. */ +@Fluent +public class ResourceIdentity { + /* + * 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; + + /** Creates an instance of ResourceIdentity class. */ + public ResourceIdentity() { + } + + /** + * 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 000000000000..8277f452fb6a --- /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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Fields for tracking resource move. */ +@Fluent +public final class ResourceMoveDetails { + /* + * 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; + + /** Creates an instance of ResourceMoveDetails class. */ + public ResourceMoveDetails() { + } + + /** + * 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 000000000000..f8b75ac57319 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceMoveStatus.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Denotes whether move operation is in progress. */ +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); + } + + /** + * Gets known ResourceMoveStatus values. + * + * @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 a470ff9e5447..b36ad53ab0fb 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: Metadata pertaining to creation and last modification of Role. + * + * @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/RoleList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleList.java index 7815f31ad9be..a968b3317d69 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleList.java @@ -5,17 +5,13 @@ 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.RoleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Collection of all the roles on the Data Box Edge device. */ @Immutable public final class RoleList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoleList.class); - /* * The Value. */ @@ -28,6 +24,10 @@ public final class RoleList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of RoleList class. */ + public RoleList() { + } + /** * Get the value property: The Value. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleSinkInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleSinkInfo.java index 25330d663d02..c224df826b61 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleSinkInfo.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleSinkInfo.java @@ -6,20 +6,21 @@ 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 role against which events will be raised. */ @Fluent public final class RoleSinkInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoleSinkInfo.class); - /* * Compute role ID. */ @JsonProperty(value = "roleId", required = true) private String roleId; + /** Creates an instance of RoleSinkInfo class. */ + public RoleSinkInfo() { + } + /** * Get the roleId property: Compute role ID. * @@ -47,9 +48,11 @@ public RoleSinkInfo withRoleId(String roleId) { */ public void validate() { if (roleId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property roleId in model RoleSinkInfo")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RoleSinkInfo.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleStatus.java index e0782b764c89..85d80d7430aa 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RoleStatus. */ +/** Local Edge Management Status. */ public final class RoleStatus extends ExpandableStringEnum { /** Static value Enabled for RoleStatus. */ public static final RoleStatus ENABLED = fromString("Enabled"); @@ -27,7 +27,11 @@ public static RoleStatus fromString(String name) { return fromString(name, RoleStatus.class); } - /** @return known RoleStatus values. */ + /** + * Gets known RoleStatus values. + * + * @return known RoleStatus values. + */ public static Collection values() { return values(RoleStatus.class); } 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 77d85cf66966..a0d685318afb 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. * @@ -33,7 +42,11 @@ public static RoleTypes fromString(String name) { return fromString(name, RoleTypes.class); } - /** @return known RoleTypes values. */ + /** + * Gets known RoleTypes values. + * + * @return known RoleTypes values. + */ public static Collection values() { return values(RoleTypes.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Roles.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Roles.java index 9a944afebc20..be0c16d30341 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Roles.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Roles.java @@ -19,7 +19,7 @@ public interface Roles { * @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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device as paginated response with {@link PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -32,7 +32,7 @@ public interface Roles { * @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 roles on the Data Box Edge device. + * @return collection of all the roles on the Data Box Edge device as paginated response with {@link PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName, Context context); @@ -42,12 +42,13 @@ public interface Roles { * @param deviceName The device name. * @param name 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 specific role by name. + * @return a specific role by name along with {@link Response}. */ - Role get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets a specific role by name. @@ -55,13 +56,12 @@ public interface Roles { * @param deviceName The device name. * @param name 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 specific role by name. */ - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + Role get(String deviceName, String name, String resourceGroupName); /** * Create or update a role. 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 000000000000..c5c3b3634d2d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Secret.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Holds device secret either as a KeyVault reference or as an encrypted value. */ +@Fluent +public final class Secret { + /* + * 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; + + /** Creates an instance of Secret class. */ + public Secret() { + } + + /** + * 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/SecuritySettings.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SecuritySettings.java index aab9264af01a..7ec56bd260db 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SecuritySettings.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SecuritySettings.java @@ -5,25 +5,31 @@ 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.azure.resourcemanager.databoxedge.fluent.models.SecuritySettingsProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The security settings of a device. */ -@JsonFlatten @Fluent -public class SecuritySettings extends ArmBaseModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecuritySettings.class); - +public final class SecuritySettings extends ArmBaseModel { /* - * Device administrator password as an encrypted string (encrypted using - * RSA PKCS #1) is used to sign into the local web UI of the device. The - * Actual password should have at least 8 characters that are a combination - * of uppercase, lowercase, numeric, and special characters. + * Properties of the security settings. + */ + @JsonProperty(value = "properties", required = true) + private SecuritySettingsProperties innerProperties = new SecuritySettingsProperties(); + + /** Creates an instance of SecuritySettings class. */ + public SecuritySettings() { + } + + /** + * Get the innerProperties property: Properties of the security settings. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.deviceAdminPassword", required = true) - private AsymmetricEncryptedSecret deviceAdminPassword; + private SecuritySettingsProperties innerProperties() { + return this.innerProperties; + } /** * Get the deviceAdminPassword property: Device administrator password as an encrypted string (encrypted using RSA @@ -33,7 +39,7 @@ public class SecuritySettings extends ArmBaseModel { * @return the deviceAdminPassword value. */ public AsymmetricEncryptedSecret deviceAdminPassword() { - return this.deviceAdminPassword; + return this.innerProperties() == null ? null : this.innerProperties().deviceAdminPassword(); } /** @@ -45,7 +51,10 @@ public AsymmetricEncryptedSecret deviceAdminPassword() { * @return the SecuritySettings object itself. */ public SecuritySettings withDeviceAdminPassword(AsymmetricEncryptedSecret deviceAdminPassword) { - this.deviceAdminPassword = deviceAdminPassword; + if (this.innerProperties() == null) { + this.innerProperties = new SecuritySettingsProperties(); + } + this.innerProperties().withDeviceAdminPassword(deviceAdminPassword); return this; } @@ -57,13 +66,15 @@ public SecuritySettings withDeviceAdminPassword(AsymmetricEncryptedSecret device @Override public void validate() { super.validate(); - if (deviceAdminPassword() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property deviceAdminPassword in model SecuritySettings")); + "Missing required property innerProperties in model SecuritySettings")); } else { - deviceAdminPassword().validate(); + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(SecuritySettings.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ServiceSpecification.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ServiceSpecification.java index 166993c9e860..ef218943c59c 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ServiceSpecification.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ServiceSpecification.java @@ -5,22 +5,22 @@ 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; /** Service specification. */ @Fluent public final class ServiceSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceSpecification.class); - /* * Metric specification as defined by shoebox. */ @JsonProperty(value = "metricSpecifications") private List metricSpecifications; + /** Creates an instance of ServiceSpecification class. */ + public ServiceSpecification() { + } + /** * Get the metricSpecifications property: Metric specification as defined by shoebox. * 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 72dffc3710a8..62d9cbef356f 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: Metadata pertaining to creation and last modification of Share. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the description property: Description for the share. * @@ -103,6 +111,13 @@ public interface Share { */ DataPolicy dataPolicy(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.ShareInner object. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessProtocol.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessProtocol.java index e25a0bb86b12..2e0f1b657fb5 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessProtocol.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessProtocol.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ShareAccessProtocol. */ +/** Access protocol to be used by the share. */ public final class ShareAccessProtocol extends ExpandableStringEnum { /** Static value SMB for ShareAccessProtocol. */ public static final ShareAccessProtocol SMB = fromString("SMB"); @@ -27,7 +27,11 @@ public static ShareAccessProtocol fromString(String name) { return fromString(name, ShareAccessProtocol.class); } - /** @return known ShareAccessProtocol values. */ + /** + * Gets known ShareAccessProtocol values. + * + * @return known ShareAccessProtocol values. + */ public static Collection values() { return values(ShareAccessProtocol.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessRight.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessRight.java index 1e34abad55cb..c373fb545a71 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessRight.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessRight.java @@ -6,14 +6,11 @@ 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; /** Specifies the mapping between this particular user and the type of access he has on shares on this device. */ @Fluent public final class ShareAccessRight { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ShareAccessRight.class); - /* * The share ID. */ @@ -26,6 +23,10 @@ public final class ShareAccessRight { @JsonProperty(value = "accessType", required = true) private ShareAccessType accessType; + /** Creates an instance of ShareAccessRight class. */ + public ShareAccessRight() { + } + /** * Get the shareId property: The share ID. * @@ -73,14 +74,16 @@ public ShareAccessRight withAccessType(ShareAccessType accessType) { */ public void validate() { if (shareId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property shareId in model ShareAccessRight")); } if (accessType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property accessType in model ShareAccessRight")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ShareAccessRight.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessType.java index 3bbb8f4d9ada..57789ebb5e5f 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessType.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareAccessType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ShareAccessType. */ +/** Type of access to be allowed on the share for this user. */ public final class ShareAccessType extends ExpandableStringEnum { /** Static value Change for ShareAccessType. */ public static final ShareAccessType CHANGE = fromString("Change"); @@ -30,7 +30,11 @@ public static ShareAccessType fromString(String name) { return fromString(name, ShareAccessType.class); } - /** @return known ShareAccessType values. */ + /** + * Gets known ShareAccessType values. + * + * @return known ShareAccessType values. + */ public static Collection values() { return values(ShareAccessType.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareList.java index 69316787a4f0..98f856359299 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareList.java @@ -5,17 +5,13 @@ 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.ShareInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Collection of all the shares on the Data Box Edge/Gateway device. */ @Immutable public final class ShareList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ShareList.class); - /* * The list of shares. */ @@ -28,6 +24,10 @@ public final class ShareList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ShareList class. */ + public ShareList() { + } + /** * Get the value property: The list of shares. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareStatus.java index 19be822a5444..95f6b9f09909 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShareStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ShareStatus. */ +/** Current status of the share. */ public final class ShareStatus extends ExpandableStringEnum { /** Static value Offline for ShareStatus. */ public static final ShareStatus OFFLINE = fromString("Offline"); @@ -36,7 +36,11 @@ public static ShareStatus fromString(String name) { return fromString(name, ShareStatus.class); } - /** @return known ShareStatus values. */ + /** + * Gets known ShareStatus values. + * + * @return known ShareStatus values. + */ public static Collection values() { return values(ShareStatus.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Shares.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Shares.java index e0835f7259bc..e4324f691769 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Shares.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Shares.java @@ -18,7 +18,8 @@ public interface Shares { * @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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -31,7 +32,8 @@ public interface Shares { * @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 shares on the Data Box Edge/Gateway device. + * @return collection of all the shares on the Data Box Edge/Gateway device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName, Context context); @@ -41,12 +43,13 @@ public interface Shares { * @param deviceName The device name. * @param name The share 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 share by name. + * @return a share by name along with {@link Response}. */ - Share get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets a share by name. @@ -54,13 +57,12 @@ public interface Shares { * @param deviceName The device name. * @param name The share 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 share by name. */ - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + Share get(String deviceName, String name, String resourceGroupName); /** * Deletes the share on the Data Box Edge/Data Box Gateway device. @@ -119,7 +121,7 @@ public interface Shares { * @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 share by name. + * @return a share by name along with {@link Response}. */ Share getById(String id); @@ -131,7 +133,7 @@ public interface Shares { * @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 share by name. + * @return a share by name along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 000000000000..83de0f07741e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShipmentType.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.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); + } + + /** + * Gets known ShipmentType values. + * + * @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/Sku.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Sku.java index dc92865c757a..00c2c9380a81 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Sku.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Sku.java @@ -5,15 +5,11 @@ 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 SKU type. */ @Fluent public final class Sku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); - /* * SKU name. */ @@ -26,6 +22,10 @@ public final class Sku { @JsonProperty(value = "tier") private SkuTier tier; + /** Creates an instance of Sku class. */ + public Sku() { + } + /** * Get the name property: SKU name. * 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 000000000000..0749df41f528 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuAvailability.java @@ -0,0 +1,38 @@ +// 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; + +/** Links to the next set of results. */ +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); + } + + /** + * Gets known SkuAvailability values. + * + * @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 000000000000..010631de49f3 --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** The metadata to describe the capability. */ +@Immutable +public final class SkuCapability { + /* + * 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; + + /** Creates an instance of SkuCapability class. */ + public SkuCapability() { + } + + /** + * 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 d90f1c5a9836..c708ad66dcb5 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 @@ -5,15 +5,11 @@ 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 for retrieving price info. */ @Immutable public final class SkuCost { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuCost.class); - /* * Used for querying price from commerce. */ @@ -27,11 +23,15 @@ 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; + /** Creates an instance of SkuCost class. */ + public SkuCost() { + } + /** * Get the meterId property: Used for querying price from commerce. * @@ -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/SkuLocationInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuLocationInfo.java index defd26917c1e..db2e25891961 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuLocationInfo.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuLocationInfo.java @@ -5,16 +5,12 @@ 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 location info. */ @Immutable public final class SkuLocationInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuLocationInfo.class); - /* * The location. */ @@ -33,6 +29,10 @@ public final class SkuLocationInfo { @JsonProperty(value = "sites", access = JsonProperty.Access.WRITE_ONLY) private List sites; + /** Creates an instance of SkuLocationInfo class. */ + public SkuLocationInfo() { + } + /** * Get the location property: The location. * 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 4fbb2fb05057..bc87a04d1bed 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SkuName. */ +/** The Sku name. */ public final class SkuName extends ExpandableStringEnum { /** Static value Gateway for SkuName. */ public static final SkuName GATEWAY = fromString("Gateway"); @@ -37,6 +37,66 @@ 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"); + + /** Static value EP2_64_Mx1_W for SkuName. */ + public static final SkuName EP2_64_MX1_W = fromString("EP2_64_Mx1_W"); + + /** Static value EP2_128_GPU1_Mx1_W for SkuName. */ + public static final SkuName EP2_128_GPU1_MX1_W = fromString("EP2_128_GPU1_Mx1_W"); + + /** Static value EP2_256_GPU2_Mx1 for SkuName. */ + public static final SkuName EP2_256_GPU2_MX1 = fromString("EP2_256_GPU2_Mx1"); + + /** Static value EdgeMR_TCP for SkuName. */ + public static final SkuName EDGE_MR_TCP = fromString("EdgeMR_TCP"); + /** * Creates or finds a SkuName from its string representation. * @@ -48,7 +108,11 @@ public static SkuName fromString(String name) { return fromString(name, SkuName.class); } - /** @return known SkuName values. */ + /** + * Gets known SkuName values. + * + * @return known SkuName values. + */ public static Collection values() { return values(SkuName.class); } 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 1f1f9bca17ff..000000000000 --- 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/SkuRestrictionInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestrictionInfo.java deleted file mode 100644 index 74d76c8f4687..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestrictionInfo.java +++ /dev/null @@ -1,55 +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 restriction info with locations and zones. */ -@Immutable -public final class SkuRestrictionInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuRestrictionInfo.class); - - /* - * The locations. - */ - @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) - private List locations; - - /* - * The zones. - */ - @JsonProperty(value = "zones", access = JsonProperty.Access.WRITE_ONLY) - private List zones; - - /** - * Get the locations property: The locations. - * - * @return the locations value. - */ - public List locations() { - return this.locations; - } - - /** - * Get the zones property: The zones. - * - * @return the zones value. - */ - public List zones() { - return this.zones; - } - - /** - * 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/SkuRestrictionReasonCode.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestrictionReasonCode.java deleted file mode 100644 index 30312411d949..000000000000 --- 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 000000000000..ed905f1597a8 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuSignupOption.java @@ -0,0 +1,38 @@ +// 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; + +/** Sku can be signed up by customer or not. */ +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); + } + + /** + * Gets known SkuSignupOption values. + * + * @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/SkuTier.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuTier.java index 3ad20942b228..5959b0d79744 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuTier.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuTier.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SkuTier. */ +/** The Sku tier. */ public final class SkuTier extends ExpandableStringEnum { /** Static value Standard for SkuTier. */ public static final SkuTier STANDARD = fromString("Standard"); @@ -24,7 +24,11 @@ public static SkuTier fromString(String name) { return fromString(name, SkuTier.class); } - /** @return known SkuTier values. */ + /** + * Gets known SkuTier values. + * + * @return known SkuTier values. + */ public static Collection values() { return values(SkuTier.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 000000000000..0e452dc1cf84 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuVersion.java @@ -0,0 +1,38 @@ +// 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; + +/** Availability of the Sku as preview/stable. */ +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); + } + + /** + * Gets known SkuVersion values. + * + * @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/SslStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SslStatus.java index 2adc8265b805..6b02786d6289 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SslStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SslStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SslStatus. */ +/** Signifies whether SSL needs to be enabled or not. */ public final class SslStatus extends ExpandableStringEnum { /** Static value Enabled for SslStatus. */ public static final SslStatus ENABLED = fromString("Enabled"); @@ -27,7 +27,11 @@ public static SslStatus fromString(String name) { return fromString(name, SslStatus.class); } - /** @return known SslStatus values. */ + /** + * Gets known SslStatus values. + * + * @return known SslStatus values. + */ public static Collection values() { return values(SslStatus.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 33b382d1360d..2e15f47aa5c0 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: Metadata pertaining to creation and last modification of StorageAccount. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the description property: Description for the storage Account. * @@ -73,6 +81,13 @@ public interface StorageAccount { */ Integer containerCount(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.StorageAccountInner object. * @@ -82,7 +97,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 +116,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 +135,6 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithDescription, DefinitionStages.WithStorageAccountStatus, - DefinitionStages.WithDataPolicy, DefinitionStages.WithStorageAccountCredentialId { /** * Executes the create request. @@ -144,16 +171,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 d84a6b6654c3..52fb16c8f964 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: Metadata pertaining to creation and last modification of StorageAccountCredential. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the alias property: Alias for the storage account. * @@ -87,6 +95,13 @@ public interface StorageAccountCredential { */ String storageAccountId(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.StorageAccountCredentialInner object. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredentialList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredentialList.java index 0308118c1e0f..f96aee365605 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredentialList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredentialList.java @@ -5,17 +5,13 @@ 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.StorageAccountCredentialInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The collection of storage account credentials. */ @Immutable public final class StorageAccountCredentialList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountCredentialList.class); - /* * The value. */ @@ -28,6 +24,10 @@ public final class StorageAccountCredentialList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of StorageAccountCredentialList class. */ + public StorageAccountCredentialList() { + } + /** * Get the value property: The value. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredentials.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredentials.java index a2226125b578..23532a49b2dd 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredentials.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountCredentials.java @@ -18,7 +18,8 @@ public interface StorageAccountCredentials { * @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 all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * @return all the storage account credentials in a Data Box Edge/Data Box Gateway device as paginated response with + * {@link PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -31,7 +32,8 @@ public interface StorageAccountCredentials { * @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 all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * @return all the storage account credentials in a Data Box Edge/Data Box Gateway device as paginated response with + * {@link PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice( String deviceName, String resourceGroupName, Context context); @@ -42,12 +44,14 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The storage account credential 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 properties of the specified storage account credential. + * @return the properties of the specified storage account credential along with {@link Response}. */ - StorageAccountCredential get(String deviceName, String name, String resourceGroupName); + Response getWithResponse( + String deviceName, String name, String resourceGroupName, Context context); /** * Gets the properties of the specified storage account credential. @@ -55,14 +59,12 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The storage account credential 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 properties of the specified storage account credential. */ - Response getWithResponse( - String deviceName, String name, String resourceGroupName, Context context); + StorageAccountCredential get(String deviceName, String name, String resourceGroupName); /** * Deletes the storage account credential. @@ -96,7 +98,7 @@ Response getWithResponse( * @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 properties of the specified storage account credential. + * @return the properties of the specified storage account credential along with {@link Response}. */ StorageAccountCredential getById(String id); @@ -108,7 +110,7 @@ Response getWithResponse( * @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 properties of the specified storage account credential. + * @return the properties of the specified storage account credential along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountList.java index ed696b793735..248f88db0450 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountList.java @@ -5,17 +5,13 @@ 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.StorageAccountInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Collection of all the Storage Accounts on the Data Box Edge/Gateway device. */ @Immutable public final class StorageAccountList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountList.class); - /* * The list of storageAccounts. */ @@ -28,6 +24,10 @@ public final class StorageAccountList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of StorageAccountList class. */ + public StorageAccountList() { + } + /** * Get the value property: The list of storageAccounts. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountStatus.java index 6bb2ec244947..4425a18fbd79 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountStatus.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccountStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StorageAccountStatus. */ +/** Current status of the storage account. */ public final class StorageAccountStatus extends ExpandableStringEnum { /** Static value OK for StorageAccountStatus. */ public static final StorageAccountStatus OK = fromString("OK"); @@ -36,7 +36,11 @@ public static StorageAccountStatus fromString(String name) { return fromString(name, StorageAccountStatus.class); } - /** @return known StorageAccountStatus values. */ + /** + * Gets known StorageAccountStatus values. + * + * @return known StorageAccountStatus values. + */ public static Collection values() { return values(StorageAccountStatus.class); } 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 b0697bb7f839..5ed1a881ae00 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,19 +11,20 @@ /** 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. * @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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device as paginated response with + * {@link PagedIterable}. */ 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. @@ -31,7 +32,8 @@ public interface StorageAccounts { * @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 Storage Accounts on the Data Box Edge/Gateway device. + * @return collection of all the Storage Accounts on the Data Box Edge/Gateway device as paginated response with + * {@link PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName, Context context); @@ -41,12 +43,14 @@ public interface StorageAccounts { * @param deviceName The device name. * @param storageAccountName The storage account 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 StorageAccount by name. + * @return a StorageAccount by name along with {@link Response}. */ - StorageAccount get(String deviceName, String storageAccountName, String resourceGroupName); + Response getWithResponse( + String deviceName, String storageAccountName, String resourceGroupName, Context context); /** * Gets a StorageAccount by name. @@ -54,14 +58,12 @@ public interface StorageAccounts { * @param deviceName The device name. * @param storageAccountName The storage account 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 StorageAccount by name. */ - Response getWithResponse( - String deviceName, String storageAccountName, String resourceGroupName, Context context); + StorageAccount get(String deviceName, String storageAccountName, String resourceGroupName); /** * Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. @@ -95,7 +97,7 @@ Response getWithResponse( * @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 StorageAccount by name. + * @return a StorageAccount by name along with {@link Response}. */ StorageAccount getById(String id); @@ -107,7 +109,7 @@ Response getWithResponse( * @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 StorageAccount by name. + * @return a StorageAccount by name along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 000000000000..eeccf878b561 --- /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.fasterxml.jackson.annotation.JsonProperty; + +/** The SubscriptionRegisteredFeatures model. */ +@Fluent +public final class SubscriptionRegisteredFeatures { + /* + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The state property. + */ + @JsonProperty(value = "state") + private String state; + + /** Creates an instance of SubscriptionRegisteredFeatures class. */ + public SubscriptionRegisteredFeatures() { + } + + /** + * 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 000000000000..78731591fce0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SubscriptionState.java @@ -0,0 +1,47 @@ +// 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); + } + + /** + * Gets known SubscriptionState values. + * + * @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 000000000000..35d148e7466a --- /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/SymmetricKey.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SymmetricKey.java index d9ac4ba1befd..6a3634eb1f9c 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SymmetricKey.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SymmetricKey.java @@ -5,21 +5,21 @@ 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; /** Symmetric key for authentication. */ @Fluent public final class SymmetricKey { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SymmetricKey.class); - /* * Connection string based on the symmetric key. */ @JsonProperty(value = "connectionString") private AsymmetricEncryptedSecret connectionString; + /** Creates an instance of SymmetricKey class. */ + public SymmetricKey() { + } + /** * Get the connectionString property: Connection string based on the symmetric key. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TimeGrain.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TimeGrain.java index ea705bc75a6d..8e3bcbc3faa2 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TimeGrain.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TimeGrain.java @@ -45,7 +45,11 @@ public static TimeGrain fromString(String name) { return fromString(name, TimeGrain.class); } - /** @return known TimeGrain values. */ + /** + * Gets known TimeGrain values. + * + * @return known TimeGrain values. + */ public static Collection values() { return values(TimeGrain.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TrackingInfo.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TrackingInfo.java index 478a39581157..ef5b2ade331b 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TrackingInfo.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TrackingInfo.java @@ -5,15 +5,11 @@ 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; /** Tracking courier information. */ @Fluent public final class TrackingInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TrackingInfo.class); - /* * Serial number of the device being tracked. */ @@ -38,6 +34,10 @@ public final class TrackingInfo { @JsonProperty(value = "trackingUrl") private String trackingUrl; + /** Creates an instance of TrackingInfo class. */ + public TrackingInfo() { + } + /** * Get the serialNumber property: Serial number of the device being tracked. * 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 a05d1d29d308..afee38b74149 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: Metadata pertaining to creation and last modification of Trigger. + * + * @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/TriggerEventType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TriggerEventType.java index f0c3d610b17d..7cd94142c119 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TriggerEventType.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TriggerEventType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TriggerEventType. */ +/** Trigger Kind. */ public final class TriggerEventType extends ExpandableStringEnum { /** Static value FileEvent for TriggerEventType. */ public static final TriggerEventType FILE_EVENT = fromString("FileEvent"); @@ -27,7 +27,11 @@ public static TriggerEventType fromString(String name) { return fromString(name, TriggerEventType.class); } - /** @return known TriggerEventType values. */ + /** + * Gets known TriggerEventType values. + * + * @return known TriggerEventType values. + */ public static Collection values() { return values(TriggerEventType.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TriggerList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TriggerList.java index 4a284f498fff..f7c60bf0a8cd 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TriggerList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TriggerList.java @@ -5,17 +5,13 @@ 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.TriggerInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Collection of all trigger on the data box edge device. */ @Immutable public final class TriggerList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggerList.class); - /* * The list of triggers. */ @@ -28,6 +24,10 @@ public final class TriggerList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of TriggerList class. */ + public TriggerList() { + } + /** * Get the value property: The list of triggers. * 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 000000000000..de55f5f7a9f4 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/TriggerSupportPackageRequest.java @@ -0,0 +1,125 @@ +// 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.azure.resourcemanager.databoxedge.fluent.models.SupportPackageRequestProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The request object for trigger support package. */ +@Fluent +public final class TriggerSupportPackageRequest extends ArmBaseModel { + /* + * The TriggerSupportPackageRequest properties. + */ + @JsonProperty(value = "properties", required = true) + private SupportPackageRequestProperties innerProperties = new SupportPackageRequestProperties(); + + /** Creates an instance of TriggerSupportPackageRequest class. */ + public TriggerSupportPackageRequest() { + } + + /** + * Get the innerProperties property: The TriggerSupportPackageRequest properties. + * + * @return the innerProperties value. + */ + private SupportPackageRequestProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the minimumTimestamp property: MinimumTimeStamp from where logs need to be collected. + * + * @return the minimumTimestamp value. + */ + public OffsetDateTime minimumTimestamp() { + return this.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new SupportPackageRequestProperties(); + } + this.innerProperties().withMinimumTimestamp(minimumTimestamp); + return this; + } + + /** + * Get the maximumTimestamp property: Start of the timespan of the log collection. + * + * @return the maximumTimestamp value. + */ + public OffsetDateTime maximumTimestamp() { + return this.innerProperties() == null ? null : this.innerProperties().maximumTimestamp(); + } + + /** + * Set the maximumTimestamp property: Start of the timespan of the log collection. + * + * @param maximumTimestamp the maximumTimestamp value to set. + * @return the TriggerSupportPackageRequest object itself. + */ + public TriggerSupportPackageRequest withMaximumTimestamp(OffsetDateTime maximumTimestamp) { + if (this.innerProperties() == null) { + this.innerProperties = new SupportPackageRequestProperties(); + } + this.innerProperties().withMaximumTimestamp(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.innerProperties() == null ? null : this.innerProperties().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) { + if (this.innerProperties() == null) { + this.innerProperties = new SupportPackageRequestProperties(); + } + this.innerProperties().withInclude(include); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model TriggerSupportPackageRequest")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TriggerSupportPackageRequest.class); +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Triggers.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Triggers.java index d41f8fc623d3..aa1e5506cff0 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Triggers.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Triggers.java @@ -19,7 +19,7 @@ public interface Triggers { * @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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device as paginated response with {@link PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -33,7 +33,7 @@ public interface Triggers { * @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 trigger on the data box edge device. + * @return collection of all trigger on the data box edge device as paginated response with {@link PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice( String deviceName, String resourceGroupName, String filter, Context context); @@ -44,12 +44,13 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The trigger 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 trigger by name. + * @return a specific trigger by name along with {@link Response}. */ - Trigger get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Get a specific trigger by name. @@ -57,13 +58,12 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The trigger 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 trigger by name. */ - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + Trigger get(String deviceName, String name, String resourceGroupName); /** * Creates or updates a trigger. 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 000000000000..7ec2589a17c7 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateDetails.java @@ -0,0 +1,260 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** Update Specific attributes. */ +@Fluent +public final class UpdateDetails { + /* + * 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; + + /** Creates an instance of UpdateDetails class. */ + public UpdateDetails() { + } + + /** + * 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/UpdateDownloadProgress.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateDownloadProgress.java index f33974ea89e2..4856ab8361ad 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateDownloadProgress.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateDownloadProgress.java @@ -5,15 +5,11 @@ 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; /** Details about the download progress of update. */ @Immutable public final class UpdateDownloadProgress { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateDownloadProgress.class); - /* * The download phase. */ @@ -50,6 +46,10 @@ public final class UpdateDownloadProgress { @JsonProperty(value = "numberOfUpdatesDownloaded", access = JsonProperty.Access.WRITE_ONLY) private Integer numberOfUpdatesDownloaded; + /** Creates an instance of UpdateDownloadProgress class. */ + public UpdateDownloadProgress() { + } + /** * Get the downloadPhase property: The download phase. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateInstallProgress.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateInstallProgress.java index e909e17a0753..27cdd230c171 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateInstallProgress.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateInstallProgress.java @@ -5,15 +5,11 @@ 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; /** Progress details during installation of updates. */ @Immutable public final class UpdateInstallProgress { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateInstallProgress.class); - /* * Percentage completed. */ @@ -32,6 +28,10 @@ public final class UpdateInstallProgress { @JsonProperty(value = "numberOfUpdatesInstalled", access = JsonProperty.Access.WRITE_ONLY) private Integer numberOfUpdatesInstalled; + /** Creates an instance of UpdateInstallProgress class. */ + public UpdateInstallProgress() { + } + /** * Get the percentComplete property: Percentage completed. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateOperation.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateOperation.java index 5025e0f6fa82..16ee8eb4840c 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateOperation.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateOperation.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UpdateOperation. */ +/** The current update operation. */ public final class UpdateOperation extends ExpandableStringEnum { /** Static value None for UpdateOperation. */ public static final UpdateOperation NONE = fromString("None"); @@ -33,7 +33,11 @@ public static UpdateOperation fromString(String name) { return fromString(name, UpdateOperation.class); } - /** @return known UpdateOperation values. */ + /** + * Gets known UpdateOperation values. + * + * @return known UpdateOperation values. + */ public static Collection values() { return values(UpdateOperation.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateOperationStage.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateOperationStage.java index 29f7dd179888..184425954e75 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateOperationStage.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateOperationStage.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UpdateOperationStage. */ +/** Current stage of the update operation. */ public final class UpdateOperationStage extends ExpandableStringEnum { /** Static value Unknown for UpdateOperationStage. */ public static final UpdateOperationStage UNKNOWN = fromString("Unknown"); @@ -72,7 +72,11 @@ public static UpdateOperationStage fromString(String name) { return fromString(name, UpdateOperationStage.class); } - /** @return known UpdateOperationStage values. */ + /** + * Gets known UpdateOperationStage values. + * + * @return known UpdateOperationStage values. + */ public static Collection values() { return values(UpdateOperationStage.class); } 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 000000000000..2705a5846eb2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateStatus.java @@ -0,0 +1,47 @@ +// 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; + +/** Status of the update. */ +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); + } + + /** + * Gets known UpdateStatus values. + * + * @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 0ddca1b351a2..6e11ef71da88 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: Metadata pertaining to creation and last modification of UpdateSummary. + * + * @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 000000000000..d615fe588d56 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateType.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of the Update. */ +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); + } + + /** + * Gets known UpdateType values. + * + * @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/UploadCertificateRequest.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UploadCertificateRequest.java index 4bc42a44682e..458a814ec19b 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UploadCertificateRequest.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UploadCertificateRequest.java @@ -5,28 +5,31 @@ 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.azure.resourcemanager.databoxedge.fluent.models.RawCertificateData; import com.fasterxml.jackson.annotation.JsonProperty; /** The upload certificate request. */ -@JsonFlatten @Fluent -public class UploadCertificateRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UploadCertificateRequest.class); - +public final class UploadCertificateRequest { /* - * The authentication type. + * The Base 64 encoded certificate raw data. */ - @JsonProperty(value = "properties.authenticationType") - private AuthenticationType authenticationType; + @JsonProperty(value = "properties", required = true) + private RawCertificateData innerProperties = new RawCertificateData(); - /* - * The base64 encoded certificate raw data. + /** Creates an instance of UploadCertificateRequest class. */ + public UploadCertificateRequest() { + } + + /** + * Get the innerProperties property: The Base 64 encoded certificate raw data. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.certificate", required = true) - private String certificate; + private RawCertificateData innerProperties() { + return this.innerProperties; + } /** * Get the authenticationType property: The authentication type. @@ -34,7 +37,7 @@ public class UploadCertificateRequest { * @return the authenticationType value. */ public AuthenticationType authenticationType() { - return this.authenticationType; + return this.innerProperties() == null ? null : this.innerProperties().authenticationType(); } /** @@ -44,7 +47,10 @@ public AuthenticationType authenticationType() { * @return the UploadCertificateRequest object itself. */ public UploadCertificateRequest withAuthenticationType(AuthenticationType authenticationType) { - this.authenticationType = authenticationType; + if (this.innerProperties() == null) { + this.innerProperties = new RawCertificateData(); + } + this.innerProperties().withAuthenticationType(authenticationType); return this; } @@ -54,7 +60,7 @@ public UploadCertificateRequest withAuthenticationType(AuthenticationType authen * @return the certificate value. */ public String certificate() { - return this.certificate; + return this.innerProperties() == null ? null : this.innerProperties().certificate(); } /** @@ -64,7 +70,10 @@ public String certificate() { * @return the UploadCertificateRequest object itself. */ public UploadCertificateRequest withCertificate(String certificate) { - this.certificate = certificate; + if (this.innerProperties() == null) { + this.innerProperties = new RawCertificateData(); + } + this.innerProperties().withCertificate(certificate); return this; } @@ -74,11 +83,15 @@ public UploadCertificateRequest withCertificate(String certificate) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (certificate() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property certificate in model UploadCertificateRequest")); + "Missing required property innerProperties in model UploadCertificateRequest")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(UploadCertificateRequest.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 1630b8510628..03f8c64142ca 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: Metadata pertaining to creation and last modification of User. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the encryptedPassword property: The password details. * @@ -53,6 +61,13 @@ public interface User { */ UserType userType(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.databoxedge.fluent.models.UserInner object. * @@ -97,7 +112,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 +138,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 +147,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 +175,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/UserAccessRight.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UserAccessRight.java index c6c1af09d943..ed5b5df32194 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UserAccessRight.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UserAccessRight.java @@ -6,14 +6,11 @@ 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 mapping between a particular user and the access type on the SMB share. */ @Fluent public final class UserAccessRight { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAccessRight.class); - /* * User ID (already existing in the device). */ @@ -26,6 +23,10 @@ public final class UserAccessRight { @JsonProperty(value = "accessType", required = true) private ShareAccessType accessType; + /** Creates an instance of UserAccessRight class. */ + public UserAccessRight() { + } + /** * Get the userId property: User ID (already existing in the device). * @@ -73,14 +74,16 @@ public UserAccessRight withAccessType(ShareAccessType accessType) { */ public void validate() { if (userId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property userId in model UserAccessRight")); } if (accessType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property accessType in model UserAccessRight")); } } + + private static final ClientLogger LOGGER = new ClientLogger(UserAccessRight.class); } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UserList.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UserList.java index 39b933cc3075..039b2a9172da 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UserList.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UserList.java @@ -5,17 +5,13 @@ 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.UserInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Collection of users. */ @Immutable public final class UserList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserList.class); - /* * The list of users. */ @@ -28,6 +24,10 @@ public final class UserList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of UserList class. */ + public UserList() { + } + /** * Get the value property: The list of users. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UserType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UserType.java index 181533d3bef8..8bb9eee62403 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UserType.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UserType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UserType. */ +/** Type of the user. */ public final class UserType extends ExpandableStringEnum { /** Static value Share for UserType. */ public static final UserType SHARE = fromString("Share"); @@ -30,7 +30,11 @@ public static UserType fromString(String name) { return fromString(name, UserType.class); } - /** @return known UserType values. */ + /** + * Gets known UserType values. + * + * @return known UserType values. + */ public static Collection values() { return values(UserType.class); } 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 cf8ed029cdf9..398668c66d51 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 @@ -18,7 +18,8 @@ public interface Users { * @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 all the users registered on a Data Box Edge/Data Box Gateway device. + * @return all the users registered on a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); @@ -27,12 +28,13 @@ 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the users registered on a Data Box Edge/Data Box Gateway device. + * @return all the users registered on a Data Box Edge/Data Box Gateway device as paginated response with {@link + * PagedIterable}. */ PagedIterable listByDataBoxEdgeDevice( String deviceName, String resourceGroupName, String filter, Context context); @@ -43,12 +45,13 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The user 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 properties of the specified user. + * @return the properties of the specified user along with {@link Response}. */ - User get(String deviceName, String name, String resourceGroupName); + Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); /** * Gets the properties of the specified user. @@ -56,13 +59,12 @@ PagedIterable listByDataBoxEdgeDevice( * @param deviceName The device name. * @param name The user 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 properties of the specified user. */ - Response getWithResponse(String deviceName, String name, String resourceGroupName, Context context); + User get(String deviceName, String name, String resourceGroupName); /** * Deletes the user on a databox edge/gateway device. @@ -96,7 +98,7 @@ PagedIterable listByDataBoxEdgeDevice( * @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 properties of the specified user. + * @return the properties of the specified user along with {@link Response}. */ User getById(String id); @@ -108,7 +110,7 @@ PagedIterable listByDataBoxEdgeDevice( * @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 properties of the specified user. + * @return the properties of the specified user along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/VmMemory.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/VmMemory.java new file mode 100644 index 000000000000..33fc7ab9170c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/VmMemory.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** VmMemory Data. */ +@Fluent +public final class VmMemory { + /* + * The total amount of RAM in the virtual machine, as seen by the guest operating system. For a virtual machine + * with dynamic memory enabled, this represents the initial memory available at startup. + */ + @JsonProperty(value = "startupMemoryMB") + private Long startupMemoryMB; + + /* + * The current memory used by the virtual machine. + */ + @JsonProperty(value = "currentMemoryUsageMB") + private Long currentMemoryUsageMB; + + /** Creates an instance of VmMemory class. */ + public VmMemory() { + } + + /** + * Get the startupMemoryMB property: The total amount of RAM in the virtual machine, as seen by the guest operating + * system. For a virtual machine with dynamic memory enabled, this represents the initial memory available at + * startup. + * + * @return the startupMemoryMB value. + */ + public Long startupMemoryMB() { + return this.startupMemoryMB; + } + + /** + * Set the startupMemoryMB property: The total amount of RAM in the virtual machine, as seen by the guest operating + * system. For a virtual machine with dynamic memory enabled, this represents the initial memory available at + * startup. + * + * @param startupMemoryMB the startupMemoryMB value to set. + * @return the VmMemory object itself. + */ + public VmMemory withStartupMemoryMB(Long startupMemoryMB) { + this.startupMemoryMB = startupMemoryMB; + return this; + } + + /** + * Get the currentMemoryUsageMB property: The current memory used by the virtual machine. + * + * @return the currentMemoryUsageMB value. + */ + public Long currentMemoryUsageMB() { + return this.currentMemoryUsageMB; + } + + /** + * Set the currentMemoryUsageMB property: The current memory used by the virtual machine. + * + * @param currentMemoryUsageMB the currentMemoryUsageMB value to set. + * @return the VmMemory object itself. + */ + public VmMemory withCurrentMemoryUsageMB(Long currentMemoryUsageMB) { + this.currentMemoryUsageMB = currentMemoryUsageMB; + 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/VmPlacementRequestResult.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/VmPlacementRequestResult.java new file mode 100644 index 000000000000..209875300ed1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/VmPlacementRequestResult.java @@ -0,0 +1,129 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of VM sizes being checked for creation on appliance along with corresponding result. */ +@Fluent +public final class VmPlacementRequestResult { + /* + * List of VM sizes being checked. + */ + @JsonProperty(value = "vmSize") + private List vmSize; + + /* + * Boolean value indicating if the VM(s) in VmSize can be created. + */ + @JsonProperty(value = "isFeasible") + private Boolean isFeasible; + + /* + * MessageCode indicating reason for success or failure. + */ + @JsonProperty(value = "messageCode") + private String messageCode; + + /* + * Localized message to be displayed to the user to explain the check result. + */ + @JsonProperty(value = "message") + private String message; + + /** Creates an instance of VmPlacementRequestResult class. */ + public VmPlacementRequestResult() { + } + + /** + * Get the vmSize property: List of VM sizes being checked. + * + * @return the vmSize value. + */ + public List vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: List of VM sizes being checked. + * + * @param vmSize the vmSize value to set. + * @return the VmPlacementRequestResult object itself. + */ + public VmPlacementRequestResult withVmSize(List vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the isFeasible property: Boolean value indicating if the VM(s) in VmSize can be created. + * + * @return the isFeasible value. + */ + public Boolean isFeasible() { + return this.isFeasible; + } + + /** + * Set the isFeasible property: Boolean value indicating if the VM(s) in VmSize can be created. + * + * @param isFeasible the isFeasible value to set. + * @return the VmPlacementRequestResult object itself. + */ + public VmPlacementRequestResult withIsFeasible(Boolean isFeasible) { + this.isFeasible = isFeasible; + return this; + } + + /** + * Get the messageCode property: MessageCode indicating reason for success or failure. + * + * @return the messageCode value. + */ + public String messageCode() { + return this.messageCode; + } + + /** + * Set the messageCode property: MessageCode indicating reason for success or failure. + * + * @param messageCode the messageCode value to set. + * @return the VmPlacementRequestResult object itself. + */ + public VmPlacementRequestResult withMessageCode(String messageCode) { + this.messageCode = messageCode; + return this; + } + + /** + * Get the message property: Localized message to be displayed to the user to explain the check result. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Localized message to be displayed to the user to explain the check result. + * + * @param message the message value to set. + * @return the VmPlacementRequestResult object itself. + */ + public VmPlacementRequestResult withMessage(String message) { + this.message = message; + 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/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..fa266dab1a31 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsCreateOrUpdateSamples.java @@ -0,0 +1,35 @@ +// 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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.ArcAddon; + +/** Samples for Addons CreateOrUpdate. */ +public final class AddonsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/PutAddons.json + */ + /** + * Sample code: PutAddOns. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void putAddOns(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .addons() + .createOrUpdate( + "testedgedevice", + "KubernetesRole", + "arcName", + "GroupForEdgeAutomation", + new ArcAddon() + .withSubscriptionId("4385cf00-2d3a-425a-832f-f4285b1c9dce") + .withResourceGroupName("GroupForEdgeAutomation") + .withResourceName("testedgedevice") + .withResourceLocation("EastUS"), + Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsDeleteSamples.java new file mode 100644 index 000000000000..58f6dd855610 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Addons Delete. */ +public final class AddonsDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DeleteAddons.json + */ + /** + * Sample code: DeleteAddOns. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void deleteAddOns(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.addons().delete("testedgedevice", "KubernetesRole", "arcName", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsGetSamples.java new file mode 100644 index 000000000000..791333f8920b --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsGetSamples.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.generated; + +import com.azure.core.util.Context; + +/** Samples for Addons Get. */ +public final class AddonsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetAddons.json + */ + /** + * Sample code: GetAddOns. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getAddOns(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .addons() + .getWithResponse("testedgedevice", "KubernetesRole", "arcName", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsListByRoleSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsListByRoleSamples.java new file mode 100644 index 000000000000..d59e1e88e495 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsListByRoleSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Addons ListByRole. */ +public final class AddonsListByRoleSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/RoleListAddOns.json + */ + /** + * Sample code: RoleListAddOns. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void roleListAddOns(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.addons().listByRole("testedgedevice", "IoTRole1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AlertsGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AlertsGetSamples.java new file mode 100644 index 000000000000..599725024526 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AlertsGetSamples.java @@ -0,0 +1,25 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Alerts Get. */ +public final class AlertsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/AlertGet.json + */ + /** + * Sample code: AlertGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void alertGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .alerts() + .getWithResponse( + "testedgedevice", "159a00c7-8543-4343-9435-263ac87df3bb", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AlertsListByDataBoxEdgeDeviceSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AlertsListByDataBoxEdgeDeviceSamples.java new file mode 100644 index 000000000000..4c181b245853 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AlertsListByDataBoxEdgeDeviceSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Alerts ListByDataBoxEdgeDevice. */ +public final class AlertsListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/AlertGetAllInDevice.json + */ + /** + * Sample code: AlertGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void alertGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.alerts().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AvailableSkusListSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AvailableSkusListSamples.java new file mode 100644 index 000000000000..a55393c159b6 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AvailableSkusListSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for AvailableSkus List. */ +public final class AvailableSkusListSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/AvailableSkusList.json + */ + /** + * Sample code: AvailableSkus. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void availableSkus(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.availableSkus().list(Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..5a93a6d34f33 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesCreateOrUpdateSamples.java @@ -0,0 +1,31 @@ +// 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.generated; + +import com.azure.resourcemanager.databoxedge.models.DayOfWeek; +import java.util.Arrays; + +/** Samples for BandwidthSchedules CreateOrUpdate. */ +public final class BandwidthSchedulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/BandwidthSchedulePut.json + */ + /** + * Sample code: BandwidthSchedulePut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void bandwidthSchedulePut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .bandwidthSchedules() + .define("bandwidth-1") + .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withStart("0:0:0") + .withStop("13:59:0") + .withRateInMbps(100) + .withDays(Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.MONDAY)) + .create(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesDeleteSamples.java new file mode 100644 index 000000000000..2ac3eed8035e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for BandwidthSchedules Delete. */ +public final class BandwidthSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/BandwidthScheduleDelete.json + */ + /** + * Sample code: BandwidthScheduleDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void bandwidthScheduleDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.bandwidthSchedules().delete("testedgedevice", "bandwidth-1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesGetSamples.java new file mode 100644 index 000000000000..3e3d7dd41820 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesGetSamples.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.generated; + +import com.azure.core.util.Context; + +/** Samples for BandwidthSchedules Get. */ +public final class BandwidthSchedulesGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/BandwidthScheduleGet.json + */ + /** + * Sample code: BandwidthScheduleGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void bandwidthScheduleGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .bandwidthSchedules() + .getWithResponse("testedgedevice", "bandwidth-1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesListByDataBoxEdgeDeviceSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesListByDataBoxEdgeDeviceSamples.java new file mode 100644 index 000000000000..f82799249419 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesListByDataBoxEdgeDeviceSamples.java @@ -0,0 +1,23 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for BandwidthSchedules ListByDataBoxEdgeDevice. */ +public final class BandwidthSchedulesListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/BandwidthScheduleGetAllInDevice.json + */ + /** + * Sample code: BandwidthScheduleGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void bandwidthScheduleGetAllInDevice( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.bandwidthSchedules().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..b2c803ef18ae --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersCreateOrUpdateSamples.java @@ -0,0 +1,27 @@ +// 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.generated; + +import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; + +/** Samples for Containers CreateOrUpdate. */ +public final class ContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ContainerPut.json + */ + /** + * Sample code: ContainerPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void containerPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .containers() + .define("blobcontainer1") + .withExistingStorageAccount("testedgedevice", "storageaccount1", "GroupForEdgeAutomation") + .withDataFormat(AzureContainerDataFormat.BLOCK_BLOB) + .create(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersDeleteSamples.java new file mode 100644 index 000000000000..60c6bf110275 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersDeleteSamples.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.generated; + +import com.azure.core.util.Context; + +/** Samples for Containers Delete. */ +public final class ContainersDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ContainerDelete.json + */ + /** + * Sample code: ContainerDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void containerDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .containers() + .delete("testedgedevice", "storageaccount1", "blobcontainer1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersGetSamples.java new file mode 100644 index 000000000000..c72d7ef53b84 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersGetSamples.java @@ -0,0 +1,25 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Containers Get. */ +public final class ContainersGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ContainerGet.json + */ + /** + * Sample code: ContainerGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void containerGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .containers() + .getWithResponse( + "testedgedevice", "storageaccount1", "blobcontainer1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersListByStorageAccountSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersListByStorageAccountSamples.java new file mode 100644 index 000000000000..6e10f6129cf0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersListByStorageAccountSamples.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.generated; + +import com.azure.core.util.Context; + +/** Samples for Containers ListByStorageAccount. */ +public final class ContainersListByStorageAccountSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ContainerListAllInDevice.json + */ + /** + * Sample code: ContainerListAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void containerListAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .containers() + .listByStorageAccount("testedgedevice", "storageaccount1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersRefreshSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersRefreshSamples.java new file mode 100644 index 000000000000..b58c2f1594dc --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/ContainersRefreshSamples.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.generated; + +import com.azure.core.util.Context; + +/** Samples for Containers Refresh. */ +public final class ContainersRefreshSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ContainerRefresh.json + */ + /** + * Sample code: ContainerRefresh. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void containerRefresh(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .containers() + .refresh("testedgedevice", "storageaccount1", "blobcontainer1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DeviceCapacityCheckCheckResourceCreationFeasibilitySamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DeviceCapacityCheckCheckResourceCreationFeasibilitySamples.java new file mode 100644 index 000000000000..58cf230a2e1f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DeviceCapacityCheckCheckResourceCreationFeasibilitySamples.java @@ -0,0 +1,31 @@ +// 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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.DeviceCapacityRequestInfo; +import java.util.Arrays; + +/** Samples for DeviceCapacityCheck CheckResourceCreationFeasibility. */ +public final class DeviceCapacityCheckCheckResourceCreationFeasibilitySamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DeviceCapacityRequestPost.json + */ + /** + * Sample code: DeviceCapacityRequestPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void deviceCapacityRequestPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .deviceCapacityChecks() + .checkResourceCreationFeasibility( + "GroupForEdgeAutomation", + "testedgedevice", + new DeviceCapacityRequestInfo().withVmPlacementQuery(Arrays.asList(Arrays.asList("Standard_D2_v2"))), + null, + Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DeviceCapacityInfoGetDeviceCapacityInfoSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DeviceCapacityInfoGetDeviceCapacityInfoSamples.java new file mode 100644 index 000000000000..25c4c5b27b2e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DeviceCapacityInfoGetDeviceCapacityInfoSamples.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.generated; + +import com.azure.core.util.Context; + +/** Samples for DeviceCapacityInfo GetDeviceCapacityInfo. */ +public final class DeviceCapacityInfoGetDeviceCapacityInfoSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DeviceCapacityGet.json + */ + /** + * Sample code: DeviceCapacityGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void deviceCapacityGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .deviceCapacityInfoes() + .getDeviceCapacityInfoWithResponse("GroupForEdgeAutomation", "testedgedevice", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..52537436a88a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesCreateOrUpdateSamples.java @@ -0,0 +1,67 @@ +// 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.generated; + +import com.azure.resourcemanager.databoxedge.models.DataResidency; +import com.azure.resourcemanager.databoxedge.models.DataResidencyType; +import com.azure.resourcemanager.databoxedge.models.Sku; +import com.azure.resourcemanager.databoxedge.models.SkuName; +import com.azure.resourcemanager.databoxedge.models.SkuTier; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Devices CreateOrUpdate. */ +public final class DevicesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDevicePutWithDataResidency.json + */ + /** + * Sample code: DataBoxEdgeDevicePutWithDataResidency. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDevicePutWithDataResidency( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .devices() + .define("testedgedevice") + .withRegion("WUS") + .withExistingResourceGroup("GroupForEdgeAutomation") + .withTags(mapOf()) + .withSku(new Sku().withName(SkuName.EDGE).withTier(SkuTier.STANDARD)) + .withDataResidency(new DataResidency().withType(DataResidencyType.ZONE_REPLICATION)) + .create(); + } + + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDevicePut.json + */ + /** + * Sample code: DataBoxEdgeDevicePut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDevicePut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .devices() + .define("testedgedevice") + .withRegion("WUS") + .withExistingResourceGroup("GroupForEdgeAutomation") + .withTags(mapOf()) + .withSku(new Sku().withName(SkuName.EDGE).withTier(SkuTier.STANDARD)) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesCreateOrUpdateSecuritySettingsSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesCreateOrUpdateSecuritySettingsSamples.java new file mode 100644 index 000000000000..69134c7b1b51 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesCreateOrUpdateSecuritySettingsSamples.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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; +import com.azure.resourcemanager.databoxedge.models.SecuritySettings; + +/** Samples for Devices CreateOrUpdateSecuritySettings. */ +public final class DevicesCreateOrUpdateSecuritySettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SecuritySettingsUpdatePost.json + */ + /** + * Sample code: CreateOrUpdateSecuritySettings. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void createOrUpdateSecuritySettings( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .devices() + .createOrUpdateSecuritySettings( + "testedgedevice", + "AzureVM", + new SecuritySettings() + .withDeviceAdminPassword( + new AsymmetricEncryptedSecret() + .withValue("") + .withEncryptionCertThumbprint("") + .withEncryptionAlgorithm(EncryptionAlgorithm.AES256)), + Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesDeleteSamples.java new file mode 100644 index 000000000000..b3c695530ab2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Devices Delete. */ +public final class DevicesDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDeviceDelete.json + */ + /** + * Sample code: DataBoxEdgeDeviceDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDeviceDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().delete("GroupForEdgeAutomation", "testedgedevice", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesDownloadUpdatesSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesDownloadUpdatesSamples.java new file mode 100644 index 000000000000..36a86c30edcb --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesDownloadUpdatesSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Devices DownloadUpdates. */ +public final class DevicesDownloadUpdatesSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DownloadUpdatesPost.json + */ + /** + * Sample code: DownloadUpdatesPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void downloadUpdatesPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().downloadUpdates("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGenerateCertificateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGenerateCertificateSamples.java new file mode 100644 index 000000000000..1a96246dae2b --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGenerateCertificateSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Devices GenerateCertificate. */ +public final class DevicesGenerateCertificateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GenerateCertificate.json + */ + /** + * Sample code: GenerateCertificate. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void generateCertificate(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().generateCertificateWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetByResourceGroupSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..054668fa7603 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetByResourceGroupSamples.java @@ -0,0 +1,35 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Devices GetByResourceGroup. */ +public final class DevicesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDeviceGetByName.json + */ + /** + * Sample code: DataBoxEdgeDeviceGetByName. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDeviceGetByName(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().getByResourceGroupWithResponse("GroupForEdgeAutomation", "testedgedevice", Context.NONE); + } + + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDeviceGetByNameWithDataResidency.json + */ + /** + * Sample code: DataBoxEdgeDeviceGetByNameWithDataResidency. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDeviceGetByNameWithDataResidency( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().getByResourceGroupWithResponse("GroupForEdgeAutomation", "testedgedevice", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetExtendedInformationSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetExtendedInformationSamples.java new file mode 100644 index 000000000000..6b9a43cd8dd8 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetExtendedInformationSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Devices GetExtendedInformation. */ +public final class DevicesGetExtendedInformationSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ExtendedInfoPost.json + */ + /** + * Sample code: ExtendedInfoPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void extendedInfoPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().getExtendedInformationWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetNetworkSettingsSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetNetworkSettingsSamples.java new file mode 100644 index 000000000000..81e7d390ebe7 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetNetworkSettingsSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Devices GetNetworkSettings. */ +public final class DevicesGetNetworkSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/NetworkSettingsGet.json + */ + /** + * Sample code: NetworkSettingsGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void networkSettingsGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().getNetworkSettingsWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetUpdateSummarySamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetUpdateSummarySamples.java new file mode 100644 index 000000000000..63978ead62c1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetUpdateSummarySamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Devices GetUpdateSummary. */ +public final class DevicesGetUpdateSummarySamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UpdateSummaryGet.json + */ + /** + * Sample code: UpdateSummaryGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void updateSummaryGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().getUpdateSummaryWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesInstallUpdatesSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesInstallUpdatesSamples.java new file mode 100644 index 000000000000..bd41af6806b6 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesInstallUpdatesSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Devices InstallUpdates. */ +public final class DevicesInstallUpdatesSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/InstallUpdatesPost.json + */ + /** + * Sample code: InstallUpdatesPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void installUpdatesPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().installUpdates("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesListByResourceGroupSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesListByResourceGroupSamples.java new file mode 100644 index 000000000000..f9a60b672056 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Devices ListByResourceGroup. */ +public final class DevicesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDeviceGetByResourceGroup.json + */ + /** + * Sample code: DataBoxEdgeDeviceGetByResourceGroup. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDeviceGetByResourceGroup( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().listByResourceGroup("GroupForEdgeAutomation", null, Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesListSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesListSamples.java new file mode 100644 index 000000000000..3581b02729b5 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesListSamples.java @@ -0,0 +1,23 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Devices List. */ +public final class DevicesListSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDeviceGetBySubscription.json + */ + /** + * Sample code: DataBoxEdgeDeviceGetBySubscription. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDeviceGetBySubscription( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().list(null, Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesScanForUpdatesSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesScanForUpdatesSamples.java new file mode 100644 index 000000000000..91e89b806f7d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesScanForUpdatesSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Devices ScanForUpdates. */ +public final class DevicesScanForUpdatesSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ScanForUpdatesPost.json + */ + /** + * Sample code: ScanForUpdatesPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void scanForUpdatesPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.devices().scanForUpdates("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesUpdateExtendedInformationSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesUpdateExtendedInformationSamples.java new file mode 100644 index 000000000000..193bbc52dae1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesUpdateExtendedInformationSamples.java @@ -0,0 +1,26 @@ +// 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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch; + +/** Samples for Devices UpdateExtendedInformation. */ +public final class DevicesUpdateExtendedInformationSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetUpdateExtendedInfo.json + */ + /** + * Sample code: GetUpdateExtendedInfo. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getUpdateExtendedInfo(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .devices() + .updateExtendedInformationWithResponse( + "testedgedevice", "GroupForEdgeAutomation", new DataBoxEdgeDeviceExtendedInfoPatch(), Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesUpdateSamples.java new file mode 100644 index 000000000000..0b3623197385 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesUpdateSamples.java @@ -0,0 +1,38 @@ +// 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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevice; +import com.azure.resourcemanager.databoxedge.models.EdgeProfilePatch; +import com.azure.resourcemanager.databoxedge.models.EdgeProfileSubscriptionPatch; + +/** Samples for Devices Update. */ +public final class DevicesUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DataBoxEdgeDevicePatch.json + */ + /** + * Sample code: DataBoxEdgeDevicePatch. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void dataBoxEdgeDevicePatch(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + DataBoxEdgeDevice resource = + manager + .devices() + .getByResourceGroupWithResponse("GroupForEdgeAutomation", "testedgedevice", Context.NONE) + .getValue(); + resource + .update() + .withEdgeProfile( + new EdgeProfilePatch() + .withSubscription( + new EdgeProfileSubscriptionPatch() + .withId( + "/subscriptions/0d44739e-0563-474f-97e7-24a0cdb23b29/resourceGroups/rapvs-rg/providers/Microsoft.AzureStack/linkedSubscriptions/ca014ddc-5cf2-45f8-b390-e901e4a0ae87"))) + .apply(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesUploadCertificateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesUploadCertificateSamples.java new file mode 100644 index 000000000000..eb32f38328e6 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesUploadCertificateSamples.java @@ -0,0 +1,31 @@ +// 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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.UploadCertificateRequest; + +/** Samples for Devices UploadCertificate. */ +public final class DevicesUploadCertificateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UploadCertificatePost.json + */ + /** + * Sample code: UploadCertificatePost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void uploadCertificatePost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .devices() + .uploadCertificateWithResponse( + "testedgedevice", + "GroupForEdgeAutomation", + new UploadCertificateRequest() + .withCertificate( + "MIIC9DCCAdygAwIBAgIQWJae7GNjiI9Mcv/gJyrOPTANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDDAdXaW5kb3dzMB4XDTE4MTEyNzAwMTA0NVoXDTIxMTEyODAwMTA0NVowEjEQMA4GA1UEAwwHV2luZG93czCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKxkRExqxf0qH1avnyORptIbRC2yQwqe3EIbJ2FPKr5jtAppGeX/dGKrFSnX+7/0HFr77aJHafdpEAtOiLyJ4zCAVs0obZCCIq4qJdmjYUTU0UXH/w/YzXfQA0d9Zh9AN+NJBX9xj05NzgsT24fkgsK2v6mWJQXT7YcWAsl5sEYPnx1e+MrupNyVSL/RUJmrS+etJSysHtFeWRhsUhVAs1DD5ExJvBLU3WH0IsojEvpXcjrutB5/MDQNrd/StGI6WovoSSPH7FyT9tgERx+q+Yg3YUGzfaIPCctlrRGehcdtzdNoKd0rsX62yCq0U6POoSfwe22NJu41oAUMd7e6R8cCAwEAAaNGMEQwEwYDVR0lBAwwCgYIKwYBBQUHAwIwHQYDVR0OBBYEFDd0VxnS3LnMIfwc7xW4b4IZWG5GMA4GA1UdDwEB/wQEAwIFIDANBgkqhkiG9w0BAQUFAAOCAQEAPQRby2u9celvtvL/DLEb5Vt3/tPStRQC5MyTD62L5RT/q8E6EMCXVZNkXF5WlWucLJi/18tY+9PNgP9xWLJh7kpSWlWdi9KPtwMqKDlEH8L2TnQdjimt9XuiCrTnoFy/1X2BGLY/rCaUJNSd15QCkz2xeW+Z+YSk2GwAc/A/4YfNpqSIMfNuPrT76o02VdD9WmJUA3fS/HY0sU9qgQRS/3F5/0EPS+HYQ0SvXCK9tggcCd4O050ytNBMJC9qMOJ7yE0iOrFfOJSCfDAuPhn/rHFh79Kn1moF+/CE+nc0/2RPiLC8r54/rt5dYyyxJDfXg0a3VrrX39W69WZGW5OXiw=="), + Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsSamples.java new file mode 100644 index 000000000000..d15101052aa0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsSamples.java @@ -0,0 +1,26 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for DiagnosticSettings GetDiagnosticProactiveLogCollectionSettings. */ +public final class DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetDiagnosticProactiveLogCollectionSettings.json + */ + /** + * Sample code: GetDiagnosticProactiveLogCollectionSettings. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getDiagnosticProactiveLogCollectionSettings( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .diagnosticSettings() + .getDiagnosticProactiveLogCollectionSettingsWithResponse( + "testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsGetDiagnosticRemoteSupportSettingsSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsGetDiagnosticRemoteSupportSettingsSamples.java new file mode 100644 index 000000000000..9dc40368e980 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsGetDiagnosticRemoteSupportSettingsSamples.java @@ -0,0 +1,25 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for DiagnosticSettings GetDiagnosticRemoteSupportSettings. */ +public final class DiagnosticSettingsGetDiagnosticRemoteSupportSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetDiagnosticRemoteSupportSettings.json + */ + /** + * Sample code: GetDiagnosticRemoteSupportSettings. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getDiagnosticRemoteSupportSettings( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .diagnosticSettings() + .getDiagnosticRemoteSupportSettingsWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsSamples.java new file mode 100644 index 000000000000..d0852a2c796d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsSamples.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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticProactiveLogCollectionSettingsInner; +import com.azure.resourcemanager.databoxedge.models.ProactiveDiagnosticsConsent; + +/** Samples for DiagnosticSettings UpdateDiagnosticProactiveLogCollectionSettings. */ +public final class DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UpdateDiagnosticProactiveLogCollectionSettings.json + */ + /** + * Sample code: UpdateDiagnosticProactiveLogCollectionSettings. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void updateDiagnosticProactiveLogCollectionSettings( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .diagnosticSettings() + .updateDiagnosticProactiveLogCollectionSettings( + "testedgedevice", + "GroupForEdgeAutomation", + new DiagnosticProactiveLogCollectionSettingsInner() + .withUserConsent(ProactiveDiagnosticsConsent.ENABLED), + Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsSamples.java new file mode 100644 index 000000000000..232b72368a47 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsSamples.java @@ -0,0 +1,42 @@ +// 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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.DiagnosticRemoteSupportSettingsInner; +import com.azure.resourcemanager.databoxedge.models.AccessLevel; +import com.azure.resourcemanager.databoxedge.models.RemoteApplicationType; +import com.azure.resourcemanager.databoxedge.models.RemoteSupportSettings; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** Samples for DiagnosticSettings UpdateDiagnosticRemoteSupportSettings. */ +public final class DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UpdateDiagnosticRemoteSupportSettings.json + */ + /** + * Sample code: UpdateDiagnosticRemoteSupportSettings. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void updateDiagnosticRemoteSupportSettings( + com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .diagnosticSettings() + .updateDiagnosticRemoteSupportSettings( + "testedgedevice", + "GroupForEdgeAutomation", + new DiagnosticRemoteSupportSettingsInner() + .withRemoteSupportSettingsList( + Arrays + .asList( + new RemoteSupportSettings() + .withRemoteApplicationType(RemoteApplicationType.POWERSHELL) + .withAccessLevel(AccessLevel.READ_WRITE) + .withExpirationTimestampInUtc(OffsetDateTime.parse("2021-07-07T00:00:00+00:00")))), + Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/JobsGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/JobsGetSamples.java new file mode 100644 index 000000000000..7bb15d7e1128 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/JobsGetSamples.java @@ -0,0 +1,25 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Jobs Get. */ +public final class JobsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/JobsGet.json + */ + /** + * Sample code: JobsGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void jobsGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .jobs() + .getWithResponse( + "testedgedevice", "159a00c7-8543-4343-9435-263ac87df3bb", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigCreateOrUpdateSamples.java new file mode 100644 index 000000000000..127ff6182d08 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigCreateOrUpdateSamples.java @@ -0,0 +1,47 @@ +// 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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.MonitoringMetricConfigurationInner; +import com.azure.resourcemanager.databoxedge.models.MetricConfiguration; +import com.azure.resourcemanager.databoxedge.models.MetricCounter; +import com.azure.resourcemanager.databoxedge.models.MetricCounterSet; +import java.util.Arrays; + +/** Samples for MonitoringConfig CreateOrUpdate. */ +public final class MonitoringConfigCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/PutMonitoringConfig.json + */ + /** + * Sample code: PutMonitoringConfig. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void putMonitoringConfig(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .monitoringConfigs() + .createOrUpdate( + "testedgedevice", + "testrole", + "GroupForEdgeAutomation", + new MonitoringMetricConfigurationInner() + .withMetricConfigurations( + Arrays + .asList( + new MetricConfiguration() + .withResourceId("test") + .withMdmAccount("test") + .withMetricNameSpace("test") + .withCounterSets( + Arrays + .asList( + new MetricCounterSet() + .withCounters( + Arrays.asList(new MetricCounter().withName("test"))))))), + Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigDeleteSamples.java new file mode 100644 index 000000000000..de540e0bd8ce --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for MonitoringConfig Delete. */ +public final class MonitoringConfigDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/DeleteMonitoringConfig.json + */ + /** + * Sample code: DeleteMonitoringConfig. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void deleteMonitoringConfig(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.monitoringConfigs().delete("testedgedevice", "testrole", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigGetSamples.java new file mode 100644 index 000000000000..ff3c9e68ad4d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigGetSamples.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.generated; + +import com.azure.core.util.Context; + +/** Samples for MonitoringConfig Get. */ +public final class MonitoringConfigGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetMonitoringConfig.json + */ + /** + * Sample code: GetMonitoringConfig. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getMonitoringConfig(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .monitoringConfigs() + .getWithResponse("testedgedevice", "testrole", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigListSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigListSamples.java new file mode 100644 index 000000000000..8dd9aba38c7c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigListSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for MonitoringConfig List. */ +public final class MonitoringConfigListSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ListMonitoringConfig.json + */ + /** + * Sample code: ListMonitoringConfig. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void listMonitoringConfig(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.monitoringConfigs().list("testedgedevice", "testrole", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/NodesListByDataBoxEdgeDeviceSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/NodesListByDataBoxEdgeDeviceSamples.java new file mode 100644 index 000000000000..d750c1a18697 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/NodesListByDataBoxEdgeDeviceSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Nodes ListByDataBoxEdgeDevice. */ +public final class NodesListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/NodeGetAllInDevice.json + */ + /** + * Sample code: NodesGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void nodesGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.nodes().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OperationsListSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OperationsListSamples.java new file mode 100644 index 000000000000..25822fec6a6a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OperationsGet.json + */ + /** + * Sample code: OperationsGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void operationsGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.operations().list(Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OperationsStatusGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OperationsStatusGetSamples.java new file mode 100644 index 000000000000..f83b50d94d01 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OperationsStatusGetSamples.java @@ -0,0 +1,25 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationsStatus Get. */ +public final class OperationsStatusGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OperationsStatusGet.json + */ + /** + * Sample code: OperationsStatusGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void operationsStatusGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .operationsStatus() + .getWithResponse( + "testedgedevice", "159a00c7-8543-4343-9435-263ac87df3bb", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..87f0e157039a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersCreateOrUpdateSamples.java @@ -0,0 +1,47 @@ +// 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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.fluent.models.OrderInner; +import com.azure.resourcemanager.databoxedge.models.Address; +import com.azure.resourcemanager.databoxedge.models.ContactDetails; +import java.util.Arrays; + +/** Samples for Orders CreateOrUpdate. */ +public final class OrdersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OrderPut.json + */ + /** + * Sample code: OrderPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void orderPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .orders() + .createOrUpdate( + "testedgedevice", + "GroupForEdgeAutomation", + new OrderInner() + .withContactInformation( + new ContactDetails() + .withContactPerson("John Mcclane") + .withCompanyName("Microsoft") + .withPhone("(800) 426-9400") + .withEmailList(Arrays.asList("john@microsoft.com"))) + .withShippingAddress( + new Address() + .withAddressLine1("Microsoft Corporation") + .withAddressLine2("One Microsoft Way") + .withAddressLine3("Redmond") + .withPostalCode("fakeTokenPlaceholder") + .withCity("WA") + .withState("WA") + .withCountry("USA")), + Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersDeleteSamples.java new file mode 100644 index 000000000000..9c56c648df89 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Orders Delete. */ +public final class OrdersDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OrderDelete.json + */ + /** + * Sample code: OrderDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void orderDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.orders().delete("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersGetSamples.java new file mode 100644 index 000000000000..6698ed21f741 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersGetSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Orders Get. */ +public final class OrdersGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OrderGet.json + */ + /** + * Sample code: OrderGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void orderGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.orders().getWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersListByDataBoxEdgeDeviceSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersListByDataBoxEdgeDeviceSamples.java new file mode 100644 index 000000000000..00fc272b5248 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersListByDataBoxEdgeDeviceSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Orders ListByDataBoxEdgeDevice. */ +public final class OrdersListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/OrderGetAllInDevice.json + */ + /** + * Sample code: OrderGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void orderGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.orders().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersListDCAccessCodeSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersListDCAccessCodeSamples.java new file mode 100644 index 000000000000..12da398890d0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/OrdersListDCAccessCodeSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Orders ListDCAccessCode. */ +public final class OrdersListDCAccessCodeSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/GetDCAccessCode.json + */ + /** + * Sample code: GetDCAccessCode. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void getDCAccessCode(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.orders().listDCAccessCodeWithResponse("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..06ddfdc3ad14 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesCreateOrUpdateSamples.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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.azure.resourcemanager.databoxedge.models.Authentication; +import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; +import com.azure.resourcemanager.databoxedge.models.IoTDeviceInfo; +import com.azure.resourcemanager.databoxedge.models.IoTRole; +import com.azure.resourcemanager.databoxedge.models.PlatformType; +import com.azure.resourcemanager.databoxedge.models.RoleStatus; +import com.azure.resourcemanager.databoxedge.models.SymmetricKey; +import java.util.Arrays; + +/** Samples for Roles CreateOrUpdate. */ +public final class RolesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/RolePut.json + */ + /** + * Sample code: RolePut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void rolePut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .roles() + .createOrUpdate( + "testedgedevice", + "IoTRole1", + "GroupForEdgeAutomation", + new IoTRole() + .withHostPlatform(PlatformType.LINUX) + .withIoTDeviceDetails( + new IoTDeviceInfo() + .withDeviceId("iotdevice") + .withIoTHostHub("iothub.azure-devices.net") + .withAuthentication( + new Authentication() + .withSymmetricKey( + new SymmetricKey() + .withConnectionString( + new AsymmetricEncryptedSecret() + .withValue( + "Encrypted<>") + .withEncryptionCertThumbprint("348586569999244") + .withEncryptionAlgorithm(EncryptionAlgorithm.AES256))))) + .withIoTEdgeDeviceDetails( + new IoTDeviceInfo() + .withDeviceId("iotEdge") + .withIoTHostHub("iothub.azure-devices.net") + .withAuthentication( + new Authentication() + .withSymmetricKey( + new SymmetricKey() + .withConnectionString( + new AsymmetricEncryptedSecret() + .withValue( + "Encrypted<>") + .withEncryptionCertThumbprint("1245475856069999244") + .withEncryptionAlgorithm(EncryptionAlgorithm.AES256))))) + .withShareMappings(Arrays.asList()) + .withRoleStatus(RoleStatus.ENABLED), + Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesDeleteSamples.java new file mode 100644 index 000000000000..02eb2221fa8b --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Roles Delete. */ +public final class RolesDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/RoleDelete.json + */ + /** + * Sample code: RoleDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void roleDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.roles().delete("testedgedevice", "IoTRole1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesGetSamples.java new file mode 100644 index 000000000000..ee7276225f8c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesGetSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Roles Get. */ +public final class RolesGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/RoleGet.json + */ + /** + * Sample code: RoleGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void roleGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.roles().getWithResponse("testedgedevice", "IoTRole1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesListByDataBoxEdgeDeviceSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesListByDataBoxEdgeDeviceSamples.java new file mode 100644 index 000000000000..c230e4f5f40a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/RolesListByDataBoxEdgeDeviceSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Roles ListByDataBoxEdgeDevice. */ +public final class RolesListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/RoleGetAllInDevice.json + */ + /** + * Sample code: RoleGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void roleGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.roles().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..838eca7f9d2e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; +import com.azure.resourcemanager.databoxedge.models.AzureContainerInfo; +import com.azure.resourcemanager.databoxedge.models.DataPolicy; +import com.azure.resourcemanager.databoxedge.models.MonitoringStatus; +import com.azure.resourcemanager.databoxedge.models.ShareAccessProtocol; +import com.azure.resourcemanager.databoxedge.models.ShareAccessType; +import com.azure.resourcemanager.databoxedge.models.ShareStatus; +import com.azure.resourcemanager.databoxedge.models.UserAccessRight; +import java.util.Arrays; + +/** Samples for Shares CreateOrUpdate. */ +public final class SharesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SharePut.json + */ + /** + * Sample code: SharePut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void sharePut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .shares() + .define("smbshare") + .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withShareStatus(ShareStatus.fromString("Online")) + .withMonitoringStatus(MonitoringStatus.ENABLED) + .withAccessProtocol(ShareAccessProtocol.SMB) + .withDescription("") + .withAzureContainerInfo( + new AzureContainerInfo() + .withStorageAccountCredentialId("fakeTokenPlaceholder") + .withContainerName("testContainerSMB") + .withDataFormat(AzureContainerDataFormat.BLOCK_BLOB)) + .withUserAccessRights( + Arrays + .asList( + new UserAccessRight() + .withUserId( + "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/users/user2") + .withAccessType(ShareAccessType.CHANGE))) + .withDataPolicy(DataPolicy.CLOUD) + .create(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesDeleteSamples.java new file mode 100644 index 000000000000..9fefd5d4aba5 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Shares Delete. */ +public final class SharesDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ShareDelete.json + */ + /** + * Sample code: ShareDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void shareDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.shares().delete("testedgedevice", "smbshare", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesGetSamples.java new file mode 100644 index 000000000000..d990000c2ef7 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesGetSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Shares Get. */ +public final class SharesGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ShareGet.json + */ + /** + * Sample code: ShareGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void shareGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.shares().getWithResponse("testedgedevice", "smbshare", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesListByDataBoxEdgeDeviceSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesListByDataBoxEdgeDeviceSamples.java new file mode 100644 index 000000000000..bf3a40b2888a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesListByDataBoxEdgeDeviceSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Shares ListByDataBoxEdgeDevice. */ +public final class SharesListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ShareGetAllInDevice.json + */ + /** + * Sample code: ShareGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void shareGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.shares().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesRefreshSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesRefreshSamples.java new file mode 100644 index 000000000000..7a2fa2ad1a2c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SharesRefreshSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Shares Refresh. */ +public final class SharesRefreshSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/ShareRefreshPost.json + */ + /** + * Sample code: ShareRefreshPost. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void shareRefreshPost(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.shares().refresh("testedgedevice", "smbshare", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..da97454dade6 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsCreateOrUpdateSamples.java @@ -0,0 +1,39 @@ +// 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.generated; + +import com.azure.resourcemanager.databoxedge.models.AccountType; +import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; +import com.azure.resourcemanager.databoxedge.models.SslStatus; + +/** Samples for StorageAccountCredentials CreateOrUpdate. */ +public final class StorageAccountCredentialsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SACPut.json + */ + /** + * Sample code: SACPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void sACPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .storageAccountCredentials() + .define("sac1") + .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withAlias("sac1") + .withSslStatus(SslStatus.DISABLED) + .withAccountType(AccountType.BLOB_STORAGE) + .withUsername("cisbvt") + .withAccountKey( + new AsymmetricEncryptedSecret() + .withValue( + "lAeZEYi6rNP1/EyNaVUYmTSZEYyaIaWmwUsGwek0+xiZj54GM9Ue9/UA2ed/ClC03wuSit2XzM/cLRU5eYiFBwks23rGwiQOr3sruEL2a74EjPD050xYjA6M1I2hu/w2yjVHhn5j+DbXS4Xzi+rHHNZK3DgfDO3PkbECjPck+PbpSBjy9+6Mrjcld5DIZhUAeMlMHrFlg+WKRKB14o/og56u5/xX6WKlrMLEQ+y6E18dUwvWs2elTNoVO8PBE8SM/CfooX4AMNvaNdSObNBPdP+F6Lzc556nFNWXrBLRt0vC7s9qTiVRO4x/qCNaK/B4y7IqXMllwQFf4Np9UQ2ECA==") + .withEncryptionCertThumbprint("2A9D8D6BE51574B5461230AEF02F162C5F01AD31") + .withEncryptionAlgorithm(EncryptionAlgorithm.AES256)) + .create(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsDeleteSamples.java new file mode 100644 index 000000000000..4a1124593a78 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for StorageAccountCredentials Delete. */ +public final class StorageAccountCredentialsDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SACDelete.json + */ + /** + * Sample code: SACDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void sACDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.storageAccountCredentials().delete("testedgedevice", "sac1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsGetSamples.java new file mode 100644 index 000000000000..65a00186d730 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsGetSamples.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.generated; + +import com.azure.core.util.Context; + +/** Samples for StorageAccountCredentials Get. */ +public final class StorageAccountCredentialsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SACGet.json + */ + /** + * Sample code: SACGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void sACGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .storageAccountCredentials() + .getWithResponse("testedgedevice", "sac1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsListByDataBoxEdgeDeviceSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsListByDataBoxEdgeDeviceSamples.java new file mode 100644 index 000000000000..59f2271fe517 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsListByDataBoxEdgeDeviceSamples.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.generated; + +import com.azure.core.util.Context; + +/** Samples for StorageAccountCredentials ListByDataBoxEdgeDevice. */ +public final class StorageAccountCredentialsListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/SACGetAllInDevice.json + */ + /** + * Sample code: SACGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void sACGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .storageAccountCredentials() + .listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..df93fa690655 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.databoxedge.models.DataPolicy; +import com.azure.resourcemanager.databoxedge.models.StorageAccountStatus; + +/** Samples for StorageAccounts CreateOrUpdate. */ +public final class StorageAccountsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/StorageAccountPut.json + */ + /** + * Sample code: StorageAccountPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void storageAccountPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .storageAccounts() + .define("blobstorageaccount1") + .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withDataPolicy(DataPolicy.CLOUD) + .withDescription("It's an awesome storage account") + .withStorageAccountStatus(StorageAccountStatus.OK) + .withStorageAccountCredentialId( + "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForDataBoxEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/storageAccountCredentials/cisbvt") + .create(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsDeleteSamples.java new file mode 100644 index 000000000000..bee65296c0b8 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for StorageAccounts Delete. */ +public final class StorageAccountsDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/StorageAccountDelete.json + */ + /** + * Sample code: StorageAccountDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void storageAccountDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.storageAccounts().delete("testedgedevice", "storageaccount1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsGetSamples.java new file mode 100644 index 000000000000..571ac65cea74 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsGetSamples.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.generated; + +import com.azure.core.util.Context; + +/** Samples for StorageAccounts Get. */ +public final class StorageAccountsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/StorageAccountGet.json + */ + /** + * Sample code: StorageAccountGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void storageAccountGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .storageAccounts() + .getWithResponse("testedgedevice", "blobstorageaccount1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsListByDataBoxEdgeDeviceSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsListByDataBoxEdgeDeviceSamples.java new file mode 100644 index 000000000000..c0c3eec70eb0 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountsListByDataBoxEdgeDeviceSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for StorageAccounts ListByDataBoxEdgeDevice. */ +public final class StorageAccountsListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/StorageAccountGetAllInDevice.json + */ + /** + * Sample code: StorageAccountGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void storageAccountGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.storageAccounts().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SupportPackagesTriggerSupportPackageSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SupportPackagesTriggerSupportPackageSamples.java new file mode 100644 index 000000000000..1064e7bd76a2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SupportPackagesTriggerSupportPackageSamples.java @@ -0,0 +1,33 @@ +// 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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.TriggerSupportPackageRequest; +import java.time.OffsetDateTime; + +/** Samples for SupportPackages TriggerSupportPackage. */ +public final class SupportPackagesTriggerSupportPackageSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/TriggerSupportPackage.json + */ + /** + * Sample code: TriggerSupportPackage. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void triggerSupportPackage(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .supportPackages() + .triggerSupportPackage( + "testedgedevice", + "GroupForEdgeAutomation", + new TriggerSupportPackageRequest() + .withMinimumTimestamp(OffsetDateTime.parse("2018-12-18T02:18:51.4270267Z")) + .withMaximumTimestamp(OffsetDateTime.parse("2018-12-18T02:19:51.4270267Z")) + .withInclude("DefaultWithDumps"), + Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..dd258ae1fb82 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersCreateOrUpdateSamples.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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.databoxedge.models.FileEventTrigger; +import com.azure.resourcemanager.databoxedge.models.FileSourceInfo; +import com.azure.resourcemanager.databoxedge.models.RoleSinkInfo; + +/** Samples for Triggers CreateOrUpdate. */ +public final class TriggersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/TriggerPut.json + */ + /** + * Sample code: TriggerPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void triggerPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .triggers() + .createOrUpdate( + "testedgedevice", + "trigger1", + "GroupForEdgeAutomation", + new FileEventTrigger() + .withSourceInfo( + new FileSourceInfo() + .withShareId( + "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/shares/share1")) + .withSinkInfo( + new RoleSinkInfo() + .withRoleId( + "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/roles/role1")) + .withCustomContextTag("CustomContextTags-1235346475"), + Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersDeleteSamples.java new file mode 100644 index 000000000000..055417a6979b --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Triggers Delete. */ +public final class TriggersDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/TriggerDelete.json + */ + /** + * Sample code: TriggerDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void triggerDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.triggers().delete("testedgedevice", "trigger1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersGetSamples.java new file mode 100644 index 000000000000..85c8746772de --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersGetSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Triggers Get. */ +public final class TriggersGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/TriggerGet.json + */ + /** + * Sample code: TriggerGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void triggerGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.triggers().getWithResponse("testedgedevice", "trigger1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersListByDataBoxEdgeDeviceSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersListByDataBoxEdgeDeviceSamples.java new file mode 100644 index 000000000000..2a82f2e239e9 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/TriggersListByDataBoxEdgeDeviceSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Triggers ListByDataBoxEdgeDevice. */ +public final class TriggersListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/TriggerGetAllInDevice.json + */ + /** + * Sample code: TriggerGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void triggerGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.triggers().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", null, Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersCreateOrUpdateSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..f0e18d96119d --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; +import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; +import com.azure.resourcemanager.databoxedge.models.UserType; + +/** Samples for Users CreateOrUpdate. */ +public final class UsersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UserPut.json + */ + /** + * Sample code: UserPut. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void userPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager + .users() + .define("user1") + .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withUserType(UserType.SHARE) + .withEncryptedPassword( + new AsymmetricEncryptedSecret() + .withValue("") + .withEncryptionCertThumbprint("blah") + .withEncryptionAlgorithm(EncryptionAlgorithm.NONE)) + .create(); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersDeleteSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersDeleteSamples.java new file mode 100644 index 000000000000..337f9a9a460c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Users Delete. */ +public final class UsersDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UserDelete.json + */ + /** + * Sample code: UserDelete. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void userDelete(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.users().delete("testedgedevice", "user1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersGetSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersGetSamples.java new file mode 100644 index 000000000000..a45d1e6c0901 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersGetSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Users Get. */ +public final class UsersGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UserGet.json + */ + /** + * Sample code: UserGet. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void userGet(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.users().getWithResponse("testedgedevice", "user1", "GroupForEdgeAutomation", Context.NONE); + } +} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersListByDataBoxEdgeDeviceSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersListByDataBoxEdgeDeviceSamples.java new file mode 100644 index 000000000000..730af97d0ef1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/UsersListByDataBoxEdgeDeviceSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +import com.azure.core.util.Context; + +/** Samples for Users ListByDataBoxEdgeDevice. */ +public final class UsersListByDataBoxEdgeDeviceSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2022-03-01/examples/UserGetAllInDevice.json + */ + /** + * Sample code: UserGetAllInDevice. + * + * @param manager Entry point to DataBoxEdgeManager. + */ + public static void userGetAllInDevice(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.users().listByDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation", null, Context.NONE); + } +}