diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/CHANGELOG.md b/sdk/databoxedge/azure-resourcemanager-databoxedge/CHANGELOG.md index 7ab6e4a23d71..982ae681764b 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/CHANGELOG.md +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2023-07-21) + +- Azure Resource Manager DataBoxEdge client library for Java. This package contains Microsoft Azure SDK for DataBoxEdge Management SDK. Package tag package-2023-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/README.md b/sdk/databoxedge/azure-resourcemanager-databoxedge/README.md index 75296d09f434..09cc07039149 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-2023-07. 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.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) @@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [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/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fdataboxedge%2Fazure-resourcemanager-databoxedge%2FREADME.png) diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/SAMPLE.md b/sdk/databoxedge/azure-resourcemanager-databoxedge/SAMPLE.md index 269b406e11e7..a624fc325c3d 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/SAMPLE.md +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/SAMPLE.md @@ -1,11 +1,22 @@ # 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) @@ -21,12 +32,21 @@ - [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) @@ -36,12 +56,27 @@ - [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) @@ -60,6 +95,7 @@ - [Delete](#orders_delete) - [Get](#orders_get) - [ListByDataBoxEdgeDevice](#orders_listbydataboxedgedevice) +- [ListDCAccessCode](#orders_listdcaccesscode) ## Roles @@ -76,10 +112,6 @@ - [ListByDataBoxEdgeDevice](#shares_listbydataboxedgedevice) - [Refresh](#shares_refresh) -## Skus - -- [List](#skus_list) - ## StorageAccountCredentials - [CreateOrUpdate](#storageaccountcredentials_createorupdate) @@ -94,6 +126,10 @@ - [Get](#storageaccounts_get) - [ListByDataBoxEdgeDevice](#storageaccounts_listbydataboxedgedevice) +## SupportPackages + +- [TriggerSupportPackage](#supportpackages_triggersupportpackage) + ## Triggers - [CreateOrUpdate](#triggers_createorupdate) @@ -107,13 +143,119 @@ - [Delete](#users_delete) - [Get](#users_get) - [ListByDataBoxEdgeDevice](#users_listbydataboxedgedevice) +### Addons_CreateOrUpdate + +```java +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/2023-07-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"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Addons_Delete + +```java +/** Samples for Addons Delete. */ +public final class AddonsDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", + com.azure.core.util.Context.NONE); + } +} +``` + +### Addons_Get + +```java +/** Samples for Addons Get. */ +public final class AddonsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", + com.azure.core.util.Context.NONE); + } +} +``` + +### Addons_ListByRole + +```java +/** Samples for Addons ListByRole. */ +public final class AddonsListByRoleSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.Context.NONE); + } +} +``` + ### Alerts_Get ```java /** Samples for Alerts Get. */ public final class AlertsGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/AlertGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/AlertGet.json */ /** * Sample code: AlertGet. @@ -138,7 +280,7 @@ public final class AlertsGetSamples { /** Samples for Alerts ListByDataBoxEdgeDevice. */ public final class AlertsListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/AlertGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/AlertGetAllInDevice.json */ /** * Sample code: AlertGetAllInDevice. @@ -153,6 +295,25 @@ public final class AlertsListByDataBoxEdgeDeviceSamples { } ``` +### AvailableSkus_List + +```java +/** Samples for AvailableSkus List. */ +public final class AvailableSkusListSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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(com.azure.core.util.Context.NONE); + } +} +``` + ### BandwidthSchedules_CreateOrUpdate ```java @@ -162,7 +323,7 @@ import java.util.Arrays; /** Samples for BandwidthSchedules CreateOrUpdate. */ public final class BandwidthSchedulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/BandwidthSchedulePut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/BandwidthSchedulePut.json */ /** * Sample code: BandwidthSchedulePut. @@ -189,7 +350,7 @@ public final class BandwidthSchedulesCreateOrUpdateSamples { /** Samples for BandwidthSchedules Delete. */ public final class BandwidthSchedulesDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/BandwidthScheduleDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/BandwidthScheduleDelete.json */ /** * Sample code: BandwidthScheduleDelete. @@ -210,7 +371,7 @@ public final class BandwidthSchedulesDeleteSamples { /** Samples for BandwidthSchedules Get. */ public final class BandwidthSchedulesGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/BandwidthScheduleGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/BandwidthScheduleGet.json */ /** * Sample code: BandwidthScheduleGet. @@ -232,7 +393,7 @@ public final class BandwidthSchedulesGetSamples { /** Samples for BandwidthSchedules ListByDataBoxEdgeDevice. */ public final class BandwidthSchedulesListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/BandwidthScheduleGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/BandwidthScheduleGetAllInDevice.json */ /** * Sample code: BandwidthScheduleGetAllInDevice. @@ -256,7 +417,7 @@ 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/2019-08-01/examples/ContainerPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ContainerPut.json */ /** * Sample code: ContainerPut. @@ -280,7 +441,7 @@ public final class ContainersCreateOrUpdateSamples { /** Samples for Containers Delete. */ public final class ContainersDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ContainerDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ContainerDelete.json */ /** * Sample code: ContainerDelete. @@ -306,7 +467,7 @@ public final class ContainersDeleteSamples { /** Samples for Containers Get. */ public final class ContainersGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ContainerGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ContainerGet.json */ /** * Sample code: ContainerGet. @@ -332,7 +493,7 @@ public final class ContainersGetSamples { /** Samples for Containers ListByStorageAccount. */ public final class ContainersListByStorageAccountSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ContainerListAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ContainerListAllInDevice.json */ /** * Sample code: ContainerListAllInDevice. @@ -354,7 +515,7 @@ public final class ContainersListByStorageAccountSamples { /** Samples for Containers Refresh. */ public final class ContainersRefreshSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ContainerRefresh.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ContainerRefresh.json */ /** * Sample code: ContainerRefresh. @@ -374,9 +535,62 @@ public final class ContainersRefreshSamples { } ``` +### DeviceCapacityCheck_CheckResourceCreationFeasibility + +```java +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/2023-07-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, + com.azure.core.util.Context.NONE); + } +} +``` + +### DeviceCapacityInfo_GetDeviceCapacityInfo + +```java +/** Samples for DeviceCapacityInfo GetDeviceCapacityInfo. */ +public final class DeviceCapacityInfoGetDeviceCapacityInfoSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.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; @@ -386,7 +600,28 @@ import java.util.Map; /** Samples for Devices CreateOrUpdate. */ public final class DevicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DataBoxEdgeDevicePut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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/2023-07-01/examples/DataBoxEdgeDevicePut.json */ /** * Sample code: DataBoxEdgeDevicePut. @@ -397,7 +632,7 @@ public final class DevicesCreateOrUpdateSamples { manager .devices() .define("testedgedevice") - .withRegion("eastus") + .withRegion("WUS") .withExistingResourceGroup("GroupForEdgeAutomation") .withTags(mapOf()) .withSku(new Sku().withName(SkuName.EDGE).withTier(SkuTier.STANDARD)) @@ -427,7 +662,7 @@ 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/2019-08-01/examples/SecuritySettingsUpdatePost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SecuritySettingsUpdatePost.json */ /** * Sample code: CreateOrUpdateSecuritySettings. @@ -444,8 +679,8 @@ public final class DevicesCreateOrUpdateSecuritySettingsSamples { new SecuritySettings() .withDeviceAdminPassword( new AsymmetricEncryptedSecret() - .withValue("") - .withEncryptionCertThumbprint("7DCBDFC44ED968D232C9A998FC105B5C70E84BE0") + .withValue("") + .withEncryptionCertThumbprint("") .withEncryptionAlgorithm(EncryptionAlgorithm.AES256)), com.azure.core.util.Context.NONE); } @@ -458,7 +693,7 @@ public final class DevicesCreateOrUpdateSecuritySettingsSamples { /** Samples for Devices Delete. */ public final class DevicesDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DataBoxEdgeDeviceDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DataBoxEdgeDeviceDelete.json */ /** * Sample code: DataBoxEdgeDeviceDelete. @@ -477,7 +712,7 @@ public final class DevicesDeleteSamples { /** Samples for Devices DownloadUpdates. */ public final class DevicesDownloadUpdatesSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DownloadUpdatesPost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DownloadUpdatesPost.json */ /** * Sample code: DownloadUpdatesPost. @@ -490,13 +725,35 @@ public final class DevicesDownloadUpdatesSamples { } ``` +### Devices_GenerateCertificate + +```java +/** Samples for Devices GenerateCertificate. */ +public final class DevicesGenerateCertificateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.Context.NONE); + } +} +``` + ### Devices_GetByResourceGroup ```java /** Samples for Devices GetByResourceGroup. */ public final class DevicesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DataBoxEdgeDeviceGetByName.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DataBoxEdgeDeviceGetByName.json */ /** * Sample code: DataBoxEdgeDeviceGetByName. @@ -509,6 +766,22 @@ public final class DevicesGetByResourceGroupSamples { .getByResourceGroupWithResponse( "GroupForEdgeAutomation", "testedgedevice", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.Context.NONE); + } } ``` @@ -518,7 +791,7 @@ public final class DevicesGetByResourceGroupSamples { /** Samples for Devices GetExtendedInformation. */ public final class DevicesGetExtendedInformationSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ExtendedInfoPost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ExtendedInfoPost.json */ /** * Sample code: ExtendedInfoPost. @@ -540,7 +813,7 @@ public final class DevicesGetExtendedInformationSamples { /** Samples for Devices GetNetworkSettings. */ public final class DevicesGetNetworkSettingsSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/NetworkSettingsGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/NetworkSettingsGet.json */ /** * Sample code: NetworkSettingsGet. @@ -562,7 +835,7 @@ public final class DevicesGetNetworkSettingsSamples { /** Samples for Devices GetUpdateSummary. */ public final class DevicesGetUpdateSummarySamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/UpdateSummaryGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UpdateSummaryGet.json */ /** * Sample code: UpdateSummaryGet. @@ -583,7 +856,7 @@ public final class DevicesGetUpdateSummarySamples { /** Samples for Devices InstallUpdates. */ public final class DevicesInstallUpdatesSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/InstallUpdatesPost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/InstallUpdatesPost.json */ /** * Sample code: InstallUpdatesPost. @@ -602,7 +875,7 @@ public final class DevicesInstallUpdatesSamples { /** Samples for Devices List. */ public final class DevicesListSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DataBoxEdgeDeviceGetBySubscription.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DataBoxEdgeDeviceGetBySubscription.json */ /** * Sample code: DataBoxEdgeDeviceGetBySubscription. @@ -622,7 +895,7 @@ public final class DevicesListSamples { /** Samples for Devices ListByResourceGroup. */ public final class DevicesListByResourceGroupSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DataBoxEdgeDeviceGetByResourceGroup.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DataBoxEdgeDeviceGetByResourceGroup.json */ /** * Sample code: DataBoxEdgeDeviceGetByResourceGroup. @@ -642,7 +915,7 @@ public final class DevicesListByResourceGroupSamples { /** Samples for Devices ScanForUpdates. */ public final class DevicesScanForUpdatesSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ScanForUpdatesPost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ScanForUpdatesPost.json */ /** * Sample code: ScanForUpdatesPost. @@ -659,13 +932,13 @@ public final class DevicesScanForUpdatesSamples { ```java import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevice; -import java.util.HashMap; -import java.util.Map; +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/2019-08-01/examples/DataBoxEdgeDevicePatch.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DataBoxEdgeDevicePatch.json */ /** * Sample code: DataBoxEdgeDevicePatch. @@ -679,18 +952,42 @@ public final class DevicesUpdateSamples { .getByResourceGroupWithResponse( "GroupForEdgeAutomation", "testedgedevice", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("Key1", "value1", "Key2", "value2")).apply(); + 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(); } +} +``` - @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_UpdateExtendedInformation + +```java +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/2023-07-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(), + com.azure.core.util.Context.NONE); } } ``` @@ -703,7 +1000,7 @@ 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/2019-08-01/examples/UploadCertificatePost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UploadCertificatePost.json */ /** * Sample code: UploadCertificatePost. @@ -724,13 +1021,129 @@ public final class DevicesUploadCertificateSamples { } ``` +### DiagnosticSettings_GetDiagnosticProactiveLogCollectionSettings + +```java +/** Samples for DiagnosticSettings GetDiagnosticProactiveLogCollectionSettings. */ +public final class DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.Context.NONE); + } +} +``` + +### DiagnosticSettings_GetDiagnosticRemoteSupportSettings + +```java +/** Samples for DiagnosticSettings GetDiagnosticRemoteSupportSettings. */ +public final class DiagnosticSettingsGetDiagnosticRemoteSupportSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.Context.NONE); + } +} +``` + +### DiagnosticSettings_UpdateDiagnosticProactiveLogCollectionSettings + +```java +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/2023-07-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), + com.azure.core.util.Context.NONE); + } +} +``` + +### DiagnosticSettings_UpdateDiagnosticRemoteSupportSettings + +```java +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/2023-07-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")))), + com.azure.core.util.Context.NONE); + } +} +``` + ### Jobs_Get ```java /** Samples for Jobs Get. */ public final class JobsGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/JobsGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/JobsGet.json */ /** * Sample code: JobsGet. @@ -749,13 +1162,121 @@ public final class JobsGetSamples { } ``` +### MonitoringConfig_CreateOrUpdate + +```java +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/2023-07-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"))))))), + com.azure.core.util.Context.NONE); + } +} +``` + +### MonitoringConfig_Delete + +```java +/** Samples for MonitoringConfig Delete. */ +public final class MonitoringConfigDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.Context.NONE); + } +} +``` + +### MonitoringConfig_Get + +```java +/** Samples for MonitoringConfig Get. */ +public final class MonitoringConfigGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.Context.NONE); + } +} +``` + +### MonitoringConfig_List + +```java +/** Samples for MonitoringConfig List. */ +public final class MonitoringConfigListSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.Context.NONE); + } +} +``` + ### Nodes_ListByDataBoxEdgeDevice ```java /** Samples for Nodes ListByDataBoxEdgeDevice. */ public final class NodesListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/NodeGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/NodeGetAllInDevice.json */ /** * Sample code: NodesGetAllInDevice. @@ -776,7 +1297,7 @@ public final class NodesListByDataBoxEdgeDeviceSamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OperationsGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OperationsGet.json */ /** * Sample code: OperationsGet. @@ -795,7 +1316,7 @@ public final class OperationsListSamples { /** Samples for OperationsStatus Get. */ public final class OperationsStatusGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OperationsStatusGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OperationsStatusGet.json */ /** * Sample code: OperationsStatusGet. @@ -825,7 +1346,7 @@ import java.util.Arrays; /** Samples for Orders CreateOrUpdate. */ public final class OrdersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OrderPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OrderPut.json */ /** * Sample code: OrderPut. @@ -865,7 +1386,7 @@ public final class OrdersCreateOrUpdateSamples { /** Samples for Orders Delete. */ public final class OrdersDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OrderDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OrderDelete.json */ /** * Sample code: OrderDelete. @@ -884,7 +1405,7 @@ public final class OrdersDeleteSamples { /** Samples for Orders Get. */ public final class OrdersGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OrderGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OrderGet.json */ /** * Sample code: OrderGet. @@ -903,7 +1424,7 @@ public final class OrdersGetSamples { /** Samples for Orders ListByDataBoxEdgeDevice. */ public final class OrdersListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OrderGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OrderGetAllInDevice.json */ /** * Sample code: OrderGetAllInDevice. @@ -918,6 +1439,27 @@ public final class OrdersListByDataBoxEdgeDeviceSamples { } ``` +### Orders_ListDCAccessCode + +```java +/** Samples for Orders ListDCAccessCode. */ +public final class OrdersListDCAccessCodeSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.Context.NONE); + } +} +``` + ### Roles_CreateOrUpdate ```java @@ -934,7 +1476,7 @@ import java.util.Arrays; /** Samples for Roles CreateOrUpdate. */ public final class RolesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/RolePut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/RolePut.json */ /** * Sample code: RolePut. @@ -991,7 +1533,7 @@ public final class RolesCreateOrUpdateSamples { /** Samples for Roles Delete. */ public final class RolesDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/RoleDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/RoleDelete.json */ /** * Sample code: RoleDelete. @@ -1012,7 +1554,7 @@ public final class RolesDeleteSamples { /** Samples for Roles Get. */ public final class RolesGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/RoleGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/RoleGet.json */ /** * Sample code: RoleGet. @@ -1033,7 +1575,7 @@ public final class RolesGetSamples { /** Samples for Roles ListByDataBoxEdgeDevice. */ public final class RolesListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/RoleGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/RoleGetAllInDevice.json */ /** * Sample code: RoleGetAllInDevice. @@ -1064,7 +1606,7 @@ import java.util.Arrays; /** Samples for Shares CreateOrUpdate. */ public final class SharesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/SharePut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SharePut.json */ /** * Sample code: SharePut. @@ -1104,7 +1646,7 @@ public final class SharesCreateOrUpdateSamples { /** Samples for Shares Delete. */ public final class SharesDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ShareDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ShareDelete.json */ /** * Sample code: ShareDelete. @@ -1125,7 +1667,7 @@ public final class SharesDeleteSamples { /** Samples for Shares Get. */ public final class SharesGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ShareGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ShareGet.json */ /** * Sample code: ShareGet. @@ -1146,7 +1688,7 @@ public final class SharesGetSamples { /** Samples for Shares ListByDataBoxEdgeDevice. */ public final class SharesListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ShareGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ShareGetAllInDevice.json */ /** * Sample code: ShareGetAllInDevice. @@ -1167,7 +1709,7 @@ public final class SharesListByDataBoxEdgeDeviceSamples { /** Samples for Shares Refresh. */ public final class SharesRefreshSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ShareRefreshPost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ShareRefreshPost.json */ /** * Sample code: ShareRefreshPost. @@ -1182,25 +1724,6 @@ public final class SharesRefreshSamples { } ``` -### Skus_List - -```java -/** Samples for Skus List. */ -public final class SkusListSamples { - /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ListSkus.json - */ - /** - * Sample code: ListSkus. - * - * @param manager Entry point to DataBoxEdgeManager. - */ - public static void listSkus(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { - manager.skus().list(null, com.azure.core.util.Context.NONE); - } -} -``` - ### StorageAccountCredentials_CreateOrUpdate ```java @@ -1212,7 +1735,7 @@ 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/2019-08-01/examples/SACPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SACPut.json */ /** * Sample code: SACPut. @@ -1245,7 +1768,7 @@ public final class StorageAccountCredentialsCreateOrUpdateSamples { /** Samples for StorageAccountCredentials Delete. */ public final class StorageAccountCredentialsDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/SACDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SACDelete.json */ /** * Sample code: SACDelete. @@ -1266,7 +1789,7 @@ public final class StorageAccountCredentialsDeleteSamples { /** Samples for StorageAccountCredentials Get. */ public final class StorageAccountCredentialsGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/SACGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SACGet.json */ /** * Sample code: SACGet. @@ -1287,7 +1810,7 @@ public final class StorageAccountCredentialsGetSamples { /** Samples for StorageAccountCredentials ListByDataBoxEdgeDevice. */ public final class StorageAccountCredentialsListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/SACGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SACGetAllInDevice.json */ /** * Sample code: SACGetAllInDevice. @@ -1311,7 +1834,7 @@ 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/2019-08-01/examples/StorageAccountPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/StorageAccountPut.json */ /** * Sample code: StorageAccountPut. @@ -1323,9 +1846,9 @@ public final class StorageAccountsCreateOrUpdateSamples { .storageAccounts() .define("blobstorageaccount1") .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withDataPolicy(DataPolicy.CLOUD) .withDescription("It's an awesome storage account") .withStorageAccountStatus(StorageAccountStatus.OK) - .withDataPolicy(DataPolicy.CLOUD) .withStorageAccountCredentialId( "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForDataBoxEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/storageAccountCredentials/cisbvt") .create(); @@ -1339,7 +1862,7 @@ public final class StorageAccountsCreateOrUpdateSamples { /** Samples for StorageAccounts Delete. */ public final class StorageAccountsDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/StorageAccountDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/StorageAccountDelete.json */ /** * Sample code: StorageAccountDelete. @@ -1360,7 +1883,7 @@ public final class StorageAccountsDeleteSamples { /** Samples for StorageAccounts Get. */ public final class StorageAccountsGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/StorageAccountGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/StorageAccountGet.json */ /** * Sample code: StorageAccountGet. @@ -1382,7 +1905,7 @@ public final class StorageAccountsGetSamples { /** Samples for StorageAccounts ListByDataBoxEdgeDevice. */ public final class StorageAccountsListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/StorageAccountGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/StorageAccountGetAllInDevice.json */ /** * Sample code: StorageAccountGetAllInDevice. @@ -1397,6 +1920,37 @@ public final class StorageAccountsListByDataBoxEdgeDeviceSamples { } ``` +### SupportPackages_TriggerSupportPackage + +```java +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/2023-07-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"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Triggers_CreateOrUpdate ```java @@ -1407,7 +1961,7 @@ 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/2019-08-01/examples/TriggerPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/TriggerPut.json */ /** * Sample code: TriggerPut. @@ -1442,7 +1996,7 @@ public final class TriggersCreateOrUpdateSamples { /** Samples for Triggers Delete. */ public final class TriggersDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/TriggerDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/TriggerDelete.json */ /** * Sample code: TriggerDelete. @@ -1463,7 +2017,7 @@ public final class TriggersDeleteSamples { /** Samples for Triggers Get. */ public final class TriggersGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/TriggerGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/TriggerGet.json */ /** * Sample code: TriggerGet. @@ -1484,7 +2038,7 @@ public final class TriggersGetSamples { /** Samples for Triggers ListByDataBoxEdgeDevice. */ public final class TriggersListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/TriggerGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/TriggerGetAllInDevice.json */ /** * Sample code: TriggerGetAllInDevice. @@ -1506,12 +2060,11 @@ public final class TriggersListByDataBoxEdgeDeviceSamples { import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; import com.azure.resourcemanager.databoxedge.models.UserType; -import java.util.Arrays; /** Samples for Users CreateOrUpdate. */ public final class UsersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/UserPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UserPut.json */ /** * Sample code: UserPut. @@ -1529,7 +2082,6 @@ public final class UsersCreateOrUpdateSamples { .withValue("") .withEncryptionCertThumbprint("blah") .withEncryptionAlgorithm(EncryptionAlgorithm.NONE)) - .withShareAccessRights(Arrays.asList()) .create(); } } @@ -1541,7 +2093,7 @@ public final class UsersCreateOrUpdateSamples { /** Samples for Users Delete. */ public final class UsersDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/UserDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UserDelete.json */ /** * Sample code: UserDelete. @@ -1560,7 +2112,7 @@ public final class UsersDeleteSamples { /** Samples for Users Get. */ public final class UsersGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/UserGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UserGet.json */ /** * Sample code: UserGet. @@ -1581,7 +2133,7 @@ public final class UsersGetSamples { /** Samples for Users ListByDataBoxEdgeDevice. */ public final class UsersListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/UserGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UserGetAllInDevice.json */ /** * Sample code: UserGetAllInDevice. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml b/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml index 9bd59de284b3..f763645e59e7 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ 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. + 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-2023-07. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,8 @@ UTF-8 - true + 0 + 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 ee98994cd76f..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 @@ -24,37 +24,49 @@ 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; @@ -68,12 +80,20 @@ 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; @@ -84,6 +104,10 @@ public final class DataBoxEdgeManager { private Roles roles; + private Addons addons; + + private MonitoringConfigs monitoringConfigs; + private Shares shares; private StorageAccountCredentials storageAccountCredentials; @@ -94,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; @@ -263,7 +287,7 @@ public DataBoxEdgeManager authenticate(TokenCredential credential, AzureProfile .append("-") .append("com.azure.resourcemanager.databoxedge") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -332,6 +356,18 @@ public Operations operations() { return operations; } + /** + * 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. * @@ -368,6 +404,42 @@ public BandwidthSchedules bandwidthSchedules() { return bandwidthSchedules; } + /** + * 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. * @@ -428,6 +500,30 @@ public Roles roles() { return roles; } + /** + * 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. * @@ -490,27 +586,27 @@ public Triggers triggers() { } /** - * Gets the resource collection API of Users. It manages User. + * Gets the resource collection API of SupportPackages. * - * @return Resource collection API of Users. + * @return Resource collection API of SupportPackages. */ - public Users users() { - if (this.users == null) { - this.users = new UsersImpl(clientObject.getUsers(), this); + public SupportPackages supportPackages() { + if (this.supportPackages == null) { + this.supportPackages = new SupportPackagesImpl(clientObject.getSupportPackages(), this); } - return users; + return supportPackages; } /** - * Gets the resource collection API of Skus. + * Gets the resource collection API of Users. It manages User. * - * @return Resource collection API of Skus. + * @return Resource collection API of Users. */ - public Skus skus() { - if (this.skus == null) { - this.skus = new SkusImpl(clientObject.getSkus(), this); + public Users users() { + if (this.users == null) { + this.users = new UsersImpl(clientObject.getUsers(), this); } - return skus; + return users; } /** 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/SkusClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/AvailableSkusClient.java similarity index 72% 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 b20b7c002247..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,24 +8,23 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.databoxedge.fluent.models.ResourceTypeSkuInner; +import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeSkuInner; -/** An instance of this class provides access to all the operations defined in SkusClient. */ -public interface SkusClient { +/** An instance of this class provides access to all the operations defined in AvailableSkusClient. */ +public interface AvailableSkusClient { /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of SKU Information objects 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. @@ -33,5 +32,5 @@ public interface SkusClient { * @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/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 0a4fffa09ce7..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; @@ -105,21 +107,6 @@ Response getByResourceGroupWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) DataBoxEdgeDeviceInner getByResourceGroup(String resourceGroupName, String deviceName); - /** - * Creates or updates a Data Box Edge/Data Box Gateway resource. - * - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param dataBoxEdgeDevice The resource object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DataBoxEdgeDeviceInner> beginCreateOrUpdate( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice); - /** * Creates or updates a Data Box Edge/Data Box Gateway resource. * @@ -130,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 {@link SyncPoller} for polling of the Data Box Edge/Gateway device. + * @return the Data Box Edge/Gateway device along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DataBoxEdgeDeviceInner> beginCreateOrUpdate( + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context); /** @@ -151,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. * @@ -303,7 +274,7 @@ 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. @@ -311,7 +282,35 @@ 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 along with {@link + * @return used in activation key generation flow along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response generateCertificateWithResponse( + String deviceName, String resourceGroupName, Context 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 com.azure.core.management.exception.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. + * @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 Azure Stack Edge/Data Box Gateway device along with {@link * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -319,14 +318,14 @@ Response getExtendedInformationWithResponse( String deviceName, String resourceGroupName, Context context); /** - * 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 com.azure.core.management.exception.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) DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceName, String resourceGroupName); @@ -524,6 +523,38 @@ SyncPoller, Void> beginCreateOrUpdateSecuritySettings( void createOrUpdateSecuritySettings( String deviceName, String resourceGroupName, SecuritySettings securitySettings, Context context); + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The patch object. + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 * about any ongoing download or install jobs on the device. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DiagnosticSettingsClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DiagnosticSettingsClient.java new file mode 100644 index 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/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/OrdersClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/OrdersClient.java index 823d754437d1..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. */ @@ -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/StorageAccountsClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/StorageAccountsClient.java index 40884580fcfc..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,7 +16,7 @@ /** An instance of this class provides access to all the operations defined in StorageAccountsClient. */ public interface StorageAccountsClient { /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -30,7 +30,7 @@ public interface StorageAccountsClient { PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SupportPackagesClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/SupportPackagesClient.java new file mode 100644 index 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/UsersClient.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/UsersClient.java index 35f172491685..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 @@ -34,7 +34,7 @@ public interface UsersClient { * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AddonInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/AddonInner.java new file mode 100644 index 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 f415b2749bfe..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,6 +5,7 @@ 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.AlertErrorDetails; import com.azure.resourcemanager.databoxedge.models.AlertSeverity; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; @@ -21,6 +22,12 @@ public final class AlertInner extends ArmBaseModel { @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private AlertProperties innerProperties; + /* + * Metadata pertaining to creation and last modification of Alert + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of AlertInner class. */ public AlertInner() { } @@ -34,6 +41,15 @@ private AlertProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Metadata pertaining to creation and last modification of Alert. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the title property: Alert title. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/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 c9bd6681bf73..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,6 +5,7 @@ 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.DayOfWeek; @@ -20,6 +21,12 @@ public final class BandwidthScheduleInner extends ArmBaseModel { @JsonProperty(value = "properties", required = true) private BandwidthScheduleProperties innerProperties = new BandwidthScheduleProperties(); + /* + * Metadata pertaining to creation and last modification of BandwidthSchedule + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of BandwidthScheduleInner class. */ public BandwidthScheduleInner() { } @@ -33,6 +40,15 @@ private BandwidthScheduleProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Metadata pertaining to creation and last modification of BandwidthSchedule. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the start property: The start time of the schedule in UTC. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/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 11e82cf381e3..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,6 +5,7 @@ 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.AzureContainerDataFormat; @@ -22,6 +23,12 @@ public final class ContainerInner extends ArmBaseModel { @JsonProperty(value = "properties", required = true) private ContainerProperties innerProperties = new ContainerProperties(); + /* + * Metadata pertaining to creation and last modification of Container + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of ContainerInner class. */ public ContainerInner() { } @@ -35,6 +42,15 @@ private ContainerProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Metadata pertaining to creation and last modification of Container. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the containerStatus property: Current status of the container. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DCAccessCodeInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DCAccessCodeInner.java new file mode 100644 index 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 d9e66c5e1779..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,8 +5,13 @@ 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.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. */ @Fluent @@ -17,6 +22,12 @@ public final class DataBoxEdgeDeviceExtendedInfoInner extends ArmBaseModel { @JsonProperty(value = "properties") private DataBoxEdgeDeviceExtendedInfoProperties innerProperties; + /* + * Metadata pertaining to creation and last modification of DataBoxEdgeDevice + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of DataBoxEdgeDeviceExtendedInfoInner class. */ public DataBoxEdgeDeviceExtendedInfoInner() { } @@ -30,6 +41,15 @@ private DataBoxEdgeDeviceExtendedInfoProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Metadata pertaining to creation and last modification of DataBoxEdgeDevice. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the encryptionKeyThumbprint property: The digital signature of encrypted certificate. * @@ -87,6 +107,184 @@ public String 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(); + } + /** * Validates the instance. * 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 index efa79d63b8fd..7cc0dcf7a10d 100644 --- 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 @@ -5,7 +5,12 @@ 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 @@ -28,6 +33,79 @@ public final class DataBoxEdgeDeviceExtendedInfoProperties { @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() { } @@ -83,11 +161,184 @@ 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 8190197f7414..b2f3a4c8f7ab 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,10 +5,16 @@ 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.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.JsonInclude; @@ -47,6 +53,24 @@ public final class DataBoxEdgeDeviceInner extends ArmBaseModel { @JsonProperty(value = "etag") private String etag; + /* + * Msi identity of the resource + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /* + * The kind of the device. + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private DataBoxEdgeDeviceKind kind; + + /* + * DataBoxEdge Resource + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * The properties of the Data Box Edge/Gateway device. */ @@ -143,6 +167,44 @@ public DataBoxEdgeDeviceInner withEtag(String etag) { return this; } + /** + * Get the identity property: Msi identity of the resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Msi identity of the resource. + * + * @param identity the identity value to set. + * @return the DataBoxEdgeDeviceInner object itself. + */ + public DataBoxEdgeDeviceInner withIdentity(ResourceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the kind property: The kind of the device. + * + * @return the kind value. + */ + public DataBoxEdgeDeviceKind kind() { + return this.kind; + } + + /** + * Get the systemData property: DataBoxEdge Resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the innerProperties property: The properties of the Data Box Edge/Gateway device. * @@ -153,26 +215,21 @@ private DataBoxEdgeDeviceProperties innerProperties() { } /** - * Get the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. + * Get the systemData property: DataBoxEdge Device Properties. * - * @return the dataBoxEdgeDeviceStatus value. + * @return the systemData value. */ - public DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus() { - return this.innerProperties() == null ? null : this.innerProperties().dataBoxEdgeDeviceStatus(); + public SystemData systemDataPropertiesSystemData() { + return this.innerProperties() == null ? null : this.innerProperties().systemData(); } /** - * Set the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. + * Get the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. * - * @param dataBoxEdgeDeviceStatus the dataBoxEdgeDeviceStatus value to set. - * @return the DataBoxEdgeDeviceInner object itself. + * @return the dataBoxEdgeDeviceStatus value. */ - public DataBoxEdgeDeviceInner withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus) { - if (this.innerProperties() == null) { - this.innerProperties = new DataBoxEdgeDeviceProperties(); - } - this.innerProperties().withDataBoxEdgeDeviceStatus(dataBoxEdgeDeviceStatus); - return this; + public DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus() { + return this.innerProperties() == null ? null : this.innerProperties().dataBoxEdgeDeviceStatus(); } /** @@ -193,20 +250,6 @@ public String description() { return this.innerProperties() == null ? null : this.innerProperties().description(); } - /** - * Set the description property: The Description of the Data Box Edge/Gateway device. - * - * @param description the description value to set. - * @return the DataBoxEdgeDeviceInner object itself. - */ - public DataBoxEdgeDeviceInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new DataBoxEdgeDeviceProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - /** * Get the modelDescription property: The description of the Data Box Edge/Gateway device model. * @@ -216,20 +259,6 @@ public String modelDescription() { return this.innerProperties() == null ? null : this.innerProperties().modelDescription(); } - /** - * Set the modelDescription property: The description of the Data Box Edge/Gateway device model. - * - * @param modelDescription the modelDescription value to set. - * @return the DataBoxEdgeDeviceInner object itself. - */ - public DataBoxEdgeDeviceInner withModelDescription(String modelDescription) { - if (this.innerProperties() == null) { - this.innerProperties = new DataBoxEdgeDeviceProperties(); - } - this.innerProperties().withModelDescription(modelDescription); - return this; - } - /** * Get the deviceType property: The type of the Data Box Edge/Gateway device. * @@ -248,20 +277,6 @@ public String friendlyName() { return this.innerProperties() == null ? null : this.innerProperties().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) { - if (this.innerProperties() == null) { - this.innerProperties = new DataBoxEdgeDeviceProperties(); - } - this.innerProperties().withFriendlyName(friendlyName); - return this; - } - /** * Get the culture property: The Data Box Edge/Gateway device culture. * @@ -334,6 +349,56 @@ public Integer 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; + } + + /** + * Get the kubernetesWorkloadProfile property: Kubernetes Workload Profile. + * + * @return the kubernetesWorkloadProfile value. + */ + public String kubernetesWorkloadProfile() { + return this.innerProperties() == null ? null : this.innerProperties().kubernetesWorkloadProfile(); + } + /** * Validates the instance. * @@ -350,6 +415,9 @@ public void validate() { if (sku() != null) { sku().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/fluent/models/DataBoxEdgeDeviceProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/DataBoxEdgeDeviceProperties.java index e870a228850f..22b04e629977 100644 --- 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 @@ -5,8 +5,12 @@ 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; @@ -14,10 +18,16 @@ /** 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") + @JsonProperty(value = "dataBoxEdgeDeviceStatus", access = JsonProperty.Access.WRITE_ONLY) private DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus; /* @@ -29,13 +39,13 @@ public final class DataBoxEdgeDeviceProperties { /* * The Description of the Data Box Edge/Gateway device. */ - @JsonProperty(value = "description") + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; /* * The description of the Data Box Edge/Gateway device model. */ - @JsonProperty(value = "modelDescription") + @JsonProperty(value = "modelDescription", access = JsonProperty.Access.WRITE_ONLY) private String modelDescription; /* @@ -47,7 +57,7 @@ public final class DataBoxEdgeDeviceProperties { /* * The Data Box Edge/Gateway device name. */ - @JsonProperty(value = "friendlyName") + @JsonProperty(value = "friendlyName", access = JsonProperty.Access.WRITE_ONLY) private String friendlyName; /* @@ -98,28 +108,50 @@ public final class DataBoxEdgeDeviceProperties { @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; + + /* + * Kubernetes Workload Profile + */ + @JsonProperty(value = "kubernetesWorkloadProfile", access = JsonProperty.Access.WRITE_ONLY) + private String kubernetesWorkloadProfile; + /** Creates an instance of DataBoxEdgeDeviceProperties class. */ public DataBoxEdgeDeviceProperties() { } /** - * Get the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. + * Get the systemData property: DataBoxEdge Device Properties. * - * @return the dataBoxEdgeDeviceStatus value. + * @return the systemData value. */ - public DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus() { - return this.dataBoxEdgeDeviceStatus; + public SystemData systemData() { + return this.systemData; } /** - * Set the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. + * Get the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device. * - * @param dataBoxEdgeDeviceStatus the dataBoxEdgeDeviceStatus value to set. - * @return the DataBoxEdgeDeviceProperties object itself. + * @return the dataBoxEdgeDeviceStatus value. */ - public DataBoxEdgeDeviceProperties withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus) { - this.dataBoxEdgeDeviceStatus = dataBoxEdgeDeviceStatus; - return this; + public DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus() { + return this.dataBoxEdgeDeviceStatus; } /** @@ -140,17 +172,6 @@ public String description() { return this.description; } - /** - * Set the description property: The Description of the Data Box Edge/Gateway device. - * - * @param description the description value to set. - * @return the DataBoxEdgeDeviceProperties object itself. - */ - public DataBoxEdgeDeviceProperties withDescription(String description) { - this.description = description; - return this; - } - /** * Get the modelDescription property: The description of the Data Box Edge/Gateway device model. * @@ -160,17 +181,6 @@ public String modelDescription() { return this.modelDescription; } - /** - * Set the modelDescription property: The description of the Data Box Edge/Gateway device model. - * - * @param modelDescription the modelDescription value to set. - * @return the DataBoxEdgeDeviceProperties object itself. - */ - public DataBoxEdgeDeviceProperties withModelDescription(String modelDescription) { - this.modelDescription = modelDescription; - return this; - } - /** * Get the deviceType property: The type of the Data Box Edge/Gateway device. * @@ -189,17 +199,6 @@ public String friendlyName() { return this.friendlyName; } - /** - * Set the friendlyName property: The Data Box Edge/Gateway device name. - * - * @param friendlyName the friendlyName value to set. - * @return the DataBoxEdgeDeviceProperties object itself. - */ - public DataBoxEdgeDeviceProperties withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - /** * Get the culture property: The Data Box Edge/Gateway device culture. * @@ -272,11 +271,67 @@ 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; + } + + /** + * Get the kubernetesWorkloadProfile property: Kubernetes Workload Profile. + * + * @return the kubernetesWorkloadProfile value. + */ + public String kubernetesWorkloadProfile() { + return this.kubernetesWorkloadProfile; + } + /** * 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 be42df441e67..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,61 +5,71 @@ package com.azure.resourcemanager.databoxedge.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.databoxedge.models.ShipmentType; +import com.azure.resourcemanager.databoxedge.models.SkuAvailability; +import com.azure.resourcemanager.databoxedge.models.SkuCapability; import com.azure.resourcemanager.databoxedge.models.SkuCost; import com.azure.resourcemanager.databoxedge.models.SkuLocationInfo; import com.azure.resourcemanager.databoxedge.models.SkuName; -import com.azure.resourcemanager.databoxedge.models.SkuRestriction; +import com.azure.resourcemanager.databoxedge.models.SkuSignupOption; import com.azure.resourcemanager.databoxedge.models.SkuTier; +import com.azure.resourcemanager.databoxedge.models.SkuVersion; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** SkuInformation object. */ +/** The Sku information. */ @Immutable -public final class ResourceTypeSkuInner { +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; @@ -71,13 +81,37 @@ 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 ResourceTypeSkuInner class. */ - public ResourceTypeSkuInner() { + /** Creates an instance of DataBoxEdgeSkuInner class. */ + public DataBoxEdgeSkuInner() { } /** @@ -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/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 index a6f99340fd31..0d982af377b4 100644 --- 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 @@ -6,7 +6,10 @@ 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; @@ -40,6 +43,24 @@ public final class IoTRoleProperties { @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. */ @@ -130,6 +151,55 @@ public IoTRoleProperties withShareMappings(List shareMappings) { return this; } + /** + * Get the ioTEdgeAgentInfo property: Iot edge agent details to download the agent and bootstrap iot runtime. + * + * @return the ioTEdgeAgentInfo value. + */ + public IoTEdgeAgentInfo ioTEdgeAgentInfo() { + return this.ioTEdgeAgentInfo; + } + + /** + * Set the ioTEdgeAgentInfo property: Iot edge agent details to download the agent and bootstrap iot runtime. + * + * @param ioTEdgeAgentInfo the ioTEdgeAgentInfo value to set. + * @return the 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. * @@ -180,6 +250,12 @@ public void 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( 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 b25b8d1b06a4..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,6 +5,7 @@ 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.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.NetworkAdapter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -19,6 +20,12 @@ public final class NetworkSettingsInner extends ArmBaseModel { @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private NetworkSettingsProperties innerProperties; + /* + * 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() { } @@ -32,6 +39,15 @@ 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. * 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 daca3cc03096..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 @@ -18,6 +18,12 @@ public final class OperationInner { @JsonProperty(value = "name") private String name; + /* + * Is data action. + */ + @JsonProperty(value = "isDataAction") + private Boolean isDataAction; + /* * Properties displayed for the operation. */ @@ -60,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. * 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 cfbcfa2ed793..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,10 +5,12 @@ 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.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.JsonProperty; import java.util.List; @@ -16,6 +18,18 @@ /** The order details. */ @Fluent public final class OrderInner extends ArmBaseModel { + /* + * It specify the order api version. + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private String kind; + + /* + * Metadata pertaining to creation and last modification of Order + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * The order properties. */ @@ -26,6 +40,24 @@ public final class OrderInner extends ArmBaseModel { public OrderInner() { } + /** + * Get the kind property: It specify the order api version. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of Order. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the innerProperties property: The order properties. * @@ -35,6 +67,15 @@ private OrderProperties innerProperties() { return this.innerProperties; } + /** + * Get the orderId property: It specify the order resource id. + * + * @return the orderId value. + */ + public String orderId() { + return this.innerProperties() == null ? null : this.innerProperties().orderId(); + } + /** * Get the contactInformation property: The contact details. * @@ -90,20 +131,6 @@ public OrderStatus currentStatus() { return this.innerProperties() == null ? null : this.innerProperties().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) { - if (this.innerProperties() == null) { - this.innerProperties = new OrderProperties(); - } - this.innerProperties().withCurrentStatus(currentStatus); - return this; - } - /** * Get the orderHistory property: List of status changes in the order. * @@ -142,6 +169,29 @@ public List 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; + } + /** * Validates the instance. * 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 index e58bae32a1cc..fabff91788f2 100644 --- 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 @@ -9,6 +9,7 @@ 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; @@ -16,6 +17,12 @@ /** 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. */ @@ -25,13 +32,13 @@ public final class OrderProperties { /* * The shipping address. */ - @JsonProperty(value = "shippingAddress", required = true) + @JsonProperty(value = "shippingAddress") private Address shippingAddress; /* * Current status of the order. */ - @JsonProperty(value = "currentStatus") + @JsonProperty(value = "currentStatus", access = JsonProperty.Access.WRITE_ONLY) private OrderStatus currentStatus; /* @@ -60,10 +67,25 @@ public final class OrderProperties { @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. * @@ -113,17 +135,6 @@ public OrderStatus currentStatus() { return this.currentStatus; } - /** - * Set the currentStatus property: Current status of the order. - * - * @param currentStatus the currentStatus value to set. - * @return the OrderProperties object itself. - */ - public OrderProperties withCurrentStatus(OrderStatus currentStatus) { - this.currentStatus = currentStatus; - return this; - } - /** * Get the orderHistory property: List of status changes in the order. * @@ -162,6 +173,26 @@ public List returnTrackingInfo() { return this.returnTrackingInfo; } + /** + * Get the shipmentType property: ShipmentType of the order. + * + * @return the shipmentType value. + */ + public ShipmentType shipmentType() { + return this.shipmentType; + } + + /** + * Set the shipmentType property: ShipmentType of the order. + * + * @param shipmentType the shipmentType value to set. + * @return the OrderProperties object itself. + */ + public OrderProperties withShipmentType(ShipmentType shipmentType) { + this.shipmentType = shipmentType; + return this; + } + /** * Validates the instance. * @@ -176,11 +207,7 @@ public void validate() { } else { contactInformation().validate(); } - if (shippingAddress() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property shippingAddress in model OrderProperties")); - } else { + if (shippingAddress() != null) { shippingAddress().validate(); } if (currentStatus() != null) { 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/RoleInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/RoleInner.java index 1f1c1d65b209..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,8 +5,13 @@ 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.ArmBaseModel; +import com.azure.resourcemanager.databoxedge.models.CloudEdgeManagementRole; import com.azure.resourcemanager.databoxedge.models.IoTRole; +import com.azure.resourcemanager.databoxedge.models.KubernetesRole; +import com.azure.resourcemanager.databoxedge.models.MecRole; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,13 +23,33 @@ 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 { + /* + * 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/ShareInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/ShareInner.java index f6668e3e4598..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,6 +5,7 @@ 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.AzureContainerInfo; @@ -28,6 +29,12 @@ public final class ShareInner extends ArmBaseModel { @JsonProperty(value = "properties", required = true) private ShareProperties innerProperties = new ShareProperties(); + /* + * Metadata pertaining to creation and last modification of Share + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of ShareInner class. */ public ShareInner() { } @@ -41,6 +48,15 @@ private ShareProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Metadata pertaining to creation and last modification of Share. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the description property: Description for the share. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountCredentialInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountCredentialInner.java index ad324874384c..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,6 +5,7 @@ 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.AccountType; import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; @@ -21,6 +22,12 @@ public final class StorageAccountCredentialInner extends ArmBaseModel { @JsonProperty(value = "properties", required = true) private StorageAccountCredentialProperties innerProperties = new StorageAccountCredentialProperties(); + /* + * Metadata pertaining to creation and last modification of StorageAccountCredential + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of StorageAccountCredentialInner class. */ public StorageAccountCredentialInner() { } @@ -34,6 +41,15 @@ private StorageAccountCredentialProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Metadata pertaining to creation and last modification of StorageAccountCredential. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the alias property: Alias for the storage account. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/StorageAccountInner.java index ba76421463a1..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,6 +5,7 @@ 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.DataPolicy; @@ -20,6 +21,12 @@ public final class StorageAccountInner extends ArmBaseModel { @JsonProperty(value = "properties", required = true) private StorageAccountProperties innerProperties = new StorageAccountProperties(); + /* + * Metadata pertaining to creation and last modification of StorageAccount + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of StorageAccountInner class. */ public StorageAccountInner() { } @@ -33,6 +40,15 @@ private StorageAccountProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Metadata pertaining to creation and last modification of StorageAccount. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the description property: Description for the storage Account. * 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 index 39bf40c9827e..4bd8286341c0 100644 --- 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 @@ -5,6 +5,7 @@ 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; @@ -27,7 +28,7 @@ public final class StorageAccountProperties { /* * Data policy of the storage Account. */ - @JsonProperty(value = "dataPolicy") + @JsonProperty(value = "dataPolicy", required = true) private DataPolicy dataPolicy; /* @@ -157,5 +158,13 @@ public Integer containerCount() { * @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 ebc2fb34af74..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,9 +5,11 @@ 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.ArmBaseModel; import com.azure.resourcemanager.databoxedge.models.FileEventTrigger; import com.azure.resourcemanager.databoxedge.models.PeriodicTimerEventTrigger; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -25,10 +27,25 @@ }) @Immutable public class TriggerInner extends ArmBaseModel { + /* + * 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 244ab7117c0e..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,8 +5,11 @@ 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.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; @@ -21,6 +24,12 @@ public final class UpdateSummaryInner extends ArmBaseModel { @JsonProperty(value = "properties") private UpdateSummaryProperties innerProperties; + /* + * Metadata pertaining to creation and last modification of UpdateSummary + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of UpdateSummaryInner class. */ public UpdateSummaryInner() { } @@ -34,6 +43,15 @@ private UpdateSummaryProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Metadata pertaining to creation and last modification of UpdateSummary. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the deviceVersionNumber property: The current version of the device in format: 1.2.17312.13.",. * @@ -128,6 +146,29 @@ public UpdateSummaryInner withLastCompletedScanJobDateTime(OffsetDateTime lastCo return this; } + /** + * Get the lastSuccessfulScanJobTime property: Time when the last scan job is successfully completed. + * + * @return the lastSuccessfulScanJobTime value. + */ + public OffsetDateTime lastSuccessfulScanJobTime() { + return this.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; + } + /** * Get the lastCompletedDownloadJobDateTime property: The time when the last Download job was completed * (success/cancelled/failed) on the appliance. @@ -138,6 +179,50 @@ public OffsetDateTime 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; + } + /** * Get the lastCompletedInstallJobDateTime property: The time when the last Install job was completed * (success/cancelled/failed) on the appliance. @@ -148,6 +233,24 @@ public OffsetDateTime 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(); + } + /** * Get the totalNumberOfUpdatesAvailable property: The number of updates available for the current device version as * per the last device scan. @@ -242,6 +345,15 @@ public List 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(); + } + /** * Get the totalUpdateSizeInBytes property: The total size of updates available for download in bytes. * @@ -251,6 +363,15 @@ public Double 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(); + } + /** * Validates the instance. * 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 index 5b01f7b99eea..60edbf453281 100644 --- 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 @@ -6,6 +6,8 @@ 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; @@ -38,18 +40,54 @@ public final class UpdateSummaryProperties { @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. */ @@ -110,12 +148,24 @@ public final class UpdateSummaryProperties { @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() { } @@ -202,6 +252,26 @@ public UpdateSummaryProperties withLastCompletedScanJobDateTime(OffsetDateTime l 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. @@ -212,6 +282,48 @@ 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. @@ -222,6 +334,24 @@ public OffsetDateTime lastCompletedInstallJobDateTime() { return this.lastCompletedInstallJobDateTime; } + /** + * Get the lastCompletedInstallJobId property: JobId of the last ran install job.(Can be success/cancelled/failed). + * + * @return the lastCompletedInstallJobId value. + */ + public String lastCompletedInstallJobId() { + return this.lastCompletedInstallJobId; + } + + /** + * Get the lastInstallJobStatus property: JobStatus of the last ran install job. + * + * @return the lastInstallJobStatus value. + */ + public JobStatus lastInstallJobStatus() { + return this.lastInstallJobStatus; + } + /** * Get the totalNumberOfUpdatesAvailable property: The number of updates available for the current device version as * per the last device scan. @@ -316,6 +446,15 @@ public List updateTitles() { return this.updateTitles; } + /** + * Get the updates property: The list of updates available for install. + * + * @return the updates value. + */ + public List updates() { + return this.updates; + } + /** * Get the totalUpdateSizeInBytes property: The total size of updates available for download in bytes. * @@ -325,11 +464,23 @@ 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/UserInner.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UserInner.java index d289df90d76f..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,6 +5,7 @@ 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.AsymmetricEncryptedSecret; @@ -22,6 +23,12 @@ public final class UserInner extends ArmBaseModel { @JsonProperty(value = "properties", required = true) private UserProperties innerProperties = new UserProperties(); + /* + * Metadata pertaining to creation and last modification of User + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of UserInner class. */ public UserInner() { } @@ -35,6 +42,15 @@ 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. * @@ -68,21 +84,6 @@ public List shareAccessRights() { return this.innerProperties() == null ? null : this.innerProperties().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) { - if (this.innerProperties() == null) { - this.innerProperties = new UserProperties(); - } - this.innerProperties().withShareAccessRights(shareAccessRights); - return this; - } - /** * Get the userType property: Type of the user. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UserProperties.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/UserProperties.java index d13c4d5fa112..6848bfab405d 100644 --- 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 @@ -24,7 +24,7 @@ public final class UserProperties { /* * List of shares that the user has rights on. This field should not be specified during user creation. */ - @JsonProperty(value = "shareAccessRights") + @JsonProperty(value = "shareAccessRights", access = JsonProperty.Access.WRITE_ONLY) private List shareAccessRights; /* @@ -67,18 +67,6 @@ public List shareAccessRights() { return this.shareAccessRights; } - /** - * Set the shareAccessRights property: List of shares that the user has rights on. This field should not be - * specified during user creation. - * - * @param shareAccessRights the shareAccessRights value to set. - * @return the UserProperties object itself. - */ - public UserProperties withShareAccessRights(List shareAccessRights) { - this.shareAccessRights = shareAccessRights; - return this; - } - /** * Get the userType property: Type of the user. * diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonImpl.java new file mode 100644 index 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..8bd73a8c8870 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AddonsClientImpl.java @@ -0,0 +1,1181 @@ +// Copyright (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 this.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 this + .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 this.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 this.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 6b8a74482c6c..8065889c3996 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 @@ -57,8 +57,7 @@ public final class AlertsClientImpl implements AlertsClient { public interface AlertsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/alerts") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDataBoxEdgeDevice( @@ -72,8 +71,7 @@ Mono> listByDataBoxEdgeDevice( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/alerts/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SkusClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusClientImpl.java similarity index 54% rename from sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SkusClientImpl.java rename to sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusClientImpl.java index 9f2a903fba01..1ef1fe5230e4 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SkusClientImpl.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusClientImpl.java @@ -25,61 +25,69 @@ 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.SkusClient; -import com.azure.resourcemanager.databoxedge.fluent.models.ResourceTypeSkuInner; -import com.azure.resourcemanager.databoxedge.models.SkuInformationList; +import com.azure.resourcemanager.databoxedge.fluent.AvailableSkusClient; +import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeSkuInner; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeSkuList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SkusClient. */ -public final class SkusClientImpl implements SkusClient { +/** 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 SkusService service; + private final AvailableSkusService service; /** The service client containing this operation class. */ private final DataBoxEdgeManagementClientImpl client; /** - * Initializes an instance of SkusClientImpl. + * Initializes an instance of AvailableSkusClientImpl. * * @param client the instance of the service client containing this operation class. */ - SkusClientImpl(DataBoxEdgeManagementClientImpl client) { - this.service = RestProxy.create(SkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + AvailableSkusClientImpl(DataBoxEdgeManagementClientImpl client) { + this.service = + RestProxy.create(AvailableSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for DataBoxEdgeManagementClientSkus to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for DataBoxEdgeManagementClientAvailableSkus to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "DataBoxEdgeManagemen") - public interface SkusService { + public interface AvailableSkusService { @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/skus") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/availableSkus") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> list( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * - * @param filter Specify $filter='location eq <location>' to filter on location. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of SKU Information objects along with {@link PagedResponse} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter) { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono .error( @@ -101,20 +109,23 @@ private Mono> listSinglePageAsync(String fil this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), - filter, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * - * @param filter Specify $filter='location eq <location>' to filter on location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -123,7 +134,7 @@ private Mono> listSinglePageAsync(String fil * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Context context) { + private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -143,82 +154,144 @@ private Mono> listSinglePageAsync(String fil this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), - filter, accept, context) .map( res -> new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * - * @param filter Specify $filter='location eq <location>' to filter on location. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of SKU Information objects as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(filter)); + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * + * @param 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() { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter)); + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * - * @param filter Specify $filter='location eq <location>' to filter on location. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU Information objects as paginated response with {@link PagedFlux}. + * @return list of SKU Information objects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, context)); + public PagedIterable list() { + return new PagedIterable<>(listAsync()); } /** - * List all the available Skus in the region and information related to them. + * List all the available Skus and information related to them. * + * @param 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() { - final String filter = null; - return new PagedIterable<>(listAsync(filter)); + 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())); } /** - * List all the available Skus in the region and information related to them. + * Get the next page of items. * - * @param filter Specify $filter='location eq <location>' to filter on location. + * @param nextLink The 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 as paginated response with {@link PagedIterable}. + * @return list of SKU Information objects along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Context context) { - return new PagedIterable<>(listAsync(filter, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/AvailableSkusImpl.java new file mode 100644 index 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 41065fd948fd..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(); } 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 4509586d8778..49ccdfe434e3 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 @@ -66,8 +66,7 @@ public final class BandwidthSchedulesClientImpl implements BandwidthSchedulesCli public interface BandwidthSchedulesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDataBoxEdgeDevice( @@ -81,8 +80,7 @@ Mono> listByDataBoxEdgeDevice( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -97,8 +95,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -114,8 +111,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( 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 28e0532ada95..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(); } 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 4b8c8bbfe16e..bc525ae4c2aa 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 @@ -67,8 +67,7 @@ public final class ContainersClientImpl implements ContainersClient { public interface ContainersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByStorageAccount( @@ -83,8 +82,7 @@ Mono> listByStorageAccount( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -100,8 +98,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -118,8 +115,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}") @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -135,9 +131,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}" - + "/refresh") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}/refresh") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> refresh( 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 bd75c3405b34..060606e94f67 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,22 @@ 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 String kubernetesWorkloadProfile() { + return this.innerModel().kubernetesWorkloadProfile(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -157,7 +198,8 @@ public DataBoxEdgeDevice create() { serviceManager .serviceClient() .getDevices() - .createOrUpdate(deviceName, resourceGroupName, this.innerModel(), Context.NONE); + .createOrUpdateWithResponse(deviceName, resourceGroupName, this.innerModel(), Context.NONE) + .getValue(); return this; } @@ -166,7 +208,8 @@ public DataBoxEdgeDevice create(Context context) { serviceManager .serviceClient() .getDevices() - .createOrUpdate(deviceName, resourceGroupName, this.innerModel(), context); + .createOrUpdateWithResponse(deviceName, resourceGroupName, this.innerModel(), context) + .getValue(); return this; } @@ -237,6 +280,14 @@ public void downloadUpdates(Context context) { serviceManager.devices().downloadUpdates(deviceName, resourceGroupName, context); } + 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); } @@ -261,6 +312,17 @@ public void scanForUpdates(Context context) { serviceManager.devices().scanForUpdates(deviceName, resourceGroupName, context); } + 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( UploadCertificateRequest parameters, Context context) { return serviceManager @@ -302,23 +364,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/DataBoxEdgeManagementClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DataBoxEdgeManagementClientImpl.java index 9ba6f294c7f0..5f857011dc60 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 @@ -22,21 +22,27 @@ 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; @@ -135,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; @@ -171,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; @@ -231,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; @@ -291,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; } /** @@ -337,23 +415,29 @@ public SkusClient getSkus() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2019-08-01"; + this.apiVersion = "2023-07-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); } /** 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..3077e3702126 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityChecksClientImpl.java @@ -0,0 +1,442 @@ +// Copyright (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 this + .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 this + .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/DeviceCapacityInfoesClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityInfoesClientImpl.java new file mode 100644 index 000000000000..c8ba66a2efeb --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/DeviceCapacityInfoesClientImpl.java @@ -0,0 +1,213 @@ +// Copyright (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.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.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 DeviceCapacityInfoesClient. */ +public final class DeviceCapacityInfoesClientImpl implements DeviceCapacityInfoesClient { + /** The proxy service used to perform REST calls. */ + private final DeviceCapacityInfoesService service; + + /** The service client containing this operation class. */ + private final DataBoxEdgeManagementClientImpl client; + + /** + * Initializes an instance of DeviceCapacityInfoesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DeviceCapacityInfoesClientImpl(DataBoxEdgeManagementClientImpl client) { + this.service = + RestProxy + .create(DeviceCapacityInfoesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataBoxEdgeManagementClientDeviceCapacityInfoes to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataBoxEdgeManagemen") + public interface DeviceCapacityInfoesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/deviceCapacityInfo/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeviceCapacityInfo( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("deviceName") String deviceName, + @HeaderParam("Accept") String accept, + 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 ManagementException 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} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeviceCapacityInfoWithResponseAsync( + String resourceGroupName, String deviceName) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getDeviceCapacityInfo( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + deviceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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 ManagementException 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} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeviceCapacityInfoWithResponseAsync( + String resourceGroupName, String deviceName, 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getDeviceCapacityInfo( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + deviceName, + accept, + 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 ManagementException 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeviceCapacityInfoAsync(String resourceGroupName, String deviceName) { + return getDeviceCapacityInfoWithResponseAsync(resourceGroupName, deviceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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 ManagementException 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) + public Response getDeviceCapacityInfoWithResponse( + String resourceGroupName, String deviceName, Context context) { + return getDeviceCapacityInfoWithResponseAsync(resourceGroupName, deviceName, context).block(); + } + + /** + * 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 ManagementException 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) + 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 370d5d126a68..9af2ea5b9ef5 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 @@ -36,9 +36,11 @@ import com.azure.resourcemanager.databoxedge.fluent.DevicesClient; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceExtendedInfoInner; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceInner; +import com.azure.resourcemanager.databoxedge.fluent.models.GenerateCertResponseInner; import com.azure.resourcemanager.databoxedge.fluent.models.NetworkSettingsInner; import com.azure.resourcemanager.databoxedge.fluent.models.UpdateSummaryInner; import com.azure.resourcemanager.databoxedge.fluent.models.UploadCertificateResponseInner; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceList; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevicePatch; import com.azure.resourcemanager.databoxedge.models.SecuritySettings; @@ -86,8 +88,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -101,8 +102,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -116,11 +116,10 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("deviceName") String deviceName, @PathParam("subscriptionId") String subscriptionId, @@ -132,8 +131,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -147,8 +145,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -163,8 +160,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/downloadUpdates") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> downloadUpdates( @@ -178,8 +174,21 @@ Mono>> downloadUpdates( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/getExtendedInformation") + "/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/dataBoxEdgeDevices/{deviceName}/getExtendedInformation") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getExtendedInformation( @@ -193,8 +202,7 @@ Mono> getExtendedInformation( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/installUpdates") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> installUpdates( @@ -208,8 +216,7 @@ Mono>> installUpdates( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/networkSettings/default") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getNetworkSettings( @@ -223,8 +230,7 @@ Mono> getNetworkSettings( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/scanForUpdates") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> scanForUpdates( @@ -238,8 +244,7 @@ Mono>> scanForUpdates( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update") @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdateSecuritySettings( @@ -252,10 +257,24 @@ 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" - + "/dataBoxEdgeDevices/{deviceName}/updateSummary/default") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getUpdateSummary( @@ -269,8 +288,7 @@ Mono> getUpdateSummary( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/uploadCertificate") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> uploadCertificate( @@ -841,7 +859,7 @@ public DataBoxEdgeDeviceInner getByResourceGroup(String resourceGroupName, Strin * @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 @@ -898,7 +916,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 @@ -939,95 +957,6 @@ private Mono>> createOrUpdateWithResponseAsync( context); } - /** - * Creates or updates a Data Box Edge/Data Box Gateway resource. - * - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param dataBoxEdgeDevice The resource object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - 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, - this.client.getContext()); - } - - /** - * 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 {@link PollerFlux} for polling of the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - 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 {@link SyncPoller} for polling of the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DataBoxEdgeDeviceInner> beginCreateOrUpdate( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice) { - return this.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 {@link SyncPoller} for polling of the Data Box Edge/Gateway device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DataBoxEdgeDeviceInner> beginCreateOrUpdate( - String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice, Context context) { - return this.beginCreateOrUpdateAsync(deviceName, resourceGroupName, dataBoxEdgeDevice, context).getSyncPoller(); - } - /** * Creates or updates a Data Box Edge/Data Box Gateway resource. * @@ -1042,9 +971,8 @@ public SyncPoller, DataBoxEdgeDeviceInner> be @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice) { - return beginCreateOrUpdateAsync(deviceName, resourceGroupName, dataBoxEdgeDevice) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return createOrUpdateWithResponseAsync(deviceName, resourceGroupName, dataBoxEdgeDevice) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1057,14 +985,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 on successful completion of {@link Mono}. + * @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(); } /** @@ -1081,25 +1007,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(); } /** @@ -1722,14 +1630,158 @@ 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 along with {@link + * @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) @@ -1771,7 +1823,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. @@ -1779,7 +1831,7 @@ private Mono> getExtendedInformatio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device along with {@link + * @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) @@ -1818,15 +1870,15 @@ 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 on successful completion - * of {@link Mono}. + * @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( @@ -1836,7 +1888,7 @@ private Mono getExtendedInformationAsync( } /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -1844,7 +1896,7 @@ private Mono getExtendedInformationAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device along with {@link * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1854,14 +1906,14 @@ public Response getExtendedInformationWithRe } /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return additional information for the specified Data Box Edge/Data Box Gateway device. + * @return additional information for the specified Azure Stack Edge/Data Box Gateway device. */ @ServiceMethod(returns = ReturnType.SINGLE) public DataBoxEdgeDeviceExtendedInfoInner getExtendedInformation(String deviceName, String resourceGroupName) { @@ -2739,6 +2791,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. 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 02f29efbe2a6..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,12 +12,15 @@ import com.azure.resourcemanager.databoxedge.fluent.DevicesClient; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceExtendedInfoInner; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceInner; +import com.azure.resourcemanager.databoxedge.fluent.models.GenerateCertResponseInner; import com.azure.resourcemanager.databoxedge.fluent.models.NetworkSettingsInner; import com.azure.resourcemanager.databoxedge.fluent.models.UpdateSummaryInner; import com.azure.resourcemanager.databoxedge.fluent.models.UploadCertificateResponseInner; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevice; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfo; +import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch; import com.azure.resourcemanager.databoxedge.models.Devices; +import com.azure.resourcemanager.databoxedge.models.GenerateCertResponse; import com.azure.resourcemanager.databoxedge.models.NetworkSettings; import com.azure.resourcemanager.databoxedge.models.SecuritySettings; import com.azure.resourcemanager.databoxedge.models.UpdateSummary; @@ -99,6 +102,30 @@ public void downloadUpdates(String deviceName, String resourceGroupName, Context this.serviceClient().downloadUpdates(deviceName, resourceGroupName, context); } + public Response generateCertificateWithResponse( + String deviceName, String resourceGroupName, Context context) { + Response inner = + this.serviceClient().generateCertificateWithResponse(deviceName, resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new GenerateCertResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GenerateCertResponse generateCertificate(String deviceName, String resourceGroupName) { + GenerateCertResponseInner inner = this.serviceClient().generateCertificate(deviceName, resourceGroupName); + if (inner != null) { + return new GenerateCertResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public Response getExtendedInformationWithResponse( String deviceName, String resourceGroupName, Context context) { Response inner = @@ -174,6 +201,34 @@ public void createOrUpdateSecuritySettings( this.serviceClient().createOrUpdateSecuritySettings(deviceName, resourceGroupName, securitySettings, context); } + public Response updateExtendedInformationWithResponse( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters, Context context) { + Response inner = + this + .serviceClient() + .updateExtendedInformationWithResponse(deviceName, resourceGroupName, parameters, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataBoxEdgeDeviceExtendedInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataBoxEdgeDeviceExtendedInfo updateExtendedInformation( + String deviceName, String resourceGroupName, DataBoxEdgeDeviceExtendedInfoPatch parameters) { + DataBoxEdgeDeviceExtendedInfoInner inner = + this.serviceClient().updateExtendedInformation(deviceName, resourceGroupName, parameters); + if (inner != null) { + return new DataBoxEdgeDeviceExtendedInfoImpl(inner, this.manager()); + } else { + return null; + } + } + public Response getUpdateSummaryWithResponse( String deviceName, String resourceGroupName, Context context) { Response inner = 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..0944f0370ae1 --- /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 this + .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 this + .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 this + .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 this + .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 6b8afe15dcae..8e4732db9884 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 @@ -52,8 +52,7 @@ public final class JobsClientImpl implements JobsClient { public interface JobsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/jobs/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/jobs/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( 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..24df11fa15fc --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/MonitoringConfigsClientImpl.java @@ -0,0 +1,1161 @@ +// Copyright (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 this + .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 this + .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 this.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 this.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 0188c0e09973..77db3e62fba5 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 @@ -57,8 +57,7 @@ public final class NodesClientImpl implements NodesClient { public interface NodesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/nodes") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/nodes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDataBoxEdgeDevice( @@ -69,6 +68,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); } /** @@ -120,7 +129,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())); } @@ -172,7 +186,12 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( .map( res -> new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } /** @@ -188,7 +207,9 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, String resourceGroupName) { - return new PagedFlux<>(() -> listByDataBoxEdgeDeviceSinglePageAsync(deviceName, resourceGroupName)); + return new PagedFlux<>( + () -> listByDataBoxEdgeDeviceSinglePageAsync(deviceName, resourceGroupName), + nextLink -> listByDataBoxEdgeDeviceNextSinglePageAsync(nextLink)); } /** @@ -206,7 +227,9 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, Str @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDataBoxEdgeDeviceAsync( String deviceName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByDataBoxEdgeDeviceSinglePageAsync(deviceName, resourceGroupName, context)); + return new PagedFlux<>( + () -> listByDataBoxEdgeDeviceSinglePageAsync(deviceName, resourceGroupName, context), + nextLink -> listByDataBoxEdgeDeviceNextSinglePageAsync(nextLink, context)); } /** @@ -242,4 +265,79 @@ 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/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/OperationsStatusClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OperationsStatusClientImpl.java index 49fcc122e8fb..f6fb6535a734 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 @@ -53,8 +53,7 @@ public final class OperationsStatusClientImpl implements OperationsStatusClient public interface OperationsStatusService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( 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 c060eb09611b..c79fcbdfc360 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; @@ -32,6 +33,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.databoxedge.fluent.OrdersClient; +import com.azure.resourcemanager.databoxedge.fluent.models.DCAccessCodeInner; import com.azure.resourcemanager.databoxedge.fluent.models.OrderInner; import com.azure.resourcemanager.databoxedge.models.OrderList; import java.nio.ByteBuffer; @@ -65,8 +67,7 @@ public final class OrdersClientImpl implements OrdersClient { public interface OrdersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/orders") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDataBoxEdgeDevice( @@ -80,8 +81,7 @@ Mono> listByDataBoxEdgeDevice( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/orders/default") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -95,8 +95,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/orders/default") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -111,8 +110,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/orders/default") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -124,6 +122,20 @@ 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}) @@ -940,6 +952,148 @@ 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. * 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 9070e42dd0f3..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,7 +10,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databoxedge.fluent.OrdersClient; +import com.azure.resourcemanager.databoxedge.fluent.models.DCAccessCodeInner; import com.azure.resourcemanager.databoxedge.fluent.models.OrderInner; +import com.azure.resourcemanager.databoxedge.models.DCAccessCode; import com.azure.resourcemanager.databoxedge.models.Order; import com.azure.resourcemanager.databoxedge.models.Orders; @@ -86,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 ec2fc36b33e1..b58110d65c41 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 @@ -65,8 +65,7 @@ public final class RolesClientImpl implements RolesClient { public interface RolesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/roles") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDataBoxEdgeDevice( @@ -80,8 +79,7 @@ Mono> listByDataBoxEdgeDevice( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/roles/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -96,8 +94,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/roles/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -113,8 +110,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/roles/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( 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 4448abbb67f0..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(); } 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 f1f157574cce..e424c0301460 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 @@ -66,8 +66,7 @@ public final class SharesClientImpl implements SharesClient { public interface SharesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/shares") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDataBoxEdgeDevice( @@ -81,8 +80,7 @@ Mono> listByDataBoxEdgeDevice( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/shares/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -97,8 +95,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/shares/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -114,8 +111,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/shares/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -130,8 +126,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> refresh( 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 4887c2b26db8..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SkusImpl.java +++ /dev/null @@ -1,44 +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; - -public final class SkusImpl implements Skus { - private static 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 ec3829fc6535..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(); } 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 db002040c428..caf0250935b0 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 @@ -68,8 +68,7 @@ public final class StorageAccountCredentialsClientImpl implements StorageAccount public interface StorageAccountCredentialsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDataBoxEdgeDevice( @@ -83,8 +82,7 @@ Mono> listByDataBoxEdgeDevice( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -99,8 +97,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -116,8 +113,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( 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 f2f4d37f0701..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(); } @@ -150,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; @@ -160,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 7b639559d040..db7f0a8e0e7e 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 @@ -66,8 +66,7 @@ public final class StorageAccountsClientImpl implements StorageAccountsClient { public interface StorageAccountsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccounts") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDataBoxEdgeDevice( @@ -81,8 +80,7 @@ Mono> listByDataBoxEdgeDevice( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -97,8 +95,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -114,8 +111,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}") @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -140,7 +136,7 @@ Mono> listByDataBoxEdgeDeviceNext( } /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -198,7 +194,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. @@ -254,7 +250,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePa } /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -272,7 +268,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. @@ -292,7 +288,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync( } /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -308,7 +304,7 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceN } /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SupportPackagesClientImpl.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SupportPackagesClientImpl.java new file mode 100644 index 000000000000..3dea075efc45 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/SupportPackagesClientImpl.java @@ -0,0 +1,361 @@ +// Copyright (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 this + .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 this + .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 85a9ce9587ba..4e9fd239e00e 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 @@ -65,8 +65,7 @@ public final class TriggersClientImpl implements TriggersClient { public interface TriggersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/triggers") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDataBoxEdgeDevice( @@ -81,8 +80,7 @@ Mono> listByDataBoxEdgeDevice( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/triggers/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -97,8 +95,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/triggers/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -114,8 +111,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/triggers/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( 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 1caf4438d4fc..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(); } @@ -154,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 a689b656aa08..2aa88683c600 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 @@ -65,8 +65,7 @@ public final class UsersClientImpl implements UsersClient { public interface UsersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/users") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDataBoxEdgeDevice( @@ -81,8 +80,7 @@ Mono> listByDataBoxEdgeDevice( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/users/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -97,8 +95,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/users/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -114,8 +111,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge" - + "/dataBoxEdgeDevices/{deviceName}/users/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -144,7 +140,7 @@ Mono> listByDataBoxEdgeDeviceNext( * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -204,7 +200,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -262,7 +258,7 @@ private Mono> listByDataBoxEdgeDeviceSinglePageAsync( * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -301,7 +297,7 @@ private PagedFlux listByDataBoxEdgeDeviceAsync(String deviceName, Str * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -339,7 +335,7 @@ public PagedIterable listByDataBoxEdgeDevice(String deviceName, Strin * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AccessLevel.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AccessLevel.java new file mode 100644 index 000000000000..e45131190cad --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AccessLevel.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; + +/** 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 a new instance of AccessLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AccessLevel() { + } + + /** + * 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/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..30a67d3af2f2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonState.java @@ -0,0 +1,62 @@ +// Copyright (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 a new instance of AddonState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AddonState() { + } + + /** + * 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..205159587fcf --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AddonType.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; + +/** 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 a new instance of AddonType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AddonType() { + } + + /** + * 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 ff42c49c9771..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 @@ -14,7 +14,7 @@ public final class Address { /* * The address line1. */ - @JsonProperty(value = "addressLine1", required = true) + @JsonProperty(value = "addressLine1") private String addressLine1; /* @@ -32,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; /* @@ -203,24 +203,6 @@ public Address withCountry(String country) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (addressLine1() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property addressLine1 in model Address")); - } - if (postalCode() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property postalCode in model Address")); - } - if (city() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property city in model Address")); - } - if (state() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property state in model Address")); - } if (country() == null) { throw LOGGER .logExceptionAsError( diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Alert.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Alert.java index 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/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/Skus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/AvailableSkus.java similarity index 72% 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 d485e5dfcd52..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 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 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/BandwidthSchedule.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/BandwidthSchedule.java index 3f51654fd9a7..a33d763c46d3 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. * @@ -83,11 +91,13 @@ interface Definition DefinitionStages.WithDays, DefinitionStages.WithCreate { } + /** The BandwidthSchedule definition stages. */ interface DefinitionStages { /** The first stage of the BandwidthSchedule definition. */ interface Blank extends WithParentResource { } + /** The stage of the BandwidthSchedule definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -99,6 +109,7 @@ interface WithParentResource { */ WithStart withExistingDataBoxEdgeDevice(String deviceName, String resourceGroupName); } + /** The stage of the BandwidthSchedule definition allowing to specify start. */ interface WithStart { /** @@ -109,6 +120,7 @@ interface WithStart { */ WithStop withStart(String start); } + /** The stage of the BandwidthSchedule definition allowing to specify stop. */ interface WithStop { /** @@ -119,6 +131,7 @@ interface WithStop { */ WithRateInMbps withStop(String stop); } + /** The stage of the BandwidthSchedule definition allowing to specify rateInMbps. */ interface WithRateInMbps { /** @@ -129,6 +142,7 @@ interface WithRateInMbps { */ WithDays withRateInMbps(int rateInMbps); } + /** The stage of the BandwidthSchedule definition allowing to specify days. */ interface WithDays { /** @@ -139,6 +153,7 @@ interface WithDays { */ WithCreate withDays(List days); } + /** * The stage of the BandwidthSchedule 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. @@ -160,6 +175,7 @@ interface WithCreate { BandwidthSchedule create(Context context); } } + /** * Begins update for the BandwidthSchedule resource. * @@ -185,6 +201,7 @@ interface Update */ BandwidthSchedule apply(Context context); } + /** The BandwidthSchedule update stages. */ interface UpdateStages { /** The stage of the BandwidthSchedule update allowing to specify start. */ @@ -197,6 +214,7 @@ interface WithStart { */ Update withStart(String start); } + /** The stage of the BandwidthSchedule update allowing to specify stop. */ interface WithStop { /** @@ -207,6 +225,7 @@ interface WithStop { */ Update withStop(String stop); } + /** The stage of the BandwidthSchedule update allowing to specify rateInMbps. */ interface WithRateInMbps { /** @@ -217,6 +236,7 @@ interface WithRateInMbps { */ Update withRateInMbps(int rateInMbps); } + /** The stage of the BandwidthSchedule update allowing to specify days. */ interface WithDays { /** @@ -228,6 +248,7 @@ interface WithDays { Update withDays(List days); } } + /** * Refreshes the resource to sync with Azure. * 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..c3e5740ab817 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ClusterWitnessType.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.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 a new instance of ClusterWitnessType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterWitnessType() { + } + + /** + * 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/Container.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Container.java index d5021595d005..fccf69af1eda 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. * @@ -80,11 +88,13 @@ interface Definition DefinitionStages.WithDataFormat, DefinitionStages.WithCreate { } + /** The Container definition stages. */ interface DefinitionStages { /** The first stage of the Container definition. */ interface Blank extends WithParentResource { } + /** The stage of the Container definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -98,6 +108,7 @@ interface WithParentResource { WithDataFormat withExistingStorageAccount( String deviceName, String storageAccountName, String resourceGroupName); } + /** The stage of the Container definition allowing to specify dataFormat. */ interface WithDataFormat { /** @@ -108,6 +119,7 @@ interface WithDataFormat { */ WithCreate withDataFormat(AzureContainerDataFormat dataFormat); } + /** * The stage of the Container 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. @@ -129,6 +141,7 @@ interface WithCreate { Container create(Context context); } } + /** * Begins update for the Container resource. * @@ -153,6 +166,7 @@ interface Update extends UpdateStages.WithDataFormat { */ Container apply(Context context); } + /** The Container update stages. */ interface UpdateStages { /** The stage of the Container update allowing to specify dataFormat. */ @@ -166,6 +180,7 @@ interface WithDataFormat { Update withDataFormat(AzureContainerDataFormat dataFormat); } } + /** * Refreshes the resource to sync with Azure. * 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 2dcd7a28c620..58badd9c499a 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,34 @@ 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 kubernetesWorkloadProfile property: Kubernetes Workload Profile. + * + * @return the kubernetesWorkloadProfile value. + */ + String kubernetesWorkloadProfile(); + /** * Gets the region of the resource. * @@ -198,11 +255,13 @@ interface Definition DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } + /** The DataBoxEdgeDevice definition stages. */ interface DefinitionStages { /** The first stage of the DataBoxEdgeDevice definition. */ interface Blank extends WithLocation { } + /** The stage of the DataBoxEdgeDevice definition allowing to specify location. */ interface WithLocation { /** @@ -227,6 +286,7 @@ interface WithLocation { */ WithResourceGroup withRegion(String location); } + /** The stage of the DataBoxEdgeDevice definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -237,6 +297,7 @@ interface WithResourceGroup { */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * The stage of the DataBoxEdgeDevice 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. @@ -245,10 +306,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. * @@ -264,6 +323,7 @@ interface WithCreate */ DataBoxEdgeDevice create(Context context); } + /** The stage of the DataBoxEdgeDevice definition allowing to specify tags. */ interface WithTags { /** @@ -276,6 +336,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the DataBoxEdgeDevice definition allowing to specify sku. */ interface WithSku { /** @@ -286,6 +347,7 @@ interface WithSku { */ WithCreate withSku(Sku sku); } + /** The stage of the DataBoxEdgeDevice definition allowing to specify etag. */ interface WithEtag { /** @@ -296,47 +358,30 @@ interface WithEtag { */ WithCreate withEtag(String etag); } - /** The stage of the DataBoxEdgeDevice definition allowing to specify dataBoxEdgeDeviceStatus. */ - interface WithDataBoxEdgeDeviceStatus { - /** - * Specifies the dataBoxEdgeDeviceStatus property: The status of the Data Box Edge/Gateway device.. - * - * @param dataBoxEdgeDeviceStatus The status of the Data Box Edge/Gateway device. - * @return the next definition stage. - */ - WithCreate withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus dataBoxEdgeDeviceStatus); - } - /** The stage of the DataBoxEdgeDevice definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: The Description of the Data Box Edge/Gateway device.. - * - * @param description The Description of the Data Box Edge/Gateway device. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - /** The stage of the DataBoxEdgeDevice definition allowing to specify modelDescription. */ - interface WithModelDescription { + + /** The stage of the DataBoxEdgeDevice definition allowing to specify identity. */ + interface WithIdentity { /** - * Specifies the modelDescription property: The description of the Data Box Edge/Gateway device model.. + * Specifies the identity property: Msi identity of the resource. * - * @param modelDescription The description of the Data Box Edge/Gateway device model. + * @param identity Msi identity of the resource. * @return the next definition stage. */ - WithCreate withModelDescription(String modelDescription); + WithCreate withIdentity(ResourceIdentity identity); } - /** The stage of the DataBoxEdgeDevice definition allowing to specify friendlyName. */ - interface WithFriendlyName { + + /** The stage of the DataBoxEdgeDevice definition allowing to specify dataResidency. */ + interface WithDataResidency { /** - * Specifies the friendlyName property: The Data Box Edge/Gateway device name.. + * Specifies the dataResidency property: The details of data-residency related properties for this resource. * - * @param friendlyName The Data Box Edge/Gateway device name. + * @param dataResidency The details of data-residency related properties for this resource. * @return the next definition stage. */ - WithCreate withFriendlyName(String friendlyName); + WithCreate withDataResidency(DataResidency dataResidency); } } + /** * Begins update for the DataBoxEdgeDevice resource. * @@ -345,7 +390,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. * @@ -361,6 +406,7 @@ interface Update extends UpdateStages.WithTags { */ DataBoxEdgeDevice apply(Context context); } + /** The DataBoxEdgeDevice update stages. */ interface UpdateStages { /** The stage of the DataBoxEdgeDevice update allowing to specify tags. */ @@ -373,7 +419,30 @@ 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. * @@ -408,23 +477,43 @@ 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 along with {@link + * @return used in activation key generation flow along with {@link Response}. + */ + Response generateCertificateWithResponse(Context context); + + /** + * 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 Azure Stack Edge/Data Box Gateway device along with {@link * Response}. */ Response getExtendedInformationWithResponse(Context context); /** - * 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. * * @throws com.azure.core.management.exception.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. */ DataBoxEdgeDeviceExtendedInfo getExtendedInformation(); @@ -464,6 +553,31 @@ interface WithTags { */ void scanForUpdates(Context context); + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * + * @param parameters The patch object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return additional information for the specified Data Box Edge/Data Box Gateway device along with {@link + * Response}. + */ + 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. * 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..4dddce95e06b --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDeviceKind.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; + +/** 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 a new instance of DataBoxEdgeDeviceKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataBoxEdgeDeviceKind() { + } + + /** + * 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/DataBoxEdgeDevicePatch.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataBoxEdgeDevicePatch.java index b95ff11e94ba..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,6 +5,7 @@ package com.azure.resourcemanager.databoxedge.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDevicePropertiesPatch; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -19,6 +20,18 @@ public final class DataBoxEdgeDevicePatch { @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() { } @@ -43,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/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 80% 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 19ff0b916a54..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,18 +5,18 @@ package com.azure.resourcemanager.databoxedge.models; import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.databoxedge.fluent.models.ResourceTypeSkuInner; +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 { +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 @@ -24,8 +24,8 @@ public final class SkuInformationList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SkuInformationList class. */ - public SkuInformationList() { + /** Creates an instance of DataBoxEdgeSkuList class. */ + public DataBoxEdgeSkuList() { } /** @@ -33,7 +33,7 @@ public SkuInformationList() { * * @return the value value. */ - public List value() { + public List value() { return this.value; } diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataResidency.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataResidency.java new file mode 100644 index 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..0ff8f27de7bf --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/DataResidencyType.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; + +/** 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 a new instance of DataResidencyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataResidencyType() { + } + + /** + * 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/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/Devices.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Devices.java index 89ecbd958516..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 @@ -134,7 +134,7 @@ 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. @@ -142,21 +142,47 @@ 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 along with {@link + * @return used in activation key generation flow along with {@link Response}. + */ + Response generateCertificateWithResponse( + String deviceName, String resourceGroupName, Context 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 com.azure.core.management.exception.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. + * @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 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 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 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. */ DataBoxEdgeDeviceExtendedInfo getExtendedInformation(String deviceName, String resourceGroupName); @@ -258,6 +284,36 @@ 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. 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/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/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/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..ea4218721b06 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/HostPlatformType.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; + +/** 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 a new instance of HostPlatformType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HostPlatformType() { + } + + /** + * 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/InstallationImpact.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/InstallationImpact.java new file mode 100644 index 000000000000..6bfddbc81545 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/InstallationImpact.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.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 a new instance of InstallationImpact value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InstallationImpact() { + } + + /** + * 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 02c55fbdb943..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 @@ -30,7 +30,7 @@ public final class IoTDeviceInfo { private String ioTHostHubId; /* - * IoT device authentication info. + * Encrypted IoT device/IoT edge device connection string. */ @JsonProperty(value = "authentication") private Authentication authentication; @@ -100,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. */ @@ -109,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. 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 ee96df9af6ff..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 @@ -128,6 +128,61 @@ public IoTRole withShareMappings(List shareMappings) { return this; } + /** + * Get the ioTEdgeAgentInfo property: Iot edge agent details to download the agent and bootstrap iot runtime. + * + * @return the ioTEdgeAgentInfo value. + */ + public IoTEdgeAgentInfo ioTEdgeAgentInfo() { + return this.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; + } + /** * Get the roleStatus property: Role status. * 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 d2d9ee4fd207..3d00fecb7112 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobType.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/JobType.java @@ -28,6 +28,15 @@ public final class JobType extends ExpandableStringEnum { /** Static value RefreshContainer for JobType. */ public static final JobType REFRESH_CONTAINER = fromString("RefreshContainer"); + /** Static value Backup for JobType. */ + public static final JobType BACKUP = fromString("Backup"); + + /** Static value Restore for JobType. */ + public static final JobType RESTORE = fromString("Restore"); + + /** Static value TriggerSupportPackage for JobType. */ + public static final JobType TRIGGER_SUPPORT_PACKAGE = fromString("TriggerSupportPackage"); + /** * Creates a new instance of JobType value. * 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..6e8e86e56f6a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KeyVaultSyncStatus.java @@ -0,0 +1,62 @@ +// Copyright (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 a new instance of KeyVaultSyncStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KeyVaultSyncStatus() { + } + + /** + * 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..15f146971ea9 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesNodeType.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.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 a new instance of KubernetesNodeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KubernetesNodeType() { + } + + /** + * 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..5d59c38239ab --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/KubernetesState.java @@ -0,0 +1,62 @@ +// Copyright (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 a new instance of KubernetesState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KubernetesState() { + } + + /** + * 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/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/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/MountPointMap.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MountPointMap.java index 1f3de574824d..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 @@ -29,6 +29,12 @@ public final class MountPointMap { @JsonProperty(value = "mountPoint", access = JsonProperty.Access.WRITE_ONLY) private String mountPoint; + /* + * Mounting type. + */ + @JsonProperty(value = "mountType", access = JsonProperty.Access.WRITE_ONLY) + private MountType mountType; + /* * Role type. */ @@ -77,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. * 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..34d14f3a823a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MountType.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; + +/** 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 a new instance of MountType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MountType() { + } + + /** + * 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..6fd4276f9d9c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MsiIdentityType.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.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 a new instance of MsiIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MsiIdentityType() { + } + + /** + * 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/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 4341ee0a06ac..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 @@ -18,6 +18,12 @@ public final class NodeList { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + /** Creates an instance of NodeList class. */ public NodeList() { } @@ -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/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/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/OrderState.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderState.java index c392d6f66567..0ab39fd67988 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderState.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/OrderState.java @@ -13,8 +13,8 @@ public final class OrderState extends ExpandableStringEnum { /** Static value Untracked for OrderState. */ public static final OrderState UNTRACKED = fromString("Untracked"); - /** Static value AwaitingFulfilment for OrderState. */ - public static final OrderState AWAITING_FULFILMENT = fromString("AwaitingFulfilment"); + /** Static value AwaitingFulfillment for OrderState. */ + public static final OrderState AWAITING_FULFILLMENT = fromString("AwaitingFulfillment"); /** Static value AwaitingPreparation for OrderState. */ public static final OrderState AWAITING_PREPARATION = fromString("AwaitingPreparation"); @@ -52,6 +52,15 @@ public final class OrderState extends ExpandableStringEnum { /** Static value CollectedAtMicrosoft for OrderState. */ public static final OrderState COLLECTED_AT_MICROSOFT = fromString("CollectedAtMicrosoft"); + /** Static value AwaitingPickup for OrderState. */ + public static final OrderState AWAITING_PICKUP = fromString("AwaitingPickup"); + + /** Static value PickupCompleted for OrderState. */ + public static final OrderState PICKUP_COMPLETED = fromString("PickupCompleted"); + + /** Static value AwaitingDrop for OrderState. */ + public static final OrderState AWAITING_DROP = fromString("AwaitingDrop"); + /** * Creates a new instance of OrderState value. * 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 a57d580e2232..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 @@ -32,6 +32,12 @@ 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 @@ -93,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. @@ -114,6 +129,9 @@ public void validate() { .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 d24e873699ae..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 @@ -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/PlatformType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PlatformType.java index 6e1da401928e..8d50a45ff727 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; -/** Host OS supported by the IoT role. */ +/** 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"); 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..543335dfb57a --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/PosixComplianceStatus.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.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 a new instance of PosixComplianceStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PosixComplianceStatus() { + } + + /** + * 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..720f448e43da --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ProactiveDiagnosticsConsent.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; + +/** 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 a new instance of ProactiveDiagnosticsConsent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProactiveDiagnosticsConsent() { + } + + /** + * 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/RemoteApplicationType.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RemoteApplicationType.java new file mode 100644 index 000000000000..f11ffc1b3c7c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RemoteApplicationType.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; + +/** 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 a new instance of RemoteApplicationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RemoteApplicationType() { + } + + /** + * 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..e765dbff8c07 --- /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 final 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..85a3c454acaf --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ResourceMoveStatus.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.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 a new instance of ResourceMoveStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceMoveStatus() { + } + + /** + * 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/RoleStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/RoleStatus.java index faea05291083..7bee366ff38d 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; -/** Role status. */ +/** Local Edge Management Status. */ public final class RoleStatus extends ExpandableStringEnum { /** Static value Enabled for RoleStatus. */ public static final RoleStatus ENABLED = fromString("Enabled"); 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 7d3c43afaf0d..02ef12f8e85d 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 a new instance of RoleTypes value. * 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/Share.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Share.java index eb7b759774fe..8cd78177f2d6 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. * @@ -126,11 +134,13 @@ interface Definition DefinitionStages.WithAccessProtocol, DefinitionStages.WithCreate { } + /** The Share definition stages. */ interface DefinitionStages { /** The first stage of the Share definition. */ interface Blank extends WithParentResource { } + /** The stage of the Share definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -142,6 +152,7 @@ interface WithParentResource { */ WithShareStatus withExistingDataBoxEdgeDevice(String deviceName, String resourceGroupName); } + /** The stage of the Share definition allowing to specify shareStatus. */ interface WithShareStatus { /** @@ -152,6 +163,7 @@ interface WithShareStatus { */ WithMonitoringStatus withShareStatus(ShareStatus shareStatus); } + /** The stage of the Share definition allowing to specify monitoringStatus. */ interface WithMonitoringStatus { /** @@ -162,6 +174,7 @@ interface WithMonitoringStatus { */ WithAccessProtocol withMonitoringStatus(MonitoringStatus monitoringStatus); } + /** The stage of the Share definition allowing to specify accessProtocol. */ interface WithAccessProtocol { /** @@ -172,6 +185,7 @@ interface WithAccessProtocol { */ WithCreate withAccessProtocol(ShareAccessProtocol accessProtocol); } + /** * The stage of the Share 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. @@ -198,6 +212,7 @@ interface WithCreate */ Share create(Context context); } + /** The stage of the Share definition allowing to specify description. */ interface WithDescription { /** @@ -208,6 +223,7 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the Share definition allowing to specify azureContainerInfo. */ interface WithAzureContainerInfo { /** @@ -218,6 +234,7 @@ interface WithAzureContainerInfo { */ WithCreate withAzureContainerInfo(AzureContainerInfo azureContainerInfo); } + /** The stage of the Share definition allowing to specify userAccessRights. */ interface WithUserAccessRights { /** @@ -230,6 +247,7 @@ interface WithUserAccessRights { */ WithCreate withUserAccessRights(List userAccessRights); } + /** The stage of the Share definition allowing to specify clientAccessRights. */ interface WithClientAccessRights { /** @@ -242,6 +260,7 @@ interface WithClientAccessRights { */ WithCreate withClientAccessRights(List clientAccessRights); } + /** The stage of the Share definition allowing to specify refreshDetails. */ interface WithRefreshDetails { /** @@ -252,6 +271,7 @@ interface WithRefreshDetails { */ WithCreate withRefreshDetails(RefreshDetails refreshDetails); } + /** The stage of the Share definition allowing to specify dataPolicy. */ interface WithDataPolicy { /** @@ -263,6 +283,7 @@ interface WithDataPolicy { WithCreate withDataPolicy(DataPolicy dataPolicy); } } + /** * Begins update for the Share resource. * @@ -296,6 +317,7 @@ interface Update */ Share apply(Context context); } + /** The Share update stages. */ interface UpdateStages { /** The stage of the Share update allowing to specify description. */ @@ -308,6 +330,7 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the Share update allowing to specify shareStatus. */ interface WithShareStatus { /** @@ -318,6 +341,7 @@ interface WithShareStatus { */ Update withShareStatus(ShareStatus shareStatus); } + /** The stage of the Share update allowing to specify monitoringStatus. */ interface WithMonitoringStatus { /** @@ -328,6 +352,7 @@ interface WithMonitoringStatus { */ Update withMonitoringStatus(MonitoringStatus monitoringStatus); } + /** The stage of the Share update allowing to specify azureContainerInfo. */ interface WithAzureContainerInfo { /** @@ -338,6 +363,7 @@ interface WithAzureContainerInfo { */ Update withAzureContainerInfo(AzureContainerInfo azureContainerInfo); } + /** The stage of the Share update allowing to specify accessProtocol. */ interface WithAccessProtocol { /** @@ -348,6 +374,7 @@ interface WithAccessProtocol { */ Update withAccessProtocol(ShareAccessProtocol accessProtocol); } + /** The stage of the Share update allowing to specify userAccessRights. */ interface WithUserAccessRights { /** @@ -360,6 +387,7 @@ interface WithUserAccessRights { */ Update withUserAccessRights(List userAccessRights); } + /** The stage of the Share update allowing to specify clientAccessRights. */ interface WithClientAccessRights { /** @@ -372,6 +400,7 @@ interface WithClientAccessRights { */ Update withClientAccessRights(List clientAccessRights); } + /** The stage of the Share update allowing to specify refreshDetails. */ interface WithRefreshDetails { /** @@ -382,6 +411,7 @@ interface WithRefreshDetails { */ Update withRefreshDetails(RefreshDetails refreshDetails); } + /** The stage of the Share update allowing to specify dataPolicy. */ interface WithDataPolicy { /** @@ -393,6 +423,7 @@ interface WithDataPolicy { Update withDataPolicy(DataPolicy dataPolicy); } } + /** * Refreshes the resource to sync with Azure. * 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..a262cf7b309c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/ShipmentType.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.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 a new instance of ShipmentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ShipmentType() { + } + + /** + * 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/SkuAvailability.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuAvailability.java new file mode 100644 index 000000000000..794be2a6005f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuAvailability.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; + +/** 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 a new instance of SkuAvailability value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SkuAvailability() { + } + + /** + * 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 deac8579d626..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 @@ -23,7 +23,7 @@ public final class SkuCost { private Long quantity; /* - * Restriction of the SKU for the location/zone + * The extended unit. */ @JsonProperty(value = "extendedUnit", access = JsonProperty.Access.WRITE_ONLY) private String extendedUnit; @@ -51,7 +51,7 @@ public Long quantity() { } /** - * Get the extendedUnit property: Restriction of the SKU for the location/zone. + * Get the extendedUnit property: The extended unit. * * @return the extendedUnit value. */ diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuName.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuName.java index b69da2e01fcd..96e1d1b8bf62 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuName.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuName.java @@ -37,6 +37,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 a new instance of SkuName value. * 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 7982e19ba7b0..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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The restrictions because of which SKU cannot be used. */ -@Immutable -public final class SkuRestriction { - /* - * 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; - - /** Creates an instance of SkuRestriction class. */ - public SkuRestriction() { - } - - /** - * 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 f160a25d385f..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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The restriction info with locations and zones. */ -@Immutable -public final class SkuRestrictionInfo { - /* - * 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; - - /** Creates an instance of SkuRestrictionInfo class. */ - public SkuRestrictionInfo() { - } - - /** - * 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 a6de66324181..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuRestrictionReasonCode.java +++ /dev/null @@ -1,48 +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; - -/** The SKU restriction reason. */ -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 a new instance of SkuRestrictionReasonCode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SkuRestrictionReasonCode() { - } - - /** - * 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); - } - - /** - * Gets known SkuRestrictionReasonCode values. - * - * @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..54a8bac7d881 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuSignupOption.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; + +/** 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 a new instance of SkuSignupOption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SkuSignupOption() { + } + + /** + * 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/SkuVersion.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuVersion.java new file mode 100644 index 000000000000..aa60a0dad54c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SkuVersion.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; + +/** 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 a new instance of SkuVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SkuVersion() { + } + + /** + * 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/StorageAccount.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/StorageAccount.java index 0c553a301e09..9bf6fe87f3d5 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. * @@ -89,13 +97,18 @@ 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 { /** The first stage of the StorageAccount definition. */ interface Blank extends WithParentResource { } + /** The stage of the StorageAccount definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -105,8 +118,20 @@ 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 * resource to be created, but also allows for any other optional properties to be specified. @@ -114,7 +139,6 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithDescription, DefinitionStages.WithStorageAccountStatus, - DefinitionStages.WithDataPolicy, DefinitionStages.WithStorageAccountCredentialId { /** * Executes the create request. @@ -131,6 +155,7 @@ interface WithCreate */ StorageAccount create(Context context); } + /** The stage of the StorageAccount definition allowing to specify description. */ interface WithDescription { /** @@ -141,6 +166,7 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the StorageAccount definition allowing to specify storageAccountStatus. */ interface WithStorageAccountStatus { /** @@ -151,16 +177,7 @@ 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 { /** @@ -172,6 +189,7 @@ interface WithStorageAccountCredentialId { WithCreate withStorageAccountCredentialId(String storageAccountCredentialId); } } + /** * Begins update for the StorageAccount resource. * @@ -200,6 +218,7 @@ interface Update */ StorageAccount apply(Context context); } + /** The StorageAccount update stages. */ interface UpdateStages { /** The stage of the StorageAccount update allowing to specify description. */ @@ -212,6 +231,7 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the StorageAccount update allowing to specify storageAccountStatus. */ interface WithStorageAccountStatus { /** @@ -222,6 +242,7 @@ interface WithStorageAccountStatus { */ Update withStorageAccountStatus(StorageAccountStatus storageAccountStatus); } + /** The stage of the StorageAccount update allowing to specify dataPolicy. */ interface WithDataPolicy { /** @@ -232,6 +253,7 @@ interface WithDataPolicy { */ Update withDataPolicy(DataPolicy dataPolicy); } + /** The stage of the StorageAccount update allowing to specify storageAccountCredentialId. */ interface WithStorageAccountCredentialId { /** @@ -243,6 +265,7 @@ interface WithStorageAccountCredentialId { Update withStorageAccountCredentialId(String storageAccountCredentialId); } } + /** * Refreshes the resource to sync with Azure. * 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 e9275df6190d..251e66dfc42c 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. * @@ -110,11 +118,13 @@ interface Definition DefinitionStages.WithAccountType, DefinitionStages.WithCreate { } + /** The StorageAccountCredential definition stages. */ interface DefinitionStages { /** The first stage of the StorageAccountCredential definition. */ interface Blank extends WithParentResource { } + /** The stage of the StorageAccountCredential definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -126,6 +136,7 @@ interface WithParentResource { */ WithAlias withExistingDataBoxEdgeDevice(String deviceName, String resourceGroupName); } + /** The stage of the StorageAccountCredential definition allowing to specify alias. */ interface WithAlias { /** @@ -136,6 +147,7 @@ interface WithAlias { */ WithSslStatus withAlias(String alias); } + /** The stage of the StorageAccountCredential definition allowing to specify sslStatus. */ interface WithSslStatus { /** @@ -146,6 +158,7 @@ interface WithSslStatus { */ WithAccountType withSslStatus(SslStatus sslStatus); } + /** The stage of the StorageAccountCredential definition allowing to specify accountType. */ interface WithAccountType { /** @@ -156,6 +169,7 @@ interface WithAccountType { */ WithCreate withAccountType(AccountType accountType); } + /** * The stage of the StorageAccountCredential 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. @@ -181,6 +195,7 @@ interface WithCreate */ StorageAccountCredential create(Context context); } + /** The stage of the StorageAccountCredential definition allowing to specify username. */ interface WithUsername { /** @@ -191,6 +206,7 @@ interface WithUsername { */ WithCreate withUsername(String username); } + /** The stage of the StorageAccountCredential definition allowing to specify accountKey. */ interface WithAccountKey { /** @@ -201,6 +217,7 @@ interface WithAccountKey { */ WithCreate withAccountKey(AsymmetricEncryptedSecret accountKey); } + /** The stage of the StorageAccountCredential definition allowing to specify connectionString. */ interface WithConnectionString { /** @@ -213,6 +230,7 @@ interface WithConnectionString { */ WithCreate withConnectionString(String connectionString); } + /** The stage of the StorageAccountCredential definition allowing to specify blobDomainName. */ interface WithBlobDomainName { /** @@ -223,6 +241,7 @@ interface WithBlobDomainName { */ WithCreate withBlobDomainName(String blobDomainName); } + /** The stage of the StorageAccountCredential definition allowing to specify storageAccountId. */ interface WithStorageAccountId { /** @@ -234,6 +253,7 @@ interface WithStorageAccountId { WithCreate withStorageAccountId(String storageAccountId); } } + /** * Begins update for the StorageAccountCredential resource. * @@ -266,6 +286,7 @@ interface Update */ StorageAccountCredential apply(Context context); } + /** The StorageAccountCredential update stages. */ interface UpdateStages { /** The stage of the StorageAccountCredential update allowing to specify alias. */ @@ -278,6 +299,7 @@ interface WithAlias { */ Update withAlias(String alias); } + /** The stage of the StorageAccountCredential update allowing to specify username. */ interface WithUsername { /** @@ -288,6 +310,7 @@ interface WithUsername { */ Update withUsername(String username); } + /** The stage of the StorageAccountCredential update allowing to specify accountKey. */ interface WithAccountKey { /** @@ -298,6 +321,7 @@ interface WithAccountKey { */ Update withAccountKey(AsymmetricEncryptedSecret accountKey); } + /** The stage of the StorageAccountCredential update allowing to specify connectionString. */ interface WithConnectionString { /** @@ -310,6 +334,7 @@ interface WithConnectionString { */ Update withConnectionString(String connectionString); } + /** The stage of the StorageAccountCredential update allowing to specify sslStatus. */ interface WithSslStatus { /** @@ -320,6 +345,7 @@ interface WithSslStatus { */ Update withSslStatus(SslStatus sslStatus); } + /** The stage of the StorageAccountCredential update allowing to specify blobDomainName. */ interface WithBlobDomainName { /** @@ -330,6 +356,7 @@ interface WithBlobDomainName { */ Update withBlobDomainName(String blobDomainName); } + /** The stage of the StorageAccountCredential update allowing to specify accountType. */ interface WithAccountType { /** @@ -340,6 +367,7 @@ interface WithAccountType { */ Update withAccountType(AccountType accountType); } + /** The stage of the StorageAccountCredential update allowing to specify storageAccountId. */ interface WithStorageAccountId { /** @@ -351,6 +379,7 @@ interface WithStorageAccountId { Update withStorageAccountId(String storageAccountId); } } + /** * Refreshes the resource to sync with Azure. * 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 bdded4fb4fd1..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,7 +11,7 @@ /** Resource collection API of StorageAccounts. */ public interface StorageAccounts { /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. @@ -24,7 +24,7 @@ public interface StorageAccounts { PagedIterable listByDataBoxEdgeDevice(String deviceName, String resourceGroupName); /** - * Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param resourceGroupName The resource group name. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SubscriptionRegisteredFeatures.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SubscriptionRegisteredFeatures.java new file mode 100644 index 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..0426eb0accc1 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/SubscriptionState.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.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 a new instance of SubscriptionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SubscriptionState() { + } + + /** + * 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/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/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/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/UpdateStatus.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateStatus.java new file mode 100644 index 000000000000..490bf9352f44 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateStatus.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.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 a new instance of UpdateStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpdateStatus() { + } + + /** + * 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..003c76a1e0bf --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/UpdateType.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.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 a new instance of UpdateType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpdateType() { + } + + /** + * 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/User.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/User.java index 6a4d0ed32b9f..8adf65ca71c5 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. * @@ -74,11 +82,13 @@ interface Definition DefinitionStages.WithUserType, DefinitionStages.WithCreate { } + /** The User definition stages. */ interface DefinitionStages { /** The first stage of the User definition. */ interface Blank extends WithParentResource { } + /** The stage of the User definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -90,6 +100,7 @@ interface WithParentResource { */ WithUserType withExistingDataBoxEdgeDevice(String deviceName, String resourceGroupName); } + /** The stage of the User definition allowing to specify userType. */ interface WithUserType { /** @@ -100,11 +111,12 @@ interface WithUserType { */ WithCreate withUserType(UserType userType); } + /** * 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. * @@ -120,6 +132,7 @@ interface WithCreate extends DefinitionStages.WithEncryptedPassword, DefinitionS */ User create(Context context); } + /** The stage of the User definition allowing to specify encryptedPassword. */ interface WithEncryptedPassword { /** @@ -130,19 +143,8 @@ 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. * @@ -151,8 +153,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. * @@ -168,6 +169,7 @@ interface Update */ User apply(Context context); } + /** The User update stages. */ interface UpdateStages { /** The stage of the User update allowing to specify encryptedPassword. */ @@ -180,18 +182,7 @@ 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 { /** @@ -203,6 +194,7 @@ interface WithUserType { Update withUserType(UserType userType); } } + /** * Refreshes the resource to sync with Azure. * 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 d02350b5bb28..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 @@ -28,7 +28,7 @@ public interface Users { * * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param filter Specify $filter='UserType eq <type>' to filter on user type property. + * @param filter Specify $filter='Type eq <type>' to filter on user type property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. 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..6ee2e541f416 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsCreateOrUpdateSamples.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.ArcAddon; + +/** Samples for Addons CreateOrUpdate. */ +public final class AddonsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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"), + com.azure.core.util.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..6e334be3e07f --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsDeleteSamples.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; + +/** Samples for Addons Delete. */ +public final class AddonsDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", + com.azure.core.util.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..be961f58fe86 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AddonsGetSamples.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; + +/** Samples for Addons Get. */ +public final class AddonsGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", + com.azure.core.util.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..f420bd7e8da0 --- /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; + +/** Samples for Addons ListByRole. */ +public final class AddonsListByRoleSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.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 index 01b76688467d..9ad0eec5906d 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Alerts Get. */ public final class AlertsGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/AlertGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/AlertGet.json */ /** * Sample code: AlertGet. 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 index 038d0c4e8a40..7c0bdfbf0247 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Alerts ListByDataBoxEdgeDevice. */ public final class AlertsListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/AlertGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/AlertGetAllInDevice.json */ /** * Sample code: AlertGetAllInDevice. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SkusListSamples.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AvailableSkusListSamples.java similarity index 50% rename from sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SkusListSamples.java rename to sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AvailableSkusListSamples.java index e2326ae90a54..0d9b2701bc78 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SkusListSamples.java +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/AvailableSkusListSamples.java @@ -4,17 +4,17 @@ package com.azure.resourcemanager.databoxedge.generated; -/** Samples for Skus List. */ -public final class SkusListSamples { +/** Samples for AvailableSkus List. */ +public final class AvailableSkusListSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ListSkus.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/AvailableSkusList.json */ /** - * Sample code: ListSkus. + * Sample code: AvailableSkus. * * @param manager Entry point to DataBoxEdgeManager. */ - public static void listSkus(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { - manager.skus().list(null, com.azure.core.util.Context.NONE); + public static void availableSkus(com.azure.resourcemanager.databoxedge.DataBoxEdgeManager manager) { + manager.availableSkus().list(com.azure.core.util.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 index 0a0a152294ea..91525c207e2e 100644 --- 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 @@ -10,7 +10,7 @@ /** Samples for BandwidthSchedules CreateOrUpdate. */ public final class BandwidthSchedulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/BandwidthSchedulePut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/BandwidthSchedulePut.json */ /** * Sample code: BandwidthSchedulePut. 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 index 0af862f2f727..0adf5497a094 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for BandwidthSchedules Delete. */ public final class BandwidthSchedulesDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/BandwidthScheduleDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/BandwidthScheduleDelete.json */ /** * Sample code: BandwidthScheduleDelete. 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 index 86abb20809cd..74f60d2febb0 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for BandwidthSchedules Get. */ public final class BandwidthSchedulesGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/BandwidthScheduleGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/BandwidthScheduleGet.json */ /** * Sample code: BandwidthScheduleGet. 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 index 86d7c87cbe4c..ce13b4bb9b15 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for BandwidthSchedules ListByDataBoxEdgeDevice. */ public final class BandwidthSchedulesListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/BandwidthScheduleGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/BandwidthScheduleGetAllInDevice.json */ /** * Sample code: BandwidthScheduleGetAllInDevice. 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 index 9dc1f035f985..3cbde0de47f1 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Containers CreateOrUpdate. */ public final class ContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ContainerPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ContainerPut.json */ /** * Sample code: ContainerPut. 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 index 0cae1eb9ad8c..a85fd739eadf 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Containers Delete. */ public final class ContainersDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ContainerDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ContainerDelete.json */ /** * Sample code: ContainerDelete. 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 index 26abe10d0107..a5d4069edeee 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Containers Get. */ public final class ContainersGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ContainerGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ContainerGet.json */ /** * Sample code: ContainerGet. 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 index c8ced4f330e5..6c09ff6320ea 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Containers ListByStorageAccount. */ public final class ContainersListByStorageAccountSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ContainerListAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ContainerListAllInDevice.json */ /** * Sample code: ContainerListAllInDevice. 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 index d40f65b97cda..e8ffb0e788f8 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Containers Refresh. */ public final class ContainersRefreshSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ContainerRefresh.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ContainerRefresh.json */ /** * Sample code: ContainerRefresh. 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..8ff6edfd68a6 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DeviceCapacityCheckCheckResourceCreationFeasibilitySamples.java @@ -0,0 +1,30 @@ +// Copyright (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.DeviceCapacityRequestInfo; +import java.util.Arrays; + +/** Samples for DeviceCapacityCheck CheckResourceCreationFeasibility. */ +public final class DeviceCapacityCheckCheckResourceCreationFeasibilitySamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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, + com.azure.core.util.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..5aeecf5d8c8b --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DeviceCapacityInfoGetDeviceCapacityInfoSamples.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; + +/** Samples for DeviceCapacityInfo GetDeviceCapacityInfo. */ +public final class DeviceCapacityInfoGetDeviceCapacityInfoSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.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 index 72e9b54e345b..e21b7ff62f41 100644 --- 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 @@ -4,6 +4,8 @@ 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; @@ -13,7 +15,28 @@ /** Samples for Devices CreateOrUpdate. */ public final class DevicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DataBoxEdgeDevicePut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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/2023-07-01/examples/DataBoxEdgeDevicePut.json */ /** * Sample code: DataBoxEdgeDevicePut. @@ -24,7 +47,7 @@ public static void dataBoxEdgeDevicePut(com.azure.resourcemanager.databoxedge.Da manager .devices() .define("testedgedevice") - .withRegion("eastus") + .withRegion("WUS") .withExistingResourceGroup("GroupForEdgeAutomation") .withTags(mapOf()) .withSku(new Sku().withName(SkuName.EDGE).withTier(SkuTier.STANDARD)) 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 index 711550dd8926..36f12f090a67 100644 --- 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 @@ -11,7 +11,7 @@ /** Samples for Devices CreateOrUpdateSecuritySettings. */ public final class DevicesCreateOrUpdateSecuritySettingsSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/SecuritySettingsUpdatePost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SecuritySettingsUpdatePost.json */ /** * Sample code: CreateOrUpdateSecuritySettings. @@ -28,8 +28,8 @@ public static void createOrUpdateSecuritySettings( new SecuritySettings() .withDeviceAdminPassword( new AsymmetricEncryptedSecret() - .withValue("") - .withEncryptionCertThumbprint("7DCBDFC44ED968D232C9A998FC105B5C70E84BE0") + .withValue("") + .withEncryptionCertThumbprint("") .withEncryptionAlgorithm(EncryptionAlgorithm.AES256)), com.azure.core.util.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 index b60629110c5a..465a9aa345a5 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Devices Delete. */ public final class DevicesDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DataBoxEdgeDeviceDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DataBoxEdgeDeviceDelete.json */ /** * Sample code: DataBoxEdgeDeviceDelete. 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 index 24a660f57bec..e7de0252676c 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Devices DownloadUpdates. */ public final class DevicesDownloadUpdatesSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DownloadUpdatesPost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DownloadUpdatesPost.json */ /** * Sample code: DownloadUpdatesPost. 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..6ccdbe829bad --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesGenerateCertificateSamples.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; + +/** Samples for Devices GenerateCertificate. */ +public final class DevicesGenerateCertificateSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.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 index ac1154d75a4f..7e7fd1be86ab 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Devices GetByResourceGroup. */ public final class DevicesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DataBoxEdgeDeviceGetByName.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DataBoxEdgeDeviceGetByName.json */ /** * Sample code: DataBoxEdgeDeviceGetByName. @@ -20,4 +20,20 @@ public static void dataBoxEdgeDeviceGetByName(com.azure.resourcemanager.databoxe .getByResourceGroupWithResponse( "GroupForEdgeAutomation", "testedgedevice", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.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 index 6e1d0feabb25..459fdacd05e0 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Devices GetExtendedInformation. */ public final class DevicesGetExtendedInformationSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ExtendedInfoPost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ExtendedInfoPost.json */ /** * Sample code: ExtendedInfoPost. 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 index 75fcb1997b96..bead3c675b63 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Devices GetNetworkSettings. */ public final class DevicesGetNetworkSettingsSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/NetworkSettingsGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/NetworkSettingsGet.json */ /** * Sample code: NetworkSettingsGet. 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 index 061f8383ff09..9ae07dbfcbca 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Devices GetUpdateSummary. */ public final class DevicesGetUpdateSummarySamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/UpdateSummaryGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UpdateSummaryGet.json */ /** * Sample code: UpdateSummaryGet. 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 index 8ae88ae9dfd6..f6f7ed5df7a3 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Devices InstallUpdates. */ public final class DevicesInstallUpdatesSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/InstallUpdatesPost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/InstallUpdatesPost.json */ /** * Sample code: InstallUpdatesPost. 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 index 0ad136471cf6..90966a1fba1b 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Devices ListByResourceGroup. */ public final class DevicesListByResourceGroupSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DataBoxEdgeDeviceGetByResourceGroup.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DataBoxEdgeDeviceGetByResourceGroup.json */ /** * Sample code: DataBoxEdgeDeviceGetByResourceGroup. 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 index e0f28821cb36..72ed2da0abcd 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Devices List. */ public final class DevicesListSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/DataBoxEdgeDeviceGetBySubscription.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DataBoxEdgeDeviceGetBySubscription.json */ /** * Sample code: DataBoxEdgeDeviceGetBySubscription. 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 index c9f5698fd954..dde454f5e615 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Devices ScanForUpdates. */ public final class DevicesScanForUpdatesSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ScanForUpdatesPost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ScanForUpdatesPost.json */ /** * Sample code: ScanForUpdatesPost. 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..b8a274ce86df --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DevicesUpdateExtendedInformationSamples.java @@ -0,0 +1,28 @@ +// Copyright (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.DataBoxEdgeDeviceExtendedInfoPatch; + +/** Samples for Devices UpdateExtendedInformation. */ +public final class DevicesUpdateExtendedInformationSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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(), + com.azure.core.util.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 index be3b60f99d8d..2979b848c199 100644 --- 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 @@ -5,13 +5,13 @@ package com.azure.resourcemanager.databoxedge.generated; import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevice; -import java.util.HashMap; -import java.util.Map; +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/2019-08-01/examples/DataBoxEdgeDevicePatch.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/DataBoxEdgeDevicePatch.json */ /** * Sample code: DataBoxEdgeDevicePatch. @@ -25,17 +25,14 @@ public static void dataBoxEdgeDevicePatch(com.azure.resourcemanager.databoxedge. .getByResourceGroupWithResponse( "GroupForEdgeAutomation", "testedgedevice", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("Key1", "value1", "Key2", "value2")).apply(); - } - - @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; + 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 index 6ca8cd152f6c..6b4fc3800327 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Devices UploadCertificate. */ public final class DevicesUploadCertificateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/UploadCertificatePost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UploadCertificatePost.json */ /** * Sample code: UploadCertificatePost. 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..8b9c696c4525 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsSamples.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; + +/** Samples for DiagnosticSettings GetDiagnosticProactiveLogCollectionSettings. */ +public final class DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.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..5fcf9c94d485 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsGetDiagnosticRemoteSupportSettingsSamples.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; + +/** Samples for DiagnosticSettings GetDiagnosticRemoteSupportSettings. */ +public final class DiagnosticSettingsGetDiagnosticRemoteSupportSettingsSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.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..a030d003f37c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsSamples.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.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/2023-07-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), + com.azure.core.util.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..c28d42c14823 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsSamples.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.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/2023-07-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")))), + com.azure.core.util.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 index 39f425806dc5..667195f9e3dc 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Jobs Get. */ public final class JobsGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/JobsGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/JobsGet.json */ /** * Sample code: JobsGet. 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..99ea10a1e97e --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigCreateOrUpdateSamples.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.generated; + +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/2023-07-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"))))))), + com.azure.core.util.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..1490297818bf --- /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; + +/** Samples for MonitoringConfig Delete. */ +public final class MonitoringConfigDeleteSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.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..4cd6b103d23c --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/MonitoringConfigGetSamples.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; + +/** Samples for MonitoringConfig Get. */ +public final class MonitoringConfigGetSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.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..4c7f8167a813 --- /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; + +/** Samples for MonitoringConfig List. */ +public final class MonitoringConfigListSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.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 index 5ac275c0293e..d22cb34cb797 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Nodes ListByDataBoxEdgeDevice. */ public final class NodesListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/NodeGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/NodeGetAllInDevice.json */ /** * Sample code: NodesGetAllInDevice. 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 index 3fd47f7bd7d4..ad9f70934ac4 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OperationsGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OperationsGet.json */ /** * Sample code: OperationsGet. 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 index c07575105c92..535a81fb513b 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for OperationsStatus Get. */ public final class OperationsStatusGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OperationsStatusGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OperationsStatusGet.json */ /** * Sample code: OperationsStatusGet. 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 index 3479287125d8..12b9374ef04f 100644 --- 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 @@ -12,7 +12,7 @@ /** Samples for Orders CreateOrUpdate. */ public final class OrdersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OrderPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OrderPut.json */ /** * Sample code: OrderPut. 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 index bb0f222fe4b9..167b702ba3d9 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Orders Delete. */ public final class OrdersDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OrderDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OrderDelete.json */ /** * Sample code: OrderDelete. 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 index ab8fbd83053d..18cb88154439 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Orders Get. */ public final class OrdersGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OrderGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OrderGet.json */ /** * Sample code: OrderGet. 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 index e0eaf8301cab..bbed8142f188 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Orders ListByDataBoxEdgeDevice. */ public final class OrdersListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/OrderGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/OrderGetAllInDevice.json */ /** * Sample code: OrderGetAllInDevice. 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..3f47294fd742 --- /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; + +/** Samples for Orders ListDCAccessCode. */ +public final class OrdersListDCAccessCodeSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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", com.azure.core.util.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 index 4f4333fda43b..3bf3e59a7494 100644 --- 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 @@ -17,7 +17,7 @@ /** Samples for Roles CreateOrUpdate. */ public final class RolesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/RolePut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/RolePut.json */ /** * Sample code: RolePut. 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 index 64587672653c..9864798fbcf9 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Roles Delete. */ public final class RolesDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/RoleDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/RoleDelete.json */ /** * Sample code: RoleDelete. 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 index eaaee621dc08..447f7294bc52 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Roles Get. */ public final class RolesGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/RoleGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/RoleGet.json */ /** * Sample code: RoleGet. 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 index 5d5ec6cedf1a..f5045a1b2c5f 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Roles ListByDataBoxEdgeDevice. */ public final class RolesListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/RoleGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/RoleGetAllInDevice.json */ /** * Sample code: RoleGetAllInDevice. 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 index f766ec723965..42d7f1877705 100644 --- 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 @@ -17,7 +17,7 @@ /** Samples for Shares CreateOrUpdate. */ public final class SharesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/SharePut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SharePut.json */ /** * Sample code: SharePut. 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 index 005a9c132e02..81dbb8fed71a 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Shares Delete. */ public final class SharesDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ShareDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ShareDelete.json */ /** * Sample code: ShareDelete. 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 index 100f5bfc838e..39850630aa35 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Shares Get. */ public final class SharesGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ShareGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ShareGet.json */ /** * Sample code: ShareGet. 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 index 309176bae47d..88465dc08e41 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Shares ListByDataBoxEdgeDevice. */ public final class SharesListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ShareGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ShareGetAllInDevice.json */ /** * Sample code: ShareGetAllInDevice. 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 index 73306fa001d0..0408f0204d14 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Shares Refresh. */ public final class SharesRefreshSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/ShareRefreshPost.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/ShareRefreshPost.json */ /** * Sample code: ShareRefreshPost. 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 index 32918ef0a1e6..518caff4eee9 100644 --- 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 @@ -12,7 +12,7 @@ /** Samples for StorageAccountCredentials CreateOrUpdate. */ public final class StorageAccountCredentialsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/SACPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SACPut.json */ /** * Sample code: SACPut. 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 index 1fc9107b16e1..fba1b6813ab8 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for StorageAccountCredentials Delete. */ public final class StorageAccountCredentialsDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/SACDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SACDelete.json */ /** * Sample code: SACDelete. 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 index 1d8f81d1e724..63ee49b6bb23 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for StorageAccountCredentials Get. */ public final class StorageAccountCredentialsGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/SACGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SACGet.json */ /** * Sample code: SACGet. 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 index 66363593421c..9fc7a5c55c3e 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for StorageAccountCredentials ListByDataBoxEdgeDevice. */ public final class StorageAccountCredentialsListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/SACGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/SACGetAllInDevice.json */ /** * Sample code: SACGetAllInDevice. 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 index c5c810e4a548..aa22b7a9bd1d 100644 --- 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 @@ -10,7 +10,7 @@ /** Samples for StorageAccounts CreateOrUpdate. */ public final class StorageAccountsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/StorageAccountPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/StorageAccountPut.json */ /** * Sample code: StorageAccountPut. @@ -22,9 +22,9 @@ public static void storageAccountPut(com.azure.resourcemanager.databoxedge.DataB .storageAccounts() .define("blobstorageaccount1") .withExistingDataBoxEdgeDevice("testedgedevice", "GroupForEdgeAutomation") + .withDataPolicy(DataPolicy.CLOUD) .withDescription("It's an awesome storage account") .withStorageAccountStatus(StorageAccountStatus.OK) - .withDataPolicy(DataPolicy.CLOUD) .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 index 17b1a4ce1fef..3c2cc1b3d052 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for StorageAccounts Delete. */ public final class StorageAccountsDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/StorageAccountDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/StorageAccountDelete.json */ /** * Sample code: StorageAccountDelete. 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 index 5feb4a6acae7..77a0977ad911 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for StorageAccounts Get. */ public final class StorageAccountsGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/StorageAccountGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/StorageAccountGet.json */ /** * Sample code: StorageAccountGet. 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 index c41c65d275cf..2f2d18c2c362 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for StorageAccounts ListByDataBoxEdgeDevice. */ public final class StorageAccountsListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/StorageAccountGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/StorageAccountGetAllInDevice.json */ /** * Sample code: StorageAccountGetAllInDevice. 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..d6cb93beb8b2 --- /dev/null +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/samples/java/com/azure/resourcemanager/databoxedge/generated/SupportPackagesTriggerSupportPackageSamples.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.TriggerSupportPackageRequest; +import java.time.OffsetDateTime; + +/** Samples for SupportPackages TriggerSupportPackage. */ +public final class SupportPackagesTriggerSupportPackageSamples { + /* + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-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"), + com.azure.core.util.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 index ada2cd116b9c..4a3e792b1b45 100644 --- 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 @@ -11,7 +11,7 @@ /** Samples for Triggers CreateOrUpdate. */ public final class TriggersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/TriggerPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/TriggerPut.json */ /** * Sample code: TriggerPut. 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 index 334379927de0..d1a51d787086 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Triggers Delete. */ public final class TriggersDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/TriggerDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/TriggerDelete.json */ /** * Sample code: TriggerDelete. 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 index 9ae864b40ad8..a5b1b1de1951 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Triggers Get. */ public final class TriggersGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/TriggerGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/TriggerGet.json */ /** * Sample code: TriggerGet. 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 index eca700607ef7..3907302a40e2 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Triggers ListByDataBoxEdgeDevice. */ public final class TriggersListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/TriggerGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/TriggerGetAllInDevice.json */ /** * Sample code: TriggerGetAllInDevice. 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 index 400f9441eadb..cae66bfcd330 100644 --- 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 @@ -7,12 +7,11 @@ import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; import com.azure.resourcemanager.databoxedge.models.UserType; -import java.util.Arrays; /** Samples for Users CreateOrUpdate. */ public final class UsersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/UserPut.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UserPut.json */ /** * Sample code: UserPut. @@ -30,7 +29,6 @@ public static void userPut(com.azure.resourcemanager.databoxedge.DataBoxEdgeMana .withValue("") .withEncryptionCertThumbprint("blah") .withEncryptionAlgorithm(EncryptionAlgorithm.NONE)) - .withShareAccessRights(Arrays.asList()) .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 index 1106447ff053..9e464bb168cf 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Users Delete. */ public final class UsersDeleteSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/UserDelete.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UserDelete.json */ /** * Sample code: UserDelete. 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 index 4cb4d69a8e89..e25451804ae6 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Users Get. */ public final class UsersGetSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/UserGet.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UserGet.json */ /** * Sample code: UserGet. 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 index ada21e9b8f73..bb2186352eb6 100644 --- 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 @@ -7,7 +7,7 @@ /** Samples for Users ListByDataBoxEdgeDevice. */ public final class UsersListByDataBoxEdgeDeviceSamples { /* - * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2019-08-01/examples/UserGetAllInDevice.json + * x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2023-07-01/examples/UserGetAllInDevice.json */ /** * Sample code: UserGetAllInDevice. diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/AlertListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/AlertListTests.java deleted file mode 100644 index aa89b26d34c0..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/AlertListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.AlertList; - -public final class AlertListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AlertList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"title\":\"ualhbxxhejj\",\"alertType\":\"v\",\"appearedAtDateTime\":\"2021-10-15T07:07:10Z\",\"recommendation\":\"wdslfhotwmcy\",\"severity\":\"Informational\",\"detailedInformation\":{}},\"id\":\"jnpg\",\"name\":\"cftadeh\",\"type\":\"nltyfsoppusuesnz\"}],\"nextLink\":\"ej\"}") - .toObject(AlertList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AlertList model = new AlertList(); - model = BinaryData.fromObject(model).toObject(AlertList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ArmBaseModelTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ArmBaseModelTests.java deleted file mode 100644 index 9146c71e9c49..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ArmBaseModelTests.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.ArmBaseModel; - -public final class ArmBaseModelTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ArmBaseModel model = - BinaryData - .fromString("{\"id\":\"wooc\",\"name\":\"cbonqvpk\",\"type\":\"lrxnjeaseiphe\"}") - .toObject(ArmBaseModel.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ArmBaseModel model = new ArmBaseModel(); - model = BinaryData.fromObject(model).toObject(ArmBaseModel.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/AsymmetricEncryptedSecretTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/AsymmetricEncryptedSecretTests.java deleted file mode 100644 index e3adf8443444..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/AsymmetricEncryptedSecretTests.java +++ /dev/null @@ -1,37 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; -import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; -import org.junit.jupiter.api.Assertions; - -public final class AsymmetricEncryptedSecretTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AsymmetricEncryptedSecret model = - BinaryData - .fromString( - "{\"value\":\"vjfdx\",\"encryptionCertThumbprint\":\"vetvt\",\"encryptionAlgorithm\":\"RSAES_PKCS1_v_1_5\"}") - .toObject(AsymmetricEncryptedSecret.class); - Assertions.assertEquals("vjfdx", model.value()); - Assertions.assertEquals("vetvt", model.encryptionCertThumbprint()); - Assertions.assertEquals(EncryptionAlgorithm.RSAES_PKCS1_V_1_5, model.encryptionAlgorithm()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AsymmetricEncryptedSecret model = - new AsymmetricEncryptedSecret() - .withValue("vjfdx") - .withEncryptionCertThumbprint("vetvt") - .withEncryptionAlgorithm(EncryptionAlgorithm.RSAES_PKCS1_V_1_5); - model = BinaryData.fromObject(model).toObject(AsymmetricEncryptedSecret.class); - Assertions.assertEquals("vjfdx", model.value()); - Assertions.assertEquals("vetvt", model.encryptionCertThumbprint()); - Assertions.assertEquals(EncryptionAlgorithm.RSAES_PKCS1_V_1_5, model.encryptionAlgorithm()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthScheduleInnerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthScheduleInnerTests.java deleted file mode 100644 index 3ea469a828bc..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthScheduleInnerTests.java +++ /dev/null @@ -1,41 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.BandwidthScheduleInner; -import com.azure.resourcemanager.databoxedge.models.DayOfWeek; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BandwidthScheduleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BandwidthScheduleInner model = - BinaryData - .fromString( - "{\"properties\":{\"start\":\"fhyhltrpmopjmcma\",\"stop\":\"u\",\"rateInMbps\":1605990961,\"days\":[\"Wednesday\",\"Monday\",\"Sunday\",\"Tuesday\"]},\"id\":\"uaodsfcpk\",\"name\":\"xodpuozmyzydagfu\",\"type\":\"xbezyiuokktwh\"}") - .toObject(BandwidthScheduleInner.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.start()); - Assertions.assertEquals("u", model.stop()); - Assertions.assertEquals(1605990961, model.rateInMbps()); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.days().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BandwidthScheduleInner model = - new BandwidthScheduleInner() - .withStart("fhyhltrpmopjmcma") - .withStop("u") - .withRateInMbps(1605990961) - .withDays(Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.MONDAY, DayOfWeek.SUNDAY, DayOfWeek.TUESDAY)); - model = BinaryData.fromObject(model).toObject(BandwidthScheduleInner.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.start()); - Assertions.assertEquals("u", model.stop()); - Assertions.assertEquals(1605990961, model.rateInMbps()); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.days().get(0)); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulePropertiesTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulePropertiesTests.java deleted file mode 100644 index 1d799f5d0a89..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulePropertiesTests.java +++ /dev/null @@ -1,41 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.BandwidthScheduleProperties; -import com.azure.resourcemanager.databoxedge.models.DayOfWeek; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BandwidthSchedulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BandwidthScheduleProperties model = - BinaryData - .fromString( - "{\"start\":\"dxwzywqsmbsurexi\",\"stop\":\"o\",\"rateInMbps\":998039935,\"days\":[\"Saturday\"]}") - .toObject(BandwidthScheduleProperties.class); - Assertions.assertEquals("dxwzywqsmbsurexi", model.start()); - Assertions.assertEquals("o", model.stop()); - Assertions.assertEquals(998039935, model.rateInMbps()); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.days().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BandwidthScheduleProperties model = - new BandwidthScheduleProperties() - .withStart("dxwzywqsmbsurexi") - .withStop("o") - .withRateInMbps(998039935) - .withDays(Arrays.asList(DayOfWeek.SATURDAY)); - model = BinaryData.fromObject(model).toObject(BandwidthScheduleProperties.class); - Assertions.assertEquals("dxwzywqsmbsurexi", model.start()); - Assertions.assertEquals("o", model.stop()); - Assertions.assertEquals(998039935, model.rateInMbps()); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.days().get(0)); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesCreateOrUpdateMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesCreateOrUpdateMockTests.java deleted file mode 100644 index 9451325d0d38..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,80 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.BandwidthSchedule; -import com.azure.resourcemanager.databoxedge.models.DayOfWeek; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BandwidthSchedulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"start\":\"kgxywr\",\"stop\":\"kpyklyhp\",\"rateInMbps\":1144062943,\"days\":[\"Wednesday\",\"Friday\",\"Friday\",\"Saturday\"]},\"id\":\"uudl\",\"name\":\"zibt\",\"type\":\"ostgkts\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BandwidthSchedule response = - manager - .bandwidthSchedules() - .define("vpkjpr") - .withExistingDataBoxEdgeDevice("knssxmojm", "kwcf") - .withStart("ql") - .withStop("yxgtczh") - .withRateInMbps(1187358076) - .withDays(Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.WEDNESDAY)) - .create(); - - Assertions.assertEquals("kgxywr", response.start()); - Assertions.assertEquals("kpyklyhp", response.stop()); - Assertions.assertEquals(1144062943, response.rateInMbps()); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.days().get(0)); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesDeleteMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesDeleteMockTests.java deleted file mode 100644 index e9f7a2c0c1dc..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesDeleteMockTests.java +++ /dev/null @@ -1,63 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BandwidthSchedulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .bandwidthSchedules() - .delete("qfzgemjdftul", "ltducea", "tmczuomejwcwwqi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesGetWithResponseMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesGetWithResponseMockTests.java deleted file mode 100644 index f6b195b0a615..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesGetWithResponseMockTests.java +++ /dev/null @@ -1,74 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.BandwidthSchedule; -import com.azure.resourcemanager.databoxedge.models.DayOfWeek; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BandwidthSchedulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"start\":\"wrykqgai\",\"stop\":\"mvikl\",\"rateInMbps\":654040507,\"days\":[\"Saturday\"]},\"id\":\"khbejdznxc\",\"name\":\"dsrhnjiv\",\"type\":\"lvtno\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BandwidthSchedule response = - manager - .bandwidthSchedules() - .getWithResponse("wkojgcyztsfmzn", "aeqphchqnr", "rpxeh", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wrykqgai", response.start()); - Assertions.assertEquals("mvikl", response.stop()); - Assertions.assertEquals(654040507, response.rateInMbps()); - Assertions.assertEquals(DayOfWeek.SATURDAY, response.days().get(0)); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesListByDataBoxEdgeDeviceMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesListByDataBoxEdgeDeviceMockTests.java deleted file mode 100644 index e36f3691242e..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesListByDataBoxEdgeDeviceMockTests.java +++ /dev/null @@ -1,72 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.BandwidthSchedule; -import com.azure.resourcemanager.databoxedge.models.DayOfWeek; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BandwidthSchedulesListByDataBoxEdgeDeviceMockTests { - @Test - public void testListByDataBoxEdgeDevice() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"start\":\"zpnfqntcypsxj\",\"stop\":\"foimwkslircizjxv\",\"rateInMbps\":1233687153,\"days\":[\"Saturday\",\"Sunday\",\"Thursday\"]},\"id\":\"cvlhv\",\"name\":\"gdyftumrtwna\",\"type\":\"jslb\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.bandwidthSchedules().listByDataBoxEdgeDevice("hej", "g", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zpnfqntcypsxj", response.iterator().next().start()); - Assertions.assertEquals("foimwkslircizjxv", response.iterator().next().stop()); - Assertions.assertEquals(1233687153, response.iterator().next().rateInMbps()); - Assertions.assertEquals(DayOfWeek.SATURDAY, response.iterator().next().days().get(0)); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesListTests.java deleted file mode 100644 index cbba8bf716be..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/BandwidthSchedulesListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.BandwidthSchedulesList; - -public final class BandwidthSchedulesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BandwidthSchedulesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"start\":\"jrefovgmkqsle\",\"stop\":\"yvxyqjp\",\"rateInMbps\":1744021341,\"days\":[]},\"id\":\"attpngjcrcczsq\",\"name\":\"jh\",\"type\":\"mdajv\"}],\"nextLink\":\"sounqecanoaeu\"}") - .toObject(BandwidthSchedulesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BandwidthSchedulesList model = new BandwidthSchedulesList(); - model = BinaryData.fromObject(model).toObject(BandwidthSchedulesList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ClientAccessRightTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ClientAccessRightTests.java deleted file mode 100644 index f6d6add4b042..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ClientAccessRightTests.java +++ /dev/null @@ -1,31 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.ClientAccessRight; -import com.azure.resourcemanager.databoxedge.models.ClientPermissionType; -import org.junit.jupiter.api.Assertions; - -public final class ClientAccessRightTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientAccessRight model = - BinaryData - .fromString("{\"client\":\"jrybnwjewgdrjer\",\"accessPermission\":\"ReadOnly\"}") - .toObject(ClientAccessRight.class); - Assertions.assertEquals("jrybnwjewgdrjer", model.client()); - Assertions.assertEquals(ClientPermissionType.READ_ONLY, model.accessPermission()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientAccessRight model = - new ClientAccessRight().withClient("jrybnwjewgdrjer").withAccessPermission(ClientPermissionType.READ_ONLY); - model = BinaryData.fromObject(model).toObject(ClientAccessRight.class); - Assertions.assertEquals("jrybnwjewgdrjer", model.client()); - Assertions.assertEquals(ClientPermissionType.READ_ONLY, model.accessPermission()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContactDetailsTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContactDetailsTests.java deleted file mode 100644 index 50deae8bc903..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContactDetailsTests.java +++ /dev/null @@ -1,40 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.ContactDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactDetails model = - BinaryData - .fromString( - "{\"contactPerson\":\"lmwlxkvugfhzo\",\"companyName\":\"awjvzunluthnnp\",\"phone\":\"nxipeil\",\"emailList\":[\"zuaejxd\",\"ltskzbbtd\",\"umveekgpwozuhkf\",\"bsjyofdx\"]}") - .toObject(ContactDetails.class); - Assertions.assertEquals("lmwlxkvugfhzo", model.contactPerson()); - Assertions.assertEquals("awjvzunluthnnp", model.companyName()); - Assertions.assertEquals("nxipeil", model.phone()); - Assertions.assertEquals("zuaejxd", model.emailList().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactDetails model = - new ContactDetails() - .withContactPerson("lmwlxkvugfhzo") - .withCompanyName("awjvzunluthnnp") - .withPhone("nxipeil") - .withEmailList(Arrays.asList("zuaejxd", "ltskzbbtd", "umveekgpwozuhkf", "bsjyofdx")); - model = BinaryData.fromObject(model).toObject(ContactDetails.class); - Assertions.assertEquals("lmwlxkvugfhzo", model.contactPerson()); - Assertions.assertEquals("awjvzunluthnnp", model.companyName()); - Assertions.assertEquals("nxipeil", model.phone()); - Assertions.assertEquals("zuaejxd", model.emailList().get(0)); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainerInnerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainerInnerTests.java deleted file mode 100644 index 13340667cc7d..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainerInnerTests.java +++ /dev/null @@ -1,29 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.ContainerInner; -import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; -import org.junit.jupiter.api.Assertions; - -public final class ContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerInner model = - BinaryData - .fromString( - "{\"properties\":{\"containerStatus\":\"Unknown\",\"dataFormat\":\"PageBlob\",\"refreshDetails\":{\"inProgressRefreshJobId\":\"uel\",\"lastCompletedRefreshJobTimeInUTC\":\"2021-04-04T13:11:17Z\",\"errorManifestFile\":\"dyhtozfikdowwquu\",\"lastJob\":\"zx\"},\"createdDateTime\":\"2021-01-19T00:58:57Z\"},\"id\":\"ithhqzon\",\"name\":\"sg\",\"type\":\"b\"}") - .toObject(ContainerInner.class); - Assertions.assertEquals(AzureContainerDataFormat.PAGE_BLOB, model.dataFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerInner model = new ContainerInner().withDataFormat(AzureContainerDataFormat.PAGE_BLOB); - model = BinaryData.fromObject(model).toObject(ContainerInner.class); - Assertions.assertEquals(AzureContainerDataFormat.PAGE_BLOB, model.dataFormat()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainerListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainerListTests.java deleted file mode 100644 index a40c51f574df..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainerListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.ContainerList; - -public final class ContainerListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"containerStatus\":\"OK\",\"dataFormat\":\"AzureFile\",\"createdDateTime\":\"2021-01-12T19:16:50Z\"},\"id\":\"evseotgqrlltmuwl\",\"name\":\"uwz\",\"type\":\"zxb\"},{\"properties\":{\"containerStatus\":\"Updating\",\"dataFormat\":\"AzureFile\",\"createdDateTime\":\"2021-07-22T16:26:04Z\"},\"id\":\"u\",\"name\":\"muvp\",\"type\":\"ttdumorppxebmnzb\"}],\"nextLink\":\"hjpglkf\"}") - .toObject(ContainerList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerList model = new ContainerList(); - model = BinaryData.fromObject(model).toObject(ContainerList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainerPropertiesTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainerPropertiesTests.java deleted file mode 100644 index 031274515311..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainerPropertiesTests.java +++ /dev/null @@ -1,29 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.ContainerProperties; -import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; -import org.junit.jupiter.api.Assertions; - -public final class ContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerProperties model = - BinaryData - .fromString( - "{\"containerStatus\":\"Offline\",\"dataFormat\":\"PageBlob\",\"refreshDetails\":{\"inProgressRefreshJobId\":\"dsjnka\",\"lastCompletedRefreshJobTimeInUTC\":\"2021-05-13T01:39:31Z\",\"errorManifestFile\":\"iiswacffgdkzze\",\"lastJob\":\"fvhqc\"},\"createdDateTime\":\"2021-02-08T02:11:50Z\"}") - .toObject(ContainerProperties.class); - Assertions.assertEquals(AzureContainerDataFormat.PAGE_BLOB, model.dataFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerProperties model = new ContainerProperties().withDataFormat(AzureContainerDataFormat.PAGE_BLOB); - model = BinaryData.fromObject(model).toObject(ContainerProperties.class); - Assertions.assertEquals(AzureContainerDataFormat.PAGE_BLOB, model.dataFormat()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersCreateOrUpdateMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersCreateOrUpdateMockTests.java deleted file mode 100644 index 6d6d9fffb6d2..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersCreateOrUpdateMockTests.java +++ /dev/null @@ -1,73 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; -import com.azure.resourcemanager.databoxedge.models.Container; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"containerStatus\":\"Offline\",\"dataFormat\":\"AzureFile\",\"refreshDetails\":{\"inProgressRefreshJobId\":\"wogfnzjvu\",\"lastCompletedRefreshJobTimeInUTC\":\"2021-06-09T04:39:41Z\",\"errorManifestFile\":\"dmozu\",\"lastJob\":\"lfsbtkadpysow\"},\"createdDateTime\":\"2021-11-17T17:02:25Z\"},\"id\":\"gkbugrjqct\",\"name\":\"jc\",\"type\":\"isofieypefojyqd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Container response = - manager - .containers() - .define("fcjnaeoisrvhmgor") - .withExistingStorageAccount("cdyuibhmfdnbzyd", "f", "fukiscvwmzhw") - .withDataFormat(AzureContainerDataFormat.PAGE_BLOB) - .create(); - - Assertions.assertEquals(AzureContainerDataFormat.AZURE_FILE, response.dataFormat()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersGetWithResponseMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersGetWithResponseMockTests.java deleted file mode 100644 index 1544bb76cbea..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; -import com.azure.resourcemanager.databoxedge.models.Container; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"containerStatus\":\"Unknown\",\"dataFormat\":\"PageBlob\",\"refreshDetails\":{\"inProgressRefreshJobId\":\"cnifm\",\"lastCompletedRefreshJobTimeInUTC\":\"2021-11-20T11:55:53Z\",\"errorManifestFile\":\"ymbrnysuxmpraf\",\"lastJob\":\"ckh\"},\"createdDateTime\":\"2021-05-27T14:51:24Z\"},\"id\":\"vdff\",\"name\":\"wafqroud\",\"type\":\"spave\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Container response = - manager - .containers() - .getWithResponse("otppnv", "xz", "hihfrbbcevqagtlt", "hlfkqojpy", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(AzureContainerDataFormat.PAGE_BLOB, response.dataFormat()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersListByStorageAccountMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersListByStorageAccountMockTests.java deleted file mode 100644 index 445b79ba9ce1..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersListByStorageAccountMockTests.java +++ /dev/null @@ -1,71 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat; -import com.azure.resourcemanager.databoxedge.models.Container; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainersListByStorageAccountMockTests { - @Test - public void testListByStorageAccount() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"containerStatus\":\"Offline\",\"dataFormat\":\"AzureFile\",\"refreshDetails\":{\"inProgressRefreshJobId\":\"vpo\",\"lastCompletedRefreshJobTimeInUTC\":\"2021-04-28T20:02:30Z\",\"errorManifestFile\":\"gsgbdhuzq\",\"lastJob\":\"j\"},\"createdDateTime\":\"2021-08-01T19:03:10Z\"},\"id\":\"ynscl\",\"name\":\"qhzvhxnkomt\",\"type\":\"u\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .containers() - .listByStorageAccount("kphhq", "ikvylauya", "luwmncst", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(AzureContainerDataFormat.AZURE_FILE, response.iterator().next().dataFormat()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersRefreshMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersRefreshMockTests.java deleted file mode 100644 index 5193760d8aff..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ContainersRefreshMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainersRefreshMockTests { - @Test - public void testRefresh() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containers().refresh("hrv", "bunzozudh", "xg", "moy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDeviceInnerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDeviceInnerTests.java deleted file mode 100644 index 5f7de9df2fc5..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDeviceInnerTests.java +++ /dev/null @@ -1,70 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceInner; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceStatus; -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; -import org.junit.jupiter.api.Assertions; - -public final class DataBoxEdgeDeviceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataBoxEdgeDeviceInner model = - BinaryData - .fromString( - "{\"location\":\"sycbkbfk\",\"tags\":{\"axcfjpgddtocjjx\":\"dkexxppofm\",\"eojnxqbzvddn\":\"vpmouexhdzxib\"},\"sku\":{\"name\":\"TEA_1Node_UPS_Heater\",\"tier\":\"Standard\"},\"etag\":\"btwnpzaoqvuhrhcf\",\"properties\":{\"dataBoxEdgeDeviceStatus\":\"NeedsAttention\",\"serialNumber\":\"glmjth\",\"description\":\"kw\",\"modelDescription\":\"eicxmqciwqvhkhi\",\"deviceType\":\"DataBoxEdgeDevice\",\"friendlyName\":\"dtopbob\",\"culture\":\"ghmewuam\",\"deviceModel\":\"hrzayvvtpgvdf\",\"deviceSoftwareVersion\":\"otkftutqxlngx\",\"deviceLocalCapacity\":6623521547442247310,\"timeZone\":\"gnxkrxdqmidtth\",\"deviceHcsVersion\":\"vqdra\",\"configuredRoleTypes\":[\"IOT\",\"IOT\"],\"nodeCount\":1370032032},\"id\":\"ehoqfbowskan\",\"name\":\"ktzlcuiywg\",\"type\":\"ywgndrv\"}") - .toObject(DataBoxEdgeDeviceInner.class); - Assertions.assertEquals("sycbkbfk", model.location()); - Assertions.assertEquals("dkexxppofm", model.tags().get("axcfjpgddtocjjx")); - Assertions.assertEquals(SkuName.TEA_1NODE_UPS_HEATER, model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("btwnpzaoqvuhrhcf", model.etag()); - Assertions.assertEquals(DataBoxEdgeDeviceStatus.NEEDS_ATTENTION, model.dataBoxEdgeDeviceStatus()); - Assertions.assertEquals("kw", model.description()); - Assertions.assertEquals("eicxmqciwqvhkhi", model.modelDescription()); - Assertions.assertEquals("dtopbob", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxEdgeDeviceInner model = - new DataBoxEdgeDeviceInner() - .withLocation("sycbkbfk") - .withTags(mapOf("axcfjpgddtocjjx", "dkexxppofm", "eojnxqbzvddn", "vpmouexhdzxib")) - .withSku(new Sku().withName(SkuName.TEA_1NODE_UPS_HEATER).withTier(SkuTier.STANDARD)) - .withEtag("btwnpzaoqvuhrhcf") - .withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus.NEEDS_ATTENTION) - .withDescription("kw") - .withModelDescription("eicxmqciwqvhkhi") - .withFriendlyName("dtopbob"); - model = BinaryData.fromObject(model).toObject(DataBoxEdgeDeviceInner.class); - Assertions.assertEquals("sycbkbfk", model.location()); - Assertions.assertEquals("dkexxppofm", model.tags().get("axcfjpgddtocjjx")); - Assertions.assertEquals(SkuName.TEA_1NODE_UPS_HEATER, model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("btwnpzaoqvuhrhcf", model.etag()); - Assertions.assertEquals(DataBoxEdgeDeviceStatus.NEEDS_ATTENTION, model.dataBoxEdgeDeviceStatus()); - Assertions.assertEquals("kw", model.description()); - Assertions.assertEquals("eicxmqciwqvhkhi", model.modelDescription()); - Assertions.assertEquals("dtopbob", model.friendlyName()); - } - - @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/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDeviceListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDeviceListTests.java deleted file mode 100644 index 466ed502285a..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDeviceListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceList; - -public final class DataBoxEdgeDeviceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataBoxEdgeDeviceList model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"jofxqe\",\"tags\":{\"jqul\":\"aeqjhqjbasvms\"},\"sku\":{\"name\":\"TEA_4Node_Heater\",\"tier\":\"Standard\"},\"etag\":\"ybkzgcwr\",\"properties\":{\"dataBoxEdgeDeviceStatus\":\"NeedsAttention\",\"serialNumber\":\"wrljdouskc\",\"description\":\"kocrcjdkwtnhx\",\"modelDescription\":\"jbiksqrglssai\",\"deviceType\":\"DataBoxEdgeDevice\",\"friendlyName\":\"wnzlljfmppeeb\",\"culture\":\"gxsabkyq\",\"deviceModel\":\"ujitcjcz\",\"deviceSoftwareVersion\":\"evndh\",\"deviceLocalCapacity\":4158765101468631420,\"timeZone\":\"appd\",\"deviceHcsVersion\":\"dkvwrwjfe\",\"configuredRoleTypes\":[],\"nodeCount\":1102727938},\"id\":\"utjeltmrldhugj\",\"name\":\"zdatqxhocdg\",\"type\":\"ablgphuticndvk\"},{\"location\":\"ozwyiftyhxhuro\",\"tags\":{\"cukjf\":\"yxolniwp\",\"lryplwckbasyy\":\"giawx\",\"jkot\":\"nddhsgcbacph\"},\"sku\":{\"name\":\"Edge\",\"tier\":\"Standard\"},\"etag\":\"zndlikwy\",\"properties\":{\"dataBoxEdgeDeviceStatus\":\"Disconnected\",\"serialNumber\":\"ibmadgakeqsrxy\",\"description\":\"qqedqytbciqfou\",\"modelDescription\":\"mmnkzsmodmgl\",\"deviceType\":\"DataBoxEdgeDevice\",\"friendlyName\":\"b\",\"culture\":\"tmut\",\"deviceModel\":\"qktapspwgcuert\",\"deviceSoftwareVersion\":\"kdosvqw\",\"deviceLocalCapacity\":1046762399333359388,\"timeZone\":\"bbjfddgmbmbexp\",\"deviceHcsVersion\":\"htqqrolfp\",\"configuredRoleTypes\":[],\"nodeCount\":1189352281},\"id\":\"lgbquxig\",\"name\":\"yjgzjaoyfhrtxiln\",\"type\":\"rkujy\"},{\"location\":\"vlejuvfqa\",\"tags\":{\"bnwbxgjvtbvpyssz\":\"yxwjkcp\",\"guhmuouqfpr\":\"nruj\",\"nguitnwuizgazxu\":\"zw\",\"dzuhtymwi\":\"izuckyfihrfidfvz\"},\"sku\":{\"name\":\"TEA_4Node_UPS_Heater\",\"tier\":\"Standard\"},\"etag\":\"xmnteiwaop\",\"properties\":{\"dataBoxEdgeDeviceStatus\":\"Maintenance\",\"serialNumber\":\"c\",\"description\":\"xdcu\",\"modelDescription\":\"fsrpymzidnse\",\"deviceType\":\"DataBoxEdgeDevice\",\"friendlyName\":\"bzsgfyccsne\",\"culture\":\"dwzjeiach\",\"deviceModel\":\"osfln\",\"deviceSoftwareVersion\":\"sfqpteehz\",\"deviceLocalCapacity\":3146188146427506829,\"timeZone\":\"qrimzinpv\",\"deviceHcsVersion\":\"jdkirsoodqx\",\"configuredRoleTypes\":[],\"nodeCount\":901066642},\"id\":\"nohjt\",\"name\":\"kwh\",\"type\":\"soifiyipjxsqw\"},{\"location\":\"gr\",\"tags\":{\"mocpc\":\"norcjxvsnbyxqab\",\"c\":\"shurzafbljjgpbto\"},\"sku\":{\"name\":\"TEA_1Node_Heater\",\"tier\":\"Standard\"},\"etag\":\"bqidtqaj\",\"properties\":{\"dataBoxEdgeDeviceStatus\":\"Online\",\"serialNumber\":\"kudjkrlkhb\",\"description\":\"fepgzgq\",\"modelDescription\":\"zloc\",\"deviceType\":\"DataBoxEdgeDevice\",\"friendlyName\":\"aierhhb\",\"culture\":\"glu\",\"deviceModel\":\"a\",\"deviceSoftwareVersion\":\"j\",\"deviceLocalCapacity\":3716992416544598775,\"timeZone\":\"bnbdxkqpxokajion\",\"deviceHcsVersion\":\"mexgstxgcp\",\"configuredRoleTypes\":[],\"nodeCount\":1465460192},\"id\":\"aajrm\",\"name\":\"djwzrlov\",\"type\":\"clwhijcoejctbz\"}],\"nextLink\":\"s\"}") - .toObject(DataBoxEdgeDeviceList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxEdgeDeviceList model = new DataBoxEdgeDeviceList(); - model = BinaryData.fromObject(model).toObject(DataBoxEdgeDeviceList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDevicePatchTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDevicePatchTests.java deleted file mode 100644 index beadcedc7201..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDevicePatchTests.java +++ /dev/null @@ -1,41 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevicePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataBoxEdgeDevicePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataBoxEdgeDevicePatch model = - BinaryData - .fromString("{\"tags\":{\"dlwtgrhpdj\":\"okeyyienj\",\"zj\":\"jumasx\"}}") - .toObject(DataBoxEdgeDevicePatch.class); - Assertions.assertEquals("okeyyienj", model.tags().get("dlwtgrhpdj")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxEdgeDevicePatch model = - new DataBoxEdgeDevicePatch().withTags(mapOf("dlwtgrhpdj", "okeyyienj", "zj", "jumasx")); - model = BinaryData.fromObject(model).toObject(DataBoxEdgeDevicePatch.class); - Assertions.assertEquals("okeyyienj", model.tags().get("dlwtgrhpdj")); - } - - @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/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDevicePropertiesTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDevicePropertiesTests.java deleted file mode 100644 index ea90270e526b..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DataBoxEdgeDevicePropertiesTests.java +++ /dev/null @@ -1,40 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceProperties; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceStatus; -import org.junit.jupiter.api.Assertions; - -public final class DataBoxEdgeDevicePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataBoxEdgeDeviceProperties model = - BinaryData - .fromString( - "{\"dataBoxEdgeDeviceStatus\":\"ReadyToSetup\",\"serialNumber\":\"rcgyn\",\"description\":\"cpecfvmmcoofs\",\"modelDescription\":\"zevgb\",\"deviceType\":\"DataBoxEdgeDevice\",\"friendlyName\":\"abcypmivk\",\"culture\":\"zuvccfwnfnbacfio\",\"deviceModel\":\"ebxetqgtzxdp\",\"deviceSoftwareVersion\":\"bqqwxrj\",\"deviceLocalCapacity\":1458668924048164836,\"timeZone\":\"nwsubisnj\",\"deviceHcsVersion\":\"pmng\",\"configuredRoleTypes\":[\"IOT\",\"Cognitive\"],\"nodeCount\":431293436}") - .toObject(DataBoxEdgeDeviceProperties.class); - Assertions.assertEquals(DataBoxEdgeDeviceStatus.READY_TO_SETUP, model.dataBoxEdgeDeviceStatus()); - Assertions.assertEquals("cpecfvmmcoofs", model.description()); - Assertions.assertEquals("zevgb", model.modelDescription()); - Assertions.assertEquals("abcypmivk", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxEdgeDeviceProperties model = - new DataBoxEdgeDeviceProperties() - .withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus.READY_TO_SETUP) - .withDescription("cpecfvmmcoofs") - .withModelDescription("zevgb") - .withFriendlyName("abcypmivk"); - model = BinaryData.fromObject(model).toObject(DataBoxEdgeDeviceProperties.class); - Assertions.assertEquals(DataBoxEdgeDeviceStatus.READY_TO_SETUP, model.dataBoxEdgeDeviceStatus()); - Assertions.assertEquals("cpecfvmmcoofs", model.description()); - Assertions.assertEquals("zevgb", model.modelDescription()); - Assertions.assertEquals("abcypmivk", model.friendlyName()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesCreateOrUpdateMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesCreateOrUpdateMockTests.java deleted file mode 100644 index 90dd8edce20e..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,113 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevice; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceStatus; -import com.azure.resourcemanager.databoxedge.models.Sku; -import com.azure.resourcemanager.databoxedge.models.SkuName; -import com.azure.resourcemanager.databoxedge.models.SkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DevicesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"zq\",\"tags\":{\"wesgogczh\":\"f\",\"lgnyhmo\":\"nnxk\",\"h\":\"sxkkg\"},\"sku\":{\"name\":\"TEA_4Node_Heater\",\"tier\":\"Standard\"},\"etag\":\"dhqxvcx\",\"properties\":{\"dataBoxEdgeDeviceStatus\":\"Offline\",\"serialNumber\":\"sofbshrn\",\"description\":\"buswdvzyy\",\"modelDescription\":\"cnunvjsr\",\"deviceType\":\"DataBoxEdgeDevice\",\"friendlyName\":\"wnopqgikyzirtx\",\"culture\":\"uxzejntpsew\",\"deviceModel\":\"oi\",\"deviceSoftwareVersion\":\"ukry\",\"deviceLocalCapacity\":6982114006443169318,\"timeZone\":\"ieoxorggufhyaomt\",\"deviceHcsVersion\":\"hhavgrvkffovjz\",\"configuredRoleTypes\":[\"Functions\",\"Cognitive\"],\"nodeCount\":779819591},\"id\":\"jmfxumvf\",\"name\":\"luyovwxnbkfezzx\",\"type\":\"cy\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataBoxEdgeDevice response = - manager - .devices() - .define("tmmjihyeozph") - .withRegion("qncygupkvi") - .withExistingResourceGroup("wau") - .withTags( - mapOf( - "qupevzh", - "scw", - "jujbypelmcuvhixb", - "stotxh", - "ttpkiwkkbnujrywv", - "xyfwnylrcool", - "bfpncurdo", - "y")) - .withSku(new Sku().withName(SkuName.TEA_4NODE_UPS_HEATER).withTier(SkuTier.STANDARD)) - .withEtag("ywub") - .withDataBoxEdgeDeviceStatus(DataBoxEdgeDeviceStatus.READY_TO_SETUP) - .withDescription("jchrdgoihxumw") - .withModelDescription("ond") - .withFriendlyName("udfdlwgg") - .create(); - - Assertions.assertEquals("zq", response.location()); - Assertions.assertEquals("f", response.tags().get("wesgogczh")); - Assertions.assertEquals(SkuName.TEA_4NODE_HEATER, response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("dhqxvcx", response.etag()); - Assertions.assertEquals(DataBoxEdgeDeviceStatus.OFFLINE, response.dataBoxEdgeDeviceStatus()); - Assertions.assertEquals("buswdvzyy", response.description()); - Assertions.assertEquals("cnunvjsr", response.modelDescription()); - Assertions.assertEquals("wnopqgikyzirtx", response.friendlyName()); - } - - @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/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesDeleteMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesDeleteMockTests.java deleted file mode 100644 index feaa17493d11..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesDeleteMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DevicesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.devices().delete("ywkbirryuzhlhkjo", "rvqqaatj", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesDownloadUpdatesMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesDownloadUpdatesMockTests.java deleted file mode 100644 index b2c5a13fac7f..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesDownloadUpdatesMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DevicesDownloadUpdatesMockTests { - @Test - public void testDownloadUpdates() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.devices().downloadUpdates("nrvgoupmfiibfgg", "ioolvrwxkvtkkgll", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetByResourceGroupWithResponseMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index dc3f747aa402..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,81 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevice; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceStatus; -import com.azure.resourcemanager.databoxedge.models.SkuName; -import com.azure.resourcemanager.databoxedge.models.SkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DevicesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"yqtfihwh\",\"tags\":{\"ngamvpphosz\":\"z\",\"nwcvtbvkayhmtnv\":\"zudphqamvdkfw\",\"zcjaesgvvsccy\":\"qiatkzwpcnp\"},\"sku\":{\"name\":\"Gateway\",\"tier\":\"Standard\"},\"etag\":\"wygzlvdnkfxusem\",\"properties\":{\"dataBoxEdgeDeviceStatus\":\"Online\",\"serialNumber\":\"uh\",\"description\":\"fcqdpsq\",\"modelDescription\":\"vpsvuoymgcce\",\"deviceType\":\"DataBoxEdgeDevice\",\"friendlyName\":\"rypqlmfeo\",\"culture\":\"rqwky\",\"deviceModel\":\"ob\",\"deviceSoftwareVersion\":\"gxedkow\",\"deviceLocalCapacity\":3513633078690758591,\"timeZone\":\"cr\",\"deviceHcsVersion\":\"bwccsnjvcdwxlpqe\",\"configuredRoleTypes\":[\"Functions\"],\"nodeCount\":2013442569},\"id\":\"tjsyin\",\"name\":\"wfqatmtd\",\"type\":\"tmdvypgikdgs\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataBoxEdgeDevice response = - manager - .devices() - .getByResourceGroupWithResponse("ukndxdigrjgu", "fzdm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("yqtfihwh", response.location()); - Assertions.assertEquals("z", response.tags().get("ngamvpphosz")); - Assertions.assertEquals(SkuName.GATEWAY, response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("wygzlvdnkfxusem", response.etag()); - Assertions.assertEquals(DataBoxEdgeDeviceStatus.ONLINE, response.dataBoxEdgeDeviceStatus()); - Assertions.assertEquals("fcqdpsq", response.description()); - Assertions.assertEquals("vpsvuoymgcce", response.modelDescription()); - Assertions.assertEquals("rypqlmfeo", response.friendlyName()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetNetworkSettingsWithResponseMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetNetworkSettingsWithResponseMockTests.java deleted file mode 100644 index d24e4730a9ee..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetNetworkSettingsWithResponseMockTests.java +++ /dev/null @@ -1,64 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.NetworkSettings; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DevicesGetNetworkSettingsWithResponseMockTests { - @Test - public void testGetNetworkSettingsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"networkAdapters\":[]},\"id\":\"gbmhrixkwmyi\",\"name\":\"ejvegrhbpnaixex\",\"type\":\"cbdreaxhcexd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkSettings response = - manager.devices().getNetworkSettingsWithResponse("l", "dn", com.azure.core.util.Context.NONE).getValue(); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetUpdateSummaryWithResponseMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetUpdateSummaryWithResponseMockTests.java deleted file mode 100644 index 24b3cd5a362c..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesGetUpdateSummaryWithResponseMockTests.java +++ /dev/null @@ -1,73 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.UpdateSummary; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DevicesGetUpdateSummaryWithResponseMockTests { - @Test - public void testGetUpdateSummaryWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"deviceVersionNumber\":\"zm\",\"friendlyDeviceVersionName\":\"gfipnsxk\",\"deviceLastScannedDateTime\":\"2021-10-27T14:15:12Z\",\"lastCompletedScanJobDateTime\":\"2020-12-24T09:43:24Z\",\"lastCompletedDownloadJobDateTime\":\"2021-04-17T18:50:11Z\",\"lastCompletedInstallJobDateTime\":\"2021-11-05T06:26:25Z\",\"totalNumberOfUpdatesAvailable\":1897122560,\"totalNumberOfUpdatesPendingDownload\":339219254,\"totalNumberOfUpdatesPendingInstall\":1629743975,\"rebootBehavior\":\"RequestReboot\",\"ongoingUpdateOperation\":\"Scan\",\"inProgressDownloadJobId\":\"glikkxwslolb\",\"inProgressInstallJobId\":\"vuzlm\",\"inProgressDownloadJobStartedDateTime\":\"2021-08-06T01:26:51Z\",\"inProgressInstallJobStartedDateTime\":\"2021-03-10T07:17:47Z\",\"updateTitles\":[\"gplcrpwjxeznoigb\"],\"totalUpdateSizeInBytes\":51.77125486468781},\"id\":\"mw\",\"name\":\"pn\",\"type\":\"saz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpdateSummary response = - manager - .devices() - .getUpdateSummaryWithResponse("ycxzbfvoo", "vrvmtgjqppyost", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zm", response.deviceVersionNumber()); - Assertions.assertEquals("gfipnsxk", response.friendlyDeviceVersionName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T14:15:12Z"), response.deviceLastScannedDateTime()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T09:43:24Z"), response.lastCompletedScanJobDateTime()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesInstallUpdatesMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesInstallUpdatesMockTests.java deleted file mode 100644 index b659d95ac79c..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesInstallUpdatesMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DevicesInstallUpdatesMockTests { - @Test - public void testInstallUpdates() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.devices().installUpdates("wz", "bnhlmc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesListByResourceGroupMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesListByResourceGroupMockTests.java deleted file mode 100644 index a30a98074578..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesListByResourceGroupMockTests.java +++ /dev/null @@ -1,80 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevice; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceStatus; -import com.azure.resourcemanager.databoxedge.models.SkuName; -import com.azure.resourcemanager.databoxedge.models.SkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DevicesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"hneuyowqkd\",\"tags\":{\"ib\":\"i\"},\"sku\":{\"name\":\"Edge\",\"tier\":\"Standard\"},\"etag\":\"pzimejzanlfzxi\",\"properties\":{\"dataBoxEdgeDeviceStatus\":\"Maintenance\",\"serialNumber\":\"zonokixrjqci\",\"description\":\"zpfrla\",\"modelDescription\":\"zrnw\",\"deviceType\":\"DataBoxEdgeDevice\",\"friendlyName\":\"dfpwpjylwbtlhfls\",\"culture\":\"dhszfjv\",\"deviceModel\":\"gofel\",\"deviceSoftwareVersion\":\"grqmqhldvrii\",\"deviceLocalCapacity\":7120842075984408943,\"timeZone\":\"lg\",\"deviceHcsVersion\":\"kvtvsexso\",\"configuredRoleTypes\":[\"Functions\"],\"nodeCount\":2013630700},\"id\":\"hhahhxvrhmzkwpjg\",\"name\":\"wspughftqsxhqx\",\"type\":\"j\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.devices().listByResourceGroup("x", "smwutwbdsrezpd", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hneuyowqkd", response.iterator().next().location()); - Assertions.assertEquals("i", response.iterator().next().tags().get("ib")); - Assertions.assertEquals(SkuName.EDGE, response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.iterator().next().sku().tier()); - Assertions.assertEquals("pzimejzanlfzxi", response.iterator().next().etag()); - Assertions - .assertEquals(DataBoxEdgeDeviceStatus.MAINTENANCE, response.iterator().next().dataBoxEdgeDeviceStatus()); - Assertions.assertEquals("zpfrla", response.iterator().next().description()); - Assertions.assertEquals("zrnw", response.iterator().next().modelDescription()); - Assertions.assertEquals("dfpwpjylwbtlhfls", response.iterator().next().friendlyName()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesListMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesListMockTests.java deleted file mode 100644 index 78cbb1c77862..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesListMockTests.java +++ /dev/null @@ -1,81 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDevice; -import com.azure.resourcemanager.databoxedge.models.DataBoxEdgeDeviceStatus; -import com.azure.resourcemanager.databoxedge.models.SkuName; -import com.azure.resourcemanager.databoxedge.models.SkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DevicesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"vfvpdbodaciz\",\"tags\":{\"hvxndzwmkrefajpj\":\"lhkrribdeibqipqk\"},\"sku\":{\"name\":\"TEA_1Node\",\"tier\":\"Standard\"},\"etag\":\"hgbijt\",\"properties\":{\"dataBoxEdgeDeviceStatus\":\"NeedsAttention\",\"serialNumber\":\"zs\",\"description\":\"bibsystawfsdjpvk\",\"modelDescription\":\"bjxbkzbzk\",\"deviceType\":\"DataBoxEdgeDevice\",\"friendlyName\":\"jabudurgkakmo\",\"culture\":\"hjjklff\",\"deviceModel\":\"ouw\",\"deviceSoftwareVersion\":\"gzrf\",\"deviceLocalCapacity\":6379761191794506744,\"timeZone\":\"bizikayuhq\",\"deviceHcsVersion\":\"jbsybbqw\",\"configuredRoleTypes\":[\"Functions\"],\"nodeCount\":1918019278},\"id\":\"mfpgv\",\"name\":\"pip\",\"type\":\"slthaq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.devices().list("nyowxwlmdjrkvfg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vfvpdbodaciz", response.iterator().next().location()); - Assertions.assertEquals("lhkrribdeibqipqk", response.iterator().next().tags().get("hvxndzwmkrefajpj")); - Assertions.assertEquals(SkuName.TEA_1NODE, response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.iterator().next().sku().tier()); - Assertions.assertEquals("hgbijt", response.iterator().next().etag()); - Assertions - .assertEquals( - DataBoxEdgeDeviceStatus.NEEDS_ATTENTION, response.iterator().next().dataBoxEdgeDeviceStatus()); - Assertions.assertEquals("bibsystawfsdjpvk", response.iterator().next().description()); - Assertions.assertEquals("bjxbkzbzk", response.iterator().next().modelDescription()); - Assertions.assertEquals("jabudurgkakmo", response.iterator().next().friendlyName()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesScanForUpdatesMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesScanForUpdatesMockTests.java deleted file mode 100644 index d519194d7a2b..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesScanForUpdatesMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DevicesScanForUpdatesMockTests { - @Test - public void testScanForUpdates() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.devices().scanForUpdates("rvqahqkghtpwi", "nhyjsv", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesUploadCertificateWithResponseMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesUploadCertificateWithResponseMockTests.java deleted file mode 100644 index 6c42acbe7872..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/DevicesUploadCertificateWithResponseMockTests.java +++ /dev/null @@ -1,78 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.AuthenticationType; -import com.azure.resourcemanager.databoxedge.models.UploadCertificateRequest; -import com.azure.resourcemanager.databoxedge.models.UploadCertificateResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DevicesUploadCertificateWithResponseMockTests { - @Test - public void testUploadCertificateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"authType\":\"AzureActiveDirectory\",\"resourceId\":\"j\",\"aadAuthority\":\"wuenvr\",\"aadTenantId\":\"yo\",\"servicePrincipalClientId\":\"ibreb\",\"servicePrincipalObjectId\":\"aysjkixqtnqttez\",\"azureManagementEndpointAudience\":\"fffiak\",\"aadAudience\":\"pqqmted\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UploadCertificateResponse response = - manager - .devices() - .uploadCertificateWithResponse( - "jjoqkagf", - "sxtta", - new UploadCertificateRequest() - .withAuthenticationType(AuthenticationType.INVALID) - .withCertificate("xnfaazpxdtnk"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(AuthenticationType.AZURE_ACTIVE_DIRECTORY, response.authType()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/FileEventTriggerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/FileEventTriggerTests.java deleted file mode 100644 index 2a3d5cfe1145..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/FileEventTriggerTests.java +++ /dev/null @@ -1,38 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.FileEventTrigger; -import com.azure.resourcemanager.databoxedge.models.FileSourceInfo; -import com.azure.resourcemanager.databoxedge.models.RoleSinkInfo; -import org.junit.jupiter.api.Assertions; - -public final class FileEventTriggerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FileEventTrigger model = - BinaryData - .fromString( - "{\"kind\":\"FileEvent\",\"properties\":{\"sourceInfo\":{\"shareId\":\"cormr\"},\"sinkInfo\":{\"roleId\":\"xqtvcofu\"},\"customContextTag\":\"lvkgju\"},\"id\":\"gdknnqv\",\"name\":\"aznqntoru\",\"type\":\"sgsahmkycgr\"}") - .toObject(FileEventTrigger.class); - Assertions.assertEquals("cormr", model.sourceInfo().shareId()); - Assertions.assertEquals("xqtvcofu", model.sinkInfo().roleId()); - Assertions.assertEquals("lvkgju", model.customContextTag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FileEventTrigger model = - new FileEventTrigger() - .withSourceInfo(new FileSourceInfo().withShareId("cormr")) - .withSinkInfo(new RoleSinkInfo().withRoleId("xqtvcofu")) - .withCustomContextTag("lvkgju"); - model = BinaryData.fromObject(model).toObject(FileEventTrigger.class); - Assertions.assertEquals("cormr", model.sourceInfo().shareId()); - Assertions.assertEquals("xqtvcofu", model.sinkInfo().roleId()); - Assertions.assertEquals("lvkgju", model.customContextTag()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/FileSourceInfoTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/FileSourceInfoTests.java deleted file mode 100644 index 617001c567cd..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/FileSourceInfoTests.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.FileSourceInfo; -import org.junit.jupiter.api.Assertions; - -public final class FileSourceInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FileSourceInfo model = BinaryData.fromString("{\"shareId\":\"wabm\"}").toObject(FileSourceInfo.class); - Assertions.assertEquals("wabm", model.shareId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FileSourceInfo model = new FileSourceInfo().withShareId("wabm"); - model = BinaryData.fromObject(model).toObject(FileSourceInfo.class); - Assertions.assertEquals("wabm", model.shareId()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/FileTriggerPropertiesTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/FileTriggerPropertiesTests.java deleted file mode 100644 index 52abc3bb2b13..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/FileTriggerPropertiesTests.java +++ /dev/null @@ -1,38 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.FileTriggerProperties; -import com.azure.resourcemanager.databoxedge.models.FileSourceInfo; -import com.azure.resourcemanager.databoxedge.models.RoleSinkInfo; -import org.junit.jupiter.api.Assertions; - -public final class FileTriggerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FileTriggerProperties model = - BinaryData - .fromString( - "{\"sourceInfo\":{\"shareId\":\"uwjuetaeburuvdmo\"},\"sinkInfo\":{\"roleId\":\"s\"},\"customContextTag\":\"l\"}") - .toObject(FileTriggerProperties.class); - Assertions.assertEquals("uwjuetaeburuvdmo", model.sourceInfo().shareId()); - Assertions.assertEquals("s", model.sinkInfo().roleId()); - Assertions.assertEquals("l", model.customContextTag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FileTriggerProperties model = - new FileTriggerProperties() - .withSourceInfo(new FileSourceInfo().withShareId("uwjuetaeburuvdmo")) - .withSinkInfo(new RoleSinkInfo().withRoleId("s")) - .withCustomContextTag("l"); - model = BinaryData.fromObject(model).toObject(FileTriggerProperties.class); - Assertions.assertEquals("uwjuetaeburuvdmo", model.sourceInfo().shareId()); - Assertions.assertEquals("s", model.sinkInfo().roleId()); - Assertions.assertEquals("l", model.customContextTag()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/IoTRolePropertiesTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/IoTRolePropertiesTests.java deleted file mode 100644 index b578b6b29126..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/IoTRolePropertiesTests.java +++ /dev/null @@ -1,71 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.IoTRoleProperties; -import com.azure.resourcemanager.databoxedge.models.Authentication; -import com.azure.resourcemanager.databoxedge.models.IoTDeviceInfo; -import com.azure.resourcemanager.databoxedge.models.MountPointMap; -import com.azure.resourcemanager.databoxedge.models.PlatformType; -import com.azure.resourcemanager.databoxedge.models.RoleStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IoTRolePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IoTRoleProperties model = - BinaryData - .fromString( - "{\"hostPlatform\":\"Windows\",\"ioTDeviceDetails\":{\"deviceId\":\"skdsnfdsdoakg\",\"ioTHostHub\":\"dlmkkzevdl\",\"ioTHostHubId\":\"wpusdsttwvogv\",\"authentication\":{}},\"ioTEdgeDeviceDetails\":{\"deviceId\":\"jdcngqqm\",\"ioTHostHub\":\"akufgmjz\",\"ioTHostHubId\":\"rdgrtw\",\"authentication\":{}},\"shareMappings\":[{\"shareId\":\"zkopb\",\"roleId\":\"nrfdw\",\"mountPoint\":\"uhhziuiefozbhdm\",\"roleType\":\"IOT\"},{\"shareId\":\"mzqhoftrmaequi\",\"roleId\":\"xicslfao\",\"mountPoint\":\"piyylhalnswhccsp\",\"roleType\":\"Functions\"},{\"shareId\":\"ivwitqscywugg\",\"roleId\":\"luhczbw\",\"mountPoint\":\"hairsbrgzdwms\",\"roleType\":\"Functions\"}],\"roleStatus\":\"Enabled\"}") - .toObject(IoTRoleProperties.class); - Assertions.assertEquals(PlatformType.WINDOWS, model.hostPlatform()); - Assertions.assertEquals("skdsnfdsdoakg", model.ioTDeviceDetails().deviceId()); - Assertions.assertEquals("dlmkkzevdl", model.ioTDeviceDetails().ioTHostHub()); - Assertions.assertEquals("wpusdsttwvogv", model.ioTDeviceDetails().ioTHostHubId()); - Assertions.assertEquals("jdcngqqm", model.ioTEdgeDeviceDetails().deviceId()); - Assertions.assertEquals("akufgmjz", model.ioTEdgeDeviceDetails().ioTHostHub()); - Assertions.assertEquals("rdgrtw", model.ioTEdgeDeviceDetails().ioTHostHubId()); - Assertions.assertEquals("zkopb", model.shareMappings().get(0).shareId()); - Assertions.assertEquals(RoleStatus.ENABLED, model.roleStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IoTRoleProperties model = - new IoTRoleProperties() - .withHostPlatform(PlatformType.WINDOWS) - .withIoTDeviceDetails( - new IoTDeviceInfo() - .withDeviceId("skdsnfdsdoakg") - .withIoTHostHub("dlmkkzevdl") - .withIoTHostHubId("wpusdsttwvogv") - .withAuthentication(new Authentication())) - .withIoTEdgeDeviceDetails( - new IoTDeviceInfo() - .withDeviceId("jdcngqqm") - .withIoTHostHub("akufgmjz") - .withIoTHostHubId("rdgrtw") - .withAuthentication(new Authentication())) - .withShareMappings( - Arrays - .asList( - new MountPointMap().withShareId("zkopb"), - new MountPointMap().withShareId("mzqhoftrmaequi"), - new MountPointMap().withShareId("ivwitqscywugg"))) - .withRoleStatus(RoleStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(IoTRoleProperties.class); - Assertions.assertEquals(PlatformType.WINDOWS, model.hostPlatform()); - Assertions.assertEquals("skdsnfdsdoakg", model.ioTDeviceDetails().deviceId()); - Assertions.assertEquals("dlmkkzevdl", model.ioTDeviceDetails().ioTHostHub()); - Assertions.assertEquals("wpusdsttwvogv", model.ioTDeviceDetails().ioTHostHubId()); - Assertions.assertEquals("jdcngqqm", model.ioTEdgeDeviceDetails().deviceId()); - Assertions.assertEquals("akufgmjz", model.ioTEdgeDeviceDetails().ioTHostHub()); - Assertions.assertEquals("rdgrtw", model.ioTEdgeDeviceDetails().ioTHostHubId()); - Assertions.assertEquals("zkopb", model.shareMappings().get(0).shareId()); - Assertions.assertEquals(RoleStatus.ENABLED, model.roleStatus()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/IoTRoleTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/IoTRoleTests.java deleted file mode 100644 index f1fc60897cb0..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/IoTRoleTests.java +++ /dev/null @@ -1,63 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.IoTDeviceInfo; -import com.azure.resourcemanager.databoxedge.models.IoTRole; -import com.azure.resourcemanager.databoxedge.models.MountPointMap; -import com.azure.resourcemanager.databoxedge.models.PlatformType; -import com.azure.resourcemanager.databoxedge.models.RoleStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IoTRoleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IoTRole model = - BinaryData - .fromString( - "{\"kind\":\"IOT\",\"properties\":{\"hostPlatform\":\"Windows\",\"ioTDeviceDetails\":{\"deviceId\":\"cn\",\"ioTHostHub\":\"ujitcjedftww\",\"ioTHostHubId\":\"zkoj\"},\"ioTEdgeDeviceDetails\":{\"deviceId\":\"c\",\"ioTHostHub\":\"zfoqouicybxar\",\"ioTHostHubId\":\"szufoxciqopidoa\"},\"shareMappings\":[{\"shareId\":\"dhkha\",\"roleId\":\"khnzbonlw\",\"mountPoint\":\"oegokdwbwh\",\"roleType\":\"IOT\"},{\"shareId\":\"zcmrvexztvb\",\"roleId\":\"gsfraoyzkoow\",\"mountPoint\":\"mnguxawqaldsyu\",\"roleType\":\"Cognitive\"}],\"roleStatus\":\"Disabled\"},\"id\":\"erqf\",\"name\":\"bw\",\"type\":\"znkbykutwpfhpagm\"}") - .toObject(IoTRole.class); - Assertions.assertEquals(PlatformType.WINDOWS, model.hostPlatform()); - Assertions.assertEquals("cn", model.ioTDeviceDetails().deviceId()); - Assertions.assertEquals("ujitcjedftww", model.ioTDeviceDetails().ioTHostHub()); - Assertions.assertEquals("zkoj", model.ioTDeviceDetails().ioTHostHubId()); - Assertions.assertEquals("c", model.ioTEdgeDeviceDetails().deviceId()); - Assertions.assertEquals("zfoqouicybxar", model.ioTEdgeDeviceDetails().ioTHostHub()); - Assertions.assertEquals("szufoxciqopidoa", model.ioTEdgeDeviceDetails().ioTHostHubId()); - Assertions.assertEquals("dhkha", model.shareMappings().get(0).shareId()); - Assertions.assertEquals(RoleStatus.DISABLED, model.roleStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IoTRole model = - new IoTRole() - .withHostPlatform(PlatformType.WINDOWS) - .withIoTDeviceDetails( - new IoTDeviceInfo().withDeviceId("cn").withIoTHostHub("ujitcjedftww").withIoTHostHubId("zkoj")) - .withIoTEdgeDeviceDetails( - new IoTDeviceInfo() - .withDeviceId("c") - .withIoTHostHub("zfoqouicybxar") - .withIoTHostHubId("szufoxciqopidoa")) - .withShareMappings( - Arrays - .asList( - new MountPointMap().withShareId("dhkha"), new MountPointMap().withShareId("zcmrvexztvb"))) - .withRoleStatus(RoleStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(IoTRole.class); - Assertions.assertEquals(PlatformType.WINDOWS, model.hostPlatform()); - Assertions.assertEquals("cn", model.ioTDeviceDetails().deviceId()); - Assertions.assertEquals("ujitcjedftww", model.ioTDeviceDetails().ioTHostHub()); - Assertions.assertEquals("zkoj", model.ioTDeviceDetails().ioTHostHubId()); - Assertions.assertEquals("c", model.ioTEdgeDeviceDetails().deviceId()); - Assertions.assertEquals("zfoqouicybxar", model.ioTEdgeDeviceDetails().ioTHostHub()); - Assertions.assertEquals("szufoxciqopidoa", model.ioTEdgeDeviceDetails().ioTHostHubId()); - Assertions.assertEquals("dhkha", model.shareMappings().get(0).shareId()); - Assertions.assertEquals(RoleStatus.DISABLED, model.roleStatus()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/Ipv4ConfigTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/Ipv4ConfigTests.java deleted file mode 100644 index b062e5318b4a..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/Ipv4ConfigTests.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.Ipv4Config; - -public final class Ipv4ConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Ipv4Config model = - BinaryData - .fromString("{\"ipAddress\":\"psiebtfhvpes\",\"subnet\":\"skrdqmhjj\",\"gateway\":\"tldwkyzxuutk\"}") - .toObject(Ipv4Config.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Ipv4Config model = new Ipv4Config(); - model = BinaryData.fromObject(model).toObject(Ipv4Config.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/Ipv6ConfigTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/Ipv6ConfigTests.java deleted file mode 100644 index b6ee1d82285d..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/Ipv6ConfigTests.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.Ipv6Config; - -public final class Ipv6ConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Ipv6Config model = - BinaryData - .fromString("{\"ipAddress\":\"ws\",\"prefixLength\":1152812045,\"gateway\":\"lxotogtwrupq\"}") - .toObject(Ipv6Config.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Ipv6Config model = new Ipv6Config(); - model = BinaryData.fromObject(model).toObject(Ipv6Config.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/JobPropertiesTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/JobPropertiesTests.java deleted file mode 100644 index d28d0dced684..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/JobPropertiesTests.java +++ /dev/null @@ -1,28 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.JobProperties; -import org.junit.jupiter.api.Assertions; - -public final class JobPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobProperties model = - BinaryData - .fromString( - "{\"jobType\":\"RefreshContainer\",\"currentStage\":\"Unknown\",\"downloadProgress\":{\"downloadPhase\":\"Initializing\",\"percentComplete\":1879825209,\"totalBytesToDownload\":14.127280760623284,\"totalBytesDownloaded\":77.16376490043355,\"numberOfUpdatesToDownload\":207335442,\"numberOfUpdatesDownloaded\":1774598517},\"installProgress\":{\"percentComplete\":28529322,\"numberOfUpdatesToInstall\":766224962,\"numberOfUpdatesInstalled\":943269845},\"totalRefreshErrors\":771742090,\"errorManifestFile\":\"lhocohslkev\",\"refreshedEntityId\":\"ggzfbu\",\"folder\":\"mvfaxkffeiith\"}") - .toObject(JobProperties.class); - Assertions.assertEquals("mvfaxkffeiith", model.folder()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobProperties model = new JobProperties().withFolder("mvfaxkffeiith"); - model = BinaryData.fromObject(model).toObject(JobProperties.class); - Assertions.assertEquals("mvfaxkffeiith", model.folder()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/MetricDimensionV1Tests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/MetricDimensionV1Tests.java deleted file mode 100644 index b8fd285025cd..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/MetricDimensionV1Tests.java +++ /dev/null @@ -1,36 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.MetricDimensionV1; -import org.junit.jupiter.api.Assertions; - -public final class MetricDimensionV1Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricDimensionV1 model = - BinaryData - .fromString( - "{\"name\":\"cciqihnhungbwjz\",\"displayName\":\"fygxgispemvtzfk\",\"toBeExportedForShoebox\":true}") - .toObject(MetricDimensionV1.class); - Assertions.assertEquals("cciqihnhungbwjz", model.name()); - Assertions.assertEquals("fygxgispemvtzfk", model.displayName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricDimensionV1 model = - new MetricDimensionV1() - .withName("cciqihnhungbwjz") - .withDisplayName("fygxgispemvtzfk") - .withToBeExportedForShoebox(true); - model = BinaryData.fromObject(model).toObject(MetricDimensionV1.class); - Assertions.assertEquals("cciqihnhungbwjz", model.name()); - Assertions.assertEquals("fygxgispemvtzfk", model.displayName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/MetricSpecificationV1Tests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/MetricSpecificationV1Tests.java deleted file mode 100644 index 4b10d3b6ca93..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/MetricSpecificationV1Tests.java +++ /dev/null @@ -1,76 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.MetricAggregationType; -import com.azure.resourcemanager.databoxedge.models.MetricCategory; -import com.azure.resourcemanager.databoxedge.models.MetricDimensionV1; -import com.azure.resourcemanager.databoxedge.models.MetricSpecificationV1; -import com.azure.resourcemanager.databoxedge.models.MetricUnit; -import com.azure.resourcemanager.databoxedge.models.TimeGrain; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricSpecificationV1Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricSpecificationV1 model = - BinaryData - .fromString( - "{\"name\":\"oxxjtfelluwf\",\"displayName\":\"tonpe\",\"displayDescription\":\"pjkjlxofpdv\",\"unit\":\"CountPerSecond\",\"aggregationType\":\"NotSpecified\",\"dimensions\":[{\"name\":\"ninmayhuyb\",\"displayName\":\"podepoo\",\"toBeExportedForShoebox\":true}],\"fillGapWithZero\":false,\"category\":\"Capacity\",\"resourceIdDimensionNameOverride\":\"heognarxzxtheo\",\"supportedTimeGrainTypes\":[\"PT1D\"],\"supportedAggregationTypes\":[\"Count\"]}") - .toObject(MetricSpecificationV1.class); - Assertions.assertEquals("oxxjtfelluwf", model.name()); - Assertions.assertEquals("tonpe", model.displayName()); - Assertions.assertEquals("pjkjlxofpdv", model.displayDescription()); - Assertions.assertEquals(MetricUnit.COUNT_PER_SECOND, model.unit()); - Assertions.assertEquals(MetricAggregationType.NOT_SPECIFIED, model.aggregationType()); - Assertions.assertEquals("ninmayhuyb", model.dimensions().get(0).name()); - Assertions.assertEquals("podepoo", model.dimensions().get(0).displayName()); - Assertions.assertEquals(true, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals(false, model.fillGapWithZero()); - Assertions.assertEquals(MetricCategory.CAPACITY, model.category()); - Assertions.assertEquals("heognarxzxtheo", model.resourceIdDimensionNameOverride()); - Assertions.assertEquals(TimeGrain.PT1D, model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(MetricAggregationType.COUNT, model.supportedAggregationTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecificationV1 model = - new MetricSpecificationV1() - .withName("oxxjtfelluwf") - .withDisplayName("tonpe") - .withDisplayDescription("pjkjlxofpdv") - .withUnit(MetricUnit.COUNT_PER_SECOND) - .withAggregationType(MetricAggregationType.NOT_SPECIFIED) - .withDimensions( - Arrays - .asList( - new MetricDimensionV1() - .withName("ninmayhuyb") - .withDisplayName("podepoo") - .withToBeExportedForShoebox(true))) - .withFillGapWithZero(false) - .withCategory(MetricCategory.CAPACITY) - .withResourceIdDimensionNameOverride("heognarxzxtheo") - .withSupportedTimeGrainTypes(Arrays.asList(TimeGrain.PT1D)) - .withSupportedAggregationTypes(Arrays.asList(MetricAggregationType.COUNT)); - model = BinaryData.fromObject(model).toObject(MetricSpecificationV1.class); - Assertions.assertEquals("oxxjtfelluwf", model.name()); - Assertions.assertEquals("tonpe", model.displayName()); - Assertions.assertEquals("pjkjlxofpdv", model.displayDescription()); - Assertions.assertEquals(MetricUnit.COUNT_PER_SECOND, model.unit()); - Assertions.assertEquals(MetricAggregationType.NOT_SPECIFIED, model.aggregationType()); - Assertions.assertEquals("ninmayhuyb", model.dimensions().get(0).name()); - Assertions.assertEquals("podepoo", model.dimensions().get(0).displayName()); - Assertions.assertEquals(true, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals(false, model.fillGapWithZero()); - Assertions.assertEquals(MetricCategory.CAPACITY, model.category()); - Assertions.assertEquals("heognarxzxtheo", model.resourceIdDimensionNameOverride()); - Assertions.assertEquals(TimeGrain.PT1D, model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(MetricAggregationType.COUNT, model.supportedAggregationTypes().get(0)); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/MountPointMapTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/MountPointMapTests.java deleted file mode 100644 index 637467728f90..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/MountPointMapTests.java +++ /dev/null @@ -1,28 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.MountPointMap; -import org.junit.jupiter.api.Assertions; - -public final class MountPointMapTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MountPointMap model = - BinaryData - .fromString( - "{\"shareId\":\"vhqlkthumaqo\",\"roleId\":\"gycdu\",\"mountPoint\":\"r\",\"roleType\":\"Cognitive\"}") - .toObject(MountPointMap.class); - Assertions.assertEquals("vhqlkthumaqo", model.shareId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MountPointMap model = new MountPointMap().withShareId("vhqlkthumaqo"); - model = BinaryData.fromObject(model).toObject(MountPointMap.class); - Assertions.assertEquals("vhqlkthumaqo", model.shareId()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkAdapterPositionTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkAdapterPositionTests.java deleted file mode 100644 index ab689484d612..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkAdapterPositionTests.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.NetworkAdapterPosition; - -public final class NetworkAdapterPositionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkAdapterPosition model = - BinaryData - .fromString("{\"networkGroup\":\"NonRDMA\",\"port\":611656940}") - .toObject(NetworkAdapterPosition.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkAdapterPosition model = new NetworkAdapterPosition(); - model = BinaryData.fromObject(model).toObject(NetworkAdapterPosition.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkAdapterTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkAdapterTests.java deleted file mode 100644 index e09cb8006049..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkAdapterTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.NetworkAdapter; -import com.azure.resourcemanager.databoxedge.models.NetworkAdapterDhcpStatus; -import com.azure.resourcemanager.databoxedge.models.NetworkAdapterRdmaStatus; -import org.junit.jupiter.api.Assertions; - -public final class NetworkAdapterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkAdapter model = - BinaryData - .fromString( - "{\"adapterId\":\"wbavxbniwdj\",\"adapterPosition\":{\"networkGroup\":\"RDMA\",\"port\":670634549},\"index\":551724215,\"nodeId\":\"nxytxh\",\"networkAdapterName\":\"xbzpfzab\",\"label\":\"cuh\",\"macAddress\":\"tcty\",\"linkSpeed\":3791870776302603545,\"status\":\"Inactive\",\"rdmaStatus\":\"Incapable\",\"dhcpStatus\":\"Enabled\",\"ipv4Configuration\":{\"ipAddress\":\"bhvgy\",\"subnet\":\"uosvmkfssxqukk\",\"gateway\":\"l\"},\"ipv6Configuration\":{\"ipAddress\":\"sxnkjzkdeslpvlo\",\"prefixLength\":158765093,\"gateway\":\"ighxpk\"},\"ipv6LinkLocalAddress\":\"zb\",\"dnsServers\":[\"ebb\",\"umnyqu\",\"edeojnabc\"]}") - .toObject(NetworkAdapter.class); - Assertions.assertEquals(NetworkAdapterRdmaStatus.INCAPABLE, model.rdmaStatus()); - Assertions.assertEquals(NetworkAdapterDhcpStatus.ENABLED, model.dhcpStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkAdapter model = - new NetworkAdapter() - .withRdmaStatus(NetworkAdapterRdmaStatus.INCAPABLE) - .withDhcpStatus(NetworkAdapterDhcpStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(NetworkAdapter.class); - Assertions.assertEquals(NetworkAdapterRdmaStatus.INCAPABLE, model.rdmaStatus()); - Assertions.assertEquals(NetworkAdapterDhcpStatus.ENABLED, model.dhcpStatus()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkSettingsInnerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkSettingsInnerTests.java deleted file mode 100644 index 0788173787c6..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkSettingsInnerTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.NetworkSettingsInner; - -public final class NetworkSettingsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSettingsInner model = - BinaryData - .fromString( - "{\"properties\":{\"networkAdapters\":[{\"adapterId\":\"ur\",\"index\":1552581674,\"nodeId\":\"nspydptkoenkoukn\",\"networkAdapterName\":\"dwtiukbldngkp\",\"label\":\"ipazyxoegukgjnpi\",\"macAddress\":\"gygev\",\"linkSpeed\":7286292196519696494,\"status\":\"Inactive\",\"rdmaStatus\":\"Incapable\",\"dhcpStatus\":\"Disabled\",\"ipv6LinkLocalAddress\":\"drqjsdpy\",\"dnsServers\":[]},{\"adapterId\":\"yhxdeoejzicwi\",\"index\":1909902819,\"nodeId\":\"gzfbishcbk\",\"networkAdapterName\":\"jdeyeamdpha\",\"label\":\"lpbuxwgipwhonowk\",\"macAddress\":\"hwankixzbinjepu\",\"linkSpeed\":3801816570737266092,\"status\":\"Active\",\"rdmaStatus\":\"Incapable\",\"dhcpStatus\":\"Enabled\",\"ipv6LinkLocalAddress\":\"iyqzrnk\",\"dnsServers\":[]},{\"adapterId\":\"yx\",\"index\":1495315655,\"nodeId\":\"sicohoqqnwvlry\",\"networkAdapterName\":\"w\",\"label\":\"eun\",\"macAddress\":\"qhgyxzkonocukok\",\"linkSpeed\":8621613228572794905,\"status\":\"Active\",\"rdmaStatus\":\"Capable\",\"dhcpStatus\":\"Disabled\",\"ipv6LinkLocalAddress\":\"kbeype\",\"dnsServers\":[]},{\"adapterId\":\"jmwvvj\",\"index\":999201646,\"nodeId\":\"senhwlrs\",\"networkAdapterName\":\"rzpwvlqdqgbiq\",\"label\":\"ihkaetcktvfc\",\"macAddress\":\"fsnkymuctq\",\"linkSpeed\":1554730688618106722,\"status\":\"Inactive\",\"rdmaStatus\":\"Capable\",\"dhcpStatus\":\"Disabled\",\"ipv6LinkLocalAddress\":\"uwutttxfvjrbi\",\"dnsServers\":[]}]},\"id\":\"hxepcyvahfnlj\",\"name\":\"yq\",\"type\":\"j\"}") - .toObject(NetworkSettingsInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSettingsInner model = new NetworkSettingsInner(); - model = BinaryData.fromObject(model).toObject(NetworkSettingsInner.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkSettingsPropertiesTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkSettingsPropertiesTests.java deleted file mode 100644 index 0d7506afae5b..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NetworkSettingsPropertiesTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.NetworkSettingsProperties; - -public final class NetworkSettingsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSettingsProperties model = - BinaryData - .fromString( - "{\"networkAdapters\":[{\"adapterId\":\"qgidokgjljyo\",\"adapterPosition\":{\"networkGroup\":\"RDMA\",\"port\":384639682},\"index\":1059812914,\"nodeId\":\"ncghkje\",\"networkAdapterName\":\"zhbijhtxfv\",\"label\":\"bfs\",\"macAddress\":\"nehmpvecx\",\"linkSpeed\":8488647462806528566,\"status\":\"Inactive\",\"rdmaStatus\":\"Incapable\",\"dhcpStatus\":\"Enabled\",\"ipv4Configuration\":{\"ipAddress\":\"pukgriwflzlfb\",\"subnet\":\"puz\",\"gateway\":\"ispnqzahmgkbrp\"},\"ipv6Configuration\":{\"ipAddress\":\"hibnuqqkpika\",\"prefixLength\":1007022027,\"gateway\":\"tqagnbuynh\"},\"ipv6LinkLocalAddress\":\"gg\",\"dnsServers\":[\"fsiarbutr\"]},{\"adapterId\":\"pnazzm\",\"adapterPosition\":{\"networkGroup\":\"NonRDMA\",\"port\":2047177811},\"index\":840461055,\"nodeId\":\"tdbhrbnla\",\"networkAdapterName\":\"xmyskp\",\"label\":\"enbtkcxywny\",\"macAddress\":\"rsyn\",\"linkSpeed\":531733013424860873,\"status\":\"Inactive\",\"rdmaStatus\":\"Incapable\",\"dhcpStatus\":\"Disabled\",\"ipv4Configuration\":{\"ipAddress\":\"lhaaxdbabp\",\"subnet\":\"wrqlfktsthsuco\",\"gateway\":\"nyyazttbtwwrqpue\"},\"ipv6Configuration\":{\"ipAddress\":\"zywbiex\",\"prefixLength\":1206070255,\"gateway\":\"ue\"},\"ipv6LinkLocalAddress\":\"ibx\",\"dnsServers\":[\"bhqwalmuzyoxa\",\"pdkzjancuxr\"]}]}") - .toObject(NetworkSettingsProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSettingsProperties model = new NetworkSettingsProperties(); - model = BinaryData.fromObject(model).toObject(NetworkSettingsProperties.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodeInnerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodeInnerTests.java deleted file mode 100644 index 5088dcca94f0..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodeInnerTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.NodeInner; - -public final class NodeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeInner model = - BinaryData - .fromString( - "{\"properties\":{\"nodeStatus\":\"Up\",\"nodeChassisSerialNumber\":\"cq\",\"nodeSerialNumber\":\"ccm\",\"nodeDisplayName\":\"udxytlmoyrx\",\"nodeFriendlySoftwareVersion\":\"fudwpznt\",\"nodeHcsVersion\":\"dzhlrq\",\"nodeInstanceId\":\"hckfrlhrx\"},\"id\":\"bkyvp\",\"name\":\"ca\",\"type\":\"uzbpzkafku\"}") - .toObject(NodeInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeInner model = new NodeInner(); - model = BinaryData.fromObject(model).toObject(NodeInner.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodeListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodeListTests.java deleted file mode 100644 index 6c1e40fc0bdd..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodeListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.NodeList; - -public final class NodeListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"nodeStatus\":\"Unknown\",\"nodeChassisSerialNumber\":\"ykvceoveil\",\"nodeSerialNumber\":\"notyfjfcnjbkcn\",\"nodeDisplayName\":\"hbttkphyw\",\"nodeFriendlySoftwareVersion\":\"vjtoqnermclfp\",\"nodeHcsVersion\":\"hoxus\",\"nodeInstanceId\":\"pabgyeps\"},\"id\":\"jta\",\"name\":\"qugxywpmueefjzwf\",\"type\":\"kqujidsuyono\"}]}") - .toObject(NodeList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeList model = new NodeList(); - model = BinaryData.fromObject(model).toObject(NodeList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodePropertiesTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodePropertiesTests.java deleted file mode 100644 index 8c502e974685..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodePropertiesTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.NodeProperties; - -public final class NodePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeProperties model = - BinaryData - .fromString( - "{\"nodeStatus\":\"Down\",\"nodeChassisSerialNumber\":\"nwbmeh\",\"nodeSerialNumber\":\"eyvjusrtslhspkde\",\"nodeDisplayName\":\"aofmxagkvtme\",\"nodeFriendlySoftwareVersion\":\"qkrhahvljua\",\"nodeHcsVersion\":\"quhcdhmduala\",\"nodeInstanceId\":\"qpv\"}") - .toObject(NodeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeProperties model = new NodeProperties(); - model = BinaryData.fromObject(model).toObject(NodeProperties.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodesListByDataBoxEdgeDeviceMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodesListByDataBoxEdgeDeviceMockTests.java deleted file mode 100644 index a1814e140ac9..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/NodesListByDataBoxEdgeDeviceMockTests.java +++ /dev/null @@ -1,65 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.Node; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NodesListByDataBoxEdgeDeviceMockTests { - @Test - public void testListByDataBoxEdgeDevice() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"nodeStatus\":\"Up\",\"nodeChassisSerialNumber\":\"uiqtqzfavy\",\"nodeSerialNumber\":\"qqybarye\",\"nodeDisplayName\":\"yjkqabqgzslesjcb\",\"nodeFriendlySoftwareVersion\":\"rnntiewdjcv\",\"nodeHcsVersion\":\"uwrbehwagoh\",\"nodeInstanceId\":\"f\"},\"id\":\"kmr\",\"name\":\"emvvhm\",\"type\":\"tdrjfutacoebj\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.nodes().listByDataBoxEdgeDevice("goo", "kkqfqjbvle", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationDisplayTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationDisplayTests.java deleted file mode 100644 index 9312a4a06b22..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationDisplayTests.java +++ /dev/null @@ -1,39 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("cdm", model.provider()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.resource()); - Assertions.assertEquals("lhmwhfpmrqobm", model.operation()); - Assertions.assertEquals("kknryrtihf", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("cdm") - .withResource("rcryuanzwuxzdxta") - .withOperation("lhmwhfpmrqobm") - .withDescription("kknryrtihf"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("cdm", model.provider()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.resource()); - Assertions.assertEquals("lhmwhfpmrqobm", model.operation()); - Assertions.assertEquals("kknryrtihf", model.description()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationInnerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationInnerTests.java deleted file mode 100644 index 5dba5a503ada..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationInnerTests.java +++ /dev/null @@ -1,51 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.OperationInner; -import com.azure.resourcemanager.databoxedge.models.OperationDisplay; -import com.azure.resourcemanager.databoxedge.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"fogknygjofjdde\",\"display\":{\"provider\":\"deupewnwrei\",\"resource\":\"zyf\",\"operation\":\"sarhmofc\",\"description\":\"smy\"},\"origin\":\"kdtmlxhekuk\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[]}}}") - .toObject(OperationInner.class); - Assertions.assertEquals("fogknygjofjdde", model.name()); - Assertions.assertEquals("deupewnwrei", model.display().provider()); - Assertions.assertEquals("zyf", model.display().resource()); - Assertions.assertEquals("sarhmofc", model.display().operation()); - Assertions.assertEquals("smy", model.display().description()); - Assertions.assertEquals("kdtmlxhekuk", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = - new OperationInner() - .withName("fogknygjofjdde") - .withDisplay( - new OperationDisplay() - .withProvider("deupewnwrei") - .withResource("zyf") - .withOperation("sarhmofc") - .withDescription("smy")) - .withOrigin("kdtmlxhekuk") - .withServiceSpecification(new ServiceSpecification().withMetricSpecifications(Arrays.asList())); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("fogknygjofjdde", model.name()); - Assertions.assertEquals("deupewnwrei", model.display().provider()); - Assertions.assertEquals("zyf", model.display().resource()); - Assertions.assertEquals("sarhmofc", model.display().operation()); - Assertions.assertEquals("smy", model.display().description()); - Assertions.assertEquals("kdtmlxhekuk", model.origin()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationPropertiesTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationPropertiesTests.java deleted file mode 100644 index b245481ba4de..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,122 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.OperationProperties; -import com.azure.resourcemanager.databoxedge.models.MetricAggregationType; -import com.azure.resourcemanager.databoxedge.models.MetricCategory; -import com.azure.resourcemanager.databoxedge.models.MetricSpecificationV1; -import com.azure.resourcemanager.databoxedge.models.MetricUnit; -import com.azure.resourcemanager.databoxedge.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProperties model = - BinaryData - .fromString( - "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"pzvgnwzsymglzufc\",\"displayName\":\"kohdbiha\",\"displayDescription\":\"fhfcb\",\"unit\":\"NotSpecified\",\"aggregationType\":\"None\",\"dimensions\":[],\"fillGapWithZero\":false,\"category\":\"Transaction\",\"resourceIdDimensionNameOverride\":\"abifpikxwczbys\",\"supportedTimeGrainTypes\":[],\"supportedAggregationTypes\":[]},{\"name\":\"x\",\"displayName\":\"ivyqniwbybrkxvd\",\"displayDescription\":\"jgrtfwvukxga\",\"unit\":\"Seconds\",\"aggregationType\":\"Maximum\",\"dimensions\":[],\"fillGapWithZero\":false,\"category\":\"Transaction\",\"resourceIdDimensionNameOverride\":\"yejhk\",\"supportedTimeGrainTypes\":[],\"supportedAggregationTypes\":[]},{\"name\":\"napczwlokjy\",\"displayName\":\"kkvnipjox\",\"displayDescription\":\"nchgej\",\"unit\":\"Milliseconds\",\"aggregationType\":\"Average\",\"dimensions\":[],\"fillGapWithZero\":true,\"category\":\"Capacity\",\"resourceIdDimensionNameOverride\":\"eho\",\"supportedTimeGrainTypes\":[],\"supportedAggregationTypes\":[]},{\"name\":\"huxinpmqnj\",\"displayName\":\"wixjsprozvcp\",\"displayDescription\":\"eg\",\"unit\":\"CountPerSecond\",\"aggregationType\":\"NotSpecified\",\"dimensions\":[],\"fillGapWithZero\":false,\"category\":\"Capacity\",\"resourceIdDimensionNameOverride\":\"dvpjhulsuuvmk\",\"supportedTimeGrainTypes\":[],\"supportedAggregationTypes\":[]}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("pzvgnwzsymglzufc", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("kohdbiha", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals("fhfcb", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals(MetricUnit.NOT_SPECIFIED, model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - MetricAggregationType.NONE, - model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - MetricCategory.TRANSACTION, model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "abifpikxwczbys", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model = - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecificationV1() - .withName("pzvgnwzsymglzufc") - .withDisplayName("kohdbiha") - .withDisplayDescription("fhfcb") - .withUnit(MetricUnit.NOT_SPECIFIED) - .withAggregationType(MetricAggregationType.NONE) - .withDimensions(Arrays.asList()) - .withFillGapWithZero(false) - .withCategory(MetricCategory.TRANSACTION) - .withResourceIdDimensionNameOverride("abifpikxwczbys") - .withSupportedTimeGrainTypes(Arrays.asList()) - .withSupportedAggregationTypes(Arrays.asList()), - new MetricSpecificationV1() - .withName("x") - .withDisplayName("ivyqniwbybrkxvd") - .withDisplayDescription("jgrtfwvukxga") - .withUnit(MetricUnit.SECONDS) - .withAggregationType(MetricAggregationType.MAXIMUM) - .withDimensions(Arrays.asList()) - .withFillGapWithZero(false) - .withCategory(MetricCategory.TRANSACTION) - .withResourceIdDimensionNameOverride("yejhk") - .withSupportedTimeGrainTypes(Arrays.asList()) - .withSupportedAggregationTypes(Arrays.asList()), - new MetricSpecificationV1() - .withName("napczwlokjy") - .withDisplayName("kkvnipjox") - .withDisplayDescription("nchgej") - .withUnit(MetricUnit.MILLISECONDS) - .withAggregationType(MetricAggregationType.AVERAGE) - .withDimensions(Arrays.asList()) - .withFillGapWithZero(true) - .withCategory(MetricCategory.CAPACITY) - .withResourceIdDimensionNameOverride("eho") - .withSupportedTimeGrainTypes(Arrays.asList()) - .withSupportedAggregationTypes(Arrays.asList()), - new MetricSpecificationV1() - .withName("huxinpmqnj") - .withDisplayName("wixjsprozvcp") - .withDisplayDescription("eg") - .withUnit(MetricUnit.COUNT_PER_SECOND) - .withAggregationType(MetricAggregationType.NOT_SPECIFIED) - .withDimensions(Arrays.asList()) - .withFillGapWithZero(false) - .withCategory(MetricCategory.CAPACITY) - .withResourceIdDimensionNameOverride("dvpjhulsuuvmk") - .withSupportedTimeGrainTypes(Arrays.asList()) - .withSupportedAggregationTypes(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("pzvgnwzsymglzufc", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("kohdbiha", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals("fhfcb", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals(MetricUnit.NOT_SPECIFIED, model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - MetricAggregationType.NONE, - model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - MetricCategory.TRANSACTION, model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "abifpikxwczbys", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationsListMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationsListMockTests.java deleted file mode 100644 index 8e754ca80848..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationsListMockTests.java +++ /dev/null @@ -1,72 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"dl\",\"display\":{\"provider\":\"hfwpracstwit\",\"resource\":\"hevxcced\",\"operation\":\"nmdyodnwzxl\",\"description\":\"cvnhltiugc\"},\"origin\":\"avvwxqi\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[]}}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dl", response.iterator().next().name()); - Assertions.assertEquals("hfwpracstwit", response.iterator().next().display().provider()); - Assertions.assertEquals("hevxcced", response.iterator().next().display().resource()); - Assertions.assertEquals("nmdyodnwzxl", response.iterator().next().display().operation()); - Assertions.assertEquals("cvnhltiugc", response.iterator().next().display().description()); - Assertions.assertEquals("avvwxqi", response.iterator().next().origin()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationsListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationsListTests.java deleted file mode 100644 index 7e3f8a552cb9..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OperationsListTests.java +++ /dev/null @@ -1,75 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.OperationInner; -import com.azure.resourcemanager.databoxedge.models.OperationDisplay; -import com.azure.resourcemanager.databoxedge.models.OperationsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationsList model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"hq\",\"display\":{\"provider\":\"jxpybczmeh\",\"resource\":\"zopbsphrupidgs\",\"operation\":\"bejhphoycmsxa\",\"description\":\"hdxbmtqio\"},\"origin\":\"zehtbmu\",\"properties\":{}},{\"name\":\"noi\",\"display\":{\"provider\":\"lrxybqsoq\",\"resource\":\"gkdmb\",\"operation\":\"zlobcufpd\",\"description\":\"rbt\"},\"origin\":\"qjnqglhqgnufoooj\",\"properties\":{}},{\"name\":\"sqe\",\"display\":{\"provider\":\"gdf\",\"resource\":\"lzl\",\"operation\":\"xrifkwmrvkts\",\"description\":\"nt\"},\"origin\":\"ipa\",\"properties\":{}}],\"nextLink\":\"psqucmpoyf\"}") - .toObject(OperationsList.class); - Assertions.assertEquals("hq", model.value().get(0).name()); - Assertions.assertEquals("jxpybczmeh", model.value().get(0).display().provider()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().resource()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().operation()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().description()); - Assertions.assertEquals("zehtbmu", model.value().get(0).origin()); - Assertions.assertEquals("psqucmpoyf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationsList model = - new OperationsList() - .withValue( - Arrays - .asList( - new OperationInner() - .withName("hq") - .withDisplay( - new OperationDisplay() - .withProvider("jxpybczmeh") - .withResource("zopbsphrupidgs") - .withOperation("bejhphoycmsxa") - .withDescription("hdxbmtqio")) - .withOrigin("zehtbmu"), - new OperationInner() - .withName("noi") - .withDisplay( - new OperationDisplay() - .withProvider("lrxybqsoq") - .withResource("gkdmb") - .withOperation("zlobcufpd") - .withDescription("rbt")) - .withOrigin("qjnqglhqgnufoooj"), - new OperationInner() - .withName("sqe") - .withDisplay( - new OperationDisplay() - .withProvider("gdf") - .withResource("lzl") - .withOperation("xrifkwmrvkts") - .withDescription("nt")) - .withOrigin("ipa"))) - .withNextLink("psqucmpoyf"); - model = BinaryData.fromObject(model).toObject(OperationsList.class); - Assertions.assertEquals("hq", model.value().get(0).name()); - Assertions.assertEquals("jxpybczmeh", model.value().get(0).display().provider()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().resource()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().operation()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().description()); - Assertions.assertEquals("zehtbmu", model.value().get(0).origin()); - Assertions.assertEquals("psqucmpoyf", model.nextLink()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OrderListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OrderListTests.java deleted file mode 100644 index 2e12626122c7..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OrderListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.OrderList; - -public final class OrderListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OrderList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"orderHistory\":[],\"serialNumber\":\"crgvxpvgom\",\"deliveryTrackingInfo\":[],\"returnTrackingInfo\":[]},\"id\":\"misgwbnb\",\"name\":\"e\",\"type\":\"dawkzbali\"},{\"properties\":{\"orderHistory\":[],\"serialNumber\":\"akauha\",\"deliveryTrackingInfo\":[],\"returnTrackingInfo\":[]},\"id\":\"fwxosowzxcu\",\"name\":\"i\",\"type\":\"jooxdjebw\"},{\"properties\":{\"orderHistory\":[],\"serialNumber\":\"fvovbvmeuecivy\",\"deliveryTrackingInfo\":[],\"returnTrackingInfo\":[]},\"id\":\"euojgjrwju\",\"name\":\"iotwmcdytdxwit\",\"type\":\"nrjawgqwg\"},{\"properties\":{\"orderHistory\":[],\"serialNumber\":\"kxfbkpycgklwndn\",\"deliveryTrackingInfo\":[],\"returnTrackingInfo\":[]},\"id\":\"auwhvylwzbtdhx\",\"name\":\"jznb\",\"type\":\"pow\"}],\"nextLink\":\"przqlveu\"}") - .toObject(OrderList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OrderList model = new OrderList(); - model = BinaryData.fromObject(model).toObject(OrderList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OrderStatusTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OrderStatusTests.java deleted file mode 100644 index 72d6fc976a9e..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OrderStatusTests.java +++ /dev/null @@ -1,31 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.OrderState; -import com.azure.resourcemanager.databoxedge.models.OrderStatus; -import org.junit.jupiter.api.Assertions; - -public final class OrderStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OrderStatus model = - BinaryData - .fromString( - "{\"status\":\"AwaitingPreparation\",\"updateDateTime\":\"2021-02-28T22:24:22Z\",\"comments\":\"joya\",\"additionalOrderDetails\":{\"idzyexznelixhnr\":\"lyjpk\",\"nalaulppg\":\"tfolhbnx\",\"gvpgy\":\"dtpnapnyiropuhp\"}}") - .toObject(OrderStatus.class); - Assertions.assertEquals(OrderState.AWAITING_PREPARATION, model.status()); - Assertions.assertEquals("joya", model.comments()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OrderStatus model = new OrderStatus().withStatus(OrderState.AWAITING_PREPARATION).withComments("joya"); - model = BinaryData.fromObject(model).toObject(OrderStatus.class); - Assertions.assertEquals(OrderState.AWAITING_PREPARATION, model.status()); - Assertions.assertEquals("joya", model.comments()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OrdersDeleteMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OrdersDeleteMockTests.java deleted file mode 100644 index 232de6d96570..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/OrdersDeleteMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OrdersDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.orders().delete("wb", "lgy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/PeriodicTimerEventTriggerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/PeriodicTimerEventTriggerTests.java deleted file mode 100644 index 7665a5827c8c..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/PeriodicTimerEventTriggerTests.java +++ /dev/null @@ -1,47 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.PeriodicTimerEventTrigger; -import com.azure.resourcemanager.databoxedge.models.PeriodicTimerSourceInfo; -import com.azure.resourcemanager.databoxedge.models.RoleSinkInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class PeriodicTimerEventTriggerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PeriodicTimerEventTrigger model = - BinaryData - .fromString( - "{\"kind\":\"PeriodicTimerEvent\",\"properties\":{\"sourceInfo\":{\"startTime\":\"2021-05-03T02:40:47Z\",\"schedule\":\"w\",\"topic\":\"ggicccnxqhue\"},\"sinkInfo\":{\"roleId\":\"mkttlstvlzywem\"},\"customContextTag\":\"rncsdtclu\"},\"id\":\"iypbsfgytgusl\",\"name\":\"eadcygqukyhejhz\",\"type\":\"sx\"}") - .toObject(PeriodicTimerEventTrigger.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T02:40:47Z"), model.sourceInfo().startTime()); - Assertions.assertEquals("w", model.sourceInfo().schedule()); - Assertions.assertEquals("ggicccnxqhue", model.sourceInfo().topic()); - Assertions.assertEquals("mkttlstvlzywem", model.sinkInfo().roleId()); - Assertions.assertEquals("rncsdtclu", model.customContextTag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PeriodicTimerEventTrigger model = - new PeriodicTimerEventTrigger() - .withSourceInfo( - new PeriodicTimerSourceInfo() - .withStartTime(OffsetDateTime.parse("2021-05-03T02:40:47Z")) - .withSchedule("w") - .withTopic("ggicccnxqhue")) - .withSinkInfo(new RoleSinkInfo().withRoleId("mkttlstvlzywem")) - .withCustomContextTag("rncsdtclu"); - model = BinaryData.fromObject(model).toObject(PeriodicTimerEventTrigger.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T02:40:47Z"), model.sourceInfo().startTime()); - Assertions.assertEquals("w", model.sourceInfo().schedule()); - Assertions.assertEquals("ggicccnxqhue", model.sourceInfo().topic()); - Assertions.assertEquals("mkttlstvlzywem", model.sinkInfo().roleId()); - Assertions.assertEquals("rncsdtclu", model.customContextTag()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/PeriodicTimerPropertiesTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/PeriodicTimerPropertiesTests.java deleted file mode 100644 index 03a0e8398587..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/PeriodicTimerPropertiesTests.java +++ /dev/null @@ -1,47 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.PeriodicTimerProperties; -import com.azure.resourcemanager.databoxedge.models.PeriodicTimerSourceInfo; -import com.azure.resourcemanager.databoxedge.models.RoleSinkInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class PeriodicTimerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PeriodicTimerProperties model = - BinaryData - .fromString( - "{\"sourceInfo\":{\"startTime\":\"2021-04-29T01:54:20Z\",\"schedule\":\"pelol\",\"topic\":\"vk\"},\"sinkInfo\":{\"roleId\":\"r\"},\"customContextTag\":\"vu\"}") - .toObject(PeriodicTimerProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T01:54:20Z"), model.sourceInfo().startTime()); - Assertions.assertEquals("pelol", model.sourceInfo().schedule()); - Assertions.assertEquals("vk", model.sourceInfo().topic()); - Assertions.assertEquals("r", model.sinkInfo().roleId()); - Assertions.assertEquals("vu", model.customContextTag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PeriodicTimerProperties model = - new PeriodicTimerProperties() - .withSourceInfo( - new PeriodicTimerSourceInfo() - .withStartTime(OffsetDateTime.parse("2021-04-29T01:54:20Z")) - .withSchedule("pelol") - .withTopic("vk")) - .withSinkInfo(new RoleSinkInfo().withRoleId("r")) - .withCustomContextTag("vu"); - model = BinaryData.fromObject(model).toObject(PeriodicTimerProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T01:54:20Z"), model.sourceInfo().startTime()); - Assertions.assertEquals("pelol", model.sourceInfo().schedule()); - Assertions.assertEquals("vk", model.sourceInfo().topic()); - Assertions.assertEquals("r", model.sinkInfo().roleId()); - Assertions.assertEquals("vu", model.customContextTag()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/PeriodicTimerSourceInfoTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/PeriodicTimerSourceInfoTests.java deleted file mode 100644 index d1a646582704..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/PeriodicTimerSourceInfoTests.java +++ /dev/null @@ -1,36 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.PeriodicTimerSourceInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class PeriodicTimerSourceInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PeriodicTimerSourceInfo model = - BinaryData - .fromString("{\"startTime\":\"2021-07-20T00:55:01Z\",\"schedule\":\"raehtwdwrft\",\"topic\":\"iby\"}") - .toObject(PeriodicTimerSourceInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T00:55:01Z"), model.startTime()); - Assertions.assertEquals("raehtwdwrft", model.schedule()); - Assertions.assertEquals("iby", model.topic()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PeriodicTimerSourceInfo model = - new PeriodicTimerSourceInfo() - .withStartTime(OffsetDateTime.parse("2021-07-20T00:55:01Z")) - .withSchedule("raehtwdwrft") - .withTopic("iby"); - model = BinaryData.fromObject(model).toObject(PeriodicTimerSourceInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T00:55:01Z"), model.startTime()); - Assertions.assertEquals("raehtwdwrft", model.schedule()); - Assertions.assertEquals("iby", model.topic()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RawCertificateDataTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RawCertificateDataTests.java deleted file mode 100644 index e1d900b63eb7..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RawCertificateDataTests.java +++ /dev/null @@ -1,33 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.RawCertificateData; -import com.azure.resourcemanager.databoxedge.models.AuthenticationType; -import org.junit.jupiter.api.Assertions; - -public final class RawCertificateDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RawCertificateData model = - BinaryData - .fromString("{\"authenticationType\":\"AzureActiveDirectory\",\"certificate\":\"cnqxwbpokulpi\"}") - .toObject(RawCertificateData.class); - Assertions.assertEquals(AuthenticationType.AZURE_ACTIVE_DIRECTORY, model.authenticationType()); - Assertions.assertEquals("cnqxwbpokulpi", model.certificate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RawCertificateData model = - new RawCertificateData() - .withAuthenticationType(AuthenticationType.AZURE_ACTIVE_DIRECTORY) - .withCertificate("cnqxwbpokulpi"); - model = BinaryData.fromObject(model).toObject(RawCertificateData.class); - Assertions.assertEquals(AuthenticationType.AZURE_ACTIVE_DIRECTORY, model.authenticationType()); - Assertions.assertEquals("cnqxwbpokulpi", model.certificate()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RefreshDetailsTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RefreshDetailsTests.java deleted file mode 100644 index 67bd0262a7cb..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RefreshDetailsTests.java +++ /dev/null @@ -1,40 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.RefreshDetails; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class RefreshDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RefreshDetails model = - BinaryData - .fromString( - "{\"inProgressRefreshJobId\":\"enq\",\"lastCompletedRefreshJobTimeInUTC\":\"2021-01-20T04:38Z\",\"errorManifestFile\":\"ndoygmifthnzdnd\",\"lastJob\":\"gnayqigynduh\"}") - .toObject(RefreshDetails.class); - Assertions.assertEquals("enq", model.inProgressRefreshJobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T04:38Z"), model.lastCompletedRefreshJobTimeInUtc()); - Assertions.assertEquals("ndoygmifthnzdnd", model.errorManifestFile()); - Assertions.assertEquals("gnayqigynduh", model.lastJob()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RefreshDetails model = - new RefreshDetails() - .withInProgressRefreshJobId("enq") - .withLastCompletedRefreshJobTimeInUtc(OffsetDateTime.parse("2021-01-20T04:38Z")) - .withErrorManifestFile("ndoygmifthnzdnd") - .withLastJob("gnayqigynduh"); - model = BinaryData.fromObject(model).toObject(RefreshDetails.class); - Assertions.assertEquals("enq", model.inProgressRefreshJobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T04:38Z"), model.lastCompletedRefreshJobTimeInUtc()); - Assertions.assertEquals("ndoygmifthnzdnd", model.errorManifestFile()); - Assertions.assertEquals("gnayqigynduh", model.lastJob()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RoleInnerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RoleInnerTests.java deleted file mode 100644 index ccc0f61a87c7..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RoleInnerTests.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.RoleInner; - -public final class RoleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RoleInner model = - BinaryData - .fromString("{\"kind\":\"Role\",\"id\":\"lzdahzxctobgbkdm\",\"name\":\"izpost\",\"type\":\"grcfb\"}") - .toObject(RoleInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoleInner model = new RoleInner(); - model = BinaryData.fromObject(model).toObject(RoleInner.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RoleListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RoleListTests.java deleted file mode 100644 index 5ac8374732f0..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RoleListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.RoleList; - -public final class RoleListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RoleList model = - BinaryData - .fromString( - "{\"value\":[{\"kind\":\"Role\",\"id\":\"eoellwptfdygp\",\"name\":\"qbuaceopzfqr\",\"type\":\"huaoppp\"}],\"nextLink\":\"eqx\"}") - .toObject(RoleList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoleList model = new RoleList(); - model = BinaryData.fromObject(model).toObject(RoleList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RoleSinkInfoTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RoleSinkInfoTests.java deleted file mode 100644 index 1cd2f892de57..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RoleSinkInfoTests.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.RoleSinkInfo; -import org.junit.jupiter.api.Assertions; - -public final class RoleSinkInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RoleSinkInfo model = BinaryData.fromString("{\"roleId\":\"oefki\"}").toObject(RoleSinkInfo.class); - Assertions.assertEquals("oefki", model.roleId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoleSinkInfo model = new RoleSinkInfo().withRoleId("oefki"); - model = BinaryData.fromObject(model).toObject(RoleSinkInfo.class); - Assertions.assertEquals("oefki", model.roleId()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesCreateOrUpdateMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesCreateOrUpdateMockTests.java deleted file mode 100644 index d9c463d3e043..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,66 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.fluent.models.RoleInner; -import com.azure.resourcemanager.databoxedge.models.Role; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RolesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"kind\":\"Role\",\"id\":\"atnwxyiopi\",\"name\":\"kqqfk\",\"type\":\"vscx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Role response = - manager - .roles() - .createOrUpdate("gzukxitmm", "tg", "qqxhrnxrxcpj", new RoleInner(), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesDeleteMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesDeleteMockTests.java deleted file mode 100644 index 9c8190b77e62..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesDeleteMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RolesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.roles().delete("dmligovibrxk", "mloazuru", "cbgoor", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesGetWithResponseMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesGetWithResponseMockTests.java deleted file mode 100644 index 116fe5055682..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesGetWithResponseMockTests.java +++ /dev/null @@ -1,66 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.Role; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RolesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"kind\":\"Role\",\"id\":\"nsgowzfttst\",\"name\":\"ktlahbqa\",\"type\":\"tx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Role response = - manager - .roles() - .getWithResponse("qzdwlvwlyoup", "gfbkjubdyh", "kfm", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesListByDataBoxEdgeDeviceMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesListByDataBoxEdgeDeviceMockTests.java deleted file mode 100644 index f0e1d84a169f..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/RolesListByDataBoxEdgeDeviceMockTests.java +++ /dev/null @@ -1,65 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.Role; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RolesListByDataBoxEdgeDeviceMockTests { - @Test - public void testListByDataBoxEdgeDevice() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"kind\":\"Role\",\"id\":\"pi\",\"name\":\"lqol\",\"type\":\"xkcgxxlxsffgcvi\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.roles().listByDataBoxEdgeDevice("vutpthjoxo", "smsks", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ServiceSpecificationTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ServiceSpecificationTests.java deleted file mode 100644 index 662d232cde3e..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,92 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.MetricAggregationType; -import com.azure.resourcemanager.databoxedge.models.MetricCategory; -import com.azure.resourcemanager.databoxedge.models.MetricSpecificationV1; -import com.azure.resourcemanager.databoxedge.models.MetricUnit; -import com.azure.resourcemanager.databoxedge.models.ServiceSpecification; -import com.azure.resourcemanager.databoxedge.models.TimeGrain; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = - BinaryData - .fromString( - "{\"metricSpecifications\":[{\"name\":\"f\",\"displayName\":\"iodjp\",\"displayDescription\":\"w\",\"unit\":\"CountPerSecond\",\"aggregationType\":\"Maximum\",\"dimensions\":[],\"fillGapWithZero\":false,\"category\":\"Transaction\",\"resourceIdDimensionNameOverride\":\"oacctaza\",\"supportedTimeGrainTypes\":[\"PT1H\"],\"supportedAggregationTypes\":[\"Average\",\"None\",\"None\",\"NotSpecified\"]},{\"name\":\"fdfdosygexpa\",\"displayName\":\"akhmsbzjhcrz\",\"displayDescription\":\"dphlxaolt\",\"unit\":\"Percent\",\"aggregationType\":\"Average\",\"dimensions\":[],\"fillGapWithZero\":true,\"category\":\"Transaction\",\"resourceIdDimensionNameOverride\":\"s\",\"supportedTimeGrainTypes\":[\"PT15M\",\"PT1M\",\"PT1M\"],\"supportedAggregationTypes\":[\"Total\",\"Maximum\"]}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("f", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("iodjp", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("w", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals(MetricUnit.COUNT_PER_SECOND, model.metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.MAXIMUM, model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals(MetricCategory.TRANSACTION, model.metricSpecifications().get(0).category()); - Assertions.assertEquals("oacctaza", model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(TimeGrain.PT1H, model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions - .assertEquals( - MetricAggregationType.AVERAGE, model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecificationV1() - .withName("f") - .withDisplayName("iodjp") - .withDisplayDescription("w") - .withUnit(MetricUnit.COUNT_PER_SECOND) - .withAggregationType(MetricAggregationType.MAXIMUM) - .withDimensions(Arrays.asList()) - .withFillGapWithZero(false) - .withCategory(MetricCategory.TRANSACTION) - .withResourceIdDimensionNameOverride("oacctaza") - .withSupportedTimeGrainTypes(Arrays.asList(TimeGrain.PT1H)) - .withSupportedAggregationTypes( - Arrays - .asList( - MetricAggregationType.AVERAGE, - MetricAggregationType.NONE, - MetricAggregationType.NONE, - MetricAggregationType.NOT_SPECIFIED)), - new MetricSpecificationV1() - .withName("fdfdosygexpa") - .withDisplayName("akhmsbzjhcrz") - .withDisplayDescription("dphlxaolt") - .withUnit(MetricUnit.PERCENT) - .withAggregationType(MetricAggregationType.AVERAGE) - .withDimensions(Arrays.asList()) - .withFillGapWithZero(true) - .withCategory(MetricCategory.TRANSACTION) - .withResourceIdDimensionNameOverride("s") - .withSupportedTimeGrainTypes( - Arrays.asList(TimeGrain.PT15M, TimeGrain.PT1M, TimeGrain.PT1M)) - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.TOTAL, MetricAggregationType.MAXIMUM)))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("f", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("iodjp", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("w", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals(MetricUnit.COUNT_PER_SECOND, model.metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.MAXIMUM, model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals(MetricCategory.TRANSACTION, model.metricSpecifications().get(0).category()); - Assertions.assertEquals("oacctaza", model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(TimeGrain.PT1H, model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions - .assertEquals( - MetricAggregationType.AVERAGE, model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ShareAccessRightTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ShareAccessRightTests.java deleted file mode 100644 index 6fe5d2b6f762..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ShareAccessRightTests.java +++ /dev/null @@ -1,31 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.ShareAccessRight; -import com.azure.resourcemanager.databoxedge.models.ShareAccessType; -import org.junit.jupiter.api.Assertions; - -public final class ShareAccessRightTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ShareAccessRight model = - BinaryData - .fromString("{\"shareId\":\"zihleosjswsr\",\"accessType\":\"Read\"}") - .toObject(ShareAccessRight.class); - Assertions.assertEquals("zihleosjswsr", model.shareId()); - Assertions.assertEquals(ShareAccessType.READ, model.accessType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ShareAccessRight model = - new ShareAccessRight().withShareId("zihleosjswsr").withAccessType(ShareAccessType.READ); - model = BinaryData.fromObject(model).toObject(ShareAccessRight.class); - Assertions.assertEquals("zihleosjswsr", model.shareId()); - Assertions.assertEquals(ShareAccessType.READ, model.accessType()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ShareListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ShareListTests.java deleted file mode 100644 index 80807a43ddfa..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/ShareListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.ShareList; - -public final class ShareListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ShareList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"description\":\"doqmcbxvwvxys\",\"shareStatus\":\"OK\",\"monitoringStatus\":\"Enabled\",\"accessProtocol\":\"SMB\",\"userAccessRights\":[],\"clientAccessRights\":[],\"shareMappings\":[],\"dataPolicy\":\"Local\"},\"id\":\"tkblmpewww\",\"name\":\"bkrvrnsvshqj\",\"type\":\"hxcr\"}],\"nextLink\":\"fovasr\"}") - .toObject(ShareList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ShareList model = new ShareList(); - model = BinaryData.fromObject(model).toObject(ShareList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SharesDeleteMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SharesDeleteMockTests.java deleted file mode 100644 index be1e300ccecf..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SharesDeleteMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SharesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.shares().delete("lma", "stcyohpfkyrkdbd", "iogsjkmnwq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SharesRefreshMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SharesRefreshMockTests.java deleted file mode 100644 index 1d82e9b6e62f..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SharesRefreshMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SharesRefreshMockTests { - @Test - public void testRefresh() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.shares().refresh("nobaiyhddviacegf", "m", "tfpmvmemfnczdw", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuCostTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuCostTests.java deleted file mode 100644 index b173bbc03a1d..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuCostTests.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.SkuCost; - -public final class SkuCostTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCost model = - BinaryData - .fromString("{\"meterId\":\"fltkacjv\",\"quantity\":6490344131392989957,\"extendedUnit\":\"foakgg\"}") - .toObject(SkuCost.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCost model = new SkuCost(); - model = BinaryData.fromObject(model).toObject(SkuCost.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuInformationListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuInformationListTests.java deleted file mode 100644 index 383d645a410f..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuInformationListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.SkuInformationList; - -public final class SkuInformationListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuInformationList model = - BinaryData - .fromString( - "{\"value\":[{\"resourceType\":\"rpzbchckqqzqi\",\"name\":\"TEA_4Node_Heater\",\"kind\":\"suiizynkedyat\",\"tier\":\"Standard\",\"family\":\"q\",\"locations\":[\"zyh\"],\"apiVersions\":[\"smypyynpc\",\"pumnz\",\"mwzn\"],\"locationInfo\":[],\"costs\":[],\"restrictions\":[]},{\"resourceType\":\"rgjhxb\",\"name\":\"TMA\",\"kind\":\"wwrlkdmtncv\",\"tier\":\"Standard\",\"family\":\"llxdyhgs\",\"locations\":[\"ogjltdtbnnhad\",\"ocrkvcikh\",\"vpa\"],\"apiVersions\":[\"x\",\"queziky\",\"ggxkallatmelwuip\"],\"locationInfo\":[],\"costs\":[],\"restrictions\":[]},{\"resourceType\":\"v\",\"name\":\"TEA_1Node_Heater\",\"kind\":\"nayrhyrnxxmueedn\",\"tier\":\"Standard\",\"family\":\"stkwqqtch\",\"locations\":[\"mfmtdaaygdvw\",\"gpiohgwxrtfudxe\",\"xg\"],\"apiVersions\":[\"gvr\",\"mnpkukghimdblxg\",\"imfnjhfjx\"],\"locationInfo\":[],\"costs\":[],\"restrictions\":[]},{\"resourceType\":\"qreyfkzi\",\"name\":\"TEA_1Node_UPS_Heater\",\"kind\":\"wneaiv\",\"tier\":\"Standard\",\"family\":\"elpcirelsfeaenwa\",\"locations\":[\"tkl\",\"dxbjhwuaanozj\",\"sphyoulpjrvxa\",\"l\"],\"apiVersions\":[\"mjwosytx\",\"tcs\"],\"locationInfo\":[],\"costs\":[],\"restrictions\":[]}],\"nextLink\":\"iekkezz\"}") - .toObject(SkuInformationList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuInformationList model = new SkuInformationList(); - model = BinaryData.fromObject(model).toObject(SkuInformationList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuLocationInfoTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuLocationInfoTests.java deleted file mode 100644 index d80764a96e33..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuLocationInfoTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.SkuLocationInfo; - -public final class SkuLocationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuLocationInfo model = - BinaryData - .fromString( - "{\"location\":\"cvydypatdoo\",\"zones\":[\"kniod\",\"oo\"],\"sites\":[\"nuj\",\"emmsbvdkc\",\"odtji\",\"fw\"]}") - .toObject(SkuLocationInfo.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuLocationInfo model = new SkuLocationInfo(); - model = BinaryData.fromObject(model).toObject(SkuLocationInfo.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuRestrictionInfoTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuRestrictionInfoTests.java deleted file mode 100644 index 187c155c3de3..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuRestrictionInfoTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.SkuRestrictionInfo; - -public final class SkuRestrictionInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuRestrictionInfo model = - BinaryData - .fromString( - "{\"locations\":[\"uukzclewyhmlw\",\"aztz\",\"ofncckwyfzqwhxxb\",\"yq\"],\"zones\":[\"feqztppriol\",\"or\",\"altol\"]}") - .toObject(SkuRestrictionInfo.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuRestrictionInfo model = new SkuRestrictionInfo(); - model = BinaryData.fromObject(model).toObject(SkuRestrictionInfo.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuTests.java deleted file mode 100644 index 206f7d231b19..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SkuTests.java +++ /dev/null @@ -1,28 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.Sku; -import com.azure.resourcemanager.databoxedge.models.SkuName; -import com.azure.resourcemanager.databoxedge.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString("{\"name\":\"TEA_4Node_Heater\",\"tier\":\"Standard\"}").toObject(Sku.class); - Assertions.assertEquals(SkuName.TEA_4NODE_HEATER, model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = new Sku().withName(SkuName.TEA_4NODE_HEATER).withTier(SkuTier.STANDARD); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals(SkuName.TEA_4NODE_HEATER, model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialListTests.java deleted file mode 100644 index 4345cbd56a22..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.StorageAccountCredentialList; - -public final class StorageAccountCredentialListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageAccountCredentialList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"alias\":\"mvaolps\",\"userName\":\"qlfmmdnbb\",\"connectionString\":\"pswiydmcwyh\",\"sslStatus\":\"Disabled\",\"blobDomainName\":\"ss\",\"accountType\":\"GeneralPurposeStorage\",\"storageAccountId\":\"zmnvdfznudaod\"},\"id\":\"xzb\",\"name\":\"cblylpstdbhhxsr\",\"type\":\"dzu\"}],\"nextLink\":\"rsc\"}") - .toObject(StorageAccountCredentialList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageAccountCredentialList model = new StorageAccountCredentialList(); - model = BinaryData.fromObject(model).toObject(StorageAccountCredentialList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsDeleteMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsDeleteMockTests.java deleted file mode 100644 index f0c660799777..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/StorageAccountCredentialsDeleteMockTests.java +++ /dev/null @@ -1,63 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class StorageAccountCredentialsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .storageAccountCredentials() - .delete("zwiivwzjbhyzs", "jrkambtrnegvmnv", "q", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SymmetricKeyTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SymmetricKeyTests.java deleted file mode 100644 index 76d642235225..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/SymmetricKeyTests.java +++ /dev/null @@ -1,40 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.AsymmetricEncryptedSecret; -import com.azure.resourcemanager.databoxedge.models.EncryptionAlgorithm; -import com.azure.resourcemanager.databoxedge.models.SymmetricKey; -import org.junit.jupiter.api.Assertions; - -public final class SymmetricKeyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SymmetricKey model = - BinaryData - .fromString( - "{\"connectionString\":{\"value\":\"qdpfuvglsbjjca\",\"encryptionCertThumbprint\":\"xbvtvudu\",\"encryptionAlgorithm\":\"AES256\"}}") - .toObject(SymmetricKey.class); - Assertions.assertEquals("qdpfuvglsbjjca", model.connectionString().value()); - Assertions.assertEquals("xbvtvudu", model.connectionString().encryptionCertThumbprint()); - Assertions.assertEquals(EncryptionAlgorithm.AES256, model.connectionString().encryptionAlgorithm()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SymmetricKey model = - new SymmetricKey() - .withConnectionString( - new AsymmetricEncryptedSecret() - .withValue("qdpfuvglsbjjca") - .withEncryptionCertThumbprint("xbvtvudu") - .withEncryptionAlgorithm(EncryptionAlgorithm.AES256)); - model = BinaryData.fromObject(model).toObject(SymmetricKey.class); - Assertions.assertEquals("qdpfuvglsbjjca", model.connectionString().value()); - Assertions.assertEquals("xbvtvudu", model.connectionString().encryptionCertThumbprint()); - Assertions.assertEquals(EncryptionAlgorithm.AES256, model.connectionString().encryptionAlgorithm()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TrackingInfoTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TrackingInfoTests.java deleted file mode 100644 index 789ba14f6dd1..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TrackingInfoTests.java +++ /dev/null @@ -1,39 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.TrackingInfo; -import org.junit.jupiter.api.Assertions; - -public final class TrackingInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrackingInfo model = - BinaryData - .fromString( - "{\"serialNumber\":\"qgitxmed\",\"carrierName\":\"c\",\"trackingId\":\"ynqwwncwzzhxgk\",\"trackingUrl\":\"mgucna\"}") - .toObject(TrackingInfo.class); - Assertions.assertEquals("qgitxmed", model.serialNumber()); - Assertions.assertEquals("c", model.carrierName()); - Assertions.assertEquals("ynqwwncwzzhxgk", model.trackingId()); - Assertions.assertEquals("mgucna", model.trackingUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrackingInfo model = - new TrackingInfo() - .withSerialNumber("qgitxmed") - .withCarrierName("c") - .withTrackingId("ynqwwncwzzhxgk") - .withTrackingUrl("mgucna"); - model = BinaryData.fromObject(model).toObject(TrackingInfo.class); - Assertions.assertEquals("qgitxmed", model.serialNumber()); - Assertions.assertEquals("c", model.carrierName()); - Assertions.assertEquals("ynqwwncwzzhxgk", model.trackingId()); - Assertions.assertEquals("mgucna", model.trackingUrl()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggerInnerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggerInnerTests.java deleted file mode 100644 index 37179de4a8ed..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggerInnerTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.TriggerInner; - -public final class TriggerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TriggerInner model = - BinaryData - .fromString( - "{\"kind\":\"Trigger\",\"id\":\"vnhdldwmgxcxr\",\"name\":\"lpmutwuoegrpkhj\",\"type\":\"niyqslui\"}") - .toObject(TriggerInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TriggerInner model = new TriggerInner(); - model = BinaryData.fromObject(model).toObject(TriggerInner.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggerListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggerListTests.java deleted file mode 100644 index 460357cabf42..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggerListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.TriggerList; - -public final class TriggerListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TriggerList model = - BinaryData - .fromString( - "{\"value\":[{\"kind\":\"Trigger\",\"id\":\"pnppfuf\",\"name\":\"rwdmhdlxyjrxsa\",\"type\":\"afcnih\"},{\"kind\":\"Trigger\",\"id\":\"wqapnedgfbcvk\",\"name\":\"vq\",\"type\":\"pkeqdcvdrhvoo\"}],\"nextLink\":\"otbobzdopcj\"}") - .toObject(TriggerList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TriggerList model = new TriggerList(); - model = BinaryData.fromObject(model).toObject(TriggerList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersCreateOrUpdateMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersCreateOrUpdateMockTests.java deleted file mode 100644 index 713dbbdd5369..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersCreateOrUpdateMockTests.java +++ /dev/null @@ -1,67 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.fluent.models.TriggerInner; -import com.azure.resourcemanager.databoxedge.models.Trigger; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class TriggersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"kind\":\"Trigger\",\"id\":\"q\",\"name\":\"kkzjcjbtrga\",\"type\":\"hvv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Trigger response = - manager - .triggers() - .createOrUpdate( - "metttwgd", "lqxihhrmooiz", "seypxiutcxapz", new TriggerInner(), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersDeleteMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersDeleteMockTests.java deleted file mode 100644 index d0a80776f3f7..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersDeleteMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class TriggersDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.triggers().delete("brxjjsto", "beitpkx", "tmo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersGetWithResponseMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersGetWithResponseMockTests.java deleted file mode 100644 index 1942da5a9085..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.Trigger; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class TriggersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"Trigger\",\"id\":\"kvyklxubyjaffmm\",\"name\":\"bl\",\"type\":\"qcuubgqibrta\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Trigger response = - manager - .triggers() - .getWithResponse("ikf", "cvhrfsp", "uagrttikteusqc", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersListByDataBoxEdgeDeviceMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersListByDataBoxEdgeDeviceMockTests.java deleted file mode 100644 index 325c5f7a239e..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/TriggersListByDataBoxEdgeDeviceMockTests.java +++ /dev/null @@ -1,68 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import com.azure.resourcemanager.databoxedge.models.Trigger; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class TriggersListByDataBoxEdgeDeviceMockTests { - @Test - public void testListByDataBoxEdgeDevice() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"kind\":\"Trigger\",\"id\":\"teyowclu\",\"name\":\"ovekqvgqouwi\",\"type\":\"zmpjwyiv\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .triggers() - .listByDataBoxEdgeDevice( - "cuplcplcwkhih", "hlhzdsqtzbsrgno", "cjhfgmvecactxmw", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateDownloadProgressTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateDownloadProgressTests.java deleted file mode 100644 index 9143e7f6c677..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateDownloadProgressTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.UpdateDownloadProgress; - -public final class UpdateDownloadProgressTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateDownloadProgress model = - BinaryData - .fromString( - "{\"downloadPhase\":\"Unknown\",\"percentComplete\":511745945,\"totalBytesToDownload\":1.6931489022846913,\"totalBytesDownloaded\":62.02590646369739,\"numberOfUpdatesToDownload\":1190455395,\"numberOfUpdatesDownloaded\":63743502}") - .toObject(UpdateDownloadProgress.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateDownloadProgress model = new UpdateDownloadProgress(); - model = BinaryData.fromObject(model).toObject(UpdateDownloadProgress.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateInstallProgressTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateInstallProgressTests.java deleted file mode 100644 index d22021d9e2cc..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateInstallProgressTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.UpdateInstallProgress; - -public final class UpdateInstallProgressTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateInstallProgress model = - BinaryData - .fromString( - "{\"percentComplete\":820071175,\"numberOfUpdatesToInstall\":852408036,\"numberOfUpdatesInstalled\":1533389693}") - .toObject(UpdateInstallProgress.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateInstallProgress model = new UpdateInstallProgress(); - model = BinaryData.fromObject(model).toObject(UpdateInstallProgress.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateSummaryInnerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateSummaryInnerTests.java deleted file mode 100644 index d3f0e481b49f..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateSummaryInnerTests.java +++ /dev/null @@ -1,40 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.UpdateSummaryInner; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class UpdateSummaryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateSummaryInner model = - BinaryData - .fromString( - "{\"properties\":{\"deviceVersionNumber\":\"ggkzzlvmbmpa\",\"friendlyDeviceVersionName\":\"odfvuefywsbp\",\"deviceLastScannedDateTime\":\"2021-09-23T19:46:07Z\",\"lastCompletedScanJobDateTime\":\"2021-11-18T13:44:32Z\",\"lastCompletedDownloadJobDateTime\":\"2021-05-07T00:25:25Z\",\"lastCompletedInstallJobDateTime\":\"2021-03-30T01:45:45Z\",\"totalNumberOfUpdatesAvailable\":192759077,\"totalNumberOfUpdatesPendingDownload\":1120299710,\"totalNumberOfUpdatesPendingInstall\":938616277,\"rebootBehavior\":\"RequiresReboot\",\"ongoingUpdateOperation\":\"Install\",\"inProgressDownloadJobId\":\"yzvqt\",\"inProgressInstallJobId\":\"ubex\",\"inProgressDownloadJobStartedDateTime\":\"2021-04-19T22:54:33Z\",\"inProgressInstallJobStartedDateTime\":\"2021-05-08T13:31:38Z\",\"updateTitles\":[\"ndjmquxvyp\",\"mg\"],\"totalUpdateSizeInBytes\":50.27622509760092},\"id\":\"whojvp\",\"name\":\"jqg\",\"type\":\"ysmocmbqfqvmkcxo\"}") - .toObject(UpdateSummaryInner.class); - Assertions.assertEquals("ggkzzlvmbmpa", model.deviceVersionNumber()); - Assertions.assertEquals("odfvuefywsbp", model.friendlyDeviceVersionName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T19:46:07Z"), model.deviceLastScannedDateTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T13:44:32Z"), model.lastCompletedScanJobDateTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateSummaryInner model = - new UpdateSummaryInner() - .withDeviceVersionNumber("ggkzzlvmbmpa") - .withFriendlyDeviceVersionName("odfvuefywsbp") - .withDeviceLastScannedDateTime(OffsetDateTime.parse("2021-09-23T19:46:07Z")) - .withLastCompletedScanJobDateTime(OffsetDateTime.parse("2021-11-18T13:44:32Z")); - model = BinaryData.fromObject(model).toObject(UpdateSummaryInner.class); - Assertions.assertEquals("ggkzzlvmbmpa", model.deviceVersionNumber()); - Assertions.assertEquals("odfvuefywsbp", model.friendlyDeviceVersionName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T19:46:07Z"), model.deviceLastScannedDateTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T13:44:32Z"), model.lastCompletedScanJobDateTime()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateSummaryPropertiesTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateSummaryPropertiesTests.java deleted file mode 100644 index 3b5d74e7c07f..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UpdateSummaryPropertiesTests.java +++ /dev/null @@ -1,40 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.UpdateSummaryProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class UpdateSummaryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateSummaryProperties model = - BinaryData - .fromString( - "{\"deviceVersionNumber\":\"pvhelxprg\",\"friendlyDeviceVersionName\":\"atddc\",\"deviceLastScannedDateTime\":\"2021-09-13T16:27:08Z\",\"lastCompletedScanJobDateTime\":\"2021-12-04T18:39:42Z\",\"lastCompletedDownloadJobDateTime\":\"2021-07-29T04:12Z\",\"lastCompletedInstallJobDateTime\":\"2021-06-07T16:38:11Z\",\"totalNumberOfUpdatesAvailable\":1949252963,\"totalNumberOfUpdatesPendingDownload\":612337028,\"totalNumberOfUpdatesPendingInstall\":785036468,\"rebootBehavior\":\"RequiresReboot\",\"ongoingUpdateOperation\":\"None\",\"inProgressDownloadJobId\":\"xsdqrhzoymibmrqy\",\"inProgressInstallJobId\":\"ahwfluszdtmhrk\",\"inProgressDownloadJobStartedDateTime\":\"2021-06-28T13:04:58Z\",\"inProgressInstallJobStartedDateTime\":\"2021-08-13T05:08:08Z\",\"updateTitles\":[\"qacpiex\"],\"totalUpdateSizeInBytes\":8.60892322674246}") - .toObject(UpdateSummaryProperties.class); - Assertions.assertEquals("pvhelxprg", model.deviceVersionNumber()); - Assertions.assertEquals("atddc", model.friendlyDeviceVersionName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T16:27:08Z"), model.deviceLastScannedDateTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T18:39:42Z"), model.lastCompletedScanJobDateTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateSummaryProperties model = - new UpdateSummaryProperties() - .withDeviceVersionNumber("pvhelxprg") - .withFriendlyDeviceVersionName("atddc") - .withDeviceLastScannedDateTime(OffsetDateTime.parse("2021-09-13T16:27:08Z")) - .withLastCompletedScanJobDateTime(OffsetDateTime.parse("2021-12-04T18:39:42Z")); - model = BinaryData.fromObject(model).toObject(UpdateSummaryProperties.class); - Assertions.assertEquals("pvhelxprg", model.deviceVersionNumber()); - Assertions.assertEquals("atddc", model.friendlyDeviceVersionName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T16:27:08Z"), model.deviceLastScannedDateTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T18:39:42Z"), model.lastCompletedScanJobDateTime()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UploadCertificateRequestTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UploadCertificateRequestTests.java deleted file mode 100644 index bd47235932c0..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UploadCertificateRequestTests.java +++ /dev/null @@ -1,33 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.AuthenticationType; -import com.azure.resourcemanager.databoxedge.models.UploadCertificateRequest; -import org.junit.jupiter.api.Assertions; - -public final class UploadCertificateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UploadCertificateRequest model = - BinaryData - .fromString("{\"properties\":{\"authenticationType\":\"Invalid\",\"certificate\":\"bwoenwashrt\"}}") - .toObject(UploadCertificateRequest.class); - Assertions.assertEquals(AuthenticationType.INVALID, model.authenticationType()); - Assertions.assertEquals("bwoenwashrt", model.certificate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UploadCertificateRequest model = - new UploadCertificateRequest() - .withAuthenticationType(AuthenticationType.INVALID) - .withCertificate("bwoenwashrt"); - model = BinaryData.fromObject(model).toObject(UploadCertificateRequest.class); - Assertions.assertEquals(AuthenticationType.INVALID, model.authenticationType()); - Assertions.assertEquals("bwoenwashrt", model.certificate()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UploadCertificateResponseInnerTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UploadCertificateResponseInnerTests.java deleted file mode 100644 index 3611b26efeef..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UploadCertificateResponseInnerTests.java +++ /dev/null @@ -1,30 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.fluent.models.UploadCertificateResponseInner; -import com.azure.resourcemanager.databoxedge.models.AuthenticationType; -import org.junit.jupiter.api.Assertions; - -public final class UploadCertificateResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UploadCertificateResponseInner model = - BinaryData - .fromString( - "{\"authType\":\"Invalid\",\"resourceId\":\"asipqiio\",\"aadAuthority\":\"uqerpqlpqwc\",\"aadTenantId\":\"uqgbdbutauvfbt\",\"servicePrincipalClientId\":\"whhmhykojo\",\"servicePrincipalObjectId\":\"fnndl\",\"azureManagementEndpointAudience\":\"chkoymkcdyh\",\"aadAudience\":\"kkpwdreqnovvq\"}") - .toObject(UploadCertificateResponseInner.class); - Assertions.assertEquals(AuthenticationType.INVALID, model.authType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UploadCertificateResponseInner model = - new UploadCertificateResponseInner().withAuthType(AuthenticationType.INVALID); - model = BinaryData.fromObject(model).toObject(UploadCertificateResponseInner.class); - Assertions.assertEquals(AuthenticationType.INVALID, model.authType()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UserAccessRightTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UserAccessRightTests.java deleted file mode 100644 index f4767b7a59de..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UserAccessRightTests.java +++ /dev/null @@ -1,31 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.ShareAccessType; -import com.azure.resourcemanager.databoxedge.models.UserAccessRight; -import org.junit.jupiter.api.Assertions; - -public final class UserAccessRightTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAccessRight model = - BinaryData - .fromString("{\"userId\":\"qtaruoujmkcjhwq\",\"accessType\":\"Read\"}") - .toObject(UserAccessRight.class); - Assertions.assertEquals("qtaruoujmkcjhwq", model.userId()); - Assertions.assertEquals(ShareAccessType.READ, model.accessType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAccessRight model = - new UserAccessRight().withUserId("qtaruoujmkcjhwq").withAccessType(ShareAccessType.READ); - model = BinaryData.fromObject(model).toObject(UserAccessRight.class); - Assertions.assertEquals("qtaruoujmkcjhwq", model.userId()); - Assertions.assertEquals(ShareAccessType.READ, model.accessType()); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UserListTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UserListTests.java deleted file mode 100644 index e1dfec29c216..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UserListTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databoxedge.models.UserList; - -public final class UserListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"shareAccessRights\":[],\"userType\":\"ARM\"},\"id\":\"ywsuwsy\",\"name\":\"s\",\"type\":\"dsytgadgvr\"},{\"properties\":{\"shareAccessRights\":[],\"userType\":\"Share\"},\"id\":\"neqn\",\"name\":\"arrwlquu\",\"type\":\"jfqka\"}],\"nextLink\":\"wiipfpub\"}") - .toObject(UserList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserList model = new UserList(); - model = BinaryData.fromObject(model).toObject(UserList.class); - } -} diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UsersDeleteMockTests.java b/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UsersDeleteMockTests.java deleted file mode 100644 index b4b88a7c7f8f..000000000000 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/src/test/java/com/azure/resourcemanager/databoxedge/generated/UsersDeleteMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databoxedge.DataBoxEdgeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UsersDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxEdgeManager manager = - DataBoxEdgeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.users().delete("wpchwahf", "ousnfepgfewe", "wlyxgncxyk", com.azure.core.util.Context.NONE); - } -}