diff --git a/sdk/orbital/azure-resourcemanager-orbital/CHANGELOG.md b/sdk/orbital/azure-resourcemanager-orbital/CHANGELOG.md index efb5f7e1dea3..3de458ccbb10 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/CHANGELOG.md +++ b/sdk/orbital/azure-resourcemanager-orbital/CHANGELOG.md @@ -1,14 +1,110 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2025-05-06) -### Features Added +- Azure Resource Manager orbital client library for Java. This package contains Microsoft Azure SDK for orbital Management SDK. Azure Orbital service. Package tag package-2022-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.ContactsPropertiesContactProfile` was removed -### Other Changes +#### `models.AvailableGroundStationPropertiesAutoGenerated` was removed + +#### `models.ContactProfilesPropertiesProvisioningState` was removed + +#### `models.ContactsPropertiesProvisioningState` was removed + +#### `models.ContactInstanceProperties` was removed + +#### `models.ContactParametersContactProfile` was removed + +#### `models.ContactProfilesProperties` was removed + +#### `models.AvailableContactsSpacecraft` was removed + +#### `models.Contact$DefinitionStages` was modified + +* `withContactProfile(models.ContactsPropertiesContactProfile)` was removed in stage 5 + +#### `models.ContactProfile$Definition` was modified + +* `withProvisioningState(models.ContactProfilesPropertiesProvisioningState)` was removed + +#### `models.AvailableContacts` was modified + +* `models.AvailableContactsSpacecraft spacecraft()` -> `models.ResourceReference spacecraft()` + +#### `models.ContactParameters` was modified + +* `models.ContactParametersContactProfile contactProfile()` -> `models.ResourceReference contactProfile()` +* `withContactProfile(models.ContactParametersContactProfile)` was removed + +#### `models.Contact$Definition` was modified + +* `withContactProfile(models.ContactsPropertiesContactProfile)` was removed +* `withProvisioningState(models.ContactsPropertiesProvisioningState)` was removed + +#### `models.OperationsResults` was modified + +* `get(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.Contact` was modified + +* `models.ContactsPropertiesContactProfile contactProfile()` -> `models.ResourceReference contactProfile()` +* `models.ContactsPropertiesProvisioningState provisioningState()` -> `models.ProvisioningState provisioningState()` + +#### `models.ContactProfile` was modified + +* `models.ContactProfilesPropertiesProvisioningState provisioningState()` -> `models.ProvisioningState provisioningState()` + +#### `models.OperationResult` was modified + +* `java.lang.Object properties()` -> `java.util.Map properties()` + +### Features Added + +* `models.OperationsResultsGetResponse` was added + +* `models.OperationsResultsGetHeaders` was added + +* `models.ProvisioningState` was added + +#### `models.ContactProfile$Definition` was modified + +* `withProvisioningState(models.ProvisioningState)` was added + +#### `models.AvailableGroundStationListResult` was modified + +* `withNextLink(java.lang.String)` was added + +#### `models.ContactParameters` was modified + +* `withContactProfile(models.ResourceReference)` was added + +#### `models.ContactProfileListResult` was modified + +* `withNextLink(java.lang.String)` was added + +#### `models.AvailableContactsListResult` was modified + +* `withNextLink(java.lang.String)` was added + +#### `models.Contact$Definition` was modified + +* `withContactProfile(models.ResourceReference)` was added +* `withProvisioningState(models.ProvisioningState)` was added + +#### `models.OperationsResults` was modified + +* `getWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.ContactListResult` was modified + +* `withNextLink(java.lang.String)` was added + +#### `models.SpacecraftListResult` was modified + +* `withNextLink(java.lang.String)` was added ## 1.0.0 (2024-12-25) diff --git a/sdk/orbital/azure-resourcemanager-orbital/README.md b/sdk/orbital/azure-resourcemanager-orbital/README.md index 838ae8c4a127..5cadb3da4871 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/README.md +++ b/sdk/orbital/azure-resourcemanager-orbital/README.md @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ OrbitalManager manager = OrbitalManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ 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/ - - diff --git a/sdk/orbital/azure-resourcemanager-orbital/SAMPLE.md b/sdk/orbital/azure-resourcemanager-orbital/SAMPLE.md index a1c4833fe682..5428d51c5d04 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/SAMPLE.md +++ b/sdk/orbital/azure-resourcemanager-orbital/SAMPLE.md @@ -41,29 +41,50 @@ ### AvailableGroundStations_List ```java -import com.azure.resourcemanager.orbital.models.CapabilityParameter; - /** - * Samples for AvailableGroundStations List. + * Samples for Spacecrafts ListByResourceGroup. */ -public final class AvailableGroundStationsListSamples { +public final class SpacecraftsListByResourceGroupSamples { /* * x-ms-original-file: specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ - * AvailableGroundStationsByCapabilityList.json + * SpacecraftsByResourceGroupList.json */ /** - * Sample code: List of Ground Stations by Capability. + * Sample code: List of Spacecraft by Resource Group. * * @param manager Entry point to OrbitalManager. */ - public static void listOfGroundStationsByCapability(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.availableGroundStations().list(CapabilityParameter.EARTH_OBSERVATION, com.azure.core.util.Context.NONE); + public static void listOfSpacecraftByResourceGroup(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.spacecrafts().listByResourceGroup("contoso-Rgp", "opaqueString", com.azure.core.util.Context.NONE); } } ``` ### ContactProfiles_CreateOrUpdate +```java +/** + * Samples for OperationsResults Get. + */ +public final class OperationsResultsGetSamples { + /* + * x-ms-original-file: + * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/OperationResultsGet.json + */ + /** + * Sample code: KustoOperationResultsGet. + * + * @param manager Entry point to OrbitalManager. + */ + public static void kustoOperationResultsGet(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.operationsResults() + .getWithResponse("eastus2", "30972f1b-b61d-4fd8-bd34-3dcfa24670f3", com.azure.core.util.Context.NONE); + } +} +``` + +### ContactProfiles_Delete + ```java import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; import com.azure.resourcemanager.orbital.models.ContactProfileLink; @@ -136,74 +157,76 @@ public final class ContactProfilesCreateOrUpdateSamples { } ``` -### ContactProfiles_Delete +### ContactProfiles_GetByResourceGroup ```java /** - * Samples for ContactProfiles Delete. + * Samples for Contacts Get. */ -public final class ContactProfilesDeleteSamples { +public final class ContactsGetSamples { /* * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileDelete.json + * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactGet.json */ /** - * Sample code: Delete Contact Profile. + * Sample code: Get Contact. * * @param manager Entry point to OrbitalManager. */ - public static void deleteContactProfile(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contactProfiles().delete("contoso-Rgp", "CONTOSO-CP", com.azure.core.util.Context.NONE); + public static void getContact(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.contacts().getWithResponse("contoso-Rgp", "CONTOSO_SAT", "contact1", com.azure.core.util.Context.NONE); } } ``` -### ContactProfiles_GetByResourceGroup +### ContactProfiles_List ```java +import com.azure.resourcemanager.orbital.models.CapabilityParameter; + /** - * Samples for ContactProfiles GetByResourceGroup. + * Samples for AvailableGroundStations List. */ -public final class ContactProfilesGetByResourceGroupSamples { +public final class AvailableGroundStationsListSamples { /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileGet.json + * x-ms-original-file: specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ + * AvailableGroundStationsByCapabilityList.json */ /** - * Sample code: Get a contact profile. + * Sample code: List of Ground Stations by Capability. * * @param manager Entry point to OrbitalManager. */ - public static void getAContactProfile(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contactProfiles() - .getByResourceGroupWithResponse("contoso-Rgp", "CONTOSO-CP", com.azure.core.util.Context.NONE); + public static void listOfGroundStationsByCapability(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.availableGroundStations().list(CapabilityParameter.EARTH_OBSERVATION, com.azure.core.util.Context.NONE); } } ``` -### ContactProfiles_List +### ContactProfiles_ListByResourceGroup ```java /** - * Samples for ContactProfiles List. + * Samples for Spacecrafts List. */ -public final class ContactProfilesListSamples { +public final class SpacecraftsListSamples { /* - * x-ms-original-file: specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ - * ContactProfilesBySubscriptionList.json + * x-ms-original-file: + * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/SpacecraftsBySubscriptionList + * .json */ /** - * Sample code: List of Contact Profiles. + * Sample code: List of Spacecraft by Subscription. * * @param manager Entry point to OrbitalManager. */ - public static void listOfContactProfiles(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contactProfiles().list("opaqueString", com.azure.core.util.Context.NONE); + public static void listOfSpacecraftBySubscription(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.spacecrafts().list("opaqueString", com.azure.core.util.Context.NONE); } } ``` -### ContactProfiles_ListByResourceGroup +### ContactProfiles_UpdateTags ```java /** @@ -225,51 +248,10 @@ public final class ContactProfilesListByResourceGroupSamples { } ``` -### ContactProfiles_UpdateTags - -```java -import com.azure.resourcemanager.orbital.models.ContactProfile; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ContactProfiles UpdateTags. - */ -public final class ContactProfilesUpdateTagsSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileUpdateTag.json - */ - /** - * Sample code: Update Contact Profile tags. - * - * @param manager Entry point to OrbitalManager. - */ - public static void updateContactProfileTags(com.azure.resourcemanager.orbital.OrbitalManager manager) { - ContactProfile resource = manager.contactProfiles() - .getByResourceGroupWithResponse("contoso-Rgp", "CONTOSO-CP", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @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; - } -} -``` - ### Contacts_Create ```java -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; +import com.azure.resourcemanager.orbital.models.ResourceReference; import java.time.OffsetDateTime; /** @@ -292,7 +274,7 @@ public final class ContactsCreateSamples { .withReservationStartTime(OffsetDateTime.parse("2023-02-22T10:58:30Z")) .withReservationEndTime(OffsetDateTime.parse("2023-02-22T11:10:45Z")) .withGroundStationName("EASTUS2_0") - .withContactProfile(new ContactsPropertiesContactProfile().withId( + .withContactProfile(new ResourceReference().withId( "/subscriptions/c1be1141-a7c9-4aac-9608-3c2e2f1152c3/resourceGroups/contoso-Rgp/providers/Microsoft.Orbital/contactProfiles/CONTOSO-CP")) .create(); } @@ -303,20 +285,20 @@ public final class ContactsCreateSamples { ```java /** - * Samples for Contacts Delete. + * Samples for Spacecrafts Delete. */ -public final class ContactsDeleteSamples { +public final class SpacecraftsDeleteSamples { /* * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactDelete.json + * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/SpacecraftDelete.json */ /** - * Sample code: Delete Contact. + * Sample code: Delete Spacecraft. * * @param manager Entry point to OrbitalManager. */ - public static void deleteContact(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contacts().delete("contoso-Rgp", "CONTOSO_SAT", "contact1", com.azure.core.util.Context.NONE); + public static void deleteSpacecraft(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.spacecrafts().delete("contoso-Rgp", "CONTOSO_SAT", com.azure.core.util.Context.NONE); } } ``` @@ -324,49 +306,37 @@ public final class ContactsDeleteSamples { ### Contacts_Get ```java -/** - * Samples for Contacts Get. - */ -public final class ContactsGetSamples { - /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactGet.json - */ - /** - * Sample code: Get Contact. - * - * @param manager Entry point to OrbitalManager. - */ - public static void getContact(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contacts().getWithResponse("contoso-Rgp", "CONTOSO_SAT", "contact1", com.azure.core.util.Context.NONE); - } -} -``` - -### Contacts_List +import com.azure.resourcemanager.orbital.models.ContactParameters; +import com.azure.resourcemanager.orbital.models.ResourceReference; +import java.time.OffsetDateTime; -```java /** - * Samples for Contacts List. + * Samples for Spacecrafts ListAvailableContacts. */ -public final class ContactsListSamples { +public final class SpacecraftsListAvailableContactsSamples { /* * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactsBySpacecraftNameList. - * json + * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/AvailableContactsList.json */ /** - * Sample code: List of Spacecraft. + * Sample code: List of Contact. * * @param manager Entry point to OrbitalManager. */ - public static void listOfSpacecraft(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.contacts().list("contoso-Rgp", "CONTOSO_SAT", "opaqueString", com.azure.core.util.Context.NONE); + public static void listOfContact(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.spacecrafts() + .listAvailableContacts("contoso-Rgp", "CONTOSO_SAT", + new ContactParameters().withContactProfile(new ResourceReference().withId( + "/subscriptions/c1be1141-a7c9-4aac-9608-3c2e2f1152c3/resourceGroups/contoso-Rgp/providers/Microsoft.Orbital/contactProfiles/CONTOSO-CP")) + .withGroundStationName("EASTUS2_0") + .withStartTime(OffsetDateTime.parse("2022-11-01T11:30:00Z")) + .withEndTime(OffsetDateTime.parse("2022-11-02T11:30:00Z")), + com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### Contacts_List ```java /** @@ -388,30 +358,29 @@ public final class OperationsListSamples { } ``` -### OperationsResults_Get +### Operations_List ```java /** - * Samples for OperationsResults Get. + * Samples for ContactProfiles Delete. */ -public final class OperationsResultsGetSamples { +public final class ContactProfilesDeleteSamples { /* * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/OperationResultsGet.json + * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileDelete.json */ /** - * Sample code: KustoOperationResultsGet. + * Sample code: Delete Contact Profile. * * @param manager Entry point to OrbitalManager. */ - public static void kustoOperationResultsGet(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.operationsResults() - .get("eastus2", "30972f1b-b61d-4fd8-bd34-3dcfa24670f3", com.azure.core.util.Context.NONE); + public static void deleteContactProfile(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.contactProfiles().delete("contoso-Rgp", "CONTOSO-CP", com.azure.core.util.Context.NONE); } } ``` -### Spacecrafts_CreateOrUpdate +### OperationsResults_Get ```java import com.azure.resourcemanager.orbital.models.Direction; @@ -457,130 +426,138 @@ public final class SpacecraftsCreateOrUpdateSamples { } ``` -### Spacecrafts_Delete +### Spacecrafts_CreateOrUpdate ```java +import com.azure.resourcemanager.orbital.models.ContactProfile; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for Spacecrafts Delete. + * Samples for ContactProfiles UpdateTags. */ -public final class SpacecraftsDeleteSamples { +public final class ContactProfilesUpdateTagsSamples { /* * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/SpacecraftDelete.json + * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileUpdateTag.json */ /** - * Sample code: Delete Spacecraft. + * Sample code: Update Contact Profile tags. * * @param manager Entry point to OrbitalManager. */ - public static void deleteSpacecraft(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.spacecrafts().delete("contoso-Rgp", "CONTOSO_SAT", com.azure.core.util.Context.NONE); + public static void updateContactProfileTags(com.azure.resourcemanager.orbital.OrbitalManager manager) { + ContactProfile resource = manager.contactProfiles() + .getByResourceGroupWithResponse("contoso-Rgp", "CONTOSO-CP", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @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; } } ``` -### Spacecrafts_GetByResourceGroup +### Spacecrafts_Delete ```java /** - * Samples for Spacecrafts GetByResourceGroup. + * Samples for ContactProfiles List. */ -public final class SpacecraftsGetByResourceGroupSamples { +public final class ContactProfilesListSamples { /* - * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/SpacecraftGet.json + * x-ms-original-file: specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ + * ContactProfilesBySubscriptionList.json */ /** - * Sample code: Get Spacecraft. + * Sample code: List of Contact Profiles. * * @param manager Entry point to OrbitalManager. */ - public static void getSpacecraft(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.spacecrafts() - .getByResourceGroupWithResponse("contoso-Rgp", "CONTOSO_SAT", com.azure.core.util.Context.NONE); + public static void listOfContactProfiles(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.contactProfiles().list("opaqueString", com.azure.core.util.Context.NONE); } } ``` -### Spacecrafts_List +### Spacecrafts_GetByResourceGroup ```java /** - * Samples for Spacecrafts List. + * Samples for Contacts List. */ -public final class SpacecraftsListSamples { +public final class ContactsListSamples { /* * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/SpacecraftsBySubscriptionList - * .json + * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactsBySpacecraftNameList. + * json */ /** - * Sample code: List of Spacecraft by Subscription. + * Sample code: List of Spacecraft. * * @param manager Entry point to OrbitalManager. */ - public static void listOfSpacecraftBySubscription(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.spacecrafts().list("opaqueString", com.azure.core.util.Context.NONE); + public static void listOfSpacecraft(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.contacts().list("contoso-Rgp", "CONTOSO_SAT", "opaqueString", com.azure.core.util.Context.NONE); } } ``` -### Spacecrafts_ListAvailableContacts +### Spacecrafts_List ```java -import com.azure.resourcemanager.orbital.models.ContactParameters; -import com.azure.resourcemanager.orbital.models.ContactParametersContactProfile; -import java.time.OffsetDateTime; - /** - * Samples for Spacecrafts ListAvailableContacts. + * Samples for Contacts Delete. */ -public final class SpacecraftsListAvailableContactsSamples { +public final class ContactsDeleteSamples { /* * x-ms-original-file: - * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/AvailableContactsList.json + * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactDelete.json */ /** - * Sample code: List of Contact. + * Sample code: Delete Contact. * * @param manager Entry point to OrbitalManager. */ - public static void listOfContact(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.spacecrafts() - .listAvailableContacts("contoso-Rgp", "CONTOSO_SAT", - new ContactParameters().withContactProfile(new ContactParametersContactProfile().withId( - "/subscriptions/c1be1141-a7c9-4aac-9608-3c2e2f1152c3/resourceGroups/contoso-Rgp/providers/Microsoft.Orbital/contactProfiles/CONTOSO-CP")) - .withGroundStationName("EASTUS2_0") - .withStartTime(OffsetDateTime.parse("2022-11-01T11:30:00Z")) - .withEndTime(OffsetDateTime.parse("2022-11-02T11:30:00Z")), - com.azure.core.util.Context.NONE); + public static void deleteContact(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.contacts().delete("contoso-Rgp", "CONTOSO_SAT", "contact1", com.azure.core.util.Context.NONE); } } ``` -### Spacecrafts_ListByResourceGroup +### Spacecrafts_ListAvailableContacts ```java /** - * Samples for Spacecrafts ListByResourceGroup. + * Samples for Spacecrafts GetByResourceGroup. */ -public final class SpacecraftsListByResourceGroupSamples { +public final class SpacecraftsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ - * SpacecraftsByResourceGroupList.json + * x-ms-original-file: + * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/SpacecraftGet.json */ /** - * Sample code: List of Spacecraft by Resource Group. + * Sample code: Get Spacecraft. * * @param manager Entry point to OrbitalManager. */ - public static void listOfSpacecraftByResourceGroup(com.azure.resourcemanager.orbital.OrbitalManager manager) { - manager.spacecrafts().listByResourceGroup("contoso-Rgp", "opaqueString", com.azure.core.util.Context.NONE); + public static void getSpacecraft(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.spacecrafts() + .getByResourceGroupWithResponse("contoso-Rgp", "CONTOSO_SAT", com.azure.core.util.Context.NONE); } } ``` -### Spacecrafts_UpdateTags +### Spacecrafts_ListByResourceGroup ```java import com.azure.resourcemanager.orbital.models.Spacecraft; @@ -621,3 +598,26 @@ public final class SpacecraftsUpdateTagsSamples { } ``` +### Spacecrafts_UpdateTags + +```java +/** + * Samples for ContactProfiles GetByResourceGroup. + */ +public final class ContactProfilesGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileGet.json + */ + /** + * Sample code: Get a contact profile. + * + * @param manager Entry point to OrbitalManager. + */ + public static void getAContactProfile(com.azure.resourcemanager.orbital.OrbitalManager manager) { + manager.contactProfiles() + .getByResourceGroupWithResponse("contoso-Rgp", "CONTOSO-CP", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/orbital/azure-resourcemanager-orbital/pom.xml b/sdk/orbital/azure-resourcemanager-orbital/pom.xml index 83339dba89e9..38e7f7fe9375 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/pom.xml +++ b/sdk/orbital/azure-resourcemanager-orbital/pom.xml @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/OrbitalManager.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/OrbitalManager.java index 75d496f88d9a..4c883c3dd150 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/OrbitalManager.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/OrbitalManager.java @@ -22,6 +22,7 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.orbital.fluent.AzureOrbital; import com.azure.resourcemanager.orbital.implementation.AvailableGroundStationsImpl; @@ -41,6 +42,7 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -51,16 +53,16 @@ public final class OrbitalManager { private Operations operations; - private Spacecrafts spacecrafts; - - private Contacts contacts; + private AvailableGroundStations availableGroundStations; private ContactProfiles contactProfiles; - private AvailableGroundStations availableGroundStations; - private OperationsResults operationsResults; + private Spacecrafts spacecrafts; + + private Contacts contacts; + private final AzureOrbital clientObject; private OrbitalManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -113,6 +115,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-orbital.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -220,12 +225,14 @@ public OrbitalManager authenticate(TokenCredential credential, AzureProfile prof Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.orbital") .append("/") - .append("1.0.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -284,27 +291,16 @@ public Operations operations() { } /** - * Gets the resource collection API of Spacecrafts. It manages Spacecraft. - * - * @return Resource collection API of Spacecrafts. - */ - public Spacecrafts spacecrafts() { - if (this.spacecrafts == null) { - this.spacecrafts = new SpacecraftsImpl(clientObject.getSpacecrafts(), this); - } - return spacecrafts; - } - - /** - * Gets the resource collection API of Contacts. It manages Contact. + * Gets the resource collection API of AvailableGroundStations. * - * @return Resource collection API of Contacts. + * @return Resource collection API of AvailableGroundStations. */ - public Contacts contacts() { - if (this.contacts == null) { - this.contacts = new ContactsImpl(clientObject.getContacts(), this); + public AvailableGroundStations availableGroundStations() { + if (this.availableGroundStations == null) { + this.availableGroundStations + = new AvailableGroundStationsImpl(clientObject.getAvailableGroundStations(), this); } - return contacts; + return availableGroundStations; } /** @@ -319,19 +315,6 @@ public ContactProfiles contactProfiles() { return contactProfiles; } - /** - * Gets the resource collection API of AvailableGroundStations. - * - * @return Resource collection API of AvailableGroundStations. - */ - public AvailableGroundStations availableGroundStations() { - if (this.availableGroundStations == null) { - this.availableGroundStations - = new AvailableGroundStationsImpl(clientObject.getAvailableGroundStations(), this); - } - return availableGroundStations; - } - /** * Gets the resource collection API of OperationsResults. * @@ -344,6 +327,30 @@ public OperationsResults operationsResults() { return operationsResults; } + /** + * Gets the resource collection API of Spacecrafts. It manages Spacecraft. + * + * @return Resource collection API of Spacecrafts. + */ + public Spacecrafts spacecrafts() { + if (this.spacecrafts == null) { + this.spacecrafts = new SpacecraftsImpl(clientObject.getSpacecrafts(), this); + } + return spacecrafts; + } + + /** + * Gets the resource collection API of Contacts. It manages Contact. + * + * @return Resource collection API of Contacts. + */ + public Contacts contacts() { + if (this.contacts == null) { + this.contacts = new ContactsImpl(clientObject.getContacts(), this); + } + return contacts; + } + /** * Gets wrapped service client AzureOrbital providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AvailableGroundStationsClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AvailableGroundStationsClient.java index 45b5ed88fc91..fc5ac27c553e 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AvailableGroundStationsClient.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AvailableGroundStationsClient.java @@ -22,8 +22,7 @@ public interface AvailableGroundStationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. + * @return ground Stations available to schedule Contacts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(CapabilityParameter capability); @@ -36,8 +35,7 @@ public interface AvailableGroundStationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. + * @return ground Stations available to schedule Contacts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(CapabilityParameter capability, Context context); diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AzureOrbital.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AzureOrbital.java index 18379ac26030..257d097c108b 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AzureOrbital.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/AzureOrbital.java @@ -54,37 +54,37 @@ public interface AzureOrbital { OperationsClient getOperations(); /** - * Gets the SpacecraftsClient object to access its operations. + * Gets the AvailableGroundStationsClient object to access its operations. * - * @return the SpacecraftsClient object. + * @return the AvailableGroundStationsClient object. */ - SpacecraftsClient getSpacecrafts(); + AvailableGroundStationsClient getAvailableGroundStations(); /** - * Gets the ContactsClient object to access its operations. + * Gets the ContactProfilesClient object to access its operations. * - * @return the ContactsClient object. + * @return the ContactProfilesClient object. */ - ContactsClient getContacts(); + ContactProfilesClient getContactProfiles(); /** - * Gets the ContactProfilesClient object to access its operations. + * Gets the OperationsResultsClient object to access its operations. * - * @return the ContactProfilesClient object. + * @return the OperationsResultsClient object. */ - ContactProfilesClient getContactProfiles(); + OperationsResultsClient getOperationsResults(); /** - * Gets the AvailableGroundStationsClient object to access its operations. + * Gets the SpacecraftsClient object to access its operations. * - * @return the AvailableGroundStationsClient object. + * @return the SpacecraftsClient object. */ - AvailableGroundStationsClient getAvailableGroundStations(); + SpacecraftsClient getSpacecrafts(); /** - * Gets the OperationsResultsClient object to access its operations. + * Gets the ContactsClient object to access its operations. * - * @return the OperationsResultsClient object. + * @return the ContactsClient object. */ - OperationsResultsClient getOperationsResults(); + ContactsClient getContacts(); } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactProfilesClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactProfilesClient.java index 75105bf82da0..69b563809245 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactProfilesClient.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactProfilesClient.java @@ -18,6 +18,61 @@ * An instance of this class provides access to all the operations defined in ContactProfilesClient. */ public interface ContactProfilesClient { + /** + * Returns list of contact profiles by Subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Returns list of contact profiles by Subscription. + * + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. + * @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 response of a ContactProfile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String skiptoken, Context context); + + /** + * Returns list of contact profiles by Resource Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Returns list of contact profiles by Resource Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. + * @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 response of a ContactProfile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, Context context); + /** * Gets the specified contact Profile in a specified resource group. * @@ -112,59 +167,6 @@ ContactProfileInner createOrUpdate(String resourceGroupName, String contactProfi ContactProfileInner createOrUpdate(String resourceGroupName, String contactProfileName, ContactProfileInner parameters, Context context); - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile 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 resourceGroupName, String contactProfileName); - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile 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 resourceGroupName, String contactProfileName, - Context context); - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile 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 resourceGroupName, String contactProfileName); - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile 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 resourceGroupName, String contactProfileName, Context context); - /** * Updates the specified contact profile tags. * @@ -231,57 +233,55 @@ ContactProfileInner updateTags(String resourceGroupName, String contactProfileNa Context context); /** - * Returns list of contact profiles by Subscription. + * Deletes a specified contact profile resource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String contactProfileName); /** - * Returns list of contact profiles by Subscription. + * Deletes a specified contact profile resource. * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String skiptoken, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String contactProfileName, + Context context); /** - * Returns list of contact profiles by Resource Group. + * Deletes a specified contact profile resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String contactProfileName); /** - * Returns list of contact profiles by Resource Group. + * Deletes a specified contact profile resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String contactProfileName, Context context); } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactsClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactsClient.java index 62da51f9e558..93f64427f671 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactsClient.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/ContactsClient.java @@ -25,7 +25,7 @@ public interface ContactsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Contact list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String spacecraftName); @@ -43,7 +43,7 @@ public interface ContactsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Contact list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String spacecraftName, String skiptoken, diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsClient.java index 814b603185bc..fa62e78341e6 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsClient.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsClient.java @@ -15,7 +15,7 @@ */ public interface OperationsClient { /** - * Lists all of the available Orbital Rest API operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -26,7 +26,7 @@ public interface OperationsClient { PagedIterable list(); /** - * Lists all of the available Orbital Rest API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsResultsClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsResultsClient.java index aaba33ac23a7..005c764713f3 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsResultsClient.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/OperationsResultsClient.java @@ -6,28 +6,14 @@ 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.orbital.fluent.models.OperationResultInner; +import com.azure.resourcemanager.orbital.models.OperationsResultsGetResponse; /** * An instance of this class provides access to all the operations defined in OperationsResultsClient. */ public interface OperationsResultsClient { - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async 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 operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationResultInner> beginGet(String location, String operationId); - /** * Returns operation results. * @@ -37,36 +23,21 @@ public interface OperationsResultsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationResultInner> beginGet(String location, String operationId, - Context context); - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async 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 operation Result Entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationResultInner get(String location, String operationId); + OperationsResultsGetResponse getWithResponse(String location, String operationId, Context context); /** * Returns operation results. * * @param location The name of Azure region. * @param operationId The ID of an ongoing async operation. - * @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 operation Result Entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationResultInner get(String location, String operationId, Context context); + OperationResultInner get(String location, String operationId); } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/SpacecraftsClient.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/SpacecraftsClient.java index e91b71fc8d8b..16fe5b7e9c12 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/SpacecraftsClient.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/SpacecraftsClient.java @@ -25,7 +25,7 @@ public interface SpacecraftsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -41,7 +41,7 @@ public interface SpacecraftsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String skiptoken, Context context); @@ -53,7 +53,7 @@ public interface SpacecraftsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -70,7 +70,7 @@ public interface SpacecraftsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, Context context); @@ -165,116 +165,116 @@ SpacecraftInner createOrUpdate(String resourceGroupName, String spacecraftName, Context context); /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName); + SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, + String spacecraftName, TagsObject parameters); /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @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. + * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName, Context context); + SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, + String spacecraftName, TagsObject parameters, Context context); /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String spacecraftName); + SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters); /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @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 customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String spacecraftName, Context context); + SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters, Context context); /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 customer creates a spacecraft resource to schedule a contact. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, - String spacecraftName, TagsObject parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName); /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @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 customer creates a spacecraft resource to schedule a contact. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, - String spacecraftName, TagsObject parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName, Context context); /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.SINGLE) - SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters); + void delete(String resourceGroupName, String spacecraftName); /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @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 customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.SINGLE) - SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters, Context context); + void delete(String resourceGroupName, String spacecraftName, Context context); /** * Returns list of available contacts. A contact is available if the spacecraft is visible from the ground station diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsInner.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsInner.java index af2adf4e5052..82f7ad776829 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsInner.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsInner.java @@ -9,7 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.AvailableContactsSpacecraft; +import com.azure.resourcemanager.orbital.models.ResourceReference; import java.io.IOException; import java.time.OffsetDateTime; @@ -22,7 +22,7 @@ public final class AvailableContactsInner implements JsonSerializable { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableGroundStationProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableGroundStationProperties.java index 01241a317d10..3bf20bc2f2c1 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableGroundStationProperties.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableGroundStationProperties.java @@ -6,17 +6,47 @@ import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.AvailableGroundStationPropertiesAutoGenerated; import com.azure.resourcemanager.orbital.models.ReleaseMode; import java.io.IOException; /** - * The properties bag for this resource. + * Properties object for Available groundstation. */ @Fluent -public final class AvailableGroundStationProperties extends AvailableGroundStationPropertiesAutoGenerated { +public final class AvailableGroundStationProperties implements JsonSerializable { + /* + * City of ground station. + */ + private String city; + + /* + * Ground station provider name. + */ + private String providerName; + + /* + * Longitude of the ground station in decimal degrees. + */ + private Float longitudeDegrees; + + /* + * Latitude of the ground station in decimal degrees. + */ + private Float latitudeDegrees; + + /* + * Altitude of the ground station. + */ + private Float altitudeMeters; + + /* + * Release Status of a ground station. + */ + private ReleaseMode releaseMode; + /** * Creates an instance of AvailableGroundStationProperties class. */ @@ -24,56 +54,122 @@ public AvailableGroundStationProperties() { } /** - * {@inheritDoc} + * Get the city property: City of ground station. + * + * @return the city value. + */ + public String city() { + return this.city; + } + + /** + * Set the city property: City of ground station. + * + * @param city the city value to set. + * @return the AvailableGroundStationProperties object itself. */ - @Override public AvailableGroundStationProperties withCity(String city) { - super.withCity(city); + this.city = city; return this; } /** - * {@inheritDoc} + * Get the providerName property: Ground station provider name. + * + * @return the providerName value. + */ + public String providerName() { + return this.providerName; + } + + /** + * Set the providerName property: Ground station provider name. + * + * @param providerName the providerName value to set. + * @return the AvailableGroundStationProperties object itself. */ - @Override public AvailableGroundStationProperties withProviderName(String providerName) { - super.withProviderName(providerName); + this.providerName = providerName; return this; } /** - * {@inheritDoc} + * Get the longitudeDegrees property: Longitude of the ground station in decimal degrees. + * + * @return the longitudeDegrees value. + */ + public Float longitudeDegrees() { + return this.longitudeDegrees; + } + + /** + * Set the longitudeDegrees property: Longitude of the ground station in decimal degrees. + * + * @param longitudeDegrees the longitudeDegrees value to set. + * @return the AvailableGroundStationProperties object itself. */ - @Override public AvailableGroundStationProperties withLongitudeDegrees(Float longitudeDegrees) { - super.withLongitudeDegrees(longitudeDegrees); + this.longitudeDegrees = longitudeDegrees; return this; } /** - * {@inheritDoc} + * Get the latitudeDegrees property: Latitude of the ground station in decimal degrees. + * + * @return the latitudeDegrees value. + */ + public Float latitudeDegrees() { + return this.latitudeDegrees; + } + + /** + * Set the latitudeDegrees property: Latitude of the ground station in decimal degrees. + * + * @param latitudeDegrees the latitudeDegrees value to set. + * @return the AvailableGroundStationProperties object itself. */ - @Override public AvailableGroundStationProperties withLatitudeDegrees(Float latitudeDegrees) { - super.withLatitudeDegrees(latitudeDegrees); + this.latitudeDegrees = latitudeDegrees; return this; } /** - * {@inheritDoc} + * Get the altitudeMeters property: Altitude of the ground station. + * + * @return the altitudeMeters value. + */ + public Float altitudeMeters() { + return this.altitudeMeters; + } + + /** + * Set the altitudeMeters property: Altitude of the ground station. + * + * @param altitudeMeters the altitudeMeters value to set. + * @return the AvailableGroundStationProperties object itself. */ - @Override public AvailableGroundStationProperties withAltitudeMeters(Float altitudeMeters) { - super.withAltitudeMeters(altitudeMeters); + this.altitudeMeters = altitudeMeters; return this; } /** - * {@inheritDoc} + * Get the releaseMode property: Release Status of a ground station. + * + * @return the releaseMode value. + */ + public ReleaseMode releaseMode() { + return this.releaseMode; + } + + /** + * Set the releaseMode property: Release Status of a ground station. + * + * @param releaseMode the releaseMode value to set. + * @return the AvailableGroundStationProperties object itself. */ - @Override public AvailableGroundStationProperties withReleaseMode(ReleaseMode releaseMode) { - super.withReleaseMode(releaseMode); + this.releaseMode = releaseMode; return this; } @@ -82,7 +178,6 @@ public AvailableGroundStationProperties withReleaseMode(ReleaseMode releaseMode) * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { } @@ -92,12 +187,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("city", city()); - jsonWriter.writeStringField("providerName", providerName()); - jsonWriter.writeNumberField("longitudeDegrees", longitudeDegrees()); - jsonWriter.writeNumberField("latitudeDegrees", latitudeDegrees()); - jsonWriter.writeNumberField("altitudeMeters", altitudeMeters()); - jsonWriter.writeStringField("releaseMode", releaseMode() == null ? null : releaseMode().toString()); + jsonWriter.writeStringField("city", this.city); + jsonWriter.writeStringField("providerName", this.providerName); + jsonWriter.writeNumberField("longitudeDegrees", this.longitudeDegrees); + jsonWriter.writeNumberField("latitudeDegrees", this.latitudeDegrees); + jsonWriter.writeNumberField("altitudeMeters", this.altitudeMeters); + jsonWriter.writeStringField("releaseMode", this.releaseMode == null ? null : this.releaseMode.toString()); return jsonWriter.writeEndObject(); } @@ -118,21 +213,21 @@ public static AvailableGroundStationProperties fromJson(JsonReader jsonReader) t reader.nextToken(); if ("city".equals(fieldName)) { - deserializedAvailableGroundStationProperties.withCity(reader.getString()); + deserializedAvailableGroundStationProperties.city = reader.getString(); } else if ("providerName".equals(fieldName)) { - deserializedAvailableGroundStationProperties.withProviderName(reader.getString()); + deserializedAvailableGroundStationProperties.providerName = reader.getString(); } else if ("longitudeDegrees".equals(fieldName)) { - deserializedAvailableGroundStationProperties - .withLongitudeDegrees(reader.getNullable(JsonReader::getFloat)); + deserializedAvailableGroundStationProperties.longitudeDegrees + = reader.getNullable(JsonReader::getFloat); } else if ("latitudeDegrees".equals(fieldName)) { - deserializedAvailableGroundStationProperties - .withLatitudeDegrees(reader.getNullable(JsonReader::getFloat)); + deserializedAvailableGroundStationProperties.latitudeDegrees + = reader.getNullable(JsonReader::getFloat); } else if ("altitudeMeters".equals(fieldName)) { - deserializedAvailableGroundStationProperties - .withAltitudeMeters(reader.getNullable(JsonReader::getFloat)); + deserializedAvailableGroundStationProperties.altitudeMeters + = reader.getNullable(JsonReader::getFloat); } else if ("releaseMode".equals(fieldName)) { - deserializedAvailableGroundStationProperties - .withReleaseMode(ReleaseMode.fromString(reader.getString())); + deserializedAvailableGroundStationProperties.releaseMode + = ReleaseMode.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactInner.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactInner.java index 2d48bcd069a1..16ca50edbaaa 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactInner.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactInner.java @@ -12,9 +12,9 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.orbital.models.ContactsPropertiesAntennaConfiguration; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; import com.azure.resourcemanager.orbital.models.ContactsStatus; +import com.azure.resourcemanager.orbital.models.ProvisioningState; +import com.azure.resourcemanager.orbital.models.ResourceReference; import java.io.IOException; import java.time.OffsetDateTime; @@ -107,7 +107,7 @@ public String id() { * * @return the provisioningState value. */ - public ContactsPropertiesProvisioningState provisioningState() { + public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } @@ -117,7 +117,7 @@ public ContactsPropertiesProvisioningState provisioningState() { * @param provisioningState the provisioningState value to set. * @return the ContactInner object itself. */ - public ContactInner withProvisioningState(ContactsPropertiesProvisioningState provisioningState) { + public ContactInner withProvisioningState(ProvisioningState provisioningState) { if (this.innerProperties() == null) { this.innerProperties = new ContactsProperties(); } @@ -307,7 +307,7 @@ public ContactsPropertiesAntennaConfiguration antennaConfiguration() { * * @return the contactProfile value. */ - public ContactsPropertiesContactProfile contactProfile() { + public ResourceReference contactProfile() { return this.innerProperties() == null ? null : this.innerProperties().contactProfile(); } @@ -317,7 +317,7 @@ public ContactsPropertiesContactProfile contactProfile() { * @param contactProfile the contactProfile value to set. * @return the ContactInner object itself. */ - public ContactInner withContactProfile(ContactsPropertiesContactProfile contactProfile) { + public ContactInner withContactProfile(ResourceReference contactProfile) { if (this.innerProperties() == null) { this.innerProperties = new ContactsProperties(); } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactInstanceProperties.java similarity index 78% rename from sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsProperties.java rename to sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactInstanceProperties.java index 66ee0d14f218..a475d8e079bd 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/AvailableContactsProperties.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactInstanceProperties.java @@ -7,36 +7,36 @@ import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.ContactInstanceProperties; import java.io.IOException; import java.time.OffsetDateTime; /** - * Properties of Contact resource. + * Contact Instance Properties. */ @Immutable -public final class AvailableContactsProperties extends ContactInstanceProperties { +public final class ContactInstanceProperties implements JsonSerializable { /* - * Spacecraft elevation above the horizon at contact end. + * Maximum elevation of the antenna during the contact in decimal degrees. */ - private Float endElevationDegrees; + private Float maximumElevationDegrees; /* - * Spacecraft elevation above the horizon at contact start. + * Time at which antenna transmit will be enabled (ISO 8601 UTC standard). */ - private Float startElevationDegrees; + private OffsetDateTime txStartTime; /* - * Azimuth of the antenna at the end of the contact in decimal degrees. + * Time at which antenna transmit will be disabled (ISO 8601 UTC standard). */ - private Float endAzimuthDegrees; + private OffsetDateTime txEndTime; /* - * Azimuth of the antenna at the start of the contact in decimal degrees. + * Earliest time to receive a signal (ISO 8601 UTC standard). */ - private Float startAzimuthDegrees; + private OffsetDateTime rxStartTime; /* * Time to lost receiving a signal (ISO 8601 UTC standard). @@ -44,69 +44,65 @@ public final class AvailableContactsProperties extends ContactInstanceProperties private OffsetDateTime rxEndTime; /* - * Earliest time to receive a signal (ISO 8601 UTC standard). + * Azimuth of the antenna at the start of the contact in decimal degrees. */ - private OffsetDateTime rxStartTime; + private Float startAzimuthDegrees; /* - * Time at which antenna transmit will be disabled (ISO 8601 UTC standard). + * Azimuth of the antenna at the end of the contact in decimal degrees. */ - private OffsetDateTime txEndTime; + private Float endAzimuthDegrees; /* - * Time at which antenna transmit will be enabled (ISO 8601 UTC standard). + * Spacecraft elevation above the horizon at contact start. */ - private OffsetDateTime txStartTime; + private Float startElevationDegrees; /* - * Maximum elevation of the antenna during the contact in decimal degrees. + * Spacecraft elevation above the horizon at contact end. */ - private Float maximumElevationDegrees; + private Float endElevationDegrees; /** - * Creates an instance of AvailableContactsProperties class. + * Creates an instance of ContactInstanceProperties class. */ - public AvailableContactsProperties() { + public ContactInstanceProperties() { } /** - * Get the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. + * Get the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal degrees. * - * @return the endElevationDegrees value. + * @return the maximumElevationDegrees value. */ - @Override - public Float endElevationDegrees() { - return this.endElevationDegrees; + public Float maximumElevationDegrees() { + return this.maximumElevationDegrees; } /** - * Get the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. + * Get the txStartTime property: Time at which antenna transmit will be enabled (ISO 8601 UTC standard). * - * @return the startElevationDegrees value. + * @return the txStartTime value. */ - @Override - public Float startElevationDegrees() { - return this.startElevationDegrees; + public OffsetDateTime txStartTime() { + return this.txStartTime; } /** - * Get the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. + * Get the txEndTime property: Time at which antenna transmit will be disabled (ISO 8601 UTC standard). * - * @return the endAzimuthDegrees value. + * @return the txEndTime value. */ - @Override - public Float endAzimuthDegrees() { - return this.endAzimuthDegrees; + public OffsetDateTime txEndTime() { + return this.txEndTime; } /** - * Get the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. + * Get the rxStartTime property: Earliest time to receive a signal (ISO 8601 UTC standard). * - * @return the startAzimuthDegrees value. + * @return the rxStartTime value. */ - @Override - public Float startAzimuthDegrees() { - return this.startAzimuthDegrees; + public OffsetDateTime rxStartTime() { + return this.rxStartTime; } /** @@ -114,49 +110,44 @@ public Float startAzimuthDegrees() { * * @return the rxEndTime value. */ - @Override public OffsetDateTime rxEndTime() { return this.rxEndTime; } /** - * Get the rxStartTime property: Earliest time to receive a signal (ISO 8601 UTC standard). + * Get the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. * - * @return the rxStartTime value. + * @return the startAzimuthDegrees value. */ - @Override - public OffsetDateTime rxStartTime() { - return this.rxStartTime; + public Float startAzimuthDegrees() { + return this.startAzimuthDegrees; } /** - * Get the txEndTime property: Time at which antenna transmit will be disabled (ISO 8601 UTC standard). + * Get the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. * - * @return the txEndTime value. + * @return the endAzimuthDegrees value. */ - @Override - public OffsetDateTime txEndTime() { - return this.txEndTime; + public Float endAzimuthDegrees() { + return this.endAzimuthDegrees; } /** - * Get the txStartTime property: Time at which antenna transmit will be enabled (ISO 8601 UTC standard). + * Get the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. * - * @return the txStartTime value. + * @return the startElevationDegrees value. */ - @Override - public OffsetDateTime txStartTime() { - return this.txStartTime; + public Float startElevationDegrees() { + return this.startElevationDegrees; } /** - * Get the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal degrees. + * Get the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. * - * @return the maximumElevationDegrees value. + * @return the endElevationDegrees value. */ - @Override - public Float maximumElevationDegrees() { - return this.maximumElevationDegrees; + public Float endElevationDegrees() { + return this.endElevationDegrees; } /** @@ -164,7 +155,6 @@ public Float maximumElevationDegrees() { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { } @@ -178,53 +168,52 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of AvailableContactsProperties from the JsonReader. + * Reads an instance of ContactInstanceProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AvailableContactsProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AvailableContactsProperties. + * @return An instance of ContactInstanceProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ContactInstanceProperties. */ - public static AvailableContactsProperties fromJson(JsonReader jsonReader) throws IOException { + public static ContactInstanceProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AvailableContactsProperties deserializedAvailableContactsProperties = new AvailableContactsProperties(); + ContactInstanceProperties deserializedContactInstanceProperties = new ContactInstanceProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("maximumElevationDegrees".equals(fieldName)) { - deserializedAvailableContactsProperties.maximumElevationDegrees + deserializedContactInstanceProperties.maximumElevationDegrees = reader.getNullable(JsonReader::getFloat); } else if ("txStartTime".equals(fieldName)) { - deserializedAvailableContactsProperties.txStartTime = reader + deserializedContactInstanceProperties.txStartTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("txEndTime".equals(fieldName)) { - deserializedAvailableContactsProperties.txEndTime = reader + deserializedContactInstanceProperties.txEndTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("rxStartTime".equals(fieldName)) { - deserializedAvailableContactsProperties.rxStartTime = reader + deserializedContactInstanceProperties.rxStartTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("rxEndTime".equals(fieldName)) { - deserializedAvailableContactsProperties.rxEndTime = reader + deserializedContactInstanceProperties.rxEndTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("startAzimuthDegrees".equals(fieldName)) { - deserializedAvailableContactsProperties.startAzimuthDegrees + deserializedContactInstanceProperties.startAzimuthDegrees = reader.getNullable(JsonReader::getFloat); } else if ("endAzimuthDegrees".equals(fieldName)) { - deserializedAvailableContactsProperties.endAzimuthDegrees - = reader.getNullable(JsonReader::getFloat); + deserializedContactInstanceProperties.endAzimuthDegrees = reader.getNullable(JsonReader::getFloat); } else if ("startElevationDegrees".equals(fieldName)) { - deserializedAvailableContactsProperties.startElevationDegrees + deserializedContactInstanceProperties.startElevationDegrees = reader.getNullable(JsonReader::getFloat); } else if ("endElevationDegrees".equals(fieldName)) { - deserializedAvailableContactsProperties.endElevationDegrees + deserializedContactInstanceProperties.endElevationDegrees = reader.getNullable(JsonReader::getFloat); } else { reader.skipChildren(); } } - return deserializedAvailableContactsProperties; + return deserializedContactInstanceProperties; }); } } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileInner.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileInner.java index 42bc57320f67..8c71c7fb1211 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileInner.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileInner.java @@ -15,7 +15,7 @@ import com.azure.resourcemanager.orbital.models.ContactProfileLink; import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; +import com.azure.resourcemanager.orbital.models.ProvisioningState; import java.io.IOException; import java.util.List; import java.util.Map; @@ -29,7 +29,7 @@ public final class ContactProfileInner extends Resource { /* * Properties of the contact profile resource. */ - private ContactProfileProperties innerProperties = new ContactProfileProperties(); + private ContactProfilesProperties innerProperties = new ContactProfilesProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -62,7 +62,7 @@ public ContactProfileInner() { * * @return the innerProperties value. */ - private ContactProfileProperties innerProperties() { + private ContactProfilesProperties innerProperties() { return this.innerProperties; } @@ -128,7 +128,7 @@ public ContactProfileInner withTags(Map tags) { * * @return the provisioningState value. */ - public ContactProfilesPropertiesProvisioningState provisioningState() { + public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } @@ -138,9 +138,9 @@ public ContactProfilesPropertiesProvisioningState provisioningState() { * @param provisioningState the provisioningState value to set. * @return the ContactProfileInner object itself. */ - public ContactProfileInner withProvisioningState(ContactProfilesPropertiesProvisioningState provisioningState) { + public ContactProfileInner withProvisioningState(ProvisioningState provisioningState) { if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); + this.innerProperties = new ContactProfilesProperties(); } this.innerProperties().withProvisioningState(provisioningState); return this; @@ -165,7 +165,7 @@ public String minimumViableContactDuration() { */ public ContactProfileInner withMinimumViableContactDuration(String minimumViableContactDuration) { if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); + this.innerProperties = new ContactProfilesProperties(); } this.innerProperties().withMinimumViableContactDuration(minimumViableContactDuration); return this; @@ -190,7 +190,7 @@ public Float minimumElevationDegrees() { */ public ContactProfileInner withMinimumElevationDegrees(Float minimumElevationDegrees) { if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); + this.innerProperties = new ContactProfilesProperties(); } this.innerProperties().withMinimumElevationDegrees(minimumElevationDegrees); return this; @@ -213,7 +213,7 @@ public AutoTrackingConfiguration autoTrackingConfiguration() { */ public ContactProfileInner withAutoTrackingConfiguration(AutoTrackingConfiguration autoTrackingConfiguration) { if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); + this.innerProperties = new ContactProfilesProperties(); } this.innerProperties().withAutoTrackingConfiguration(autoTrackingConfiguration); return this; @@ -238,7 +238,7 @@ public String eventHubUri() { */ public ContactProfileInner withEventHubUri(String eventHubUri) { if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); + this.innerProperties = new ContactProfilesProperties(); } this.innerProperties().withEventHubUri(eventHubUri); return this; @@ -262,7 +262,7 @@ public ContactProfilesPropertiesNetworkConfiguration networkConfiguration() { public ContactProfileInner withNetworkConfiguration(ContactProfilesPropertiesNetworkConfiguration networkConfiguration) { if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); + this.innerProperties = new ContactProfilesProperties(); } this.innerProperties().withNetworkConfiguration(networkConfiguration); return this; @@ -288,7 +288,7 @@ public List thirdPartyConfigurations() { public ContactProfileInner withThirdPartyConfigurations(List thirdPartyConfigurations) { if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); + this.innerProperties = new ContactProfilesProperties(); } this.innerProperties().withThirdPartyConfigurations(thirdPartyConfigurations); return this; @@ -311,7 +311,7 @@ public List links() { */ public ContactProfileInner withLinks(List links) { if (this.innerProperties() == null) { - this.innerProperties = new ContactProfileProperties(); + this.innerProperties = new ContactProfilesProperties(); } this.innerProperties().withLinks(links); return this; @@ -374,7 +374,7 @@ public static ContactProfileInner fromJson(JsonReader jsonReader) throws IOExcep Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedContactProfileInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedContactProfileInner.innerProperties = ContactProfileProperties.fromJson(reader); + deserializedContactProfileInner.innerProperties = ContactProfilesProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedContactProfileInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileProperties.java deleted file mode 100644 index d5b40bd06751..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfileProperties.java +++ /dev/null @@ -1,201 +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.orbital.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesProperties; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import java.io.IOException; -import java.util.List; - -/** - * Properties of the contact profile resource. - */ -@Fluent -public final class ContactProfileProperties extends ContactProfilesProperties { - /** - * Creates an instance of ContactProfileProperties class. - */ - public ContactProfileProperties() { - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties - withProvisioningState(ContactProfilesPropertiesProvisioningState provisioningState) { - super.withProvisioningState(provisioningState); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties withMinimumViableContactDuration(String minimumViableContactDuration) { - super.withMinimumViableContactDuration(minimumViableContactDuration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties withMinimumElevationDegrees(Float minimumElevationDegrees) { - super.withMinimumElevationDegrees(minimumElevationDegrees); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties withAutoTrackingConfiguration(AutoTrackingConfiguration autoTrackingConfiguration) { - super.withAutoTrackingConfiguration(autoTrackingConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties withEventHubUri(String eventHubUri) { - super.withEventHubUri(eventHubUri); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties - withNetworkConfiguration(ContactProfilesPropertiesNetworkConfiguration networkConfiguration) { - super.withNetworkConfiguration(networkConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties - withThirdPartyConfigurations(List thirdPartyConfigurations) { - super.withThirdPartyConfigurations(thirdPartyConfigurations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContactProfileProperties withLinks(List links) { - super.withLinks(links); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (networkConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkConfiguration in model ContactProfileProperties")); - } else { - networkConfiguration().validate(); - } - if (thirdPartyConfigurations() != null) { - thirdPartyConfigurations().forEach(e -> e.validate()); - } - if (links() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property links in model ContactProfileProperties")); - } else { - links().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactProfileProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("networkConfiguration", networkConfiguration()); - jsonWriter.writeArrayField("links", links(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("provisioningState", - provisioningState() == null ? null : provisioningState().toString()); - jsonWriter.writeStringField("minimumViableContactDuration", minimumViableContactDuration()); - jsonWriter.writeNumberField("minimumElevationDegrees", minimumElevationDegrees()); - jsonWriter.writeStringField("autoTrackingConfiguration", - autoTrackingConfiguration() == null ? null : autoTrackingConfiguration().toString()); - jsonWriter.writeStringField("eventHubUri", eventHubUri()); - jsonWriter.writeArrayField("thirdPartyConfigurations", thirdPartyConfigurations(), - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactProfileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactProfileProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactProfileProperties. - */ - public static ContactProfileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactProfileProperties deserializedContactProfileProperties = new ContactProfileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("networkConfiguration".equals(fieldName)) { - deserializedContactProfileProperties - .withNetworkConfiguration(ContactProfilesPropertiesNetworkConfiguration.fromJson(reader)); - } else if ("links".equals(fieldName)) { - List links = reader.readArray(reader1 -> ContactProfileLink.fromJson(reader1)); - deserializedContactProfileProperties.withLinks(links); - } else if ("provisioningState".equals(fieldName)) { - deserializedContactProfileProperties.withProvisioningState( - ContactProfilesPropertiesProvisioningState.fromString(reader.getString())); - } else if ("minimumViableContactDuration".equals(fieldName)) { - deserializedContactProfileProperties.withMinimumViableContactDuration(reader.getString()); - } else if ("minimumElevationDegrees".equals(fieldName)) { - deserializedContactProfileProperties - .withMinimumElevationDegrees(reader.getNullable(JsonReader::getFloat)); - } else if ("autoTrackingConfiguration".equals(fieldName)) { - deserializedContactProfileProperties - .withAutoTrackingConfiguration(AutoTrackingConfiguration.fromString(reader.getString())); - } else if ("eventHubUri".equals(fieldName)) { - deserializedContactProfileProperties.withEventHubUri(reader.getString()); - } else if ("thirdPartyConfigurations".equals(fieldName)) { - List thirdPartyConfigurations - = reader.readArray(reader1 -> ContactProfileThirdPartyConfiguration.fromJson(reader1)); - deserializedContactProfileProperties.withThirdPartyConfigurations(thirdPartyConfigurations); - } else { - reader.skipChildren(); - } - } - - return deserializedContactProfileProperties; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfilesProperties.java similarity index 94% rename from sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesProperties.java rename to sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfilesProperties.java index 2267f9abe017..58e1f25abbf3 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesProperties.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactProfilesProperties.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.orbital.models; +package com.azure.resourcemanager.orbital.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; @@ -10,6 +10,11 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; +import com.azure.resourcemanager.orbital.models.ContactProfileLink; +import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; +import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; +import com.azure.resourcemanager.orbital.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -17,11 +22,11 @@ * List of Contact Profile Resource Properties. */ @Fluent -public class ContactProfilesProperties implements JsonSerializable { +public final class ContactProfilesProperties implements JsonSerializable { /* * The current state of the resource's creation, deletion, or modification. */ - private ContactProfilesPropertiesProvisioningState provisioningState; + private ProvisioningState provisioningState; /* * Minimum viable contact duration in ISO 8601 format. Used for listing the available contacts with a spacecraft at @@ -72,7 +77,7 @@ public ContactProfilesProperties() { * * @return the provisioningState value. */ - public ContactProfilesPropertiesProvisioningState provisioningState() { + public ProvisioningState provisioningState() { return this.provisioningState; } @@ -82,8 +87,7 @@ public ContactProfilesPropertiesProvisioningState provisioningState() { * @param provisioningState the provisioningState value to set. * @return the ContactProfilesProperties object itself. */ - public ContactProfilesProperties - withProvisioningState(ContactProfilesPropertiesProvisioningState provisioningState) { + public ContactProfilesProperties withProvisioningState(ProvisioningState provisioningState) { this.provisioningState = provisioningState; return this; } @@ -310,7 +314,7 @@ public static ContactProfilesProperties fromJson(JsonReader jsonReader) throws I deserializedContactProfilesProperties.links = links; } else if ("provisioningState".equals(fieldName)) { deserializedContactProfilesProperties.provisioningState - = ContactProfilesPropertiesProvisioningState.fromString(reader.getString()); + = ProvisioningState.fromString(reader.getString()); } else if ("minimumViableContactDuration".equals(fieldName)) { deserializedContactProfilesProperties.minimumViableContactDuration = reader.getString(); } else if ("minimumElevationDegrees".equals(fieldName)) { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactsProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactsProperties.java index b0ac26563573..ed70214a9ccb 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactsProperties.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/fluent/models/ContactsProperties.java @@ -12,9 +12,9 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.orbital.models.ContactsPropertiesAntennaConfiguration; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; import com.azure.resourcemanager.orbital.models.ContactsStatus; +import com.azure.resourcemanager.orbital.models.ProvisioningState; +import com.azure.resourcemanager.orbital.models.ResourceReference; import java.io.IOException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; @@ -27,7 +27,7 @@ public final class ContactsProperties implements JsonSerializable value; + private List> value; /* * The URL to get the next set of results. @@ -64,7 +65,7 @@ public final class OperationResultInner implements JsonSerializable properties; /* * Operation result error properties. @@ -136,7 +137,7 @@ public Double percentComplete() { * * @return the value value. */ - public List value() { + public List> value() { return this.value; } @@ -154,7 +155,7 @@ public String nextLink() { * * @return the properties value. */ - public Object properties() { + public Map properties() { return this.properties; } @@ -164,7 +165,7 @@ public Object properties() { * @param properties the properties value to set. * @return the OperationResultInner object itself. */ - public OperationResultInner withProperties(Object properties) { + public OperationResultInner withProperties(Map properties) { this.properties = properties; return this; } @@ -206,7 +207,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeUntypedField("properties", this.properties); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeUntyped(element)); jsonWriter.writeJsonField("error", this.error); return jsonWriter.writeEndObject(); } @@ -241,12 +242,14 @@ public static OperationResultInner fromJson(JsonReader jsonReader) throws IOExce } else if ("percentComplete".equals(fieldName)) { deserializedOperationResultInner.percentComplete = reader.getNullable(JsonReader::getDouble); } else if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> reader1.readUntyped()); + List> value + = reader.readArray(reader1 -> reader1.readMap(reader2 -> reader2.readUntyped())); deserializedOperationResultInner.value = value; } else if ("nextLink".equals(fieldName)) { deserializedOperationResultInner.nextLink = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedOperationResultInner.properties = reader.readUntyped(); + Map properties = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedOperationResultInner.properties = properties; } else if ("error".equals(fieldName)) { deserializedOperationResultInner.error = OperationResultErrorProperties.fromJson(reader); } else { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableContactsImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableContactsImpl.java index 5cc08bb33119..212832221c93 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableContactsImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableContactsImpl.java @@ -6,7 +6,7 @@ import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner; import com.azure.resourcemanager.orbital.models.AvailableContacts; -import com.azure.resourcemanager.orbital.models.AvailableContactsSpacecraft; +import com.azure.resourcemanager.orbital.models.ResourceReference; import java.time.OffsetDateTime; public final class AvailableContactsImpl implements AvailableContacts { @@ -20,7 +20,7 @@ public final class AvailableContactsImpl implements AvailableContacts { this.serviceManager = serviceManager; } - public AvailableContactsSpacecraft spacecraft() { + public ResourceReference spacecraft() { return this.innerModel().spacecraft(); } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationsClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationsClientImpl.java index 01bcec5be102..19bc8b1a3975 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationsClientImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AvailableGroundStationsClientImpl.java @@ -68,7 +68,7 @@ public interface AvailableGroundStationsService { @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("capability") CapabilityParameter capability, @HeaderParam("Accept") String accept, Context context); @@ -88,8 +88,8 @@ Mono> listByCapabilityNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return ground Stations available to schedule Contacts along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(CapabilityParameter capability) { @@ -106,8 +106,8 @@ private Mono> listSinglePageAsync(Cap } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), capability, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), capability, 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())); @@ -121,8 +121,8 @@ private Mono> listSinglePageAsync(Cap * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return ground Stations available to schedule Contacts along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(CapabilityParameter capability, @@ -141,7 +141,7 @@ private Mono> listSinglePageAsync(Cap final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), capability, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), capability, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); @@ -154,7 +154,7 @@ private Mono> listSinglePageAsync(Cap * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with {@link PagedFlux}. + * @return ground Stations available to schedule Contacts as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(CapabilityParameter capability) { @@ -170,7 +170,7 @@ private PagedFlux listAsync(CapabilityParameter cap * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with {@link PagedFlux}. + * @return ground Stations available to schedule Contacts as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(CapabilityParameter capability, Context context) { @@ -185,8 +185,7 @@ private PagedFlux listAsync(CapabilityParameter cap * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. + * @return ground Stations available to schedule Contacts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(CapabilityParameter capability) { @@ -201,8 +200,7 @@ public PagedIterable list(CapabilityParameter capab * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. + * @return ground Stations available to schedule Contacts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(CapabilityParameter capability, Context context) { @@ -216,8 +214,8 @@ public PagedIterable list(CapabilityParameter capab * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return ground Stations available to schedule Contacts along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCapabilityNextSinglePageAsync(String nextLink) { @@ -244,8 +242,8 @@ private Mono> listByCapabilityNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return ground Stations available to schedule Contacts along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCapabilityNextSinglePageAsync(String nextLink, diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AzureOrbitalImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AzureOrbitalImpl.java index 864ba0a8e1ae..12ce3347ab92 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AzureOrbitalImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/AzureOrbitalImpl.java @@ -143,73 +143,73 @@ public OperationsClient getOperations() { } /** - * The SpacecraftsClient object to access its operations. + * The AvailableGroundStationsClient object to access its operations. */ - private final SpacecraftsClient spacecrafts; + private final AvailableGroundStationsClient availableGroundStations; /** - * Gets the SpacecraftsClient object to access its operations. + * Gets the AvailableGroundStationsClient object to access its operations. * - * @return the SpacecraftsClient object. + * @return the AvailableGroundStationsClient object. */ - public SpacecraftsClient getSpacecrafts() { - return this.spacecrafts; + public AvailableGroundStationsClient getAvailableGroundStations() { + return this.availableGroundStations; } /** - * The ContactsClient object to access its operations. + * The ContactProfilesClient object to access its operations. */ - private final ContactsClient contacts; + private final ContactProfilesClient contactProfiles; /** - * Gets the ContactsClient object to access its operations. + * Gets the ContactProfilesClient object to access its operations. * - * @return the ContactsClient object. + * @return the ContactProfilesClient object. */ - public ContactsClient getContacts() { - return this.contacts; + public ContactProfilesClient getContactProfiles() { + return this.contactProfiles; } /** - * The ContactProfilesClient object to access its operations. + * The OperationsResultsClient object to access its operations. */ - private final ContactProfilesClient contactProfiles; + private final OperationsResultsClient operationsResults; /** - * Gets the ContactProfilesClient object to access its operations. + * Gets the OperationsResultsClient object to access its operations. * - * @return the ContactProfilesClient object. + * @return the OperationsResultsClient object. */ - public ContactProfilesClient getContactProfiles() { - return this.contactProfiles; + public OperationsResultsClient getOperationsResults() { + return this.operationsResults; } /** - * The AvailableGroundStationsClient object to access its operations. + * The SpacecraftsClient object to access its operations. */ - private final AvailableGroundStationsClient availableGroundStations; + private final SpacecraftsClient spacecrafts; /** - * Gets the AvailableGroundStationsClient object to access its operations. + * Gets the SpacecraftsClient object to access its operations. * - * @return the AvailableGroundStationsClient object. + * @return the SpacecraftsClient object. */ - public AvailableGroundStationsClient getAvailableGroundStations() { - return this.availableGroundStations; + public SpacecraftsClient getSpacecrafts() { + return this.spacecrafts; } /** - * The OperationsResultsClient object to access its operations. + * The ContactsClient object to access its operations. */ - private final OperationsResultsClient operationsResults; + private final ContactsClient contacts; /** - * Gets the OperationsResultsClient object to access its operations. + * Gets the ContactsClient object to access its operations. * - * @return the OperationsResultsClient object. + * @return the ContactsClient object. */ - public OperationsResultsClient getOperationsResults() { - return this.operationsResults; + public ContactsClient getContacts() { + return this.contacts; } /** @@ -231,11 +231,11 @@ public OperationsResultsClient getOperationsResults() { this.endpoint = endpoint; this.apiVersion = "2022-11-01"; this.operations = new OperationsClientImpl(this); - this.spacecrafts = new SpacecraftsClientImpl(this); - this.contacts = new ContactsClientImpl(this); - this.contactProfiles = new ContactProfilesClientImpl(this); this.availableGroundStations = new AvailableGroundStationsClientImpl(this); + this.contactProfiles = new ContactProfilesClientImpl(this); this.operationsResults = new OperationsResultsClientImpl(this); + this.spacecrafts = new SpacecraftsClientImpl(this); + this.contacts = new ContactsClientImpl(this); } /** diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactImpl.java index 80cc2ccf7552..5342ab07b676 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactImpl.java @@ -9,9 +9,9 @@ import com.azure.resourcemanager.orbital.fluent.models.ContactInner; import com.azure.resourcemanager.orbital.models.Contact; import com.azure.resourcemanager.orbital.models.ContactsPropertiesAntennaConfiguration; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; import com.azure.resourcemanager.orbital.models.ContactsStatus; +import com.azure.resourcemanager.orbital.models.ProvisioningState; +import com.azure.resourcemanager.orbital.models.ResourceReference; import java.time.OffsetDateTime; public final class ContactImpl implements Contact, Contact.Definition { @@ -40,7 +40,7 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public ContactsPropertiesProvisioningState provisioningState() { + public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -104,7 +104,7 @@ public ContactsPropertiesAntennaConfiguration antennaConfiguration() { return this.innerModel().antennaConfiguration(); } - public ContactsPropertiesContactProfile contactProfile() { + public ResourceReference contactProfile() { return this.innerModel().contactProfile(); } @@ -179,12 +179,12 @@ public ContactImpl withGroundStationName(String groundStationName) { return this; } - public ContactImpl withContactProfile(ContactsPropertiesContactProfile contactProfile) { + public ContactImpl withContactProfile(ResourceReference contactProfile) { this.innerModel().withContactProfile(contactProfile); return this; } - public ContactImpl withProvisioningState(ContactsPropertiesProvisioningState provisioningState) { + public ContactImpl withProvisioningState(ProvisioningState provisioningState) { this.innerModel().withProvisioningState(provisioningState); return this; } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfileImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfileImpl.java index de9daeafbcf4..546522fdf881 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfileImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfileImpl.java @@ -13,7 +13,7 @@ import com.azure.resourcemanager.orbital.models.ContactProfileLink; import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; +import com.azure.resourcemanager.orbital.models.ProvisioningState; import com.azure.resourcemanager.orbital.models.TagsObject; import java.util.Collections; import java.util.List; @@ -53,7 +53,7 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public ContactProfilesPropertiesProvisioningState provisioningState() { + public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -220,7 +220,7 @@ public ContactProfileImpl withTags(Map tags) { } } - public ContactProfileImpl withProvisioningState(ContactProfilesPropertiesProvisioningState provisioningState) { + public ContactProfileImpl withProvisioningState(ProvisioningState provisioningState) { this.innerModel().withProvisioningState(provisioningState); return this; } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesClientImpl.java index f4a31b2f3561..63f3728af20f 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesClientImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesClientImpl.java @@ -72,13 +72,30 @@ public final class ContactProfilesClientImpl implements ContactProfilesClient { @Host("{$host}") @ServiceInterface(name = "AzureOrbitalContactP") public interface ContactProfilesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Orbital/contactProfiles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skiptoken") String skiptoken, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("contactProfileName") String contactProfileName, @HeaderParam("Accept") String accept, Context context); @@ -87,49 +104,32 @@ Mono> getByResourceGroup(@HostParam("$host") Strin @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("contactProfileName") String contactProfileName, @BodyParam("application/json") ContactProfileInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("contactProfileName") String contactProfileName, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateTags(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("contactProfileName") String contactProfileName, @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Orbital/contactProfiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles") - @ExpectedResponses({ 200 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); + @PathParam("contactProfileName") String contactProfileName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @@ -149,410 +149,359 @@ Mono> listNext( } /** - * Gets the specified contact Profile in a specified resource group. + * Returns list of contact profiles by Subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response of a ContactProfile list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String contactProfileName) { + private Mono> listSinglePageAsync(String skiptoken) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (contactProfileName == null) { - return Mono - .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contactProfileName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), skiptoken, 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())); } /** - * Gets the specified contact Profile in a specified resource group. + * Returns list of contact profiles by Subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response of a ContactProfile list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String contactProfileName, Context context) { + private Mono> listSinglePageAsync(String skiptoken, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (contactProfileName == null) { - return Mono - .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), contactProfileName, accept, context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), skiptoken, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets the specified contact Profile in a specified resource group. + * Returns list of contact profiles by Subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group on successful completion of {@link Mono}. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String contactProfileName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, contactProfileName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String skiptoken) { + return new PagedFlux<>(() -> listSinglePageAsync(skiptoken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Gets the specified contact Profile in a specified resource group. + * Returns list of contact profiles by Subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String skiptoken = null; + return new PagedFlux<>(() -> listSinglePageAsync(skiptoken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Returns list of contact profiles by Subscription. + * + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group along with {@link Response}. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String contactProfileName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, contactProfileName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String skiptoken, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(skiptoken, context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** - * Gets the specified contact Profile in a specified resource group. + * Returns list of contact profiles by Subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String skiptoken = null; + return new PagedIterable<>(listAsync(skiptoken)); + } + + /** + * Returns list of contact profiles by Subscription. + * + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified contact Profile in a specified resource group. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContactProfileInner getByResourceGroup(String resourceGroupName, String contactProfileName) { - return getByResourceGroupWithResponse(resourceGroupName, contactProfileName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String skiptoken, Context context) { + return new PagedIterable<>(listAsync(skiptoken, context)); } /** - * Creates or updates a contact profile. + * Returns list of contact profiles by Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a ContactProfile list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String contactProfileName, ContactProfileInner parameters) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String skiptoken) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (contactProfileName == null) { + if (resourceGroupName == null) { return Mono - .error(new IllegalArgumentException("Parameter contactProfileName 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(); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contactProfileName, parameters, accept, - context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, skiptoken, 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())); } /** - * Creates or updates a contact profile. + * Returns list of contact profiles by Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a ContactProfile list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String contactProfileName, ContactProfileInner parameters, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String skiptoken, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (contactProfileName == null) { + if (resourceGroupName == null) { return Mono - .error(new IllegalArgumentException("Parameter contactProfileName 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(); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), contactProfileName, parameters, accept, context); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContactProfileInner> - beginCreateOrUpdateAsync(String resourceGroupName, String contactProfileName, ContactProfileInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, contactProfileName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContactProfileInner.class, ContactProfileInner.class, this.client.getContext()); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContactProfileInner> beginCreateOrUpdateAsync( - String resourceGroupName, String contactProfileName, ContactProfileInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, contactProfileName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContactProfileInner.class, ContactProfileInner.class, context); - } - - /** - * Creates or updates a contact profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContactProfileInner> - beginCreateOrUpdate(String resourceGroupName, String contactProfileName, ContactProfileInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters).getSyncPoller(); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, skiptoken, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Creates or updates a contact profile. + * Returns list of contact profiles by Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. - * @param context The context to associate with this operation. + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 customer creates a Contact Profile Resource, which will contain all - * of the configurations required for scheduling a contact. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContactProfileInner> beginCreateOrUpdate( - String resourceGroupName, String contactProfileName, ContactProfileInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Creates or updates a contact profile. + * Returns list of contact profiles by Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact on successful completion of {@link Mono}. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String contactProfileName, - ContactProfileInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String skiptoken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Creates or updates a contact profile. + * Returns list of contact profiles by Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact on successful completion of {@link Mono}. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String contactProfileName, - ContactProfileInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Creates or updates a contact profile. + * Returns list of contact profiles by Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContactProfileInner createOrUpdate(String resourceGroupName, String contactProfileName, - ContactProfileInner parameters) { - return createOrUpdateAsync(resourceGroupName, contactProfileName, parameters).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String skiptoken = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken)); } /** - * Creates or updates a contact profile. + * Returns list of contact profiles by Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. - * @param parameters The parameters to provide for the created Contact Profile. + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for - * scheduling a contact. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContactProfileInner createOrUpdate(String resourceGroupName, String contactProfileName, - ContactProfileInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, contactProfileName, parameters, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, + Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken, context)); } /** - * Deletes a specified contact profile resource. + * Gets the specified contact Profile in a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile 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}. + * @return the specified contact Profile in a specified resource group along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String contactProfileName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (contactProfileName == null) { return Mono .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contactProfileName, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contactProfileName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a specified contact profile resource. + * Gets the specified contact Profile in a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. @@ -560,120 +509,52 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the specified contact Profile in a specified resource group along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String contactProfileName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (contactProfileName == null) { return Mono .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), contactProfileName, accept, context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contactProfileName, accept, context); } /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile 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 resourceGroupName, String contactProfileName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, contactProfileName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile 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 resourceGroupName, String contactProfileName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, contactProfileName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile 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 resourceGroupName, String contactProfileName) { - return this.beginDeleteAsync(resourceGroupName, contactProfileName).getSyncPoller(); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile 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 resourceGroupName, String contactProfileName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, contactProfileName, context).getSyncPoller(); - } - - /** - * Deletes a specified contact profile resource. + * Gets the specified contact Profile in a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile 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. + * @return the specified contact Profile in a specified resource group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String contactProfileName) { - return beginDeleteAsync(resourceGroupName, contactProfileName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono getByResourceGroupAsync(String resourceGroupName, String contactProfileName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, contactProfileName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a specified contact profile resource. + * Gets the specified contact Profile in a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. @@ -681,49 +562,35 @@ private Mono deleteAsync(String resourceGroupName, String contactProfileNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resourceGroupName, String contactProfileName, Context context) { - return beginDeleteAsync(resourceGroupName, contactProfileName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a specified contact profile resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile 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 specified contact Profile in a specified resource group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String contactProfileName) { - deleteAsync(resourceGroupName, contactProfileName).block(); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String contactProfileName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, contactProfileName, context).block(); } /** - * Deletes a specified contact profile resource. + * Gets the specified contact Profile in a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile 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 specified contact Profile in a specified resource group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String contactProfileName, Context context) { - deleteAsync(resourceGroupName, contactProfileName, context).block(); + public ContactProfileInner getByResourceGroup(String resourceGroupName, String contactProfileName) { + return getByResourceGroupWithResponse(resourceGroupName, contactProfileName, Context.NONE).getValue(); } /** - * Updates the specified contact profile tags. + * Creates or updates a contact profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. + * @param parameters The parameters to provide for the created Contact Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -731,20 +598,20 @@ public void delete(String resourceGroupName, String contactProfileName, Context * scheduling a contact along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, - String contactProfileName, TagsObject parameters) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String contactProfileName, ContactProfileInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (contactProfileName == null) { return Mono .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); @@ -756,18 +623,17 @@ private Mono>> updateTagsWithResponseAsync(String reso } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contactProfileName, parameters, accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contactProfileName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the specified contact profile tags. + * Creates or updates a contact profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. + * @param parameters The parameters to provide for the created Contact Profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -776,20 +642,20 @@ private Mono>> updateTagsWithResponseAsync(String reso * scheduling a contact along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, - String contactProfileName, TagsObject parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String contactProfileName, ContactProfileInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (contactProfileName == null) { return Mono .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); @@ -801,16 +667,16 @@ private Mono>> updateTagsWithResponseAsync(String reso } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), contactProfileName, parameters, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contactProfileName, parameters, accept, context); } /** - * Updates the specified contact profile tags. + * Creates or updates a contact profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. + * @param parameters The parameters to provide for the created Contact Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -819,19 +685,19 @@ private Mono>> updateTagsWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ContactProfileInner> - beginUpdateTagsAsync(String resourceGroupName, String contactProfileName, TagsObject parameters) { + beginCreateOrUpdateAsync(String resourceGroupName, String contactProfileName, ContactProfileInner parameters) { Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, contactProfileName, parameters); + = createOrUpdateWithResponseAsync(resourceGroupName, contactProfileName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ContactProfileInner.class, ContactProfileInner.class, this.client.getContext()); } /** - * Updates the specified contact profile tags. + * Creates or updates a contact profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. + * @param parameters The parameters to provide for the created Contact Profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -840,21 +706,21 @@ private Mono>> updateTagsWithResponseAsync(String reso * of the configurations required for scheduling a contact. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContactProfileInner> beginUpdateTagsAsync( - String resourceGroupName, String contactProfileName, TagsObject parameters, Context context) { + private PollerFlux, ContactProfileInner> beginCreateOrUpdateAsync( + String resourceGroupName, String contactProfileName, ContactProfileInner parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, contactProfileName, parameters, context); + = createOrUpdateWithResponseAsync(resourceGroupName, contactProfileName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ContactProfileInner.class, ContactProfileInner.class, context); } /** - * Updates the specified contact profile tags. + * Creates or updates a contact profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. + * @param parameters The parameters to provide for the created Contact Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -862,17 +728,17 @@ private PollerFlux, ContactProfileInner> beginUp * of the configurations required for scheduling a contact. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContactProfileInner> beginUpdateTags(String resourceGroupName, - String contactProfileName, TagsObject parameters) { - return this.beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters).getSyncPoller(); + public SyncPoller, ContactProfileInner> + beginCreateOrUpdate(String resourceGroupName, String contactProfileName, ContactProfileInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters).getSyncPoller(); } /** - * Updates the specified contact profile tags. + * Creates or updates a contact profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. + * @param parameters The parameters to provide for the created Contact Profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -881,17 +747,18 @@ public SyncPoller, ContactProfileInner> beginUpd * of the configurations required for scheduling a contact. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContactProfileInner> beginUpdateTags(String resourceGroupName, - String contactProfileName, TagsObject parameters, Context context) { - return this.beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters, context).getSyncPoller(); + public SyncPoller, ContactProfileInner> beginCreateOrUpdate( + String resourceGroupName, String contactProfileName, ContactProfileInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters, context) + .getSyncPoller(); } /** - * Updates the specified contact profile tags. + * Creates or updates a contact profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. + * @param parameters The parameters to provide for the created Contact Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -899,18 +766,18 @@ public SyncPoller, ContactProfileInner> beginUpd * scheduling a contact on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String contactProfileName, - TagsObject parameters) { - return beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters).last() + private Mono createOrUpdateAsync(String resourceGroupName, String contactProfileName, + ContactProfileInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the specified contact profile tags. + * Creates or updates a contact profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. + * @param parameters The parameters to provide for the created Contact Profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -919,18 +786,18 @@ private Mono updateTagsAsync(String resourceGroupName, Stri * scheduling a contact on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String contactProfileName, - TagsObject parameters, Context context) { - return beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, String contactProfileName, + ContactProfileInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, contactProfileName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the specified contact profile tags. + * Creates or updates a contact profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. + * @param parameters The parameters to provide for the created Contact Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -938,16 +805,17 @@ private Mono updateTagsAsync(String resourceGroupName, Stri * scheduling a contact. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ContactProfileInner updateTags(String resourceGroupName, String contactProfileName, TagsObject parameters) { - return updateTagsAsync(resourceGroupName, contactProfileName, parameters).block(); + public ContactProfileInner createOrUpdate(String resourceGroupName, String contactProfileName, + ContactProfileInner parameters) { + return createOrUpdateAsync(resourceGroupName, contactProfileName, parameters).block(); } /** - * Updates the specified contact profile tags. + * Creates or updates a contact profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param contactProfileName Contact Profile name. - * @param parameters Parameters supplied to update contact profile tags. + * @param parameters The parameters to provide for the created Contact Profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -956,26 +824,26 @@ public ContactProfileInner updateTags(String resourceGroupName, String contactPr * scheduling a contact. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ContactProfileInner updateTags(String resourceGroupName, String contactProfileName, TagsObject parameters, - Context context) { - return updateTagsAsync(resourceGroupName, contactProfileName, parameters, context).block(); + public ContactProfileInner createOrUpdate(String resourceGroupName, String contactProfileName, + ContactProfileInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, contactProfileName, parameters, context).block(); } /** - * Returns list of contact profiles by Subscription. + * Updates the specified contact profile tags. * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile name. + * @param parameters Parameters supplied to update contact profile tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for + * scheduling a contact along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skiptoken) { + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, + String contactProfileName, TagsObject parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -984,31 +852,42 @@ private Mono> listSinglePageAsync(String skip 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 (contactProfileName == null) { + return Mono + .error(new IllegalArgumentException("Parameter contactProfileName 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.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), skiptoken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contactProfileName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Returns list of contact profiles by Subscription. + * Updates the specified contact profile tags. * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile name. + * @param parameters Parameters supplied to update contact profile tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for + * scheduling a contact along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skiptoken, Context context) { + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, + String contactProfileName, TagsObject parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1017,263 +896,382 @@ private Mono> listSinglePageAsync(String skip 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 (contactProfileName == null) { + return Mono + .error(new IllegalArgumentException("Parameter contactProfileName 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 - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), skiptoken, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contactProfileName, parameters, accept, context); } /** - * Returns list of contact profiles by Subscription. + * Updates the specified contact profile tags. * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile name. + * @param parameters Parameters supplied to update contact profile tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of customer creates a Contact Profile Resource, which will contain all + * of the configurations required for scheduling a contact. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ContactProfileInner> + beginUpdateTagsAsync(String resourceGroupName, String contactProfileName, TagsObject parameters) { + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, contactProfileName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContactProfileInner.class, ContactProfileInner.class, this.client.getContext()); + } + + /** + * Updates the specified contact profile tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile name. + * @param parameters Parameters supplied to update contact profile tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 customer creates a Contact Profile Resource, which will contain all + * of the configurations required for scheduling a contact. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ContactProfileInner> beginUpdateTagsAsync( + String resourceGroupName, String contactProfileName, TagsObject parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, contactProfileName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContactProfileInner.class, ContactProfileInner.class, context); + } + + /** + * Updates the specified contact profile tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile name. + * @param parameters Parameters supplied to update contact profile tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 customer creates a Contact Profile Resource, which will contain all + * of the configurations required for scheduling a contact. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ContactProfileInner> beginUpdateTags(String resourceGroupName, + String contactProfileName, TagsObject parameters) { + return this.beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters).getSyncPoller(); + } + + /** + * Updates the specified contact profile tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile name. + * @param parameters Parameters supplied to update contact profile tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 customer creates a Contact Profile Resource, which will contain all + * of the configurations required for scheduling a contact. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skiptoken) { - return new PagedFlux<>(() -> listSinglePageAsync(skiptoken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ContactProfileInner> beginUpdateTags(String resourceGroupName, + String contactProfileName, TagsObject parameters, Context context) { + return this.beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters, context).getSyncPoller(); } /** - * Returns list of contact profiles by Subscription. + * Updates the specified contact profile tags. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile name. + * @param parameters Parameters supplied to update contact profile tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. + * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for + * scheduling a contact on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String skiptoken = null; - return new PagedFlux<>(() -> listSinglePageAsync(skiptoken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String contactProfileName, + TagsObject parameters) { + return beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Returns list of contact profiles by Subscription. + * Updates the specified contact profile tags. * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile name. + * @param parameters Parameters supplied to update contact profile tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. + * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for + * scheduling a contact on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skiptoken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(skiptoken, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String contactProfileName, + TagsObject parameters, Context context) { + return beginUpdateTagsAsync(resourceGroupName, contactProfileName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Returns list of contact profiles by Subscription. + * Updates the specified contact profile tags. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile name. + * @param parameters Parameters supplied to update contact profile tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. + * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for + * scheduling a contact. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String skiptoken = null; - return new PagedIterable<>(listAsync(skiptoken)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ContactProfileInner updateTags(String resourceGroupName, String contactProfileName, TagsObject parameters) { + return updateTagsAsync(resourceGroupName, contactProfileName, parameters).block(); } /** - * Returns list of contact profiles by Subscription. + * Updates the specified contact profile tags. * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile name. + * @param parameters Parameters supplied to update contact profile tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. + * @return customer creates a Contact Profile Resource, which will contain all of the configurations required for + * scheduling a contact. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String skiptoken, Context context) { - return new PagedIterable<>(listAsync(skiptoken, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ContactProfileInner updateTags(String resourceGroupName, String contactProfileName, TagsObject parameters, + Context context) { + return updateTagsAsync(resourceGroupName, contactProfileName, parameters, context).block(); } /** - * Returns list of contact profiles by Resource Group. + * Deletes a specified contact profile resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skiptoken) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String contactProfileName) { 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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (contactProfileName == null) { + return Mono + .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), skiptoken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contactProfileName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Returns list of contact profiles by Resource Group. + * Deletes a specified contact profile resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skiptoken, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String contactProfileName, 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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (contactProfileName == null) { + return Mono + .error(new IllegalArgumentException("Parameter contactProfileName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), skiptoken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, contactProfileName, accept, context); } /** - * Returns list of contact profiles by Resource Group. + * Deletes a specified contact profile resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String contactProfileName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, contactProfileName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Returns list of contact profiles by Resource Group. + * Deletes a specified contact profile resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String skiptoken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String contactProfileName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, contactProfileName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Returns list of contact profiles by Resource Group. + * Deletes a specified contact profile resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param contactProfileName Contact Profile 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 resourceGroupName, String contactProfileName) { + return this.beginDeleteAsync(resourceGroupName, contactProfileName).getSyncPoller(); + } + + /** + * Deletes a specified contact profile resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String contactProfileName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + return this.beginDeleteAsync(resourceGroupName, contactProfileName, context).getSyncPoller(); } /** - * Returns list of contact profiles by Resource Group. + * Deletes a specified contact profile resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String skiptoken = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String contactProfileName) { + return beginDeleteAsync(resourceGroupName, contactProfileName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Returns list of contact profiles by Resource Group. + * Deletes a specified contact profile resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String contactProfileName, Context context) { + return beginDeleteAsync(resourceGroupName, contactProfileName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a specified contact profile resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile 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 resourceGroupName, String contactProfileName) { + deleteAsync(resourceGroupName, contactProfileName).block(); + } + + /** + * Deletes a specified contact profile resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile 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 resourceGroupName, String contactProfileName, Context context) { + deleteAsync(resourceGroupName, contactProfileName, context).block(); } /** @@ -1283,8 +1281,8 @@ public PagedIterable listByResourceGroup(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ContactProfile list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1312,8 +1310,8 @@ private Mono> listBySubscriptionNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ContactProfile list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, @@ -1339,8 +1337,8 @@ private Mono> listBySubscriptionNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ContactProfile list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1366,8 +1364,8 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContactProfiles API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ContactProfile list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesImpl.java index 00ec6c555f0c..b280c2260176 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactProfilesImpl.java @@ -27,6 +27,28 @@ public ContactProfilesImpl(ContactProfilesClient innerClient, this.serviceManager = serviceManager; } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); + } + + public PagedIterable list(String skiptoken, Context context) { + PagedIterable inner = this.serviceClient().list(skiptoken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, skiptoken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); + } + public Response getByResourceGroupWithResponse(String resourceGroupName, String contactProfileName, Context context) { Response inner @@ -56,28 +78,6 @@ public void delete(String resourceGroupName, String contactProfileName, Context this.serviceClient().delete(resourceGroupName, contactProfileName, context); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); - } - - public PagedIterable list(String skiptoken, Context context) { - PagedIterable inner = this.serviceClient().list(skiptoken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, skiptoken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContactProfileImpl(inner1, this.manager())); - } - public ContactProfile getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactsClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactsClientImpl.java index 9e7ba8421ddc..a5bfee1e8299 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactsClientImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/ContactsClientImpl.java @@ -74,8 +74,8 @@ public interface ContactsService { @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("spacecraftName") String spacecraftName, @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); @@ -84,8 +84,8 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("spacecraftName") String spacecraftName, @PathParam("contactName") String contactName, @HeaderParam("Accept") String accept, Context context); @@ -94,8 +94,8 @@ Mono> get(@HostParam("$host") String endpoint, @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("spacecraftName") String spacecraftName, @PathParam("contactName") String contactName, @BodyParam("application/json") ContactInner parameters, @HeaderParam("Accept") String accept, Context context); @@ -105,8 +105,8 @@ Mono>> create(@HostParam("$host") String endpoint, @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("spacecraftName") String spacecraftName, @PathParam("contactName") String contactName, @HeaderParam("Accept") String accept, Context context); @@ -130,8 +130,8 @@ Mono> listNext(@PathParam(value = "nextLink", encode * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a Contact list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String spacecraftName, @@ -140,22 +140,21 @@ private Mono> listSinglePageAsync(String resourceGro return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, skiptoken, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, skiptoken, 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())); @@ -174,8 +173,8 @@ private Mono> listSinglePageAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a Contact list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String spacecraftName, @@ -184,22 +183,22 @@ private Mono> listSinglePageAsync(String resourceGro return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, skiptoken, accept, context) + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, spacecraftName, skiptoken, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -216,7 +215,7 @@ private Mono> listSinglePageAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedFlux}. + * @return the response of a Contact list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String spacecraftName, String skiptoken) { @@ -232,7 +231,7 @@ private PagedFlux listAsync(String resourceGroupName, String space * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedFlux}. + * @return the response of a Contact list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String spacecraftName) { @@ -254,7 +253,7 @@ private PagedFlux listAsync(String resourceGroupName, String space * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedFlux}. + * @return the response of a Contact list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String spacecraftName, String skiptoken, @@ -271,7 +270,7 @@ private PagedFlux listAsync(String resourceGroupName, String space * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Contact list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String spacecraftName) { @@ -292,7 +291,7 @@ public PagedIterable list(String resourceGroupName, String spacecr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Contact list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String spacecraftName, String skiptoken, @@ -319,14 +318,14 @@ private Mono> getWithResponseAsync(String resourceGroupNa return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } @@ -335,9 +334,8 @@ private Mono> getWithResponseAsync(String resourceGroupNa } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, contactName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -361,14 +359,14 @@ private Mono> getWithResponseAsync(String resourceGroupNa return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } @@ -377,8 +375,8 @@ private Mono> getWithResponseAsync(String resourceGroupNa } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, spacecraftName, contactName, accept, context); } /** @@ -452,14 +450,14 @@ private Mono>> createWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } @@ -473,9 +471,9 @@ private Mono>> createWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, parameters, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, contactName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -500,14 +498,14 @@ private Mono>> createWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } @@ -521,8 +519,8 @@ private Mono>> createWithResponseAsync(String resource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, parameters, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, spacecraftName, contactName, parameters, accept, context); } /** @@ -701,14 +699,14 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } @@ -717,9 +715,8 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, contactName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -742,14 +739,14 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } @@ -758,8 +755,8 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, contactName, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, spacecraftName, contactName, accept, context); } /** @@ -912,8 +909,8 @@ public void delete(String resourceGroupName, String spacecraftName, String conta * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a Contact list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -939,8 +936,8 @@ private Mono> listNextSinglePageAsync(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a Contact list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationResultImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationResultImpl.java index 001d53ef1158..0492ffbc7549 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationResultImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationResultImpl.java @@ -11,6 +11,7 @@ import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; +import java.util.Map; public final class OperationResultImpl implements OperationResult { private OperationResultInner innerObject; @@ -47,8 +48,8 @@ public Double percentComplete() { return this.innerModel().percentComplete(); } - public List value() { - List inner = this.innerModel().value(); + public List> value() { + List> inner = this.innerModel().value(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -60,8 +61,13 @@ public String nextLink() { return this.innerModel().nextLink(); } - public Object properties() { - return this.innerModel().properties(); + public Map properties() { + Map inner = this.innerModel().properties(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } } public OperationResultErrorProperties error() { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsClientImpl.java index 35aba2775a7b..0956a15e6f20 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsClientImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsClientImpl.java @@ -10,6 +10,7 @@ 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; @@ -67,10 +68,17 @@ public interface OperationsService { @UnexpectedResponseExceptionType(ManagementException.class) Mono> list(@HostParam("$host") String endpoint, @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 all of the available Orbital Rest API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -88,12 +96,12 @@ private Mono> listSinglePageAsync() { .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all of the available Orbital Rest API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -112,11 +120,11 @@ private Mono> listSinglePageAsync(Context context) context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Lists all of the available Orbital Rest API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -125,11 +133,11 @@ private Mono> listSinglePageAsync(Context context) */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Lists all of the available Orbital Rest API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -140,11 +148,12 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Lists all of the available Orbital Rest API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -157,7 +166,7 @@ public PagedIterable list() { } /** - * Lists all of the available Orbital Rest API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -170,4 +179,57 @@ public PagedIterable list() { 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 list of REST API operations supported by an Azure Resource Provider 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 list of REST API operations supported by an Azure Resource Provider 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/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsClientImpl.java index 2521def2d868..28f02c8ab4da 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsClientImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsClientImpl.java @@ -16,18 +16,13 @@ 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.orbital.fluent.OperationsResultsClient; import com.azure.resourcemanager.orbital.fluent.models.OperationResultInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; +import com.azure.resourcemanager.orbital.models.OperationsResultsGetResponse; import reactor.core.publisher.Mono; /** @@ -66,8 +61,8 @@ public interface OperationsResultsService { @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Orbital/locations/{location}/operationResults/{operationId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } @@ -80,10 +75,10 @@ Mono>> get(@HostParam("$host") String endpoint, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity along with {@link Response} on successful completion of {@link Mono}. + * @return operation Result Entity on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getWithResponseAsync(String location, String operationId) { + private Mono getWithResponseAsync(String location, String operationId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -100,8 +95,8 @@ private Mono>> getWithResponseAsync(String location, S } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), location, operationId, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -114,10 +109,10 @@ private Mono>> getWithResponseAsync(String location, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity along with {@link Response} on successful completion of {@link Mono}. + * @return operation Result Entity on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getWithResponseAsync(String location, String operationId, + private Mono getWithResponseAsync(String location, String operationId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -135,81 +130,10 @@ private Mono>> getWithResponseAsync(String location, S } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, operationId, accept, context); } - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationResultInner> beginGetAsync(String location, - String operationId) { - Mono>> mono = getWithResponseAsync(location, operationId); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OperationResultInner.class, OperationResultInner.class, this.client.getContext()); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationResultInner> beginGetAsync(String location, - String operationId, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = getWithResponseAsync(location, operationId, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OperationResultInner.class, OperationResultInner.class, context); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationResultInner> beginGet(String location, - String operationId) { - return this.beginGetAsync(location, operationId).getSyncPoller(); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 operation Result Entity. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationResultInner> beginGet(String location, - String operationId, Context context) { - return this.beginGetAsync(location, operationId, context).getSyncPoller(); - } - /** * Returns operation results. * @@ -222,7 +146,7 @@ public SyncPoller, OperationResultInner> beginG */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String location, String operationId) { - return beginGetAsync(location, operationId).last().flatMap(this.client::getLroFinalResultOrError); + return getWithResponseAsync(location, operationId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -234,26 +158,11 @@ private Mono getAsync(String location, String operationId) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Result Entity on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String operationId, Context context) { - return beginGetAsync(location, operationId, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Returns operation results. - * - * @param location The name of Azure region. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operation Result Entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationResultInner get(String location, String operationId) { - return getAsync(location, operationId).block(); + public OperationsResultsGetResponse getWithResponse(String location, String operationId, Context context) { + return getWithResponseAsync(location, operationId, context).block(); } /** @@ -261,14 +170,13 @@ public OperationResultInner get(String location, String operationId) { * * @param location The name of Azure region. * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operation Result Entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationResultInner get(String location, String operationId, Context context) { - return getAsync(location, operationId, context).block(); + public OperationResultInner get(String location, String operationId) { + return getWithResponse(location, operationId, Context.NONE).getValue(); } } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsImpl.java index 30f5c1a0b2de..b5769ebd86e2 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/OperationsResultsImpl.java @@ -4,12 +4,15 @@ package com.azure.resourcemanager.orbital.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.orbital.fluent.OperationsResultsClient; import com.azure.resourcemanager.orbital.fluent.models.OperationResultInner; import com.azure.resourcemanager.orbital.models.OperationResult; import com.azure.resourcemanager.orbital.models.OperationsResults; +import com.azure.resourcemanager.orbital.models.OperationsResultsGetResponse; public final class OperationsResultsImpl implements OperationsResults { private static final ClientLogger LOGGER = new ClientLogger(OperationsResultsImpl.class); @@ -24,17 +27,18 @@ public OperationsResultsImpl(OperationsResultsClient innerClient, this.serviceManager = serviceManager; } - public OperationResult get(String location, String operationId) { - OperationResultInner inner = this.serviceClient().get(location, operationId); + public Response getWithResponse(String location, String operationId, Context context) { + OperationsResultsGetResponse inner = this.serviceClient().getWithResponse(location, operationId, context); if (inner != null) { - return new OperationResultImpl(inner, this.manager()); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OperationResultImpl(inner.getValue(), this.manager())); } else { return null; } } - public OperationResult get(String location, String operationId, Context context) { - OperationResultInner inner = this.serviceClient().get(location, operationId, context); + public OperationResult get(String location, String operationId) { + OperationResultInner inner = this.serviceClient().get(location, operationId); if (inner != null) { return new OperationResultImpl(inner, this.manager()); } else { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftsClientImpl.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftsClientImpl.java index 614a526df4ca..ffecd1946314 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftsClientImpl.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/implementation/SpacecraftsClientImpl.java @@ -81,7 +81,7 @@ public interface SpacecraftsService { @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -89,17 +89,17 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skiptoken") String skiptoken, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("spacecraftName") String spacecraftName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -107,38 +107,38 @@ Mono> getByResourceGroup(@HostParam("$host") String en @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("spacecraftName") String spacecraftName, @BodyParam("application/json") SpacecraftInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("spacecraftName") String spacecraftName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateTags(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("spacecraftName") String spacecraftName, @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spacecraftName") String spacecraftName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/spacecrafts/{spacecraftName}/listAvailableContacts") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> listAvailableContacts(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("spacecraftName") String spacecraftName, @BodyParam("application/json") ContactParameters parameters, @HeaderParam("Accept") String accept, Context context); @@ -177,8 +177,8 @@ Mono> listAvailableContactsNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Spacecraft list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String skiptoken) { @@ -192,8 +192,8 @@ private Mono> listSinglePageAsync(String skiptoke } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), skiptoken, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), skiptoken, 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())); @@ -210,8 +210,8 @@ private Mono> listSinglePageAsync(String skiptoke * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Spacecraft list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String skiptoken, Context context) { @@ -226,7 +226,7 @@ private Mono> listSinglePageAsync(String skiptoke final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), skiptoken, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), skiptoken, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); @@ -242,7 +242,7 @@ private Mono> listSinglePageAsync(String skiptoke * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String skiptoken) { @@ -255,7 +255,7 @@ private PagedFlux listAsync(String skiptoken) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -275,7 +275,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String skiptoken, Context context) { @@ -288,7 +288,7 @@ private PagedFlux listAsync(String skiptoken, Context context) * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -307,7 +307,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String skiptoken, Context context) { @@ -325,8 +325,8 @@ public PagedIterable list(String skiptoken, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Spacecraft list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, @@ -335,18 +335,18 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), skiptoken, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, skiptoken, 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())); @@ -364,8 +364,8 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Spacecraft list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, @@ -374,19 +374,19 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), skiptoken, accept, context) + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, skiptoken, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -402,7 +402,7 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken) { @@ -417,7 +417,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -438,7 +438,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedFlux}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken, @@ -454,7 +454,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -474,7 +474,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, @@ -500,21 +500,21 @@ private Mono> getByResourceGroupWithResponseAsync(Stri return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), spacecraftName, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -537,21 +537,21 @@ private Mono> getByResourceGroupWithResponseAsync(Stri return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, accept, context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, accept, context); } /** @@ -621,14 +621,14 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } @@ -638,8 +638,9 @@ private Mono>> createOrUpdateWithResponseAsync(String parameters.validate(); } final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), spacecraftName, parameters, accept, context)) + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -663,14 +664,14 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } @@ -681,8 +682,8 @@ private Mono>> createOrUpdateWithResponseAsync(String } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, parameters, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, parameters, accept, context); } /** @@ -834,434 +835,435 @@ public SpacecraftInner createOrUpdate(String resourceGroupName, String spacecraf } /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return customer creates a spacecraft resource to schedule a contact along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String spacecraftName) { + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, + String spacecraftName, TagsObject parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName 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.delete(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), spacecraftName, accept, context)) + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return customer creates a spacecraft resource to schedule a contact along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String spacecraftName, - Context context) { + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, + String spacecraftName, TagsObject parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName 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.delete(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, accept, context); + return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, parameters, accept, context); } /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String spacecraftName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, spacecraftName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private PollerFlux, SpacecraftInner> beginUpdateTagsAsync(String resourceGroupName, + String spacecraftName, TagsObject parameters) { + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, spacecraftName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SpacecraftInner.class, SpacecraftInner.class, this.client.getContext()); } /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String spacecraftName, - Context context) { + private PollerFlux, SpacecraftInner> beginUpdateTagsAsync(String resourceGroupName, + String spacecraftName, TagsObject parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, spacecraftName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, spacecraftName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SpacecraftInner.class, SpacecraftInner.class, context); } /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName) { - return this.beginDeleteAsync(resourceGroupName, spacecraftName).getSyncPoller(); + public SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, + String spacecraftName, TagsObject parameters) { + return this.beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters).getSyncPoller(); } /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, spacecraftName, context).getSyncPoller(); + public SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, + String spacecraftName, TagsObject parameters, Context context) { + return this.beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters, context).getSyncPoller(); } /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return customer creates a spacecraft resource to schedule a contact on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String spacecraftName) { - return beginDeleteAsync(resourceGroupName, spacecraftName).last() + private Mono updateTagsAsync(String resourceGroupName, String spacecraftName, + TagsObject parameters) { + return beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return customer creates a spacecraft resource to schedule a contact on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String spacecraftName, Context context) { - return beginDeleteAsync(resourceGroupName, spacecraftName, context).last() + private Mono updateTagsAsync(String resourceGroupName, String spacecraftName, + TagsObject parameters, Context context) { + return beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String spacecraftName) { - deleteAsync(resourceGroupName, spacecraftName).block(); + public SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters) { + return updateTagsAsync(resourceGroupName, spacecraftName, parameters).block(); } /** - * Deletes a specified spacecraft resource. + * Updates the specified spacecraft tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. + * @param parameters Parameters supplied to update spacecraft tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String spacecraftName, Context context) { - deleteAsync(resourceGroupName, spacecraftName, context).block(); + public SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters, + Context context) { + return updateTagsAsync(resourceGroupName, spacecraftName, parameters, context).block(); } /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, - String spacecraftName, TagsObject parameters) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String spacecraftName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName 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.updateTags(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), spacecraftName, parameters, accept, context)) + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, - String spacecraftName, TagsObject parameters, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String spacecraftName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName 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.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, parameters, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, spacecraftName, accept, context); } /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 customer creates a spacecraft resource to schedule a contact. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SpacecraftInner> beginUpdateTagsAsync(String resourceGroupName, - String spacecraftName, TagsObject parameters) { - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, spacecraftName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SpacecraftInner.class, SpacecraftInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String spacecraftName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, spacecraftName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 customer creates a spacecraft resource to schedule a contact. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SpacecraftInner> beginUpdateTagsAsync(String resourceGroupName, - String spacecraftName, TagsObject parameters, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String spacecraftName, + Context context) { context = this.client.mergeContext(context); - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, spacecraftName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SpacecraftInner.class, SpacecraftInner.class, context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, spacecraftName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 customer creates a spacecraft resource to schedule a contact. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, - String spacecraftName, TagsObject parameters) { - return this.beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName) { + return this.beginDeleteAsync(resourceGroupName, spacecraftName).getSyncPoller(); } /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 customer creates a spacecraft resource to schedule a contact. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SpacecraftInner> beginUpdateTags(String resourceGroupName, - String spacecraftName, TagsObject parameters, Context context) { - return this.beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String spacecraftName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, spacecraftName, context).getSyncPoller(); } /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String spacecraftName, - TagsObject parameters) { - return beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters).last() + private Mono deleteAsync(String resourceGroupName, String spacecraftName) { + return beginDeleteAsync(resourceGroupName, spacecraftName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String spacecraftName, - TagsObject parameters, Context context) { - return beginUpdateTagsAsync(resourceGroupName, spacecraftName, parameters, context).last() + private Mono deleteAsync(String resourceGroupName, String spacecraftName, Context context) { + return beginDeleteAsync(resourceGroupName, spacecraftName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters) { - return updateTagsAsync(resourceGroupName, spacecraftName, parameters).block(); + public void delete(String resourceGroupName, String spacecraftName) { + deleteAsync(resourceGroupName, spacecraftName).block(); } /** - * Updates the specified spacecraft tags. + * Deletes a specified spacecraft resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param spacecraftName Spacecraft ID. - * @param parameters Parameters supplied to update spacecraft tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer creates a spacecraft resource to schedule a contact. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SpacecraftInner updateTags(String resourceGroupName, String spacecraftName, TagsObject parameters, - Context context) { - return updateTagsAsync(resourceGroupName, spacecraftName, parameters, context).block(); + public void delete(String resourceGroupName, String spacecraftName, Context context) { + deleteAsync(resourceGroupName, spacecraftName, context).block(); } /** @@ -1284,14 +1286,14 @@ private Mono> listAvailableContactsSingleP return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } @@ -1303,8 +1305,8 @@ private Mono> listAvailableContactsSingleP final String accept = "application/json"; return FluxUtil.withContext(context -> { Mono>> mono = service - .listAvailableContacts(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, parameters, accept, context) + .listAvailableContacts(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, parameters, accept, context) .cache(); return Mono.zip(mono, this.client @@ -1341,14 +1343,14 @@ private Mono> listAvailableContactsSingleP return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (spacecraftName == null) { return Mono.error(new IllegalArgumentException("Parameter spacecraftName is required and cannot be null.")); } @@ -1359,11 +1361,10 @@ private Mono> listAvailableContactsSingleP } final String accept = "application/json"; context = this.client.mergeContext(context); - Mono>> mono - = service - .listAvailableContacts(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), spacecraftName, parameters, accept, context) - .cache(); + Mono>> mono = service + .listAvailableContacts(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, spacecraftName, parameters, accept, context) + .cache(); return Mono .zip(mono, this.client @@ -1461,8 +1462,8 @@ public PagedIterable listAvailableContacts(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Spacecraft list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1490,8 +1491,8 @@ private Mono> listBySubscriptionNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Spacecraft list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, @@ -1517,8 +1518,8 @@ private Mono> listBySubscriptionNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Spacecraft list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1544,8 +1545,8 @@ private Mono> listNextSinglePageAsync(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Spacecraft list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContacts.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContacts.java index cb4e9dce1b66..aaa83f97aa0f 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContacts.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContacts.java @@ -16,7 +16,7 @@ public interface AvailableContacts { * * @return the spacecraft value. */ - AvailableContactsSpacecraft spacecraft(); + ResourceReference spacecraft(); /** * Gets the groundStationName property: Name of Azure Ground Station. diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsListResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsListResult.java index 8d10f9318edb..0ce17e93f33e 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsListResult.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsListResult.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.orbital.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,12 +20,12 @@ @Fluent public final class AvailableContactsListResult implements JsonSerializable { /* - * A list of available contacts. + * The AvailableContacts items on this page */ private List value; /* - * The URL to get the next set of results. + * The link to the next page of items */ private String nextLink; @@ -35,7 +36,7 @@ public AvailableContactsListResult() { } /** - * Get the value property: A list of available contacts. + * Get the value property: The AvailableContacts items on this page. * * @return the value value. */ @@ -44,7 +45,7 @@ public List value() { } /** - * Set the value property: A list of available contacts. + * Set the value property: The AvailableContacts items on this page. * * @param value the value value to set. * @return the AvailableContactsListResult object itself. @@ -55,7 +56,7 @@ public AvailableContactsListResult withValue(List value) } /** - * Get the nextLink property: The URL to get the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +64,34 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the AvailableContactsListResult object itself. + */ + public AvailableContactsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model AvailableContactsListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(AvailableContactsListResult.class); + /** * {@inheritDoc} */ @@ -81,6 +99,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +109,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AvailableContactsListResult if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AvailableContactsListResult. */ public static AvailableContactsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsSpacecraft.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsSpacecraft.java deleted file mode 100644 index 75ba14391372..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableContactsSpacecraft.java +++ /dev/null @@ -1,85 +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.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The reference to the spacecraft resource. - */ -@Fluent -public final class AvailableContactsSpacecraft extends ResourceReference { - /** - * Creates an instance of AvailableContactsSpacecraft class. - */ - public AvailableContactsSpacecraft() { - } - - /** - * {@inheritDoc} - */ - @Override - public AvailableContactsSpacecraft withId(String id) { - super.withId(id); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property id in model AvailableContactsSpacecraft")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AvailableContactsSpacecraft.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableContactsSpacecraft from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableContactsSpacecraft if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AvailableContactsSpacecraft. - */ - public static AvailableContactsSpacecraft fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableContactsSpacecraft deserializedAvailableContactsSpacecraft = new AvailableContactsSpacecraft(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAvailableContactsSpacecraft.withId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableContactsSpacecraft; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationListResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationListResult.java index 5422f825baf8..c828bc73e9c1 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationListResult.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationListResult.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.orbital.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,17 +15,17 @@ import java.util.List; /** - * Response for the AvailableGroundStations API service call. + * Ground Stations available to schedule Contacts. */ @Fluent public final class AvailableGroundStationListResult implements JsonSerializable { /* - * A list of ground station resources. + * The AvailableGroundStation items on this page */ private List value; /* - * The URL to get the next set of results. + * The link to the next page of items */ private String nextLink; @@ -35,7 +36,7 @@ public AvailableGroundStationListResult() { } /** - * Get the value property: A list of ground station resources. + * Get the value property: The AvailableGroundStation items on this page. * * @return the value value. */ @@ -44,7 +45,7 @@ public List value() { } /** - * Set the value property: A list of ground station resources. + * Set the value property: The AvailableGroundStation items on this page. * * @param value the value value to set. * @return the AvailableGroundStationListResult object itself. @@ -55,7 +56,7 @@ public AvailableGroundStationListResult withValue(List e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(AvailableGroundStationListResult.class); + /** * {@inheritDoc} */ @@ -81,6 +99,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +109,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AvailableGroundStationListResult if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AvailableGroundStationListResult. */ public static AvailableGroundStationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationPropertiesAutoGenerated.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationPropertiesAutoGenerated.java deleted file mode 100644 index 21cd7a5ce281..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStationPropertiesAutoGenerated.java +++ /dev/null @@ -1,239 +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.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties object for Available groundstation. - */ -@Fluent -public class AvailableGroundStationPropertiesAutoGenerated - implements JsonSerializable { - /* - * City of ground station. - */ - private String city; - - /* - * Ground station provider name. - */ - private String providerName; - - /* - * Longitude of the ground station in decimal degrees. - */ - private Float longitudeDegrees; - - /* - * Latitude of the ground station in decimal degrees. - */ - private Float latitudeDegrees; - - /* - * Altitude of the ground station. - */ - private Float altitudeMeters; - - /* - * Release Status of a ground station. - */ - private ReleaseMode releaseMode; - - /** - * Creates an instance of AvailableGroundStationPropertiesAutoGenerated class. - */ - public AvailableGroundStationPropertiesAutoGenerated() { - } - - /** - * Get the city property: City of ground station. - * - * @return the city value. - */ - public String city() { - return this.city; - } - - /** - * Set the city property: City of ground station. - * - * @param city the city value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withCity(String city) { - this.city = city; - return this; - } - - /** - * Get the providerName property: Ground station provider name. - * - * @return the providerName value. - */ - public String providerName() { - return this.providerName; - } - - /** - * Set the providerName property: Ground station provider name. - * - * @param providerName the providerName value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withProviderName(String providerName) { - this.providerName = providerName; - return this; - } - - /** - * Get the longitudeDegrees property: Longitude of the ground station in decimal degrees. - * - * @return the longitudeDegrees value. - */ - public Float longitudeDegrees() { - return this.longitudeDegrees; - } - - /** - * Set the longitudeDegrees property: Longitude of the ground station in decimal degrees. - * - * @param longitudeDegrees the longitudeDegrees value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withLongitudeDegrees(Float longitudeDegrees) { - this.longitudeDegrees = longitudeDegrees; - return this; - } - - /** - * Get the latitudeDegrees property: Latitude of the ground station in decimal degrees. - * - * @return the latitudeDegrees value. - */ - public Float latitudeDegrees() { - return this.latitudeDegrees; - } - - /** - * Set the latitudeDegrees property: Latitude of the ground station in decimal degrees. - * - * @param latitudeDegrees the latitudeDegrees value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withLatitudeDegrees(Float latitudeDegrees) { - this.latitudeDegrees = latitudeDegrees; - return this; - } - - /** - * Get the altitudeMeters property: Altitude of the ground station. - * - * @return the altitudeMeters value. - */ - public Float altitudeMeters() { - return this.altitudeMeters; - } - - /** - * Set the altitudeMeters property: Altitude of the ground station. - * - * @param altitudeMeters the altitudeMeters value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withAltitudeMeters(Float altitudeMeters) { - this.altitudeMeters = altitudeMeters; - return this; - } - - /** - * Get the releaseMode property: Release Status of a ground station. - * - * @return the releaseMode value. - */ - public ReleaseMode releaseMode() { - return this.releaseMode; - } - - /** - * Set the releaseMode property: Release Status of a ground station. - * - * @param releaseMode the releaseMode value to set. - * @return the AvailableGroundStationPropertiesAutoGenerated object itself. - */ - public AvailableGroundStationPropertiesAutoGenerated withReleaseMode(ReleaseMode releaseMode) { - this.releaseMode = releaseMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("city", this.city); - jsonWriter.writeStringField("providerName", this.providerName); - jsonWriter.writeNumberField("longitudeDegrees", this.longitudeDegrees); - jsonWriter.writeNumberField("latitudeDegrees", this.latitudeDegrees); - jsonWriter.writeNumberField("altitudeMeters", this.altitudeMeters); - jsonWriter.writeStringField("releaseMode", this.releaseMode == null ? null : this.releaseMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableGroundStationPropertiesAutoGenerated from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableGroundStationPropertiesAutoGenerated if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AvailableGroundStationPropertiesAutoGenerated. - */ - public static AvailableGroundStationPropertiesAutoGenerated fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableGroundStationPropertiesAutoGenerated deserializedAvailableGroundStationPropertiesAutoGenerated - = new AvailableGroundStationPropertiesAutoGenerated(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("city".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.city = reader.getString(); - } else if ("providerName".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.providerName = reader.getString(); - } else if ("longitudeDegrees".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.longitudeDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("latitudeDegrees".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.latitudeDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("altitudeMeters".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.altitudeMeters - = reader.getNullable(JsonReader::getFloat); - } else if ("releaseMode".equals(fieldName)) { - deserializedAvailableGroundStationPropertiesAutoGenerated.releaseMode - = ReleaseMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableGroundStationPropertiesAutoGenerated; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStations.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStations.java index 84a787ae509d..758fb4faaa5b 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStations.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/AvailableGroundStations.java @@ -18,8 +18,7 @@ public interface AvailableGroundStations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. + * @return ground Stations available to schedule Contacts as paginated response with {@link PagedIterable}. */ PagedIterable list(CapabilityParameter capability); @@ -31,8 +30,7 @@ public interface AvailableGroundStations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the AvailableGroundStations API service call as paginated response with - * {@link PagedIterable}. + * @return ground Stations available to schedule Contacts as paginated response with {@link PagedIterable}. */ PagedIterable list(CapabilityParameter capability, Context context); } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contact.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contact.java index 8c45fabc71b7..77b870e1f137 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contact.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contact.java @@ -46,7 +46,7 @@ public interface Contact { * * @return the provisioningState value. */ - ContactsPropertiesProvisioningState provisioningState(); + ProvisioningState provisioningState(); /** * Gets the status property: Status of a contact. @@ -159,7 +159,7 @@ public interface Contact { * * @return the contactProfile value. */ - ContactsPropertiesContactProfile contactProfile(); + ResourceReference contactProfile(); /** * Gets the inner com.azure.resourcemanager.orbital.fluent.models.ContactInner object. @@ -250,7 +250,7 @@ interface WithContactProfile { * @param contactProfile The reference to the contact profile resource. * @return the next definition stage. */ - WithCreate withContactProfile(ContactsPropertiesContactProfile contactProfile); + WithCreate withContactProfile(ResourceReference contactProfile); } /** @@ -285,7 +285,7 @@ interface WithProvisioningState { * @param provisioningState The current state of the resource's creation, deletion, or modification. * @return the next definition stage. */ - WithCreate withProvisioningState(ContactsPropertiesProvisioningState provisioningState); + WithCreate withProvisioningState(ProvisioningState provisioningState); } } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactInstanceProperties.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactInstanceProperties.java deleted file mode 100644 index 6d12718b2fd3..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactInstanceProperties.java +++ /dev/null @@ -1,318 +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.orbital.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Contact Instance Properties. - */ -@Immutable -public class ContactInstanceProperties implements JsonSerializable { - /* - * Maximum elevation of the antenna during the contact in decimal degrees. - */ - private Float maximumElevationDegrees; - - /* - * Time at which antenna transmit will be enabled (ISO 8601 UTC standard). - */ - private OffsetDateTime txStartTime; - - /* - * Time at which antenna transmit will be disabled (ISO 8601 UTC standard). - */ - private OffsetDateTime txEndTime; - - /* - * Earliest time to receive a signal (ISO 8601 UTC standard). - */ - private OffsetDateTime rxStartTime; - - /* - * Time to lost receiving a signal (ISO 8601 UTC standard). - */ - private OffsetDateTime rxEndTime; - - /* - * Azimuth of the antenna at the start of the contact in decimal degrees. - */ - private Float startAzimuthDegrees; - - /* - * Azimuth of the antenna at the end of the contact in decimal degrees. - */ - private Float endAzimuthDegrees; - - /* - * Spacecraft elevation above the horizon at contact start. - */ - private Float startElevationDegrees; - - /* - * Spacecraft elevation above the horizon at contact end. - */ - private Float endElevationDegrees; - - /** - * Creates an instance of ContactInstanceProperties class. - */ - public ContactInstanceProperties() { - } - - /** - * Get the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal degrees. - * - * @return the maximumElevationDegrees value. - */ - public Float maximumElevationDegrees() { - return this.maximumElevationDegrees; - } - - /** - * Set the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal degrees. - * - * @param maximumElevationDegrees the maximumElevationDegrees value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withMaximumElevationDegrees(Float maximumElevationDegrees) { - this.maximumElevationDegrees = maximumElevationDegrees; - return this; - } - - /** - * Get the txStartTime property: Time at which antenna transmit will be enabled (ISO 8601 UTC standard). - * - * @return the txStartTime value. - */ - public OffsetDateTime txStartTime() { - return this.txStartTime; - } - - /** - * Set the txStartTime property: Time at which antenna transmit will be enabled (ISO 8601 UTC standard). - * - * @param txStartTime the txStartTime value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withTxStartTime(OffsetDateTime txStartTime) { - this.txStartTime = txStartTime; - return this; - } - - /** - * Get the txEndTime property: Time at which antenna transmit will be disabled (ISO 8601 UTC standard). - * - * @return the txEndTime value. - */ - public OffsetDateTime txEndTime() { - return this.txEndTime; - } - - /** - * Set the txEndTime property: Time at which antenna transmit will be disabled (ISO 8601 UTC standard). - * - * @param txEndTime the txEndTime value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withTxEndTime(OffsetDateTime txEndTime) { - this.txEndTime = txEndTime; - return this; - } - - /** - * Get the rxStartTime property: Earliest time to receive a signal (ISO 8601 UTC standard). - * - * @return the rxStartTime value. - */ - public OffsetDateTime rxStartTime() { - return this.rxStartTime; - } - - /** - * Set the rxStartTime property: Earliest time to receive a signal (ISO 8601 UTC standard). - * - * @param rxStartTime the rxStartTime value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withRxStartTime(OffsetDateTime rxStartTime) { - this.rxStartTime = rxStartTime; - return this; - } - - /** - * Get the rxEndTime property: Time to lost receiving a signal (ISO 8601 UTC standard). - * - * @return the rxEndTime value. - */ - public OffsetDateTime rxEndTime() { - return this.rxEndTime; - } - - /** - * Set the rxEndTime property: Time to lost receiving a signal (ISO 8601 UTC standard). - * - * @param rxEndTime the rxEndTime value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withRxEndTime(OffsetDateTime rxEndTime) { - this.rxEndTime = rxEndTime; - return this; - } - - /** - * Get the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. - * - * @return the startAzimuthDegrees value. - */ - public Float startAzimuthDegrees() { - return this.startAzimuthDegrees; - } - - /** - * Set the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees. - * - * @param startAzimuthDegrees the startAzimuthDegrees value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withStartAzimuthDegrees(Float startAzimuthDegrees) { - this.startAzimuthDegrees = startAzimuthDegrees; - return this; - } - - /** - * Get the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. - * - * @return the endAzimuthDegrees value. - */ - public Float endAzimuthDegrees() { - return this.endAzimuthDegrees; - } - - /** - * Set the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees. - * - * @param endAzimuthDegrees the endAzimuthDegrees value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withEndAzimuthDegrees(Float endAzimuthDegrees) { - this.endAzimuthDegrees = endAzimuthDegrees; - return this; - } - - /** - * Get the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. - * - * @return the startElevationDegrees value. - */ - public Float startElevationDegrees() { - return this.startElevationDegrees; - } - - /** - * Set the startElevationDegrees property: Spacecraft elevation above the horizon at contact start. - * - * @param startElevationDegrees the startElevationDegrees value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withStartElevationDegrees(Float startElevationDegrees) { - this.startElevationDegrees = startElevationDegrees; - return this; - } - - /** - * Get the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. - * - * @return the endElevationDegrees value. - */ - public Float endElevationDegrees() { - return this.endElevationDegrees; - } - - /** - * Set the endElevationDegrees property: Spacecraft elevation above the horizon at contact end. - * - * @param endElevationDegrees the endElevationDegrees value to set. - * @return the ContactInstanceProperties object itself. - */ - ContactInstanceProperties withEndElevationDegrees(Float endElevationDegrees) { - this.endElevationDegrees = endElevationDegrees; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactInstanceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactInstanceProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContactInstanceProperties. - */ - public static ContactInstanceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactInstanceProperties deserializedContactInstanceProperties = new ContactInstanceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maximumElevationDegrees".equals(fieldName)) { - deserializedContactInstanceProperties.maximumElevationDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("txStartTime".equals(fieldName)) { - deserializedContactInstanceProperties.txStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("txEndTime".equals(fieldName)) { - deserializedContactInstanceProperties.txEndTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("rxStartTime".equals(fieldName)) { - deserializedContactInstanceProperties.rxStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("rxEndTime".equals(fieldName)) { - deserializedContactInstanceProperties.rxEndTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("startAzimuthDegrees".equals(fieldName)) { - deserializedContactInstanceProperties.startAzimuthDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("endAzimuthDegrees".equals(fieldName)) { - deserializedContactInstanceProperties.endAzimuthDegrees = reader.getNullable(JsonReader::getFloat); - } else if ("startElevationDegrees".equals(fieldName)) { - deserializedContactInstanceProperties.startElevationDegrees - = reader.getNullable(JsonReader::getFloat); - } else if ("endElevationDegrees".equals(fieldName)) { - deserializedContactInstanceProperties.endElevationDegrees - = reader.getNullable(JsonReader::getFloat); - } else { - reader.skipChildren(); - } - } - - return deserializedContactInstanceProperties; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactListResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactListResult.java index 1617b8444532..9aff3a46e9d2 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactListResult.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactListResult.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.orbital.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,17 +15,17 @@ import java.util.List; /** - * Response for the ListContacts API service call. + * The response of a Contact list operation. */ @Fluent public final class ContactListResult implements JsonSerializable { /* - * A list of contact resources in a resource group. + * The Contact items on this page */ private List value; /* - * The URL to get the next set of results. + * The link to the next page of items */ private String nextLink; @@ -35,7 +36,7 @@ public ContactListResult() { } /** - * Get the value property: A list of contact resources in a resource group. + * Get the value property: The Contact items on this page. * * @return the value value. */ @@ -44,7 +45,7 @@ public List value() { } /** - * Set the value property: A list of contact resources in a resource group. + * Set the value property: The Contact items on this page. * * @param value the value value to set. * @return the ContactListResult object itself. @@ -55,7 +56,7 @@ public ContactListResult withValue(List value) { } /** - * Get the nextLink property: The URL to get the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +64,33 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the ContactListResult object itself. + */ + public ContactListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ContactListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ContactListResult.class); + /** * {@inheritDoc} */ @@ -81,6 +98,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +108,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ContactListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ContactListResult. */ public static ContactListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactParameters.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactParameters.java index 9d6a5963c541..da824840c606 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactParameters.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactParameters.java @@ -23,7 +23,7 @@ public final class ContactParameters implements JsonSerializable { - ContactParametersContactProfile deserializedContactParametersContactProfile - = new ContactParametersContactProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContactParametersContactProfile.withId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedContactParametersContactProfile; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfile.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfile.java index 36a673f55c73..7d5f0fc26922 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfile.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfile.java @@ -62,7 +62,7 @@ public interface ContactProfile { * * @return the provisioningState value. */ - ContactProfilesPropertiesProvisioningState provisioningState(); + ProvisioningState provisioningState(); /** * Gets the minimumViableContactDuration property: Minimum viable contact duration in ISO 8601 format. Used for @@ -272,7 +272,7 @@ interface WithProvisioningState { * @param provisioningState The current state of the resource's creation, deletion, or modification. * @return the next definition stage. */ - WithCreate withProvisioningState(ContactProfilesPropertiesProvisioningState provisioningState); + WithCreate withProvisioningState(ProvisioningState provisioningState); } /** diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileListResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileListResult.java index af4ae914bd72..cda7add57d1f 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileListResult.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfileListResult.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.orbital.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,17 +15,17 @@ import java.util.List; /** - * Response for the ListContactProfiles API service call. + * The response of a ContactProfile list operation. */ @Fluent public final class ContactProfileListResult implements JsonSerializable { /* - * A list of contact profile resources in a resource group. + * The ContactProfile items on this page */ private List value; /* - * The URL to get the next set of results. + * The link to the next page of items */ private String nextLink; @@ -35,7 +36,7 @@ public ContactProfileListResult() { } /** - * Get the value property: A list of contact profile resources in a resource group. + * Get the value property: The ContactProfile items on this page. * * @return the value value. */ @@ -44,7 +45,7 @@ public List value() { } /** - * Set the value property: A list of contact profile resources in a resource group. + * Set the value property: The ContactProfile items on this page. * * @param value the value value to set. * @return the ContactProfileListResult object itself. @@ -55,7 +56,7 @@ public ContactProfileListResult withValue(List value) { } /** - * Get the nextLink property: The URL to get the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +64,33 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the ContactProfileListResult object itself. + */ + public ContactProfileListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ContactProfileListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ContactProfileListResult.class); + /** * {@inheritDoc} */ @@ -81,6 +98,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +108,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ContactProfileListResult if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ContactProfileListResult. */ public static ContactProfileListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfiles.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfiles.java index 37c0c8979275..736aac8538b3 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfiles.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfiles.java @@ -13,104 +13,104 @@ */ public interface ContactProfiles { /** - * Gets the specified contact Profile in a specified resource group. + * Returns list of contact profiles by Subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile 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 specified contact Profile in a specified resource group along with {@link Response}. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String contactProfileName, - Context context); + PagedIterable list(); /** - * Gets the specified contact Profile in a specified resource group. + * Returns list of contact profiles by Subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. + * @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 specified contact Profile in a specified resource group. + * @return the response of a ContactProfile list operation as paginated response with {@link PagedIterable}. */ - ContactProfile getByResourceGroup(String resourceGroupName, String contactProfileName); + PagedIterable list(String skiptoken, Context context); /** - * Deletes a specified contact profile resource. + * Returns list of contact profiles by Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile 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 response of a ContactProfile list operation as paginated response with {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String contactProfileName); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Deletes a specified contact profile resource. + * Returns list of contact profiles by Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param contactProfileName Contact Profile name. + * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This + * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink + * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to + * use for subsequent calls. * @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 response of a ContactProfile list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String contactProfileName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, Context context); /** - * Returns list of contact profiles by Subscription. + * Gets the specified contact Profile in a specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. + * @return the specified contact Profile in a specified resource group along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String contactProfileName, + Context context); /** - * Returns list of contact profiles by Subscription. + * Gets the specified contact Profile in a specified resource group. * - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. + * @return the specified contact Profile in a specified resource group. */ - PagedIterable list(String skiptoken, Context context); + ContactProfile getByResourceGroup(String resourceGroupName, String contactProfileName); /** - * Returns list of contact profiles by Resource Group. + * Deletes a specified contact profile resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String contactProfileName); /** - * Returns list of contact profiles by Resource Group. + * Deletes a specified contact profile resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This - * is used when a previous list operation call returned a partial result. If a previous response contains a nextLink - * element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to - * use for subsequent calls. + * @param contactProfileName Contact Profile 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 response for the ListContactProfiles API service call as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, Context context); + void delete(String resourceGroupName, String contactProfileName, Context context); /** * Gets the specified contact Profile in a specified resource group. diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesPropertiesProvisioningState.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesPropertiesProvisioningState.java deleted file mode 100644 index 6442f455fb50..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactProfilesPropertiesProvisioningState.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.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current state of the resource's creation, deletion, or modification. - */ -public final class ContactProfilesPropertiesProvisioningState - extends ExpandableStringEnum { - /** - * Static value creating for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState CREATING = fromString("creating"); - - /** - * Static value succeeded for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState SUCCEEDED = fromString("succeeded"); - - /** - * Static value failed for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState FAILED = fromString("failed"); - - /** - * Static value canceled for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState CANCELED = fromString("canceled"); - - /** - * Static value updating for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState UPDATING = fromString("updating"); - - /** - * Static value deleting for ContactProfilesPropertiesProvisioningState. - */ - public static final ContactProfilesPropertiesProvisioningState DELETING = fromString("deleting"); - - /** - * Creates a new instance of ContactProfilesPropertiesProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContactProfilesPropertiesProvisioningState() { - } - - /** - * Creates or finds a ContactProfilesPropertiesProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContactProfilesPropertiesProvisioningState. - */ - public static ContactProfilesPropertiesProvisioningState fromString(String name) { - return fromString(name, ContactProfilesPropertiesProvisioningState.class); - } - - /** - * Gets known ContactProfilesPropertiesProvisioningState values. - * - * @return known ContactProfilesPropertiesProvisioningState values. - */ - public static Collection values() { - return values(ContactProfilesPropertiesProvisioningState.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contacts.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contacts.java index 17c3c42a57a0..2e8ff307d5e0 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contacts.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Contacts.java @@ -20,7 +20,7 @@ public interface Contacts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Contact list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String spacecraftName); @@ -37,7 +37,7 @@ public interface Contacts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListContacts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Contact list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String spacecraftName, String skiptoken, Context context); diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesContactProfile.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesContactProfile.java deleted file mode 100644 index 4acc62438e49..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesContactProfile.java +++ /dev/null @@ -1,87 +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.orbital.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The reference to the contact profile resource. - */ -@Fluent -public final class ContactsPropertiesContactProfile extends ResourceReference { - /** - * Creates an instance of ContactsPropertiesContactProfile class. - */ - public ContactsPropertiesContactProfile() { - } - - /** - * {@inheritDoc} - */ - @Override - public ContactsPropertiesContactProfile withId(String id) { - super.withId(id); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property id in model ContactsPropertiesContactProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactsPropertiesContactProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContactsPropertiesContactProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContactsPropertiesContactProfile if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContactsPropertiesContactProfile. - */ - public static ContactsPropertiesContactProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContactsPropertiesContactProfile deserializedContactsPropertiesContactProfile - = new ContactsPropertiesContactProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContactsPropertiesContactProfile.withId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedContactsPropertiesContactProfile; - }); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesProvisioningState.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesProvisioningState.java deleted file mode 100644 index 0d12c446336c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ContactsPropertiesProvisioningState.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.orbital.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current state of the resource's creation, deletion, or modification. - */ -public final class ContactsPropertiesProvisioningState - extends ExpandableStringEnum { - /** - * Static value creating for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState CREATING = fromString("creating"); - - /** - * Static value succeeded for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState SUCCEEDED = fromString("succeeded"); - - /** - * Static value failed for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState FAILED = fromString("failed"); - - /** - * Static value canceled for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState CANCELED = fromString("canceled"); - - /** - * Static value updating for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState UPDATING = fromString("updating"); - - /** - * Static value deleting for ContactsPropertiesProvisioningState. - */ - public static final ContactsPropertiesProvisioningState DELETING = fromString("deleting"); - - /** - * Creates a new instance of ContactsPropertiesProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContactsPropertiesProvisioningState() { - } - - /** - * Creates or finds a ContactsPropertiesProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContactsPropertiesProvisioningState. - */ - public static ContactsPropertiesProvisioningState fromString(String name) { - return fromString(name, ContactsPropertiesProvisioningState.class); - } - - /** - * Gets known ContactsPropertiesProvisioningState values. - * - * @return known ContactsPropertiesProvisioningState values. - */ - public static Collection values() { - return values(ContactsPropertiesProvisioningState.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationResult.java index 3da6a8fc0df1..42c24d7fe6f5 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationResult.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationResult.java @@ -7,6 +7,7 @@ import com.azure.resourcemanager.orbital.fluent.models.OperationResultInner; import java.time.OffsetDateTime; import java.util.List; +import java.util.Map; /** * An immutable client-side representation of OperationResult. @@ -59,7 +60,7 @@ public interface OperationResult { * * @return the value value. */ - List value(); + List> value(); /** * Gets the nextLink property: The URL to get the next set of results. @@ -73,7 +74,7 @@ public interface OperationResult { * * @return the properties value. */ - Object properties(); + Map properties(); /** * Gets the error property: Operation result error properties. diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Operations.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Operations.java index 2438da5b7068..72e1a2f1ded7 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Operations.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Operations.java @@ -12,7 +12,7 @@ */ public interface Operations { /** - * Lists all of the available Orbital Rest API operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -22,7 +22,7 @@ public interface Operations { PagedIterable list(); /** - * Lists all of the available Orbital Rest API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResults.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResults.java index 6e9a8ff67d25..03fc6d05259e 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResults.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResults.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.orbital.models; +import com.azure.core.http.rest.Response; import com.azure.core.util.Context; /** @@ -15,23 +16,23 @@ public interface OperationsResults { * * @param location The name of Azure region. * @param operationId The ID of an ongoing async operation. + * @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 operation Result Entity. */ - OperationResult get(String location, String operationId); + Response getWithResponse(String location, String operationId, Context context); /** * Returns operation results. * * @param location The name of Azure region. * @param operationId The ID of an ongoing async operation. - * @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 operation Result Entity. */ - OperationResult get(String location, String operationId, Context context); + OperationResult get(String location, String operationId); } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResultsGetHeaders.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResultsGetHeaders.java new file mode 100644 index 000000000000..8f285fdb1fd8 --- /dev/null +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResultsGetHeaders.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.orbital.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The OperationsResultsGetHeaders model. + */ +@Fluent +public final class OperationsResultsGetHeaders { + /* + * The Location property. + */ + private String location; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of OperationsResultsGetHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public OperationsResultsGetHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the OperationsResultsGetHeaders object itself. + */ + public OperationsResultsGetHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResultsGetResponse.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResultsGetResponse.java new file mode 100644 index 000000000000..42633519e825 --- /dev/null +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/OperationsResultsGetResponse.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.orbital.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.orbital.fluent.models.OperationResultInner; + +/** + * Contains all response data for the get operation. + */ +public final class OperationsResultsGetResponse + extends ResponseBase { + /** + * Creates an instance of OperationsResultsGetResponse. + * + * @param request the request which resulted in this OperationsResultsGetResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public OperationsResultsGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, + OperationResultInner value, OperationsResultsGetHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ + @Override + public OperationResultInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ProvisioningState.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ProvisioningState.java new file mode 100644 index 000000000000..909b7f60752d --- /dev/null +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.orbital.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current state of the resource's creation, deletion, or modification. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** + * Static value creating for ProvisioningState. + */ + public static final ProvisioningState CREATING = fromString("creating"); + + /** + * Static value succeeded for ProvisioningState. + */ + public static final ProvisioningState SUCCEEDED = fromString("succeeded"); + + /** + * Static value failed for ProvisioningState. + */ + public static final ProvisioningState FAILED = fromString("failed"); + + /** + * Static value canceled for ProvisioningState. + */ + public static final ProvisioningState CANCELED = fromString("canceled"); + + /** + * Static value updating for ProvisioningState. + */ + public static final ProvisioningState UPDATING = fromString("updating"); + + /** + * Static value deleting for ProvisioningState. + */ + public static final ProvisioningState DELETING = fromString("deleting"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ResourceReference.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ResourceReference.java index 90c3b8bdf74c..f2eb6bf68fcc 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ResourceReference.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/ResourceReference.java @@ -16,7 +16,7 @@ * Resource Reference. */ @Fluent -public class ResourceReference implements JsonSerializable { +public final class ResourceReference implements JsonSerializable { /* * Resource ID. */ diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftListResult.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftListResult.java index bd782e1ea7a6..932ece5bf48b 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftListResult.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/SpacecraftListResult.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.orbital.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,17 +15,17 @@ import java.util.List; /** - * Response for the ListSpacecrafts API service call. + * The response of a Spacecraft list operation. */ @Fluent public final class SpacecraftListResult implements JsonSerializable { /* - * A list of spacecraft resources in a resource group. + * The Spacecraft items on this page */ private List value; /* - * The URL to get the next set of results. + * The link to the next page of items */ private String nextLink; @@ -35,7 +36,7 @@ public SpacecraftListResult() { } /** - * Get the value property: A list of spacecraft resources in a resource group. + * Get the value property: The Spacecraft items on this page. * * @return the value value. */ @@ -44,7 +45,7 @@ public List value() { } /** - * Set the value property: A list of spacecraft resources in a resource group. + * Set the value property: The Spacecraft items on this page. * * @param value the value value to set. * @return the SpacecraftListResult object itself. @@ -55,7 +56,7 @@ public SpacecraftListResult withValue(List value) { } /** - * Get the nextLink property: The URL to get the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +64,33 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the SpacecraftListResult object itself. + */ + public SpacecraftListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model SpacecraftListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(SpacecraftListResult.class); + /** * {@inheritDoc} */ @@ -81,6 +98,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +108,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SpacecraftListResult if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the SpacecraftListResult. */ public static SpacecraftListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Spacecrafts.java b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Spacecrafts.java index e01cda7d6876..12ae661f1855 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Spacecrafts.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/java/com/azure/resourcemanager/orbital/models/Spacecrafts.java @@ -17,7 +17,7 @@ public interface Spacecrafts { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -32,7 +32,7 @@ public interface Spacecrafts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String skiptoken, Context context); @@ -43,7 +43,7 @@ public interface Spacecrafts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -59,7 +59,7 @@ public interface Spacecrafts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the ListSpacecrafts API service call as paginated response with {@link PagedIterable}. + * @return the response of a Spacecraft list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken, Context context); diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/main/resources/azure-resourcemanager-orbital.properties b/sdk/orbital/azure-resourcemanager-orbital/src/main/resources/azure-resourcemanager-orbital.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/orbital/azure-resourcemanager-orbital/src/main/resources/azure-resourcemanager-orbital.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsCreateSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsCreateSamples.java index c00a9a8be8bd..bce88fe20e3d 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsCreateSamples.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/ContactsCreateSamples.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.orbital.generated; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; +import com.azure.resourcemanager.orbital.models.ResourceReference; import java.time.OffsetDateTime; /** @@ -27,7 +27,7 @@ public static void createAContact(com.azure.resourcemanager.orbital.OrbitalManag .withReservationStartTime(OffsetDateTime.parse("2023-02-22T10:58:30Z")) .withReservationEndTime(OffsetDateTime.parse("2023-02-22T11:10:45Z")) .withGroundStationName("EASTUS2_0") - .withContactProfile(new ContactsPropertiesContactProfile().withId( + .withContactProfile(new ResourceReference().withId( "/subscriptions/c1be1141-a7c9-4aac-9608-3c2e2f1152c3/resourceGroups/contoso-Rgp/providers/Microsoft.Orbital/contactProfiles/CONTOSO-CP")) .create(); } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/OperationsResultsGetSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/OperationsResultsGetSamples.java index d9cdeced2131..0b170601cbee 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/OperationsResultsGetSamples.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/OperationsResultsGetSamples.java @@ -19,6 +19,6 @@ public final class OperationsResultsGetSamples { */ public static void kustoOperationResultsGet(com.azure.resourcemanager.orbital.OrbitalManager manager) { manager.operationsResults() - .get("eastus2", "30972f1b-b61d-4fd8-bd34-3dcfa24670f3", com.azure.core.util.Context.NONE); + .getWithResponse("eastus2", "30972f1b-b61d-4fd8-bd34-3dcfa24670f3", com.azure.core.util.Context.NONE); } } diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListAvailableContactsSamples.java b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListAvailableContactsSamples.java index fd36a8713559..3959b14a1fda 100644 --- a/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListAvailableContactsSamples.java +++ b/sdk/orbital/azure-resourcemanager-orbital/src/samples/java/com/azure/resourcemanager/orbital/generated/SpacecraftsListAvailableContactsSamples.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.orbital.generated; import com.azure.resourcemanager.orbital.models.ContactParameters; -import com.azure.resourcemanager.orbital.models.ContactParametersContactProfile; +import com.azure.resourcemanager.orbital.models.ResourceReference; import java.time.OffsetDateTime; /** @@ -24,7 +24,7 @@ public final class SpacecraftsListAvailableContactsSamples { public static void listOfContact(com.azure.resourcemanager.orbital.OrbitalManager manager) { manager.spacecrafts() .listAvailableContacts("contoso-Rgp", "CONTOSO_SAT", - new ContactParameters().withContactProfile(new ContactParametersContactProfile().withId( + new ContactParameters().withContactProfile(new ResourceReference().withId( "/subscriptions/c1be1141-a7c9-4aac-9608-3c2e2f1152c3/resourceGroups/contoso-Rgp/providers/Microsoft.Orbital/contactProfiles/CONTOSO-CP")) .withGroundStationName("EASTUS2_0") .withStartTime(OffsetDateTime.parse("2022-11-01T11:30:00Z")) diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AuthorizedGroundstationTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AuthorizedGroundstationTests.java deleted file mode 100644 index 391a2284bdf0..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AuthorizedGroundstationTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.AuthorizedGroundstation; -import org.junit.jupiter.api.Assertions; - -public final class AuthorizedGroundstationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthorizedGroundstation model - = BinaryData.fromString("{\"groundStation\":\"wfzitonpeqfpjk\"}").toObject(AuthorizedGroundstation.class); - Assertions.assertEquals("wfzitonpeqfpjk", model.groundStation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthorizedGroundstation model = new AuthorizedGroundstation().withGroundStation("wfzitonpeqfpjk"); - model = BinaryData.fromObject(model).toObject(AuthorizedGroundstation.class); - Assertions.assertEquals("wfzitonpeqfpjk", model.groundStation()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsInnerTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsInnerTests.java deleted file mode 100644 index 0a9144d4275f..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsInnerTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner; -import com.azure.resourcemanager.orbital.models.AvailableContactsSpacecraft; -import org.junit.jupiter.api.Assertions; - -public final class AvailableContactsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableContactsInner model = BinaryData.fromString( - "{\"spacecraft\":{\"id\":\"zcxtbzsgfyccsn\"},\"groundStationName\":\"mdwzjeiachboo\",\"properties\":{\"maximumElevationDegrees\":55.106743,\"txStartTime\":\"2021-10-01T08:17:31Z\",\"txEndTime\":\"2021-04-28T23:01:46Z\",\"rxStartTime\":\"2021-02-19T13:41:36Z\",\"rxEndTime\":\"2021-12-01T09:51:17Z\",\"startAzimuthDegrees\":44.67273,\"endAzimuthDegrees\":77.50827,\"startElevationDegrees\":67.05552,\"endElevationDegrees\":45.170357}}") - .toObject(AvailableContactsInner.class); - Assertions.assertEquals("zcxtbzsgfyccsn", model.spacecraft().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableContactsInner model - = new AvailableContactsInner().withSpacecraft(new AvailableContactsSpacecraft().withId("zcxtbzsgfyccsn")); - model = BinaryData.fromObject(model).toObject(AvailableContactsInner.class); - Assertions.assertEquals("zcxtbzsgfyccsn", model.spacecraft().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsListResultTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsListResultTests.java deleted file mode 100644 index 905d3541a017..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsListResultTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsInner; -import com.azure.resourcemanager.orbital.models.AvailableContactsListResult; -import com.azure.resourcemanager.orbital.models.AvailableContactsSpacecraft; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableContactsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableContactsListResult model = BinaryData.fromString( - "{\"value\":[{\"spacecraft\":{\"id\":\"fvzwdzuhty\"},\"groundStationName\":\"isdkfthwxmnteiw\",\"properties\":{\"maximumElevationDegrees\":76.722374,\"txStartTime\":\"2021-04-07T17:13:30Z\",\"txEndTime\":\"2021-09-18T09:57:46Z\",\"rxStartTime\":\"2021-01-28T05:49:48Z\",\"rxEndTime\":\"2021-11-05T05:35:16Z\",\"startAzimuthDegrees\":68.145454,\"endAzimuthDegrees\":56.80048,\"startElevationDegrees\":74.31171,\"endElevationDegrees\":66.845474}}],\"nextLink\":\"ymzidn\"}") - .toObject(AvailableContactsListResult.class); - Assertions.assertEquals("fvzwdzuhty", model.value().get(0).spacecraft().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableContactsListResult model = new AvailableContactsListResult().withValue(Arrays.asList( - new AvailableContactsInner().withSpacecraft(new AvailableContactsSpacecraft().withId("fvzwdzuhty")))); - model = BinaryData.fromObject(model).toObject(AvailableContactsListResult.class); - Assertions.assertEquals("fvzwdzuhty", model.value().get(0).spacecraft().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsPropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsPropertiesTests.java deleted file mode 100644 index 28bc12922049..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsPropertiesTests.java +++ /dev/null @@ -1,23 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableContactsProperties; - -public final class AvailableContactsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableContactsProperties model = BinaryData.fromString( - "{\"maximumElevationDegrees\":66.162094,\"txStartTime\":\"2021-08-28T07:05:13Z\",\"txEndTime\":\"2021-07-02T05:30:20Z\",\"rxStartTime\":\"2021-06-12T21:30:04Z\",\"rxEndTime\":\"2021-11-24T02:47:54Z\",\"startAzimuthDegrees\":20.800983,\"endAzimuthDegrees\":83.89717,\"startElevationDegrees\":20.97959,\"endElevationDegrees\":42.84593}") - .toObject(AvailableContactsProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableContactsProperties model = new AvailableContactsProperties(); - model = BinaryData.fromObject(model).toObject(AvailableContactsProperties.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsSpacecraftTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsSpacecraftTests.java deleted file mode 100644 index 7823536bb728..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableContactsSpacecraftTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.AvailableContactsSpacecraft; -import org.junit.jupiter.api.Assertions; - -public final class AvailableContactsSpacecraftTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableContactsSpacecraft model - = BinaryData.fromString("{\"id\":\"qrimzinpv\"}").toObject(AvailableContactsSpacecraft.class); - Assertions.assertEquals("qrimzinpv", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableContactsSpacecraft model = new AvailableContactsSpacecraft().withId("qrimzinpv"); - model = BinaryData.fromObject(model).toObject(AvailableContactsSpacecraft.class); - Assertions.assertEquals("qrimzinpv", model.id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationInnerTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationInnerTests.java deleted file mode 100644 index 2f9f04aeccb4..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationInner; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import org.junit.jupiter.api.Assertions; - -public final class AvailableGroundStationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableGroundStationInner model = BinaryData.fromString( - "{\"id\":\"szufoxciqopidoa\",\"name\":\"iodhkhazxkhnz\",\"location\":\"nlwntoe\",\"type\":\"kdwbwhkszz\",\"properties\":{\"city\":\"rvexztvb\",\"providerName\":\"gsfraoyzkoow\",\"longitudeDegrees\":83.122345,\"latitudeDegrees\":88.73386,\"altitudeMeters\":85.48055,\"releaseMode\":\"Preview\"}}") - .toObject(AvailableGroundStationInner.class); - Assertions.assertEquals("nlwntoe", model.location()); - Assertions.assertEquals("rvexztvb", model.city()); - Assertions.assertEquals("gsfraoyzkoow", model.providerName()); - Assertions.assertEquals(83.122345F, model.longitudeDegrees()); - Assertions.assertEquals(88.73386F, model.latitudeDegrees()); - Assertions.assertEquals(85.48055F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableGroundStationInner model = new AvailableGroundStationInner().withLocation("nlwntoe") - .withCity("rvexztvb") - .withProviderName("gsfraoyzkoow") - .withLongitudeDegrees(83.122345F) - .withLatitudeDegrees(88.73386F) - .withAltitudeMeters(85.48055F) - .withReleaseMode(ReleaseMode.PREVIEW); - model = BinaryData.fromObject(model).toObject(AvailableGroundStationInner.class); - Assertions.assertEquals("nlwntoe", model.location()); - Assertions.assertEquals("rvexztvb", model.city()); - Assertions.assertEquals("gsfraoyzkoow", model.providerName()); - Assertions.assertEquals(83.122345F, model.longitudeDegrees()); - Assertions.assertEquals(88.73386F, model.latitudeDegrees()); - Assertions.assertEquals(85.48055F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationListResultTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationListResultTests.java deleted file mode 100644 index 241265fd73b6..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationListResultTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationInner; -import com.azure.resourcemanager.orbital.models.AvailableGroundStationListResult; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableGroundStationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableGroundStationListResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"vtvudutncormr\",\"name\":\"qtvcofudflvkgj\",\"location\":\"gdknnqv\",\"type\":\"znqntoru\",\"properties\":{\"city\":\"gsahmkycgrauw\",\"providerName\":\"etaebu\",\"longitudeDegrees\":82.7481,\"latitudeDegrees\":93.07586,\"altitudeMeters\":51.671677,\"releaseMode\":\"Preview\"}},{\"id\":\"l\",\"name\":\"ab\",\"location\":\"oefki\",\"type\":\"vtpuqujmqlgk\",\"properties\":{\"city\":\"tndoaongbjc\",\"providerName\":\"ujitcjedftww\",\"longitudeDegrees\":24.823893,\"latitudeDegrees\":63.156284,\"altitudeMeters\":5.341405,\"releaseMode\":\"Preview\"}}],\"nextLink\":\"zfoqouicybxar\"}") - .toObject(AvailableGroundStationListResult.class); - Assertions.assertEquals("gdknnqv", model.value().get(0).location()); - Assertions.assertEquals("gsahmkycgrauw", model.value().get(0).city()); - Assertions.assertEquals("etaebu", model.value().get(0).providerName()); - Assertions.assertEquals(82.7481F, model.value().get(0).longitudeDegrees()); - Assertions.assertEquals(93.07586F, model.value().get(0).latitudeDegrees()); - Assertions.assertEquals(51.671677F, model.value().get(0).altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.value().get(0).releaseMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableGroundStationListResult model = new AvailableGroundStationListResult().withValue(Arrays.asList( - new AvailableGroundStationInner().withLocation("gdknnqv") - .withCity("gsahmkycgrauw") - .withProviderName("etaebu") - .withLongitudeDegrees(82.7481F) - .withLatitudeDegrees(93.07586F) - .withAltitudeMeters(51.671677F) - .withReleaseMode(ReleaseMode.PREVIEW), - new AvailableGroundStationInner().withLocation("oefki") - .withCity("tndoaongbjc") - .withProviderName("ujitcjedftww") - .withLongitudeDegrees(24.823893F) - .withLatitudeDegrees(63.156284F) - .withAltitudeMeters(5.341405F) - .withReleaseMode(ReleaseMode.PREVIEW))); - model = BinaryData.fromObject(model).toObject(AvailableGroundStationListResult.class); - Assertions.assertEquals("gdknnqv", model.value().get(0).location()); - Assertions.assertEquals("gsahmkycgrauw", model.value().get(0).city()); - Assertions.assertEquals("etaebu", model.value().get(0).providerName()); - Assertions.assertEquals(82.7481F, model.value().get(0).longitudeDegrees()); - Assertions.assertEquals(93.07586F, model.value().get(0).latitudeDegrees()); - Assertions.assertEquals(51.671677F, model.value().get(0).altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.value().get(0).releaseMode()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesAutoGeneratedTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesAutoGeneratedTests.java deleted file mode 100644 index 715a8a7e105b..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesAutoGeneratedTests.java +++ /dev/null @@ -1,43 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.AvailableGroundStationPropertiesAutoGenerated; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import org.junit.jupiter.api.Assertions; - -public final class AvailableGroundStationPropertiesAutoGeneratedTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableGroundStationPropertiesAutoGenerated model = BinaryData.fromString( - "{\"city\":\"a\",\"providerName\":\"hrskdsnfd\",\"longitudeDegrees\":76.520065,\"latitudeDegrees\":58.32351,\"altitudeMeters\":61.956436,\"releaseMode\":\"Preview\"}") - .toObject(AvailableGroundStationPropertiesAutoGenerated.class); - Assertions.assertEquals("a", model.city()); - Assertions.assertEquals("hrskdsnfd", model.providerName()); - Assertions.assertEquals(76.520065F, model.longitudeDegrees()); - Assertions.assertEquals(58.32351F, model.latitudeDegrees()); - Assertions.assertEquals(61.956436F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableGroundStationPropertiesAutoGenerated model - = new AvailableGroundStationPropertiesAutoGenerated().withCity("a") - .withProviderName("hrskdsnfd") - .withLongitudeDegrees(76.520065F) - .withLatitudeDegrees(58.32351F) - .withAltitudeMeters(61.956436F) - .withReleaseMode(ReleaseMode.PREVIEW); - model = BinaryData.fromObject(model).toObject(AvailableGroundStationPropertiesAutoGenerated.class); - Assertions.assertEquals("a", model.city()); - Assertions.assertEquals("hrskdsnfd", model.providerName()); - Assertions.assertEquals(76.520065F, model.longitudeDegrees()); - Assertions.assertEquals(58.32351F, model.latitudeDegrees()); - Assertions.assertEquals(61.956436F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesTests.java deleted file mode 100644 index cd5363cb6334..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationPropertiesTests.java +++ /dev/null @@ -1,42 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.AvailableGroundStationProperties; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import org.junit.jupiter.api.Assertions; - -public final class AvailableGroundStationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableGroundStationProperties model = BinaryData.fromString( - "{\"city\":\"aldsy\",\"providerName\":\"ximerqfobwyznk\",\"longitudeDegrees\":32.21692,\"latitudeDegrees\":4.411727,\"altitudeMeters\":98.1842,\"releaseMode\":\"Preview\"}") - .toObject(AvailableGroundStationProperties.class); - Assertions.assertEquals("aldsy", model.city()); - Assertions.assertEquals("ximerqfobwyznk", model.providerName()); - Assertions.assertEquals(32.21692F, model.longitudeDegrees()); - Assertions.assertEquals(4.411727F, model.latitudeDegrees()); - Assertions.assertEquals(98.1842F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableGroundStationProperties model = new AvailableGroundStationProperties().withCity("aldsy") - .withProviderName("ximerqfobwyznk") - .withLongitudeDegrees(32.21692F) - .withLatitudeDegrees(4.411727F) - .withAltitudeMeters(98.1842F) - .withReleaseMode(ReleaseMode.PREVIEW); - model = BinaryData.fromObject(model).toObject(AvailableGroundStationProperties.class); - Assertions.assertEquals("aldsy", model.city()); - Assertions.assertEquals("ximerqfobwyznk", model.providerName()); - Assertions.assertEquals(32.21692F, model.longitudeDegrees()); - Assertions.assertEquals(4.411727F, model.latitudeDegrees()); - Assertions.assertEquals(98.1842F, model.altitudeMeters()); - Assertions.assertEquals(ReleaseMode.PREVIEW, model.releaseMode()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationsListMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationsListMockTests.java deleted file mode 100644 index 0ee84d14adfd..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/AvailableGroundStationsListMockTests.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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.AvailableGroundStation; -import com.azure.resourcemanager.orbital.models.CapabilityParameter; -import com.azure.resourcemanager.orbital.models.ReleaseMode; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AvailableGroundStationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"sdzhezww\",\"name\":\"iqyuvvfo\",\"location\":\"p\",\"type\":\"qyikvy\",\"properties\":{\"city\":\"uyav\",\"providerName\":\"wmn\",\"longitudeDegrees\":81.981476,\"latitudeDegrees\":17.136473,\"altitudeMeters\":49.36264,\"releaseMode\":\"GA\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.availableGroundStations() - .list(CapabilityParameter.EARTH_OBSERVATION, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("p", response.iterator().next().location()); - Assertions.assertEquals("uyav", response.iterator().next().city()); - Assertions.assertEquals("wmn", response.iterator().next().providerName()); - Assertions.assertEquals(81.981476F, response.iterator().next().longitudeDegrees()); - Assertions.assertEquals(17.136473F, response.iterator().next().latitudeDegrees()); - Assertions.assertEquals(49.36264F, response.iterator().next().altitudeMeters()); - Assertions.assertEquals(ReleaseMode.GA, response.iterator().next().releaseMode()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInnerTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInnerTests.java deleted file mode 100644 index da18918c5e1e..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInnerTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactInner; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ContactInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"failed\",\"status\":\"cancelled\",\"reservationStartTime\":\"2021-09-03T01:46:22Z\",\"reservationEndTime\":\"2021-11-03T18:10:18Z\",\"rxStartTime\":\"2021-01-04T06:33:38Z\",\"rxEndTime\":\"2021-05-24T00:31:31Z\",\"txStartTime\":\"2021-11-02T07:55:59Z\",\"txEndTime\":\"2021-11-25T20:26:44Z\",\"errorMessage\":\"bacphejko\",\"maximumElevationDegrees\":64.57916,\"startAzimuthDegrees\":17.64155,\"endAzimuthDegrees\":71.94767,\"groundStationName\":\"l\",\"startElevationDegrees\":90.19363,\"endElevationDegrees\":5.8344603,\"antennaConfiguration\":{\"destinationIp\":\"yqkgfg\",\"sourceIps\":[\"adgakeqsrxybz\",\"qedqytbciqfoufl\",\"mnkzsmod\",\"glougpbk\"]},\"contactProfile\":{\"id\":\"tmut\"}},\"id\":\"qktapspwgcuert\",\"name\":\"mkdo\",\"type\":\"vqwhbmdgbbjfd\"}") - .toObject(ContactInner.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-03T01:46:22Z"), model.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T18:10:18Z"), model.reservationEndTime()); - Assertions.assertEquals("l", model.groundStationName()); - Assertions.assertEquals("tmut", model.contactProfile().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactInner model = new ContactInner().withProvisioningState(ContactsPropertiesProvisioningState.FAILED) - .withReservationStartTime(OffsetDateTime.parse("2021-09-03T01:46:22Z")) - .withReservationEndTime(OffsetDateTime.parse("2021-11-03T18:10:18Z")) - .withGroundStationName("l") - .withContactProfile(new ContactsPropertiesContactProfile().withId("tmut")); - model = BinaryData.fromObject(model).toObject(ContactInner.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-03T01:46:22Z"), model.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T18:10:18Z"), model.reservationEndTime()); - Assertions.assertEquals("l", model.groundStationName()); - Assertions.assertEquals("tmut", model.contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInstancePropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInstancePropertiesTests.java deleted file mode 100644 index 0d742c705218..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactInstancePropertiesTests.java +++ /dev/null @@ -1,23 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactInstanceProperties; - -public final class ContactInstancePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactInstanceProperties model = BinaryData.fromString( - "{\"maximumElevationDegrees\":53.583885,\"txStartTime\":\"2021-01-19T09:55:19Z\",\"txEndTime\":\"2020-12-26T05:08:12Z\",\"rxStartTime\":\"2021-01-23T02:14:07Z\",\"rxEndTime\":\"2021-05-11T08:11:32Z\",\"startAzimuthDegrees\":86.79924,\"endAzimuthDegrees\":14.297503,\"startElevationDegrees\":88.814865,\"endElevationDegrees\":82.8565}") - .toObject(ContactInstanceProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactInstanceProperties model = new ContactInstanceProperties(); - model = BinaryData.fromObject(model).toObject(ContactInstanceProperties.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactListResultTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactListResultTests.java deleted file mode 100644 index af70d9f39666..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactListResultTests.java +++ /dev/null @@ -1,53 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactInner; -import com.azure.resourcemanager.orbital.models.ContactListResult; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"canceled\",\"status\":\"cancelled\",\"reservationStartTime\":\"2021-04-27T12:55:33Z\",\"reservationEndTime\":\"2021-04-24T03:44:15Z\",\"rxStartTime\":\"2021-08-30T04:38:09Z\",\"rxEndTime\":\"2021-09-01T11:04:48Z\",\"txStartTime\":\"2021-05-14T22:11:20Z\",\"txEndTime\":\"2021-06-30T11:52:25Z\",\"errorMessage\":\"qjhqjbas\",\"maximumElevationDegrees\":92.33378,\"startAzimuthDegrees\":21.614403,\"endAzimuthDegrees\":48.216724,\"groundStationName\":\"lngsntnbybkzgcwr\",\"startElevationDegrees\":77.0421,\"endElevationDegrees\":99.26511,\"antennaConfiguration\":{\"destinationIp\":\"ljdousk\",\"sourceIps\":[\"kocrcjdkwtnhx\",\"njbiksqrglssain\",\"p\"]},\"contactProfile\":{\"id\":\"wnzlljfmppeeb\"}},\"id\":\"gxsabkyq\",\"name\":\"uujitcjc\",\"type\":\"dzevndhkrw\"},{\"properties\":{\"provisioningState\":\"succeeded\",\"status\":\"scheduled\",\"reservationStartTime\":\"2021-12-05T19:33:11Z\",\"reservationEndTime\":\"2021-05-23T21:44:39Z\",\"rxStartTime\":\"2021-06-29T12:45:09Z\",\"rxEndTime\":\"2021-05-04T09:53:42Z\",\"txStartTime\":\"2021-09-26T08:04:44Z\",\"txEndTime\":\"2021-07-05T21:18:02Z\",\"errorMessage\":\"eusnhutj\",\"maximumElevationDegrees\":87.67903,\"startAzimuthDegrees\":9.114658,\"endAzimuthDegrees\":95.85893,\"groundStationName\":\"hugjzzdatqxhoc\",\"startElevationDegrees\":25.122803,\"endElevationDegrees\":56.39705,\"antennaConfiguration\":{\"destinationIp\":\"phut\",\"sourceIps\":[\"dvkaozw\"]},\"contactProfile\":{\"id\":\"i\"}},\"id\":\"yhxhu\",\"name\":\"okftyxolniwpwcuk\",\"type\":\"fkgiawxk\"}],\"nextLink\":\"ypl\"}") - .toObject(ContactListResult.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.CANCELED, model.value().get(0).provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T12:55:33Z"), - model.value().get(0).reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T03:44:15Z"), - model.value().get(0).reservationEndTime()); - Assertions.assertEquals("lngsntnbybkzgcwr", model.value().get(0).groundStationName()); - Assertions.assertEquals("wnzlljfmppeeb", model.value().get(0).contactProfile().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactListResult model = new ContactListResult().withValue(Arrays.asList( - new ContactInner().withProvisioningState(ContactsPropertiesProvisioningState.CANCELED) - .withReservationStartTime(OffsetDateTime.parse("2021-04-27T12:55:33Z")) - .withReservationEndTime(OffsetDateTime.parse("2021-04-24T03:44:15Z")) - .withGroundStationName("lngsntnbybkzgcwr") - .withContactProfile(new ContactsPropertiesContactProfile().withId("wnzlljfmppeeb")), - new ContactInner().withProvisioningState(ContactsPropertiesProvisioningState.SUCCEEDED) - .withReservationStartTime(OffsetDateTime.parse("2021-12-05T19:33:11Z")) - .withReservationEndTime(OffsetDateTime.parse("2021-05-23T21:44:39Z")) - .withGroundStationName("hugjzzdatqxhoc") - .withContactProfile(new ContactsPropertiesContactProfile().withId("i")))); - model = BinaryData.fromObject(model).toObject(ContactListResult.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.CANCELED, model.value().get(0).provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T12:55:33Z"), - model.value().get(0).reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T03:44:15Z"), - model.value().get(0).reservationEndTime()); - Assertions.assertEquals("lngsntnbybkzgcwr", model.value().get(0).groundStationName()); - Assertions.assertEquals("wnzlljfmppeeb", model.value().get(0).contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersContactProfileTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersContactProfileTests.java deleted file mode 100644 index 23cef27cf1ba..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersContactProfileTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactParametersContactProfile; -import org.junit.jupiter.api.Assertions; - -public final class ContactParametersContactProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactParametersContactProfile model - = BinaryData.fromString("{\"id\":\"ckyfih\"}").toObject(ContactParametersContactProfile.class); - Assertions.assertEquals("ckyfih", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactParametersContactProfile model = new ContactParametersContactProfile().withId("ckyfih"); - model = BinaryData.fromObject(model).toObject(ContactParametersContactProfile.class); - Assertions.assertEquals("ckyfih", model.id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersTests.java deleted file mode 100644 index dda15b298059..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactParametersTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactParameters; -import com.azure.resourcemanager.orbital.models.ContactParametersContactProfile; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ContactParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactParameters model = BinaryData.fromString( - "{\"contactProfile\":{\"id\":\"prwzwbnguitnwui\"},\"groundStationName\":\"gazxuf\",\"startTime\":\"2020-12-27T04:43:40Z\",\"endTime\":\"2021-07-01T16:43:11Z\"}") - .toObject(ContactParameters.class); - Assertions.assertEquals("prwzwbnguitnwui", model.contactProfile().id()); - Assertions.assertEquals("gazxuf", model.groundStationName()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-27T04:43:40Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-01T16:43:11Z"), model.endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactParameters model = new ContactParameters() - .withContactProfile(new ContactParametersContactProfile().withId("prwzwbnguitnwui")) - .withGroundStationName("gazxuf") - .withStartTime(OffsetDateTime.parse("2020-12-27T04:43:40Z")) - .withEndTime(OffsetDateTime.parse("2021-07-01T16:43:11Z")); - model = BinaryData.fromObject(model).toObject(ContactParameters.class); - Assertions.assertEquals("prwzwbnguitnwui", model.contactProfile().id()); - Assertions.assertEquals("gazxuf", model.groundStationName()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-27T04:43:40Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-01T16:43:11Z"), model.endTime()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileInnerTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileInnerTests.java deleted file mode 100644 index c2af54285494..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileInnerTests.java +++ /dev/null @@ -1,229 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileInner; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfileInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"creating\",\"minimumViableContactDuration\":\"pgrjbz\",\"minimumElevationDegrees\":83.16138,\"autoTrackingConfiguration\":\"disabled\",\"eventHubUri\":\"vsnb\",\"networkConfiguration\":{\"subnetId\":\"xqabnmocpcysh\"},\"thirdPartyConfigurations\":[{\"providerName\":\"afbljjgpbtoqcjmk\",\"missionConfiguration\":\"javbqidtqajz\"}],\"links\":[{\"name\":\"l\",\"polarization\":\"linearVertical\",\"direction\":\"Uplink\",\"gainOverTemperature\":78.68875,\"eirpdBW\":85.05088,\"channels\":[{\"name\":\"khbzhfepgzg\",\"centerFrequencyMHz\":4.900825,\"bandwidthMHz\":53.090946,\"endPoint\":{\"ipAddress\":\"zloc\",\"endPointName\":\"scpai\",\"port\":\"rhhbcs\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"mmajtjaodx\",\"demodulationConfiguration\":\"nbdxk\",\"encodingConfiguration\":\"xo\",\"decodingConfiguration\":\"jionpimexgstxgc\"},{\"name\":\"odgmaajrmvdjwz\",\"centerFrequencyMHz\":79.743835,\"bandwidthMHz\":89.702286,\"endPoint\":{\"ipAddress\":\"vmclw\",\"endPointName\":\"ijcoejctb\",\"port\":\"aqsqsycbkbfk\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"dkexxppofm\",\"demodulationConfiguration\":\"x\",\"encodingConfiguration\":\"jpgd\",\"decodingConfiguration\":\"ocjjxhvpmouexh\"}]},{\"name\":\"zxibqeoj\",\"polarization\":\"linearVertical\",\"direction\":\"Downlink\",\"gainOverTemperature\":96.80261,\"eirpdBW\":52.783543,\"channels\":[{\"name\":\"ntwndeicbtwnpzao\",\"centerFrequencyMHz\":82.38834,\"bandwidthMHz\":80.9701,\"endPoint\":{\"ipAddress\":\"hrhcffcyddglmjth\",\"endPointName\":\"qkwpyeicxmqc\",\"port\":\"wqvhkhixuigdt\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"objoghmewu\",\"demodulationConfiguration\":\"a\",\"encodingConfiguration\":\"rzayv\",\"decodingConfiguration\":\"pgvdf\"},{\"name\":\"iotkftutqxl\",\"centerFrequencyMHz\":86.21241,\"bandwidthMHz\":71.90909,\"endPoint\":{\"ipAddress\":\"lefgugnxk\",\"endPointName\":\"xdqmidtthzrvqdra\",\"port\":\"hjybigehoqfbo\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"anyktzlcuiywg\",\"demodulationConfiguration\":\"wgndrvynhzgpp\",\"encodingConfiguration\":\"cgyncocpecf\",\"decodingConfiguration\":\"mcoo\"},{\"name\":\"sxlzevgbmqj\",\"centerFrequencyMHz\":53.38513,\"bandwidthMHz\":37.101418,\"endPoint\":{\"ipAddress\":\"c\",\"endPointName\":\"pmivkwlzu\",\"port\":\"ccfwnfnbacfion\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"x\",\"demodulationConfiguration\":\"qgtz\",\"encodingConfiguration\":\"pnqbqqwxrjfe\",\"decodingConfiguration\":\"lnwsubisn\"}]},{\"name\":\"ampmngnz\",\"polarization\":\"RHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":60.04183,\"eirpdBW\":23.731243,\"channels\":[{\"name\":\"chcbonqvpkvlrxnj\",\"centerFrequencyMHz\":14.8004,\"bandwidthMHz\":34.601463,\"endPoint\":{\"ipAddress\":\"eipheoflokeyy\",\"endPointName\":\"enjbdlwtgrhp\",\"port\":\"jp\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"asxazjpqyegualhb\",\"demodulationConfiguration\":\"hejjz\",\"encodingConfiguration\":\"dudgwdslfhot\",\"decodingConfiguration\":\"cynpwlbjnp\"},{\"name\":\"acfta\",\"centerFrequencyMHz\":63.682568,\"bandwidthMHz\":1.3006687,\"endPoint\":{\"ipAddress\":\"xnltyfsoppu\",\"endPointName\":\"uesnzwdejbavo\",\"port\":\"xzdmohctb\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"dwxdndnv\",\"demodulationConfiguration\":\"gujjugwdkcglh\",\"encodingConfiguration\":\"azjdyggd\",\"decodingConfiguration\":\"ixhbkuofqweykhm\"},{\"name\":\"n\",\"centerFrequencyMHz\":37.98073,\"bandwidthMHz\":45.722916,\"endPoint\":{\"ipAddress\":\"yexfwh\",\"endPointName\":\"bcibvyvdcsitynn\",\"port\":\"amdecte\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"qsc\",\"demodulationConfiguration\":\"ypvhezrkg\",\"encodingConfiguration\":\"c\",\"decodingConfiguration\":\"efovgmk\"},{\"name\":\"sle\",\"centerFrequencyMHz\":38.220562,\"bandwidthMHz\":97.29868,\"endPoint\":{\"ipAddress\":\"xyqj\",\"endPointName\":\"k\",\"port\":\"attpngjcrcczsq\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"vmdajvnysou\",\"demodulationConfiguration\":\"e\",\"encodingConfiguration\":\"noae\",\"decodingConfiguration\":\"fhyhltrpmopjmcma\"}]}]},\"location\":\"okth\",\"tags\":{\"xodpuozmyzydagfu\":\"uaodsfcpk\",\"dxwzywqsmbsurexi\":\"xbezyiuokktwh\"},\"id\":\"o\",\"name\":\"yocf\",\"type\":\"fksymddystki\"}") - .toObject(ContactProfileInner.class); - Assertions.assertEquals("okth", model.location()); - Assertions.assertEquals("uaodsfcpk", model.tags().get("xodpuozmyzydagfu")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.CREATING, model.provisioningState()); - Assertions.assertEquals("pgrjbz", model.minimumViableContactDuration()); - Assertions.assertEquals(83.16138F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.autoTrackingConfiguration()); - Assertions.assertEquals("vsnb", model.eventHubUri()); - Assertions.assertEquals("xqabnmocpcysh", model.networkConfiguration().subnetId()); - Assertions.assertEquals("afbljjgpbtoqcjmk", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("javbqidtqajz", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("l", model.links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.UPLINK, model.links().get(0).direction()); - Assertions.assertEquals(78.68875F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(85.05088F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("khbzhfepgzg", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(4.900825f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(53.090946f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("zloc", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("scpai", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("rhhbcs", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("mmajtjaodx", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("nbdxk", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("xo", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("jionpimexgstxgc", model.links().get(0).channels().get(0).decodingConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileInner model = new ContactProfileInner().withLocation("okth") - .withTags(mapOf("xodpuozmyzydagfu", "uaodsfcpk", "dxwzywqsmbsurexi", "xbezyiuokktwh")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.CREATING) - .withMinimumViableContactDuration("pgrjbz") - .withMinimumElevationDegrees(83.16138F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.DISABLED) - .withEventHubUri("vsnb") - .withNetworkConfiguration(new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("xqabnmocpcysh")) - .withThirdPartyConfigurations( - Arrays.asList(new ContactProfileThirdPartyConfiguration().withProviderName("afbljjgpbtoqcjmk") - .withMissionConfiguration("javbqidtqajz"))) - .withLinks(Arrays.asList( - new ContactProfileLink().withName("l") - .withPolarization(Polarization.LINEAR_VERTICAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(78.68875F) - .withEirpdBW(85.05088F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("khbzhfepgzg") - .withCenterFrequencyMHz(4.900825f) - .withBandwidthMHz(53.090946f) - .withEndPoint(new EndPoint().withIpAddress("zloc") - .withEndPointName("scpai") - .withPort("rhhbcs") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("mmajtjaodx") - .withDemodulationConfiguration("nbdxk") - .withEncodingConfiguration("xo") - .withDecodingConfiguration("jionpimexgstxgc"), - new ContactProfileLinkChannel().withName("odgmaajrmvdjwz") - .withCenterFrequencyMHz(79.743835f) - .withBandwidthMHz(89.702286f) - .withEndPoint(new EndPoint().withIpAddress("vmclw") - .withEndPointName("ijcoejctb") - .withPort("aqsqsycbkbfk") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("dkexxppofm") - .withDemodulationConfiguration("x") - .withEncodingConfiguration("jpgd") - .withDecodingConfiguration("ocjjxhvpmouexh"))), - new ContactProfileLink().withName("zxibqeoj") - .withPolarization(Polarization.LINEAR_VERTICAL) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(96.80261F) - .withEirpdBW(52.783543F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("ntwndeicbtwnpzao") - .withCenterFrequencyMHz(82.38834f) - .withBandwidthMHz(80.9701f) - .withEndPoint(new EndPoint().withIpAddress("hrhcffcyddglmjth") - .withEndPointName("qkwpyeicxmqc") - .withPort("wqvhkhixuigdt") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("objoghmewu") - .withDemodulationConfiguration("a") - .withEncodingConfiguration("rzayv") - .withDecodingConfiguration("pgvdf"), - new ContactProfileLinkChannel().withName("iotkftutqxl") - .withCenterFrequencyMHz(86.21241f) - .withBandwidthMHz(71.90909f) - .withEndPoint(new EndPoint().withIpAddress("lefgugnxk") - .withEndPointName("xdqmidtthzrvqdra") - .withPort("hjybigehoqfbo") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("anyktzlcuiywg") - .withDemodulationConfiguration("wgndrvynhzgpp") - .withEncodingConfiguration("cgyncocpecf") - .withDecodingConfiguration("mcoo"), - new ContactProfileLinkChannel().withName("sxlzevgbmqj") - .withCenterFrequencyMHz(53.38513f) - .withBandwidthMHz(37.101418f) - .withEndPoint(new EndPoint().withIpAddress("c") - .withEndPointName("pmivkwlzu") - .withPort("ccfwnfnbacfion") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("x") - .withDemodulationConfiguration("qgtz") - .withEncodingConfiguration("pnqbqqwxrjfe") - .withDecodingConfiguration("lnwsubisn"))), - new ContactProfileLink().withName("ampmngnz") - .withPolarization(Polarization.RHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(60.04183F) - .withEirpdBW(23.731243F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("chcbonqvpkvlrxnj") - .withCenterFrequencyMHz(14.8004f) - .withBandwidthMHz(34.601463f) - .withEndPoint(new EndPoint().withIpAddress("eipheoflokeyy") - .withEndPointName("enjbdlwtgrhp") - .withPort("jp") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("asxazjpqyegualhb") - .withDemodulationConfiguration("hejjz") - .withEncodingConfiguration("dudgwdslfhot") - .withDecodingConfiguration("cynpwlbjnp"), - new ContactProfileLinkChannel().withName("acfta") - .withCenterFrequencyMHz(63.682568f) - .withBandwidthMHz(1.3006687f) - .withEndPoint(new EndPoint().withIpAddress("xnltyfsoppu") - .withEndPointName("uesnzwdejbavo") - .withPort("xzdmohctb") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("dwxdndnv") - .withDemodulationConfiguration("gujjugwdkcglh") - .withEncodingConfiguration("azjdyggd") - .withDecodingConfiguration("ixhbkuofqweykhm"), - new ContactProfileLinkChannel().withName("n") - .withCenterFrequencyMHz(37.98073f) - .withBandwidthMHz(45.722916f) - .withEndPoint(new EndPoint().withIpAddress("yexfwh") - .withEndPointName("bcibvyvdcsitynn") - .withPort("amdecte") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("qsc") - .withDemodulationConfiguration("ypvhezrkg") - .withEncodingConfiguration("c") - .withDecodingConfiguration("efovgmk"), - new ContactProfileLinkChannel().withName("sle") - .withCenterFrequencyMHz(38.220562f) - .withBandwidthMHz(97.29868f) - .withEndPoint(new EndPoint().withIpAddress("xyqj") - .withEndPointName("k") - .withPort("attpngjcrcczsq") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("vmdajvnysou") - .withDemodulationConfiguration("e") - .withEncodingConfiguration("noae") - .withDecodingConfiguration("fhyhltrpmopjmcma"))))); - model = BinaryData.fromObject(model).toObject(ContactProfileInner.class); - Assertions.assertEquals("okth", model.location()); - Assertions.assertEquals("uaodsfcpk", model.tags().get("xodpuozmyzydagfu")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.CREATING, model.provisioningState()); - Assertions.assertEquals("pgrjbz", model.minimumViableContactDuration()); - Assertions.assertEquals(83.16138F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.autoTrackingConfiguration()); - Assertions.assertEquals("vsnb", model.eventHubUri()); - Assertions.assertEquals("xqabnmocpcysh", model.networkConfiguration().subnetId()); - Assertions.assertEquals("afbljjgpbtoqcjmk", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("javbqidtqajz", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("l", model.links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.UPLINK, model.links().get(0).direction()); - Assertions.assertEquals(78.68875F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(85.05088F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("khbzhfepgzg", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(4.900825f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(53.090946f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("zloc", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("scpai", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("rhhbcs", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("mmajtjaodx", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("nbdxk", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("xo", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("jionpimexgstxgc", model.links().get(0).channels().get(0).decodingConfiguration()); - } - - // Use "Map.of" if available - @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/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkChannelTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkChannelTests.java deleted file mode 100644 index 70c7b70e503e..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkChannelTests.java +++ /dev/null @@ -1,58 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Protocol; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfileLinkChannelTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileLinkChannel model = BinaryData.fromString( - "{\"name\":\"ivetvtcq\",\"centerFrequencyMHz\":21.629738,\"bandwidthMHz\":17.011059,\"endPoint\":{\"ipAddress\":\"doqmcbxvwvxys\",\"endPointName\":\"qbhsfxobl\",\"port\":\"tkblmpewww\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"rvrnsvshqjohxc\",\"demodulationConfiguration\":\"bfovasrruvwbhsq\",\"encodingConfiguration\":\"ubcgjbirxb\",\"decodingConfiguration\":\"bsrfbj\"}") - .toObject(ContactProfileLinkChannel.class); - Assertions.assertEquals("ivetvtcq", model.name()); - Assertions.assertEquals(21.629738f, model.centerFrequencyMHz()); - Assertions.assertEquals(17.011059f, model.bandwidthMHz()); - Assertions.assertEquals("doqmcbxvwvxys", model.endPoint().ipAddress()); - Assertions.assertEquals("qbhsfxobl", model.endPoint().endPointName()); - Assertions.assertEquals("tkblmpewww", model.endPoint().port()); - Assertions.assertEquals(Protocol.UDP, model.endPoint().protocol()); - Assertions.assertEquals("rvrnsvshqjohxc", model.modulationConfiguration()); - Assertions.assertEquals("bfovasrruvwbhsq", model.demodulationConfiguration()); - Assertions.assertEquals("ubcgjbirxb", model.encodingConfiguration()); - Assertions.assertEquals("bsrfbj", model.decodingConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileLinkChannel model = new ContactProfileLinkChannel().withName("ivetvtcq") - .withCenterFrequencyMHz(21.629738f) - .withBandwidthMHz(17.011059f) - .withEndPoint(new EndPoint().withIpAddress("doqmcbxvwvxys") - .withEndPointName("qbhsfxobl") - .withPort("tkblmpewww") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("rvrnsvshqjohxc") - .withDemodulationConfiguration("bfovasrruvwbhsq") - .withEncodingConfiguration("ubcgjbirxb") - .withDecodingConfiguration("bsrfbj"); - model = BinaryData.fromObject(model).toObject(ContactProfileLinkChannel.class); - Assertions.assertEquals("ivetvtcq", model.name()); - Assertions.assertEquals(21.629738f, model.centerFrequencyMHz()); - Assertions.assertEquals(17.011059f, model.bandwidthMHz()); - Assertions.assertEquals("doqmcbxvwvxys", model.endPoint().ipAddress()); - Assertions.assertEquals("qbhsfxobl", model.endPoint().endPointName()); - Assertions.assertEquals("tkblmpewww", model.endPoint().port()); - Assertions.assertEquals(Protocol.UDP, model.endPoint().protocol()); - Assertions.assertEquals("rvrnsvshqjohxc", model.modulationConfiguration()); - Assertions.assertEquals("bfovasrruvwbhsq", model.demodulationConfiguration()); - Assertions.assertEquals("ubcgjbirxb", model.encodingConfiguration()); - Assertions.assertEquals("bsrfbj", model.decodingConfiguration()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkTests.java deleted file mode 100644 index 94e126bc4ee4..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileLinkTests.java +++ /dev/null @@ -1,77 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfileLinkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileLink model = BinaryData.fromString( - "{\"name\":\"qrhhu\",\"polarization\":\"LHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":36.1724,\"eirpdBW\":30.051893,\"channels\":[{\"name\":\"qxolzdahzx\",\"centerFrequencyMHz\":5.8805466,\"bandwidthMHz\":68.45818,\"endPoint\":{\"ipAddress\":\"bgbkdmoizpost\",\"endPointName\":\"grcfb\",\"port\":\"nrmfqjhhk\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"vjymjhxxjyngud\",\"demodulationConfiguration\":\"krtswbxqz\",\"encodingConfiguration\":\"zjf\",\"decodingConfiguration\":\"vjfdx\"}]}") - .toObject(ContactProfileLink.class); - Assertions.assertEquals("qrhhu", model.name()); - Assertions.assertEquals(Polarization.LHCP, model.polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.direction()); - Assertions.assertEquals(36.1724F, model.gainOverTemperature()); - Assertions.assertEquals(30.051893F, model.eirpdBW()); - Assertions.assertEquals("qxolzdahzx", model.channels().get(0).name()); - Assertions.assertEquals(5.8805466f, model.channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(68.45818f, model.channels().get(0).bandwidthMHz()); - Assertions.assertEquals("bgbkdmoizpost", model.channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("grcfb", model.channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("nrmfqjhhk", model.channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, model.channels().get(0).endPoint().protocol()); - Assertions.assertEquals("vjymjhxxjyngud", model.channels().get(0).modulationConfiguration()); - Assertions.assertEquals("krtswbxqz", model.channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("zjf", model.channels().get(0).encodingConfiguration()); - Assertions.assertEquals("vjfdx", model.channels().get(0).decodingConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileLink model = new ContactProfileLink().withName("qrhhu") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(36.1724F) - .withEirpdBW(30.051893F) - .withChannels(Arrays.asList(new ContactProfileLinkChannel().withName("qxolzdahzx") - .withCenterFrequencyMHz(5.8805466f) - .withBandwidthMHz(68.45818f) - .withEndPoint(new EndPoint().withIpAddress("bgbkdmoizpost") - .withEndPointName("grcfb") - .withPort("nrmfqjhhk") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("vjymjhxxjyngud") - .withDemodulationConfiguration("krtswbxqz") - .withEncodingConfiguration("zjf") - .withDecodingConfiguration("vjfdx"))); - model = BinaryData.fromObject(model).toObject(ContactProfileLink.class); - Assertions.assertEquals("qrhhu", model.name()); - Assertions.assertEquals(Polarization.LHCP, model.polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.direction()); - Assertions.assertEquals(36.1724F, model.gainOverTemperature()); - Assertions.assertEquals(30.051893F, model.eirpdBW()); - Assertions.assertEquals("qxolzdahzx", model.channels().get(0).name()); - Assertions.assertEquals(5.8805466f, model.channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(68.45818f, model.channels().get(0).bandwidthMHz()); - Assertions.assertEquals("bgbkdmoizpost", model.channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("grcfb", model.channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("nrmfqjhhk", model.channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, model.channels().get(0).endPoint().protocol()); - Assertions.assertEquals("vjymjhxxjyngud", model.channels().get(0).modulationConfiguration()); - Assertions.assertEquals("krtswbxqz", model.channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("zjf", model.channels().get(0).encodingConfiguration()); - Assertions.assertEquals("vjfdx", model.channels().get(0).decodingConfiguration()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileListResultTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileListResultTests.java deleted file mode 100644 index 6b61def4a2b9..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileListResultTests.java +++ /dev/null @@ -1,418 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileInner; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.ContactProfileListResult; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfileListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"succeeded\",\"minimumViableContactDuration\":\"ujmkcjhwqy\",\"minimumElevationDegrees\":1.7570734,\"autoTrackingConfiguration\":\"disabled\",\"eventHubUri\":\"wj\",\"networkConfiguration\":{\"subnetId\":\"wgdrjervnaenqp\"},\"thirdPartyConfigurations\":[{\"providerName\":\"ndoygmifthnzdnd\",\"missionConfiguration\":\"l\"},{\"providerName\":\"nayqi\",\"missionConfiguration\":\"ynduha\"},{\"providerName\":\"hqlkthumaqo\",\"missionConfiguration\":\"bgycduiertgccym\"},{\"providerName\":\"aolps\",\"missionConfiguration\":\"lqlfm\"}],\"links\":[{\"name\":\"n\",\"polarization\":\"LHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":55.65765,\"eirpdBW\":81.210945,\"channels\":[{\"name\":\"iydmcwyhzdxs\",\"centerFrequencyMHz\":80.603836,\"bandwidthMHz\":20.36894,\"endPoint\":{\"ipAddress\":\"bzmnvdfznud\",\"endPointName\":\"od\",\"port\":\"xzb\",\"protocol\":\"UDP\"}},{\"name\":\"blylpstdbh\",\"centerFrequencyMHz\":21.126366,\"bandwidthMHz\":76.3956,\"endPoint\":{\"ipAddress\":\"rzdzucerscdnt\",\"endPointName\":\"evfiwjmygt\",\"port\":\"sslswtmweriof\",\"protocol\":\"TCP\"}},{\"name\":\"yqsemwa\",\"centerFrequencyMHz\":5.657935,\"bandwidthMHz\":18.444378,\"endPoint\":{\"ipAddress\":\"tshhszhedp\",\"endPointName\":\"vwiwubmwmbesld\",\"port\":\"k\",\"protocol\":\"UDP\"}},{\"name\":\"tppjflcx\",\"centerFrequencyMHz\":80.7271,\"bandwidthMHz\":66.58158,\"endPoint\":{\"ipAddress\":\"okonzmnsikvmkqz\",\"endPointName\":\"qqkdltfzxmhhvhgu\",\"port\":\"eodkwobda\",\"protocol\":\"UDP\"}}]},{\"name\":\"tibqdxbxwakb\",\"polarization\":\"linearHorizontal\",\"direction\":\"Uplink\",\"gainOverTemperature\":69.47182,\"eirpdBW\":79.54939,\"channels\":[{\"name\":\"zgx\",\"centerFrequencyMHz\":85.23063,\"bandwidthMHz\":22.702295,\"endPoint\":{\"ipAddress\":\"iplbpodxunkbebxm\",\"endPointName\":\"byyntwlrbqt\",\"port\":\"oievseotgqrlltm\",\"protocol\":\"UDP\"}},{\"name\":\"lauwzizxbmpgcjef\",\"centerFrequencyMHz\":95.06782,\"bandwidthMHz\":21.135498,\"endPoint\":{\"ipAddress\":\"uvpb\",\"endPointName\":\"tdum\",\"port\":\"rp\",\"protocol\":\"TCP\"}},{\"name\":\"ebmnzbtbhjpglk\",\"centerFrequencyMHz\":82.34188,\"bandwidthMHz\":49.83795,\"endPoint\":{\"ipAddress\":\"hdneuelfph\",\"endPointName\":\"dyhtozfikdowwquu\",\"port\":\"xzxcl\",\"protocol\":\"TCP\"}}]},{\"name\":\"thhqzonosggbh\",\"polarization\":\"LHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":61.219753,\"eirpdBW\":33.099705,\"channels\":[{\"name\":\"n\",\"centerFrequencyMHz\":65.78154,\"bandwidthMHz\":25.078642,\"endPoint\":{\"ipAddress\":\"jutiiswacff\",\"endPointName\":\"dkzzewkfvhqcrail\",\"port\":\"pnppfuf\",\"protocol\":\"UDP\"}},{\"name\":\"wdmhdlxyjrxs\",\"centerFrequencyMHz\":94.25893,\"bandwidthMHz\":37.06115,\"endPoint\":{\"ipAddress\":\"fcnihgwq\",\"endPointName\":\"pnedgf\",\"port\":\"cvkcvqvpkeqdcv\",\"protocol\":\"TCP\"}},{\"name\":\"hvoodsotbobzd\",\"centerFrequencyMHz\":29.276281,\"bandwidthMHz\":26.7008,\"endPoint\":{\"ipAddress\":\"j\",\"endPointName\":\"vnhdldwmgxcxr\",\"port\":\"lpmutwuoegrpkhj\",\"protocol\":\"TCP\"}},{\"name\":\"iyq\",\"centerFrequencyMHz\":99.57627,\"bandwidthMHz\":28.484118,\"endPoint\":{\"ipAddress\":\"i\",\"endPointName\":\"pdggkzzlvm\",\"port\":\"mpaxmodfvuefywsb\",\"protocol\":\"TCP\"}}]}]},\"location\":\"mwyhr\",\"tags\":{\"yzvqt\":\"yftaakcpw\",\"zksmondj\":\"nubexk\"},\"id\":\"quxvypomgkop\",\"name\":\"whojvp\",\"type\":\"jqg\"},{\"properties\":{\"provisioningState\":\"failed\",\"minimumViableContactDuration\":\"ocmbqfqvmkcxoza\",\"minimumElevationDegrees\":56.86097,\"autoTrackingConfiguration\":\"disabled\",\"eventHubUri\":\"prglya\",\"networkConfiguration\":{\"subnetId\":\"dd\"},\"thirdPartyConfigurations\":[{\"providerName\":\"bcuejrjxgci\",\"missionConfiguration\":\"ibrhosxsdqr\"},{\"providerName\":\"zoymibmrqyibahw\",\"missionConfiguration\":\"luszdtmhrkwof\"},{\"providerName\":\"yvoqa\",\"missionConfiguration\":\"piexpbtgiw\"},{\"providerName\":\"wo\",\"missionConfiguration\":\"nwashrtd\"}],\"links\":[{\"name\":\"cnqxwbpokulpi\",\"polarization\":\"RHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":47.424603,\"eirpdBW\":85.214745,\"channels\":[{\"name\":\"qiiobyuqer\",\"centerFrequencyMHz\":59.630554,\"bandwidthMHz\":6.2912345,\"endPoint\":{\"ipAddress\":\"pqwcciuqgbdbutau\",\"endPointName\":\"fbtkuwhhmhyk\",\"port\":\"joxafnndlpi\",\"protocol\":\"UDP\"}},{\"name\":\"koymkcd\",\"centerFrequencyMHz\":1.9727468,\"bandwidthMHz\":52.415318,\"endPoint\":{\"ipAddress\":\"pkkpw\",\"endPointName\":\"reqnovvqfov\",\"port\":\"jxywsuws\",\"protocol\":\"UDP\"}},{\"name\":\"s\",\"centerFrequencyMHz\":58.6494,\"bandwidthMHz\":74.82819,\"endPoint\":{\"ipAddress\":\"ytgadgvraeaene\",\"endPointName\":\"nzar\",\"port\":\"wlquuijfqkace\",\"protocol\":\"TCP\"}}]},{\"name\":\"ipfpubji\",\"polarization\":\"linearHorizontal\",\"direction\":\"Uplink\",\"gainOverTemperature\":5.9326353,\"eirpdBW\":86.60929,\"channels\":[{\"name\":\"qkvpuvksgplsakn\",\"centerFrequencyMHz\":0.79660416,\"bandwidthMHz\":68.44677,\"endPoint\":{\"ipAddress\":\"synljphuopxodl\",\"endPointName\":\"iyntorzihle\",\"port\":\"sjswsrms\",\"protocol\":\"UDP\"}},{\"name\":\"zrpzb\",\"centerFrequencyMHz\":73.3367,\"bandwidthMHz\":81.935295,\"endPoint\":{\"ipAddress\":\"kqqzqioxiysu\",\"endPointName\":\"i\",\"port\":\"ynkedyatrwyhqmib\",\"protocol\":\"UDP\"}},{\"name\":\"hwit\",\"centerFrequencyMHz\":65.06971,\"bandwidthMHz\":81.76519,\"endPoint\":{\"ipAddress\":\"pyy\",\"endPointName\":\"pcdpumnz\",\"port\":\"mwzn\",\"protocol\":\"TCP\"}},{\"name\":\"biknsorgjhxbld\",\"centerFrequencyMHz\":27.161957,\"bandwidthMHz\":66.445755,\"endPoint\":{\"ipAddress\":\"wrlkdmtn\",\"endPointName\":\"vokotllxdyh\",\"port\":\"syocogjltdtbnnha\",\"protocol\":\"UDP\"}}]},{\"name\":\"ocrkvcikh\",\"polarization\":\"RHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":16.389334,\"eirpdBW\":55.93623,\"channels\":[{\"name\":\"qqu\",\"centerFrequencyMHz\":43.360477,\"bandwidthMHz\":10.328889,\"endPoint\":{\"ipAddress\":\"kywggxkallatmel\",\"endPointName\":\"uipiccjzk\",\"port\":\"ivgvvcna\",\"protocol\":\"UDP\"}}]}]},\"location\":\"yrnxxmueedn\",\"tags\":{\"tkwqqtchealm\":\"v\",\"gdv\":\"mtdaa\"},\"id\":\"vgpiohgwxrt\",\"name\":\"udxepxgyqagv\",\"type\":\"vmnpkukghimdblx\"},{\"properties\":{\"provisioningState\":\"updating\",\"minimumViableContactDuration\":\"fnjhfjxwmszkkfo\",\"minimumElevationDegrees\":56.352932,\"autoTrackingConfiguration\":\"sBand\",\"eventHubUri\":\"zi\",\"networkConfiguration\":{\"subnetId\":\"fjawneaivxwczel\"},\"thirdPartyConfigurations\":[{\"providerName\":\"r\",\"missionConfiguration\":\"lsfeaenwabfatkld\"},{\"providerName\":\"xbjhwuaanozjosph\",\"missionConfiguration\":\"oulpjrv\"}],\"links\":[{\"name\":\"glrvimjwosytxi\",\"polarization\":\"linearHorizontal\",\"direction\":\"Uplink\",\"gainOverTemperature\":73.11868,\"eirpdBW\":4.9390373,\"channels\":[{\"name\":\"qumiek\",\"centerFrequencyMHz\":8.023405,\"bandwidthMHz\":74.09953,\"endPoint\":{\"ipAddress\":\"zikhl\",\"endPointName\":\"fjhdg\",\"port\":\"gge\",\"protocol\":\"TCP\"}}]}]},\"location\":\"nyga\",\"tags\":{\"fatpxllrxcyjmoa\":\"db\"},\"id\":\"su\",\"name\":\"arm\",\"type\":\"wdmjsjqbjhhyx\"},{\"properties\":{\"provisioningState\":\"deleting\",\"minimumViableContactDuration\":\"yc\",\"minimumElevationDegrees\":68.70334,\"autoTrackingConfiguration\":\"xBand\",\"eventHubUri\":\"xkgymareqnajxqu\",\"networkConfiguration\":{\"subnetId\":\"jhkycub\"},\"thirdPartyConfigurations\":[{\"providerName\":\"gssofwq\",\"missionConfiguration\":\"zqalkrmnjijpx\"},{\"providerName\":\"cqqudf\",\"missionConfiguration\":\"byxbaaabjy\"},{\"providerName\":\"ayffim\",\"missionConfiguration\":\"zrtuzq\"},{\"providerName\":\"gsexne\",\"missionConfiguration\":\"fdnw\"}],\"links\":[{\"name\":\"mewzsyyc\",\"polarization\":\"LHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":89.182625,\"eirpdBW\":81.26643,\"channels\":[{\"name\":\"ud\",\"centerFrequencyMHz\":92.32651,\"bandwidthMHz\":10.957659,\"endPoint\":{\"ipAddress\":\"xtrthz\",\"endPointName\":\"aytdwkqbrq\",\"port\":\"bpaxhexiilivpdt\",\"protocol\":\"TCP\"}},{\"name\":\"r\",\"centerFrequencyMHz\":83.604706,\"bandwidthMHz\":1.2664497,\"endPoint\":{\"ipAddress\":\"qoaxoruzfgs\",\"endPointName\":\"uyfxrxxleptramxj\",\"port\":\"zwl\",\"protocol\":\"UDP\"}}]},{\"name\":\"wxuqlcvydypatdoo\",\"polarization\":\"LHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":52.902954,\"eirpdBW\":20.04649,\"channels\":[{\"name\":\"kooebwnu\",\"centerFrequencyMHz\":25.77629,\"bandwidthMHz\":54.985764,\"endPoint\":{\"ipAddress\":\"mmsbvdkcrodtjin\",\"endPointName\":\"wj\",\"port\":\"fltkacjv\",\"protocol\":\"TCP\"}},{\"name\":\"kdlfoa\",\"centerFrequencyMHz\":79.17313,\"bandwidthMHz\":38.711143,\"endPoint\":{\"ipAddress\":\"kfpagao\",\"endPointName\":\"pulpqblylsyxk\",\"port\":\"jnsjervtiagxsd\",\"protocol\":\"UDP\"}},{\"name\":\"uem\",\"centerFrequencyMHz\":28.800655,\"bandwidthMHz\":65.141945,\"endPoint\":{\"ipAddress\":\"zkfzbeyv\",\"endPointName\":\"nqicvinvkjjxdxrb\",\"port\":\"ukzclewyhmlwpaz\",\"protocol\":\"TCP\"}}]}]},\"location\":\"ofncckwyfzqwhxxb\",\"tags\":{\"zfeqztppri\":\"a\"},\"id\":\"lxorjaltolmncws\",\"name\":\"bqwcsdbnwdcf\",\"type\":\"ucqdpfuvglsb\"}],\"nextLink\":\"ca\"}") - .toObject(ContactProfileListResult.class); - Assertions.assertEquals("mwyhr", model.value().get(0).location()); - Assertions.assertEquals("yftaakcpw", model.value().get(0).tags().get("yzvqt")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.SUCCEEDED, - model.value().get(0).provisioningState()); - Assertions.assertEquals("ujmkcjhwqy", model.value().get(0).minimumViableContactDuration()); - Assertions.assertEquals(1.7570734F, model.value().get(0).minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.value().get(0).autoTrackingConfiguration()); - Assertions.assertEquals("wj", model.value().get(0).eventHubUri()); - Assertions.assertEquals("wgdrjervnaenqp", model.value().get(0).networkConfiguration().subnetId()); - Assertions.assertEquals("ndoygmifthnzdnd", - model.value().get(0).thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("l", model.value().get(0).thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("n", model.value().get(0).links().get(0).name()); - Assertions.assertEquals(Polarization.LHCP, model.value().get(0).links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.value().get(0).links().get(0).direction()); - Assertions.assertEquals(55.65765F, model.value().get(0).links().get(0).gainOverTemperature()); - Assertions.assertEquals(81.210945F, model.value().get(0).links().get(0).eirpdBW()); - Assertions.assertEquals("iydmcwyhzdxs", model.value().get(0).links().get(0).channels().get(0).name()); - Assertions.assertEquals(80.603836f, model.value().get(0).links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(20.36894f, model.value().get(0).links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("bzmnvdfznud", - model.value().get(0).links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("od", model.value().get(0).links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("xzb", model.value().get(0).links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, - model.value().get(0).links().get(0).channels().get(0).endPoint().protocol()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileListResult model - = new ContactProfileListResult() - .withValue( - Arrays - .asList( - new ContactProfileInner().withLocation("mwyhr") - .withTags(mapOf("yzvqt", "yftaakcpw", "zksmondj", "nubexk")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.SUCCEEDED) - .withMinimumViableContactDuration("ujmkcjhwqy") - .withMinimumElevationDegrees(1.7570734F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.DISABLED) - .withEventHubUri("wj") - .withNetworkConfiguration( - new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("wgdrjervnaenqp")) - .withThirdPartyConfigurations(Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("ndoygmifthnzdnd") - .withMissionConfiguration("l"), - new ContactProfileThirdPartyConfiguration().withProviderName("nayqi") - .withMissionConfiguration("ynduha"), - new ContactProfileThirdPartyConfiguration().withProviderName("hqlkthumaqo") - .withMissionConfiguration("bgycduiertgccym"), - new ContactProfileThirdPartyConfiguration().withProviderName("aolps") - .withMissionConfiguration("lqlfm"))) - .withLinks( - Arrays - .asList( - new ContactProfileLink().withName("n") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(55.65765F) - .withEirpdBW(81.210945F) - .withChannels( - Arrays.asList( - new ContactProfileLinkChannel().withName("iydmcwyhzdxs") - .withCenterFrequencyMHz(80.603836f) - .withBandwidthMHz(20.36894f) - .withEndPoint(new EndPoint().withIpAddress("bzmnvdfznud") - .withEndPointName("od") - .withPort("xzb") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("blylpstdbh") - .withCenterFrequencyMHz(21.126366f) - .withBandwidthMHz(76.3956f) - .withEndPoint(new EndPoint().withIpAddress("rzdzucerscdnt") - .withEndPointName("evfiwjmygt") - .withPort("sslswtmweriof") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("yqsemwa") - .withCenterFrequencyMHz(5.657935f) - .withBandwidthMHz(18.444378f) - .withEndPoint(new EndPoint().withIpAddress("tshhszhedp") - .withEndPointName("vwiwubmwmbesld") - .withPort("k") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("tppjflcx") - .withCenterFrequencyMHz(80.7271f) - .withBandwidthMHz(66.58158f) - .withEndPoint(new EndPoint() - .withIpAddress("okonzmnsikvmkqz") - .withEndPointName("qqkdltfzxmhhvhgu") - .withPort("eodkwobda") - .withProtocol(Protocol.UDP)))), - new ContactProfileLink().withName("tibqdxbxwakb") - .withPolarization(Polarization.LINEAR_HORIZONTAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(69.47182F) - .withEirpdBW(79.54939F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("zgx") - .withCenterFrequencyMHz(85.23063f) - .withBandwidthMHz(22.702295f) - .withEndPoint(new EndPoint().withIpAddress("iplbpodxunkbebxm") - .withEndPointName("byyntwlrbqt") - .withPort("oievseotgqrlltm") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("lauwzizxbmpgcjef") - .withCenterFrequencyMHz(95.06782f) - .withBandwidthMHz(21.135498f) - .withEndPoint(new EndPoint().withIpAddress("uvpb") - .withEndPointName("tdum") - .withPort("rp") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("ebmnzbtbhjpglk") - .withCenterFrequencyMHz(82.34188f) - .withBandwidthMHz(49.83795f) - .withEndPoint(new EndPoint().withIpAddress("hdneuelfph") - .withEndPointName("dyhtozfikdowwquu") - .withPort("xzxcl") - .withProtocol(Protocol.TCP)))), - new ContactProfileLink().withName("thhqzonosggbh") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(61.219753F) - .withEirpdBW(33.099705F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("n") - .withCenterFrequencyMHz(65.78154f) - .withBandwidthMHz(25.078642f) - .withEndPoint(new EndPoint().withIpAddress("jutiiswacff") - .withEndPointName("dkzzewkfvhqcrail") - .withPort("pnppfuf") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("wdmhdlxyjrxs") - .withCenterFrequencyMHz(94.25893f) - .withBandwidthMHz(37.06115f) - .withEndPoint(new EndPoint().withIpAddress("fcnihgwq") - .withEndPointName("pnedgf") - .withPort("cvkcvqvpkeqdcv") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("hvoodsotbobzd") - .withCenterFrequencyMHz(29.276281f) - .withBandwidthMHz(26.7008f) - .withEndPoint(new EndPoint().withIpAddress("j") - .withEndPointName("vnhdldwmgxcxr") - .withPort("lpmutwuoegrpkhj") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("iyq") - .withCenterFrequencyMHz(99.57627f) - .withBandwidthMHz(28.484118f) - .withEndPoint(new EndPoint().withIpAddress("i") - .withEndPointName("pdggkzzlvm") - .withPort("mpaxmodfvuefywsb") - .withProtocol(Protocol.TCP)))))), - new ContactProfileInner().withLocation("yrnxxmueedn") - .withTags(mapOf("tkwqqtchealm", "v", "gdv", "mtdaa")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.FAILED) - .withMinimumViableContactDuration("ocmbqfqvmkcxoza") - .withMinimumElevationDegrees(56.86097F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.DISABLED) - .withEventHubUri("prglya") - .withNetworkConfiguration( - new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("dd")) - .withThirdPartyConfigurations(Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("bcuejrjxgci") - .withMissionConfiguration("ibrhosxsdqr"), - new ContactProfileThirdPartyConfiguration().withProviderName("zoymibmrqyibahw") - .withMissionConfiguration("luszdtmhrkwof"), - new ContactProfileThirdPartyConfiguration().withProviderName("yvoqa") - .withMissionConfiguration("piexpbtgiw"), - new ContactProfileThirdPartyConfiguration().withProviderName("wo") - .withMissionConfiguration("nwashrtd"))) - .withLinks(Arrays.asList( - new ContactProfileLink().withName("cnqxwbpokulpi") - .withPolarization(Polarization.RHCP) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(47.424603F) - .withEirpdBW(85.214745F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("qiiobyuqer") - .withCenterFrequencyMHz(59.630554f) - .withBandwidthMHz(6.2912345f) - .withEndPoint(new EndPoint().withIpAddress("pqwcciuqgbdbutau") - .withEndPointName("fbtkuwhhmhyk") - .withPort("joxafnndlpi") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("koymkcd") - .withCenterFrequencyMHz(1.9727468f) - .withBandwidthMHz(52.415318f) - .withEndPoint(new EndPoint().withIpAddress("pkkpw") - .withEndPointName("reqnovvqfov") - .withPort("jxywsuws") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("s") - .withCenterFrequencyMHz(58.6494f) - .withBandwidthMHz(74.82819f) - .withEndPoint(new EndPoint().withIpAddress("ytgadgvraeaene") - .withEndPointName("nzar") - .withPort("wlquuijfqkace") - .withProtocol(Protocol.TCP)))), - new ContactProfileLink() - .withName("ipfpubji") - .withPolarization(Polarization.LINEAR_HORIZONTAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(5.9326353F) - .withEirpdBW(86.60929F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("qkvpuvksgplsakn") - .withCenterFrequencyMHz(0.79660416f) - .withBandwidthMHz(68.44677f) - .withEndPoint(new EndPoint().withIpAddress("synljphuopxodl") - .withEndPointName("iyntorzihle") - .withPort("sjswsrms") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("zrpzb") - .withCenterFrequencyMHz(73.3367f) - .withBandwidthMHz(81.935295f) - .withEndPoint(new EndPoint().withIpAddress("kqqzqioxiysu") - .withEndPointName("i") - .withPort("ynkedyatrwyhqmib") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("hwit") - .withCenterFrequencyMHz(65.06971f) - .withBandwidthMHz(81.76519f) - .withEndPoint(new EndPoint().withIpAddress("pyy") - .withEndPointName("pcdpumnz") - .withPort("mwzn") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("biknsorgjhxbld") - .withCenterFrequencyMHz(27.161957f) - .withBandwidthMHz(66.445755f) - .withEndPoint(new EndPoint().withIpAddress("wrlkdmtn") - .withEndPointName("vokotllxdyh") - .withPort("syocogjltdtbnnha") - .withProtocol(Protocol.UDP)))), - new ContactProfileLink().withName("ocrkvcikh") - .withPolarization(Polarization.RHCP) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(16.389334F) - .withEirpdBW(55.93623F) - .withChannels(Arrays.asList(new ContactProfileLinkChannel().withName("qqu") - .withCenterFrequencyMHz(43.360477f) - .withBandwidthMHz(10.328889f) - .withEndPoint(new EndPoint().withIpAddress("kywggxkallatmel") - .withEndPointName("uipiccjzk") - .withPort("ivgvvcna") - .withProtocol(Protocol.UDP)))))), - new ContactProfileInner().withLocation("nyga") - .withTags(mapOf("fatpxllrxcyjmoa", "db")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.UPDATING) - .withMinimumViableContactDuration("fnjhfjxwmszkkfo") - .withMinimumElevationDegrees(56.352932F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.S_BAND) - .withEventHubUri("zi") - .withNetworkConfiguration( - new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("fjawneaivxwczel")) - .withThirdPartyConfigurations( - Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("r") - .withMissionConfiguration("lsfeaenwabfatkld"), - new ContactProfileThirdPartyConfiguration().withProviderName("xbjhwuaanozjosph") - .withMissionConfiguration("oulpjrv"))) - .withLinks( - Arrays - .asList( - new ContactProfileLink().withName("glrvimjwosytxi") - .withPolarization(Polarization.LINEAR_HORIZONTAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(73.11868F) - .withEirpdBW(4.9390373F) - .withChannels( - Arrays.asList(new ContactProfileLinkChannel().withName("qumiek") - .withCenterFrequencyMHz(8.023405f) - .withBandwidthMHz(74.09953f) - .withEndPoint(new EndPoint().withIpAddress("zikhl") - .withEndPointName("fjhdg") - .withPort("gge") - .withProtocol(Protocol.TCP)))))), - new ContactProfileInner().withLocation("ofncckwyfzqwhxxb") - .withTags(mapOf("zfeqztppri", "a")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.DELETING) - .withMinimumViableContactDuration("yc") - .withMinimumElevationDegrees(68.70334F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.X_BAND) - .withEventHubUri("xkgymareqnajxqu") - .withNetworkConfiguration(new ContactProfilesPropertiesNetworkConfiguration() - .withSubnetId("jhkycub")) - .withThirdPartyConfigurations(Arrays - .asList( - new ContactProfileThirdPartyConfiguration().withProviderName("gssofwq") - .withMissionConfiguration("zqalkrmnjijpx"), - new ContactProfileThirdPartyConfiguration().withProviderName("cqqudf") - .withMissionConfiguration("byxbaaabjy"), - new ContactProfileThirdPartyConfiguration().withProviderName("ayffim") - .withMissionConfiguration("zrtuzq"), - new ContactProfileThirdPartyConfiguration().withProviderName("gsexne") - .withMissionConfiguration("fdnw"))) - .withLinks( - Arrays - .asList( - new ContactProfileLink().withName("mewzsyyc") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(89.182625F) - .withEirpdBW(81.26643F) - .withChannels( - Arrays.asList( - new ContactProfileLinkChannel().withName("ud") - .withCenterFrequencyMHz(92.32651f) - .withBandwidthMHz(10.957659f) - .withEndPoint(new EndPoint().withIpAddress("xtrthz") - .withEndPointName("aytdwkqbrq") - .withPort("bpaxhexiilivpdt") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("r") - .withCenterFrequencyMHz(83.604706f) - .withBandwidthMHz(1.2664497f) - .withEndPoint(new EndPoint().withIpAddress("qoaxoruzfgs") - .withEndPointName("uyfxrxxleptramxj") - .withPort("zwl") - .withProtocol(Protocol.UDP)))), - new ContactProfileLink().withName("wxuqlcvydypatdoo") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(52.902954F) - .withEirpdBW(20.04649F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("kooebwnu") - .withCenterFrequencyMHz(25.77629f) - .withBandwidthMHz(54.985764f) - .withEndPoint(new EndPoint().withIpAddress("mmsbvdkcrodtjin") - .withEndPointName("wj") - .withPort("fltkacjv") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("kdlfoa") - .withCenterFrequencyMHz(79.17313f) - .withBandwidthMHz(38.711143f) - .withEndPoint(new EndPoint().withIpAddress("kfpagao") - .withEndPointName("pulpqblylsyxk") - .withPort("jnsjervtiagxsd") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("uem") - .withCenterFrequencyMHz(28.800655f) - .withBandwidthMHz(65.141945f) - .withEndPoint(new EndPoint().withIpAddress("zkfzbeyv") - .withEndPointName("nqicvinvkjjxdxrb") - .withPort("ukzclewyhmlwpaz") - .withProtocol(Protocol.TCP)))))))); - model = BinaryData.fromObject(model).toObject(ContactProfileListResult.class); - Assertions.assertEquals("mwyhr", model.value().get(0).location()); - Assertions.assertEquals("yftaakcpw", model.value().get(0).tags().get("yzvqt")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.SUCCEEDED, - model.value().get(0).provisioningState()); - Assertions.assertEquals("ujmkcjhwqy", model.value().get(0).minimumViableContactDuration()); - Assertions.assertEquals(1.7570734F, model.value().get(0).minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.value().get(0).autoTrackingConfiguration()); - Assertions.assertEquals("wj", model.value().get(0).eventHubUri()); - Assertions.assertEquals("wgdrjervnaenqp", model.value().get(0).networkConfiguration().subnetId()); - Assertions.assertEquals("ndoygmifthnzdnd", - model.value().get(0).thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("l", model.value().get(0).thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("n", model.value().get(0).links().get(0).name()); - Assertions.assertEquals(Polarization.LHCP, model.value().get(0).links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.value().get(0).links().get(0).direction()); - Assertions.assertEquals(55.65765F, model.value().get(0).links().get(0).gainOverTemperature()); - Assertions.assertEquals(81.210945F, model.value().get(0).links().get(0).eirpdBW()); - Assertions.assertEquals("iydmcwyhzdxs", model.value().get(0).links().get(0).channels().get(0).name()); - Assertions.assertEquals(80.603836f, model.value().get(0).links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(20.36894f, model.value().get(0).links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("bzmnvdfznud", - model.value().get(0).links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("od", model.value().get(0).links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("xzb", model.value().get(0).links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, - model.value().get(0).links().get(0).channels().get(0).endPoint().protocol()); - } - - // Use "Map.of" if available - @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/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilePropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilePropertiesTests.java deleted file mode 100644 index 5750ea665abc..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilePropertiesTests.java +++ /dev/null @@ -1,162 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactProfileProperties; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileProperties model = BinaryData.fromString( - "{\"provisioningState\":\"failed\",\"minimumViableContactDuration\":\"qyud\",\"minimumElevationDegrees\":99.38068,\"autoTrackingConfiguration\":\"xBand\",\"eventHubUri\":\"b\",\"networkConfiguration\":{\"subnetId\":\"oczvy\"},\"thirdPartyConfigurations\":[{\"providerName\":\"rvkdvjsllrm\",\"missionConfiguration\":\"vdfwatkpn\"},{\"providerName\":\"ulexxbczwtr\",\"missionConfiguration\":\"wiqzbqjvsovmyo\"}],\"links\":[{\"name\":\"cspkwlhzdobpxjmf\",\"polarization\":\"linearVertical\",\"direction\":\"Downlink\",\"gainOverTemperature\":57.130917,\"eirpdBW\":15.858865,\"channels\":[{\"name\":\"kcciwwzjuqkhr\",\"centerFrequencyMHz\":41.596596,\"bandwidthMHz\":93.71816,\"endPoint\":{\"ipAddress\":\"iwkuofos\",\"endPointName\":\"ghsauuimjmvxied\",\"port\":\"ugidyjrr\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"aos\",\"demodulationConfiguration\":\"xc\",\"encodingConfiguration\":\"npc\",\"decodingConfiguration\":\"ocohslkevleg\"},{\"name\":\"zfbuhf\",\"centerFrequencyMHz\":72.908226,\"bandwidthMHz\":51.234745,\"endPoint\":{\"ipAddress\":\"axkffei\",\"endPointName\":\"th\",\"port\":\"vmezy\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"xmzsbbzogg\",\"demodulationConfiguration\":\"rxwburv\",\"encodingConfiguration\":\"xjnspy\",\"decodingConfiguration\":\"tko\"},{\"name\":\"nkoukn\",\"centerFrequencyMHz\":51.713753,\"bandwidthMHz\":79.01165,\"endPoint\":{\"ipAddress\":\"wtiukbldn\",\"endPointName\":\"kpoc\",\"port\":\"pazyxoegukg\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"iucgygevqzn\",\"demodulationConfiguration\":\"pmr\",\"encodingConfiguration\":\"izcdrqjsd\",\"decodingConfiguration\":\"dnfyhxdeoejzicwi\"}]},{\"name\":\"sjttgzfbish\",\"polarization\":\"RHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":82.81528,\"eirpdBW\":99.54184,\"channels\":[{\"name\":\"yeamdphagalpb\",\"centerFrequencyMHz\":7.554859,\"bandwidthMHz\":52.059467,\"endPoint\":{\"ipAddress\":\"gipwhonowkg\",\"endPointName\":\"hwankixzbinjepu\",\"port\":\"tmryw\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"oqftiyqzrnkcq\",\"demodulationConfiguration\":\"xlwhzlsicoh\",\"encodingConfiguration\":\"qnwvlrya\",\"decodingConfiguration\":\"hheunmmqhgyx\"},{\"name\":\"konocu\",\"centerFrequencyMHz\":69.11444,\"bandwidthMHz\":60.951405,\"endPoint\":{\"ipAddress\":\"lyaxuc\",\"endPointName\":\"nuqszfkbey\",\"port\":\"ewrmjmwvvjektc\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"nhwlrsffrzpwvl\",\"demodulationConfiguration\":\"q\",\"encodingConfiguration\":\"iqylihkaetck\",\"decodingConfiguration\":\"fcivfsnkym\"}]}]}") - .toObject(ContactProfileProperties.class); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals("qyud", model.minimumViableContactDuration()); - Assertions.assertEquals(99.38068F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.X_BAND, model.autoTrackingConfiguration()); - Assertions.assertEquals("b", model.eventHubUri()); - Assertions.assertEquals("oczvy", model.networkConfiguration().subnetId()); - Assertions.assertEquals("rvkdvjsllrm", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("vdfwatkpn", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("cspkwlhzdobpxjmf", model.links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.links().get(0).direction()); - Assertions.assertEquals(57.130917F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(15.858865F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("kcciwwzjuqkhr", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(41.596596f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(93.71816f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("iwkuofos", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("ghsauuimjmvxied", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("ugidyjrr", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("aos", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("xc", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("npc", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("ocohslkevleg", model.links().get(0).channels().get(0).decodingConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileProperties model - = new ContactProfileProperties().withProvisioningState(ContactProfilesPropertiesProvisioningState.FAILED) - .withMinimumViableContactDuration("qyud") - .withMinimumElevationDegrees(99.38068F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.X_BAND) - .withEventHubUri("b") - .withNetworkConfiguration(new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("oczvy")) - .withThirdPartyConfigurations(Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("rvkdvjsllrm") - .withMissionConfiguration("vdfwatkpn"), - new ContactProfileThirdPartyConfiguration().withProviderName("ulexxbczwtr") - .withMissionConfiguration("wiqzbqjvsovmyo"))) - .withLinks(Arrays.asList( - new ContactProfileLink().withName("cspkwlhzdobpxjmf") - .withPolarization(Polarization.LINEAR_VERTICAL) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(57.130917F) - .withEirpdBW(15.858865F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("kcciwwzjuqkhr") - .withCenterFrequencyMHz(41.596596f) - .withBandwidthMHz(93.71816f) - .withEndPoint(new EndPoint().withIpAddress("iwkuofos") - .withEndPointName("ghsauuimjmvxied") - .withPort("ugidyjrr") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("aos") - .withDemodulationConfiguration("xc") - .withEncodingConfiguration("npc") - .withDecodingConfiguration("ocohslkevleg"), - new ContactProfileLinkChannel().withName("zfbuhf") - .withCenterFrequencyMHz(72.908226f) - .withBandwidthMHz(51.234745f) - .withEndPoint(new EndPoint().withIpAddress("axkffei") - .withEndPointName("th") - .withPort("vmezy") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("xmzsbbzogg") - .withDemodulationConfiguration("rxwburv") - .withEncodingConfiguration("xjnspy") - .withDecodingConfiguration("tko"), - new ContactProfileLinkChannel().withName("nkoukn") - .withCenterFrequencyMHz(51.713753f) - .withBandwidthMHz(79.01165f) - .withEndPoint(new EndPoint().withIpAddress("wtiukbldn") - .withEndPointName("kpoc") - .withPort("pazyxoegukg") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("iucgygevqzn") - .withDemodulationConfiguration("pmr") - .withEncodingConfiguration("izcdrqjsd") - .withDecodingConfiguration("dnfyhxdeoejzicwi"))), - new ContactProfileLink().withName("sjttgzfbish") - .withPolarization(Polarization.RHCP) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(82.81528F) - .withEirpdBW(99.54184F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("yeamdphagalpb") - .withCenterFrequencyMHz(7.554859f) - .withBandwidthMHz(52.059467f) - .withEndPoint(new EndPoint().withIpAddress("gipwhonowkg") - .withEndPointName("hwankixzbinjepu") - .withPort("tmryw") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("oqftiyqzrnkcq") - .withDemodulationConfiguration("xlwhzlsicoh") - .withEncodingConfiguration("qnwvlrya") - .withDecodingConfiguration("hheunmmqhgyx"), - new ContactProfileLinkChannel().withName("konocu") - .withCenterFrequencyMHz(69.11444f) - .withBandwidthMHz(60.951405f) - .withEndPoint(new EndPoint().withIpAddress("lyaxuc") - .withEndPointName("nuqszfkbey") - .withPort("ewrmjmwvvjektc") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("nhwlrsffrzpwvl") - .withDemodulationConfiguration("q") - .withEncodingConfiguration("iqylihkaetck") - .withDecodingConfiguration("fcivfsnkym"))))); - model = BinaryData.fromObject(model).toObject(ContactProfileProperties.class); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals("qyud", model.minimumViableContactDuration()); - Assertions.assertEquals(99.38068F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.X_BAND, model.autoTrackingConfiguration()); - Assertions.assertEquals("b", model.eventHubUri()); - Assertions.assertEquals("oczvy", model.networkConfiguration().subnetId()); - Assertions.assertEquals("rvkdvjsllrm", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("vdfwatkpn", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("cspkwlhzdobpxjmf", model.links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.links().get(0).direction()); - Assertions.assertEquals(57.130917F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(15.858865F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("kcciwwzjuqkhr", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(41.596596f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(93.71816f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("iwkuofos", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("ghsauuimjmvxied", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("ugidyjrr", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("aos", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("xc", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("npc", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("ocohslkevleg", model.links().get(0).channels().get(0).decodingConfiguration()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileThirdPartyConfigurationTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileThirdPartyConfigurationTests.java deleted file mode 100644 index 9c33652e9244..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfileThirdPartyConfigurationTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfileThirdPartyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfileThirdPartyConfiguration model - = BinaryData.fromString("{\"providerName\":\"oellwp\",\"missionConfiguration\":\"fdygpfqbuaceopz\"}") - .toObject(ContactProfileThirdPartyConfiguration.class); - Assertions.assertEquals("oellwp", model.providerName()); - Assertions.assertEquals("fdygpfqbuaceopz", model.missionConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfileThirdPartyConfiguration model - = new ContactProfileThirdPartyConfiguration().withProviderName("oellwp") - .withMissionConfiguration("fdygpfqbuaceopz"); - model = BinaryData.fromObject(model).toObject(ContactProfileThirdPartyConfiguration.class); - Assertions.assertEquals("oellwp", model.providerName()); - Assertions.assertEquals("fdygpfqbuaceopz", model.missionConfiguration()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesCreateOrUpdateMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesCreateOrUpdateMockTests.java deleted file mode 100644 index 45987392b75a..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,167 +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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfile; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactProfilesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"minimumViableContactDuration\":\"hjxa\",\"minimumElevationDegrees\":30.664253,\"autoTrackingConfiguration\":\"xBand\",\"eventHubUri\":\"lordilmywwtkgkxn\",\"networkConfiguration\":{\"subnetId\":\"edabgyvudtjue\"},\"thirdPartyConfigurations\":[{\"providerName\":\"ihxuuwh\",\"missionConfiguration\":\"j\"},{\"providerName\":\"xccybvpa\",\"missionConfiguration\":\"akkud\"},{\"providerName\":\"px\",\"missionConfiguration\":\"wjplma\"}],\"links\":[{\"name\":\"tcyohpfkyrk\",\"polarization\":\"linearVertical\",\"direction\":\"Uplink\",\"gainOverTemperature\":56.479233,\"eirpdBW\":15.116018,\"channels\":[{\"name\":\"jkmnwq\",\"centerFrequencyMHz\":94.966415,\"bandwidthMHz\":87.046394,\"endPoint\":{\"ipAddress\":\"baiyhddviaceg\",\"endPointName\":\"n\",\"port\":\"ntfpmvmemfnc\",\"protocol\":\"TCP\"}},{\"name\":\"wvvb\",\"centerFrequencyMHz\":53.000874,\"bandwidthMHz\":38.038097,\"endPoint\":{\"ipAddress\":\"lllchpodb\",\"endPointName\":\"evwrdnhfuk\",\"port\":\"vsjcswsmystuluqy\",\"protocol\":\"TCP\"}}]},{\"name\":\"cvlerchpqbmfpjba\",\"polarization\":\"RHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":78.01136,\"eirpdBW\":75.51508,\"channels\":[{\"name\":\"spuunnoxyhkxgq\",\"centerFrequencyMHz\":99.49231,\"bandwidthMHz\":48.135914,\"endPoint\":{\"ipAddress\":\"i\",\"endPointName\":\"pfhoqcaaewdao\",\"port\":\"djvlpj\",\"protocol\":\"TCP\"}},{\"name\":\"kzbrmsgeivsiy\",\"centerFrequencyMHz\":27.006971,\"bandwidthMHz\":30.264484,\"endPoint\":{\"ipAddress\":\"dncj\",\"endPointName\":\"xonbzoggculapz\",\"port\":\"y\",\"protocol\":\"UDP\"}},{\"name\":\"gogtqxepnylbf\",\"centerFrequencyMHz\":82.768166,\"bandwidthMHz\":58.09601,\"endPoint\":{\"ipAddress\":\"lyjt\",\"endPointName\":\"vofqzhvfc\",\"port\":\"byfmowuxr\",\"protocol\":\"TCP\"}},{\"name\":\"pvdwxf\",\"centerFrequencyMHz\":77.284424,\"bandwidthMHz\":99.00972,\"endPoint\":{\"ipAddress\":\"ivwzjbhyzs\",\"endPointName\":\"jrkambtrnegvmnv\",\"port\":\"q\",\"protocol\":\"UDP\"}}]},{\"name\":\"vldspa\",\"polarization\":\"RHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":34.49968,\"eirpdBW\":25.554615,\"channels\":[{\"name\":\"flvestmjlxrrilo\",\"centerFrequencyMHz\":74.649536,\"bandwidthMHz\":65.04678,\"endPoint\":{\"ipAddress\":\"eewchpxlktw\",\"endPointName\":\"uziycsl\",\"port\":\"vu\",\"protocol\":\"UDP\"}},{\"name\":\"ztcktyh\",\"centerFrequencyMHz\":66.69776,\"bandwidthMHz\":59.33001,\"endPoint\":{\"ipAddress\":\"edcg\",\"endPointName\":\"ulwm\",\"port\":\"rqzz\",\"protocol\":\"UDP\"}}]},{\"name\":\"jvpglydzgk\",\"polarization\":\"linearVertical\",\"direction\":\"Uplink\",\"gainOverTemperature\":8.784514,\"eirpdBW\":38.789143,\"channels\":[{\"name\":\"epr\",\"centerFrequencyMHz\":89.64401,\"bandwidthMHz\":2.533424,\"endPoint\":{\"ipAddress\":\"nwy\",\"endPointName\":\"pzdm\",\"port\":\"vzvfvaawzqadfl\",\"protocol\":\"TCP\"}},{\"name\":\"ur\",\"centerFrequencyMHz\":24.852264,\"bandwidthMHz\":73.55753,\"endPoint\":{\"ipAddress\":\"aecxndtic\",\"endPointName\":\"kpvzmlq\",\"port\":\"mldgxobfirc\",\"protocol\":\"TCP\"}}]}]},\"location\":\"kciayzri\",\"tags\":{\"kjlmx\":\"yawfvjlboxq\"},\"id\":\"omdynhdwdigum\",\"name\":\"nraauzz\",\"type\":\"tj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContactProfile response = manager.contactProfiles() - .define("sutujba") - .withRegion("fvazivjlfrqttba") - .withExistingResourceGroup("enr") - .withNetworkConfiguration(new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("wpklvxw")) - .withLinks(Arrays.asList( - new ContactProfileLink().withName("uuepzlrphwzsoldw") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(99.18592F) - .withEirpdBW(87.928825F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("mnnrwr") - .withCenterFrequencyMHz(1.8541336f) - .withBandwidthMHz(17.158354f) - .withEndPoint(new EndPoint().withIpAddress("rk") - .withEndPointName("alywjhhgdn") - .withPort("xmsivfomiloxggdu") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("q") - .withCenterFrequencyMHz(53.11064f) - .withBandwidthMHz(88.44245f) - .withEndPoint(new EndPoint().withIpAddress("euzaof") - .withEndPointName("chvcyyysfgdo") - .withPort("cubiipuipw") - .withProtocol(Protocol.TCP)))), - new ContactProfileLink().withName("onmacjekniz") - .withPolarization(Polarization.LINEAR_HORIZONTAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(48.20631F) - .withEirpdBW(2.8592408F) - .withChannels(Arrays.asList(new ContactProfileLinkChannel().withName("ev") - .withCenterFrequencyMHz(40.36637f) - .withBandwidthMHz(66.675064f) - .withEndPoint(new EndPoint().withIpAddress("b") - .withEndPointName("rrilbywdxsmic") - .withPort("wrwfscjfnyns") - .withProtocol(Protocol.TCP)))), - new ContactProfileLink().withName("ujiz") - .withPolarization(Polarization.LHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(41.774715F) - .withEirpdBW(88.05086F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("yo") - .withCenterFrequencyMHz(53.959526f) - .withBandwidthMHz(69.872574f) - .withEndPoint(new EndPoint().withIpAddress("lgy") - .withEndPointName("vutpthjoxo") - .withPort("smsks") - .withProtocol(Protocol.TCP)), - new ContactProfileLinkChannel().withName("iml") - .withCenterFrequencyMHz(48.246895f) - .withBandwidthMHz(57.293236f) - .withEndPoint(new EndPoint().withIpAddress("jxkcgxxlxsff") - .withEndPointName("cvizqzdwlvw") - .withPort("youpfgfbkj") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("dyhgkfminsg") - .withCenterFrequencyMHz(17.695457f) - .withBandwidthMHz(79.628006f) - .withEndPoint(new EndPoint().withIpAddress("fttsttk") - .withEndPointName("lahb") - .withPort("actxtgzukxitm") - .withProtocol(Protocol.UDP)), - new ContactProfileLinkChannel().withName("tg") - .withCenterFrequencyMHz(74.6131f) - .withBandwidthMHz(5.9823155f) - .withEndPoint(new EndPoint().withIpAddress("x") - .withEndPointName("rnxrxcpj") - .withPort("isavok") - .withProtocol(Protocol.TCP)))))) - .withTags(mapOf("kqqfk", "atnwxyiopi", "dmligovibrxk", "vscx")) - .withProvisioningState(ContactProfilesPropertiesProvisioningState.CANCELED) - .withMinimumViableContactDuration("o") - .withMinimumElevationDegrees(90.69441F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.DISABLED) - .withEventHubUri("lnorwmdu") - .withThirdPartyConfigurations(Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("dxpgpqchiszepnnb") - .withMissionConfiguration("crxgibb"), - new ContactProfileThirdPartyConfiguration().withProviderName("axconfozauo") - .withMissionConfiguration("sukokwbqplhl"))) - .create(); - - Assertions.assertEquals("kciayzri", response.location()); - Assertions.assertEquals("yawfvjlboxq", response.tags().get("kjlmx")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.fromString("Succeeded"), - response.provisioningState()); - Assertions.assertEquals("hjxa", response.minimumViableContactDuration()); - Assertions.assertEquals(30.664253F, response.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.X_BAND, response.autoTrackingConfiguration()); - Assertions.assertEquals("lordilmywwtkgkxn", response.eventHubUri()); - Assertions.assertEquals("edabgyvudtjue", response.networkConfiguration().subnetId()); - Assertions.assertEquals("ihxuuwh", response.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("j", response.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("tcyohpfkyrk", response.links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, response.links().get(0).polarization()); - Assertions.assertEquals(Direction.UPLINK, response.links().get(0).direction()); - Assertions.assertEquals(56.479233F, response.links().get(0).gainOverTemperature()); - Assertions.assertEquals(15.116018F, response.links().get(0).eirpdBW()); - Assertions.assertEquals("jkmnwq", response.links().get(0).channels().get(0).name()); - Assertions.assertEquals(94.966415f, response.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(87.046394f, response.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("baiyhddviaceg", response.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("n", response.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("ntfpmvmemfnc", response.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, response.links().get(0).channels().get(0).endPoint().protocol()); - } - - // Use "Map.of" if available - @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/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesDeleteMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesDeleteMockTests.java deleted file mode 100644 index a3c8a1073f72..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesDeleteMockTests.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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactProfilesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.contactProfiles().delete("hhavgrvkffovjz", "pjbi", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesGetByResourceGroupWithResponseMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 296ac3192d85..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesGetByResourceGroupWithResponseMockTests.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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfile; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactProfilesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"canceled\",\"minimumViableContactDuration\":\"zlmvfelfktgp\",\"minimumElevationDegrees\":12.967777,\"autoTrackingConfiguration\":\"xBand\",\"eventHubUri\":\"xeznoi\",\"networkConfiguration\":{\"subnetId\":\"brnjwmw\"},\"thirdPartyConfigurations\":[{\"providerName\":\"bsazejjoqka\",\"missionConfiguration\":\"fhsxttaugz\"},{\"providerName\":\"nfaazpxdtnkdmkq\",\"missionConfiguration\":\"jlwuenvrkp\"},{\"providerName\":\"ou\",\"missionConfiguration\":\"ibreb\"},{\"providerName\":\"aays\",\"missionConfiguration\":\"kixqtnqtt\"}],\"links\":[{\"name\":\"lwfffi\",\"polarization\":\"RHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":43.313293,\"eirpdBW\":15.329981,\"channels\":[{\"name\":\"tedltmmj\",\"centerFrequencyMHz\":65.3647,\"bandwidthMHz\":90.87137,\"endPoint\":{\"ipAddress\":\"eozphv\",\"endPointName\":\"auyqncygupkv\",\"port\":\"p\",\"protocol\":\"UDP\"}}]},{\"name\":\"scw\",\"polarization\":\"LHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":46.54088,\"eirpdBW\":38.69921,\"channels\":[{\"name\":\"f\",\"centerFrequencyMHz\":60.127544,\"bandwidthMHz\":56.80255,\"endPoint\":{\"ipAddress\":\"txhojujb\",\"endPointName\":\"pelmcuvhixbjxyf\",\"port\":\"n\",\"protocol\":\"UDP\"}},{\"name\":\"r\",\"centerFrequencyMHz\":16.996414,\"bandwidthMHz\":4.770917,\"endPoint\":{\"ipAddress\":\"lsttpkiwkkbnuj\",\"endPointName\":\"ywvtylbfpnc\",\"port\":\"rd\",\"protocol\":\"TCP\"}},{\"name\":\"wiithtywub\",\"centerFrequencyMHz\":41.84369,\"bandwidthMHz\":66.52449,\"endPoint\":{\"ipAddress\":\"ihwqknfdntwjchr\",\"endPointName\":\"goihx\",\"port\":\"mwctondzjluudfd\",\"protocol\":\"UDP\"}},{\"name\":\"gg\",\"centerFrequencyMHz\":72.12507,\"bandwidthMHz\":9.48934,\"endPoint\":{\"ipAddress\":\"bwtovvtgseinqf\",\"endPointName\":\"ufxqknpirgnepttw\",\"port\":\"msniffc\",\"protocol\":\"UDP\"}}]},{\"name\":\"qnrojlpijnkrxfrd\",\"polarization\":\"LHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":24.058205,\"eirpdBW\":98.63852,\"channels\":[{\"name\":\"zronasxift\",\"centerFrequencyMHz\":8.172721,\"bandwidthMHz\":28.090256,\"endPoint\":{\"ipAddress\":\"yzhftwesgogczh\",\"endPointName\":\"nnxk\",\"port\":\"lgnyhmo\",\"protocol\":\"TCP\"}},{\"name\":\"xkk\",\"centerFrequencyMHz\":35.89206,\"bandwidthMHz\":4.131174,\"endPoint\":{\"ipAddress\":\"rrghxjbdhqxvcxgf\",\"endPointName\":\"pdso\",\"port\":\"bshrnsvbuswd\",\"protocol\":\"TCP\"}}]}]},\"location\":\"ybycnunvj\",\"tags\":{\"rtxdyuxzejnt\":\"kfawnopqgikyz\"},\"id\":\"sewgioilqukr\",\"name\":\"dxtqmieoxo\",\"type\":\"ggufhyaomtb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContactProfile response = manager.contactProfiles() - .getByResourceGroupWithResponse("afxtsgum", "jglikkxwslolb", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ybycnunvj", response.location()); - Assertions.assertEquals("kfawnopqgikyz", response.tags().get("rtxdyuxzejnt")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.CANCELED, response.provisioningState()); - Assertions.assertEquals("zlmvfelfktgp", response.minimumViableContactDuration()); - Assertions.assertEquals(12.967777F, response.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.X_BAND, response.autoTrackingConfiguration()); - Assertions.assertEquals("xeznoi", response.eventHubUri()); - Assertions.assertEquals("brnjwmw", response.networkConfiguration().subnetId()); - Assertions.assertEquals("bsazejjoqka", response.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("fhsxttaugz", response.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("lwfffi", response.links().get(0).name()); - Assertions.assertEquals(Polarization.RHCP, response.links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, response.links().get(0).direction()); - Assertions.assertEquals(43.313293F, response.links().get(0).gainOverTemperature()); - Assertions.assertEquals(15.329981F, response.links().get(0).eirpdBW()); - Assertions.assertEquals("tedltmmj", response.links().get(0).channels().get(0).name()); - Assertions.assertEquals(65.3647f, response.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(90.87137f, response.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("eozphv", response.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("auyqncygupkv", response.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("p", response.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, response.links().get(0).channels().get(0).endPoint().protocol()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListByResourceGroupMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListByResourceGroupMockTests.java deleted file mode 100644 index 1d605db80e9c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListByResourceGroupMockTests.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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfile; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactProfilesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"canceled\",\"minimumViableContactDuration\":\"mwks\",\"minimumElevationDegrees\":50.755978,\"autoTrackingConfiguration\":\"sBand\",\"eventHubUri\":\"jxv\",\"networkConfiguration\":{\"subnetId\":\"dfcea\"},\"thirdPartyConfigurations\":[{\"providerName\":\"hvygdyftumr\",\"missionConfiguration\":\"wnawjslbiw\"},{\"providerName\":\"ojgcyzt\",\"missionConfiguration\":\"fmznba\"},{\"providerName\":\"qphchqnrnrpxehuw\",\"missionConfiguration\":\"ykqgaifmvik\"}],\"links\":[{\"name\":\"ydv\",\"polarization\":\"linearHorizontal\",\"direction\":\"Downlink\",\"gainOverTemperature\":16.89176,\"eirpdBW\":37.95228,\"channels\":[{\"name\":\"xcv\",\"centerFrequencyMHz\":47.618546,\"bandwidthMHz\":21.644152,\"endPoint\":{\"ipAddress\":\"hnjivo\",\"endPointName\":\"v\",\"port\":\"novqfzge\",\"protocol\":\"UDP\"}},{\"name\":\"dftuljltduce\",\"centerFrequencyMHz\":50.251114,\"bandwidthMHz\":91.42662,\"endPoint\":{\"ipAddress\":\"mczuo\",\"endPointName\":\"ejwcwwqiok\",\"port\":\"ssxmojms\",\"protocol\":\"TCP\"}}]},{\"name\":\"kjprvk\",\"polarization\":\"RHCP\",\"direction\":\"Uplink\",\"gainOverTemperature\":8.026451,\"eirpdBW\":44.8669,\"channels\":[{\"name\":\"x\",\"centerFrequencyMHz\":91.69459,\"bandwidthMHz\":34.803844,\"endPoint\":{\"ipAddress\":\"zheydbsdshmk\",\"endPointName\":\"maehvbbxurip\",\"port\":\"tfnhtbaxkgxywr\",\"protocol\":\"TCP\"}},{\"name\":\"pyklyhpluodpvru\",\"centerFrequencyMHz\":87.415924,\"bandwidthMHz\":23.560375,\"endPoint\":{\"ipAddress\":\"gzibthostgktstv\",\"endPointName\":\"xeclzedqbcvhzlhp\",\"port\":\"odqkdlwwqfb\",\"protocol\":\"UDP\"}}]},{\"name\":\"lkxt\",\"polarization\":\"linearVertical\",\"direction\":\"Downlink\",\"gainOverTemperature\":98.33682,\"eirpdBW\":79.85167,\"channels\":[{\"name\":\"btx\",\"centerFrequencyMHz\":0.37645698,\"bandwidthMHz\":47.412045,\"endPoint\":{\"ipAddress\":\"fwsrtawcoezbrhu\",\"endPointName\":\"skh\",\"port\":\"dyg\",\"protocol\":\"TCP\"}},{\"name\":\"okkqfqjbvleo\",\"centerFrequencyMHz\":90.28293,\"bandwidthMHz\":10.981679,\"endPoint\":{\"ipAddress\":\"luiqtqzfavyvnqq\",\"endPointName\":\"bar\",\"port\":\"euayjkqabqgzsles\",\"protocol\":\"UDP\"}}]}]},\"location\":\"hernntiewdjc\",\"tags\":{\"uffkmrqemvvh\":\"uwrbehwagoh\",\"futacoebjvewzc\":\"xtdr\",\"guaadraufactkahz\":\"znmwcp\"},\"id\":\"v\",\"name\":\"jjziuxxpsh\",\"type\":\"eekulfgslqubkwd\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.contactProfiles().listByResourceGroup("qg", "zpnfqntcypsxj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hernntiewdjc", response.iterator().next().location()); - Assertions.assertEquals("uwrbehwagoh", response.iterator().next().tags().get("uffkmrqemvvh")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.CANCELED, - response.iterator().next().provisioningState()); - Assertions.assertEquals("mwks", response.iterator().next().minimumViableContactDuration()); - Assertions.assertEquals(50.755978F, response.iterator().next().minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.S_BAND, - response.iterator().next().autoTrackingConfiguration()); - Assertions.assertEquals("jxv", response.iterator().next().eventHubUri()); - Assertions.assertEquals("dfcea", response.iterator().next().networkConfiguration().subnetId()); - Assertions.assertEquals("hvygdyftumr", - response.iterator().next().thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("wnawjslbiw", - response.iterator().next().thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("ydv", response.iterator().next().links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_HORIZONTAL, - response.iterator().next().links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, response.iterator().next().links().get(0).direction()); - Assertions.assertEquals(16.89176F, response.iterator().next().links().get(0).gainOverTemperature()); - Assertions.assertEquals(37.95228F, response.iterator().next().links().get(0).eirpdBW()); - Assertions.assertEquals("xcv", response.iterator().next().links().get(0).channels().get(0).name()); - Assertions.assertEquals(47.618546f, - response.iterator().next().links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(21.644152f, response.iterator().next().links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("hnjivo", - response.iterator().next().links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("v", - response.iterator().next().links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("novqfzge", - response.iterator().next().links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.UDP, - response.iterator().next().links().get(0).channels().get(0).endPoint().protocol()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListMockTests.java deleted file mode 100644 index 2aa2ce12a925..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesListMockTests.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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfile; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactProfilesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"creating\",\"minimumViableContactDuration\":\"wxnb\",\"minimumElevationDegrees\":97.90466,\"autoTrackingConfiguration\":\"xBand\",\"eventHubUri\":\"scyhwz\",\"networkConfiguration\":{\"subnetId\":\"g\"},\"thirdPartyConfigurations\":[{\"providerName\":\"jbzbomvzzbtdcq\",\"missionConfiguration\":\"pniyujviyl\"}],\"links\":[{\"name\":\"shfssnrbgyef\",\"polarization\":\"linearVertical\",\"direction\":\"Uplink\",\"gainOverTemperature\":28.691996,\"eirpdBW\":47.278046,\"channels\":[{\"name\":\"fmwncotmrfh\",\"centerFrequencyMHz\":26.720215,\"bandwidthMHz\":60.592484,\"endPoint\":{\"ipAddress\":\"tymoxoftp\",\"endPointName\":\"piwyczuhxacpqjl\",\"port\":\"h\",\"protocol\":\"TCP\"}}]}]},\"location\":\"spskasdvlmfwdgz\",\"tags\":{\"euzvx\":\"ucvpamrs\",\"xmrhu\":\"risjnhnytxifqjz\"},\"id\":\"lw\",\"name\":\"cesutrgjupauut\",\"type\":\"woqhihe\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.contactProfiles().list("gjmfxumvfcl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("spskasdvlmfwdgz", response.iterator().next().location()); - Assertions.assertEquals("ucvpamrs", response.iterator().next().tags().get("euzvx")); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.CREATING, - response.iterator().next().provisioningState()); - Assertions.assertEquals("wxnb", response.iterator().next().minimumViableContactDuration()); - Assertions.assertEquals(97.90466F, response.iterator().next().minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.X_BAND, - response.iterator().next().autoTrackingConfiguration()); - Assertions.assertEquals("scyhwz", response.iterator().next().eventHubUri()); - Assertions.assertEquals("g", response.iterator().next().networkConfiguration().subnetId()); - Assertions.assertEquals("jbzbomvzzbtdcq", - response.iterator().next().thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("pniyujviyl", - response.iterator().next().thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("shfssnrbgyef", response.iterator().next().links().get(0).name()); - Assertions.assertEquals(Polarization.LINEAR_VERTICAL, response.iterator().next().links().get(0).polarization()); - Assertions.assertEquals(Direction.UPLINK, response.iterator().next().links().get(0).direction()); - Assertions.assertEquals(28.691996F, response.iterator().next().links().get(0).gainOverTemperature()); - Assertions.assertEquals(47.278046F, response.iterator().next().links().get(0).eirpdBW()); - Assertions.assertEquals("fmwncotmrfh", response.iterator().next().links().get(0).channels().get(0).name()); - Assertions.assertEquals(26.720215f, - response.iterator().next().links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(60.592484f, response.iterator().next().links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("tymoxoftp", - response.iterator().next().links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("piwyczuhxacpqjl", - response.iterator().next().links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("h", response.iterator().next().links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, - response.iterator().next().links().get(0).channels().get(0).endPoint().protocol()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesNetworkConfigurationTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesNetworkConfigurationTests.java deleted file mode 100644 index df3587bee385..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesNetworkConfigurationTests.java +++ /dev/null @@ -1,26 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfilesPropertiesNetworkConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfilesPropertiesNetworkConfiguration model = BinaryData.fromString("{\"subnetId\":\"t\"}") - .toObject(ContactProfilesPropertiesNetworkConfiguration.class); - Assertions.assertEquals("t", model.subnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfilesPropertiesNetworkConfiguration model - = new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("t"); - model = BinaryData.fromObject(model).toObject(ContactProfilesPropertiesNetworkConfiguration.class); - Assertions.assertEquals("t", model.subnetId()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesTests.java deleted file mode 100644 index 908ed5e036f0..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactProfilesPropertiesTests.java +++ /dev/null @@ -1,287 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.AutoTrackingConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfileLink; -import com.azure.resourcemanager.orbital.models.ContactProfileLinkChannel; -import com.azure.resourcemanager.orbital.models.ContactProfileThirdPartyConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesProperties; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesNetworkConfiguration; -import com.azure.resourcemanager.orbital.models.ContactProfilesPropertiesProvisioningState; -import com.azure.resourcemanager.orbital.models.Direction; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Polarization; -import com.azure.resourcemanager.orbital.models.Protocol; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactProfilesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactProfilesProperties model = BinaryData.fromString( - "{\"provisioningState\":\"updating\",\"minimumViableContactDuration\":\"hjfbebrjcxe\",\"minimumElevationDegrees\":76.10287,\"autoTrackingConfiguration\":\"disabled\",\"eventHubUri\":\"ttxfvjr\",\"networkConfiguration\":{\"subnetId\":\"i\"},\"thirdPartyConfigurations\":[{\"providerName\":\"xepcyvahfn\",\"missionConfiguration\":\"jky\"},{\"providerName\":\"xjvuujqgidokg\",\"missionConfiguration\":\"ljyoxgvcltb\"},{\"providerName\":\"sncghkjeszz\",\"missionConfiguration\":\"bijhtxfvgxbf\"},{\"providerName\":\"mxnehmp\",\"missionConfiguration\":\"ec\"}],\"links\":[{\"name\":\"odebfqkkrbmpu\",\"polarization\":\"RHCP\",\"direction\":\"Downlink\",\"gainOverTemperature\":78.73024,\"eirpdBW\":59.0843,\"channels\":[{\"name\":\"lfbxzpuzycisp\",\"centerFrequencyMHz\":57.357258,\"bandwidthMHz\":99.49339,\"endPoint\":{\"ipAddress\":\"ahmgkbrp\",\"endPointName\":\"y\",\"port\":\"hibnuqqkpika\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"vtq\",\"demodulationConfiguration\":\"n\",\"encodingConfiguration\":\"ynhijggme\",\"decodingConfiguration\":\"siarbutrcvpn\"},{\"name\":\"zzmhjrunmpxttd\",\"centerFrequencyMHz\":94.22552,\"bandwidthMHz\":81.04825,\"endPoint\":{\"ipAddress\":\"bnlankxmyskpb\",\"endPointName\":\"enbtkcxywny\",\"port\":\"nrs\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"qidybyx\",\"demodulationConfiguration\":\"fclhaaxdbabphlwr\",\"encodingConfiguration\":\"fkts\",\"decodingConfiguration\":\"sucocmnyyazttbtw\"},{\"name\":\"rq\",\"centerFrequencyMHz\":28.554081,\"bandwidthMHz\":92.70088,\"endPoint\":{\"ipAddress\":\"dckzywbiexz\",\"endPointName\":\"eyueaxibxujwb\",\"port\":\"qwalmuzyoxaepd\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"ancuxrhd\",\"demodulationConfiguration\":\"avxbniwdjswztsdb\",\"encodingConfiguration\":\"nxytxh\",\"decodingConfiguration\":\"xbzpfzab\"},{\"name\":\"lcuhxwtctyqiklb\",\"centerFrequencyMHz\":28.630316,\"bandwidthMHz\":48.373898,\"endPoint\":{\"ipAddress\":\"plwzbhvgyugu\",\"endPointName\":\"svmkfssxquk\",\"port\":\"fpl\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"sxnkjzkdeslpvlo\",\"demodulationConfiguration\":\"i\",\"encodingConfiguration\":\"ghxpkdw\",\"decodingConfiguration\":\"aiuebbaumnyqu\"}]},{\"name\":\"edeojnabc\",\"polarization\":\"linearHorizontal\",\"direction\":\"Downlink\",\"gainOverTemperature\":14.241242,\"eirpdBW\":74.35146,\"channels\":[{\"name\":\"ie\",\"centerFrequencyMHz\":96.578255,\"bandwidthMHz\":51.74012,\"endPoint\":{\"ipAddress\":\"hvpesapskrdqm\",\"endPointName\":\"jjdhtld\",\"port\":\"kyzxuutk\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"scwsv\",\"demodulationConfiguration\":\"otogtwrupqs\",\"encodingConfiguration\":\"nmic\",\"decodingConfiguration\":\"vce\"},{\"name\":\"vei\",\"centerFrequencyMHz\":97.97487,\"bandwidthMHz\":65.040726,\"endPoint\":{\"ipAddress\":\"notyfjfcnjbkcn\",\"endPointName\":\"dhbt\",\"port\":\"kphywpnvjto\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"rmclfplphoxu\",\"demodulationConfiguration\":\"rpabg\",\"encodingConfiguration\":\"psbjta\",\"decodingConfiguration\":\"ugxywpmueef\"},{\"name\":\"zwfqkqujidsuyon\",\"centerFrequencyMHz\":73.08737,\"bandwidthMHz\":31.692337,\"endPoint\":{\"ipAddress\":\"laocqxtccmg\",\"endPointName\":\"udxytlmoyrx\",\"port\":\"wfudwpzntxhdzhl\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"bh\",\"demodulationConfiguration\":\"frlh\",\"encodingConfiguration\":\"sbkyvpycanuzbp\",\"decodingConfiguration\":\"afkuwb\"},{\"name\":\"rnwb\",\"centerFrequencyMHz\":79.5002,\"bandwidthMHz\":35.90838,\"endPoint\":{\"ipAddress\":\"hseyvju\",\"endPointName\":\"rts\",\"port\":\"hspkdeemao\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"ag\",\"demodulationConfiguration\":\"t\",\"encodingConfiguration\":\"lmqkrhahvlj\",\"decodingConfiguration\":\"haquhcdh\"}]},{\"name\":\"duala\",\"polarization\":\"linearVertical\",\"direction\":\"Uplink\",\"gainOverTemperature\":42.13096,\"eirpdBW\":18.452417,\"channels\":[{\"name\":\"mwsrcrgvxpvgo\",\"centerFrequencyMHz\":89.06268,\"bandwidthMHz\":8.818239,\"endPoint\":{\"ipAddress\":\"fmisg\",\"endPointName\":\"bnbbeldawkz\",\"port\":\"ali\",\"protocol\":\"TCP\"},\"modulationConfiguration\":\"qhakauhashsf\",\"demodulationConfiguration\":\"osow\",\"encodingConfiguration\":\"cugicjoox\",\"decodingConfiguration\":\"ebwpucwwfvo\"},{\"name\":\"bvmeuecivy\",\"centerFrequencyMHz\":56.92287,\"bandwidthMHz\":8.0055895,\"endPoint\":{\"ipAddress\":\"euojgjrwju\",\"endPointName\":\"iotwmcdytdxwit\",\"port\":\"nrjawgqwg\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"isk\",\"demodulationConfiguration\":\"bkpyc\",\"encodingConfiguration\":\"lwn\",\"decodingConfiguration\":\"hjdauwhvylwz\"},{\"name\":\"tdhxujznbmpowuwp\",\"centerFrequencyMHz\":92.36481,\"bandwidthMHz\":76.77147,\"endPoint\":{\"ipAddress\":\"lve\",\"endPointName\":\"alupjm\",\"port\":\"hfxobbcswsrtj\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"lrbpbewtghfgbl\",\"demodulationConfiguration\":\"wxzvlvqhjkb\",\"encodingConfiguration\":\"ibtnmxiebwwaloay\",\"decodingConfiguration\":\"gwrtzju\"},{\"name\":\"gwyzm\",\"centerFrequencyMHz\":22.303885,\"bandwidthMHz\":95.666405,\"endPoint\":{\"ipAddress\":\"ongmtsa\",\"endPointName\":\"jcbpwxqpsrknft\",\"port\":\"uvriuhprwm\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"xqtayriwwro\",\"demodulationConfiguration\":\"bexrmcq\",\"encodingConfiguration\":\"ycnojvknmefqsg\",\"decodingConfiguration\":\"ah\"}]},{\"name\":\"pjyzhpv\",\"polarization\":\"linearVertical\",\"direction\":\"Downlink\",\"gainOverTemperature\":3.2978177,\"eirpdBW\":87.9586,\"channels\":[{\"name\":\"djzlmwlx\",\"centerFrequencyMHz\":12.278867,\"bandwidthMHz\":9.6262455,\"endPoint\":{\"ipAddress\":\"gfhzovawjvzunlut\",\"endPointName\":\"nnprn\",\"port\":\"i\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"lpjzuaejxdu\",\"demodulationConfiguration\":\"skzbb\",\"encodingConfiguration\":\"zumveekgpwo\",\"decodingConfiguration\":\"hkfpbs\"},{\"name\":\"yofd\",\"centerFrequencyMHz\":13.230478,\"bandwidthMHz\":62.09696,\"endPoint\":{\"ipAddress\":\"us\",\"endPointName\":\"ttouwaboekqvkel\",\"port\":\"smv\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"yjsflhhcaalnji\",\"demodulationConfiguration\":\"sxyawjoyaqcs\",\"encodingConfiguration\":\"jpkiidzyexznelix\",\"decodingConfiguration\":\"rzt\"},{\"name\":\"o\",\"centerFrequencyMHz\":10.115522,\"bandwidthMHz\":77.96445,\"endPoint\":{\"ipAddress\":\"nxknalaulp\",\"endPointName\":\"ggdtpnapnyiro\",\"port\":\"uhpigvp\",\"protocol\":\"UDP\"},\"modulationConfiguration\":\"gqgitxmedjvcsl\",\"demodulationConfiguration\":\"qwwncw\",\"encodingConfiguration\":\"hxg\",\"decodingConfiguration\":\"rmgucnap\"}]}]}") - .toObject(ContactProfilesProperties.class); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.UPDATING, model.provisioningState()); - Assertions.assertEquals("hjfbebrjcxe", model.minimumViableContactDuration()); - Assertions.assertEquals(76.10287F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.autoTrackingConfiguration()); - Assertions.assertEquals("ttxfvjr", model.eventHubUri()); - Assertions.assertEquals("i", model.networkConfiguration().subnetId()); - Assertions.assertEquals("xepcyvahfn", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("jky", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("odebfqkkrbmpu", model.links().get(0).name()); - Assertions.assertEquals(Polarization.RHCP, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.links().get(0).direction()); - Assertions.assertEquals(78.73024F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(59.0843F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("lfbxzpuzycisp", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(57.357258f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(99.49339f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("ahmgkbrp", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("y", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("hibnuqqkpika", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("vtq", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("n", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("ynhijggme", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("siarbutrcvpn", model.links().get(0).channels().get(0).decodingConfiguration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactProfilesProperties model = new ContactProfilesProperties() - .withProvisioningState(ContactProfilesPropertiesProvisioningState.UPDATING) - .withMinimumViableContactDuration("hjfbebrjcxe") - .withMinimumElevationDegrees(76.10287F) - .withAutoTrackingConfiguration(AutoTrackingConfiguration.DISABLED) - .withEventHubUri("ttxfvjr") - .withNetworkConfiguration(new ContactProfilesPropertiesNetworkConfiguration().withSubnetId("i")) - .withThirdPartyConfigurations(Arrays.asList( - new ContactProfileThirdPartyConfiguration().withProviderName("xepcyvahfn") - .withMissionConfiguration("jky"), - new ContactProfileThirdPartyConfiguration().withProviderName("xjvuujqgidokg") - .withMissionConfiguration("ljyoxgvcltb"), - new ContactProfileThirdPartyConfiguration().withProviderName("sncghkjeszz") - .withMissionConfiguration("bijhtxfvgxbf"), - new ContactProfileThirdPartyConfiguration().withProviderName("mxnehmp").withMissionConfiguration("ec"))) - .withLinks(Arrays.asList( - new ContactProfileLink().withName("odebfqkkrbmpu") - .withPolarization(Polarization.RHCP) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(78.73024F) - .withEirpdBW(59.0843F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("lfbxzpuzycisp") - .withCenterFrequencyMHz(57.357258f) - .withBandwidthMHz(99.49339f) - .withEndPoint(new EndPoint().withIpAddress("ahmgkbrp") - .withEndPointName("y") - .withPort("hibnuqqkpika") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("vtq") - .withDemodulationConfiguration("n") - .withEncodingConfiguration("ynhijggme") - .withDecodingConfiguration("siarbutrcvpn"), - new ContactProfileLinkChannel().withName("zzmhjrunmpxttd") - .withCenterFrequencyMHz(94.22552f) - .withBandwidthMHz(81.04825f) - .withEndPoint(new EndPoint().withIpAddress("bnlankxmyskpb") - .withEndPointName("enbtkcxywny") - .withPort("nrs") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("qidybyx") - .withDemodulationConfiguration("fclhaaxdbabphlwr") - .withEncodingConfiguration("fkts") - .withDecodingConfiguration("sucocmnyyazttbtw"), - new ContactProfileLinkChannel().withName("rq") - .withCenterFrequencyMHz(28.554081f) - .withBandwidthMHz(92.70088f) - .withEndPoint(new EndPoint().withIpAddress("dckzywbiexz") - .withEndPointName("eyueaxibxujwb") - .withPort("qwalmuzyoxaepd") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("ancuxrhd") - .withDemodulationConfiguration("avxbniwdjswztsdb") - .withEncodingConfiguration("nxytxh") - .withDecodingConfiguration("xbzpfzab"), - new ContactProfileLinkChannel().withName("lcuhxwtctyqiklb") - .withCenterFrequencyMHz(28.630316f) - .withBandwidthMHz(48.373898f) - .withEndPoint(new EndPoint().withIpAddress("plwzbhvgyugu") - .withEndPointName("svmkfssxquk") - .withPort("fpl") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("sxnkjzkdeslpvlo") - .withDemodulationConfiguration("i") - .withEncodingConfiguration("ghxpkdw") - .withDecodingConfiguration("aiuebbaumnyqu"))), - new ContactProfileLink().withName("edeojnabc") - .withPolarization(Polarization.LINEAR_HORIZONTAL) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(14.241242F) - .withEirpdBW(74.35146F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("ie") - .withCenterFrequencyMHz(96.578255f) - .withBandwidthMHz(51.74012f) - .withEndPoint(new EndPoint().withIpAddress("hvpesapskrdqm") - .withEndPointName("jjdhtld") - .withPort("kyzxuutk") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("scwsv") - .withDemodulationConfiguration("otogtwrupqs") - .withEncodingConfiguration("nmic") - .withDecodingConfiguration("vce"), - new ContactProfileLinkChannel().withName("vei") - .withCenterFrequencyMHz(97.97487f) - .withBandwidthMHz(65.040726f) - .withEndPoint(new EndPoint().withIpAddress("notyfjfcnjbkcn") - .withEndPointName("dhbt") - .withPort("kphywpnvjto") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("rmclfplphoxu") - .withDemodulationConfiguration("rpabg") - .withEncodingConfiguration("psbjta") - .withDecodingConfiguration("ugxywpmueef"), - new ContactProfileLinkChannel().withName("zwfqkqujidsuyon") - .withCenterFrequencyMHz(73.08737f) - .withBandwidthMHz(31.692337f) - .withEndPoint(new EndPoint().withIpAddress("laocqxtccmg") - .withEndPointName("udxytlmoyrx") - .withPort("wfudwpzntxhdzhl") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("bh") - .withDemodulationConfiguration("frlh") - .withEncodingConfiguration("sbkyvpycanuzbp") - .withDecodingConfiguration("afkuwb"), - new ContactProfileLinkChannel().withName("rnwb") - .withCenterFrequencyMHz(79.5002f) - .withBandwidthMHz(35.90838f) - .withEndPoint(new EndPoint().withIpAddress("hseyvju") - .withEndPointName("rts") - .withPort("hspkdeemao") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("ag") - .withDemodulationConfiguration("t") - .withEncodingConfiguration("lmqkrhahvlj") - .withDecodingConfiguration("haquhcdh"))), - new ContactProfileLink().withName("duala") - .withPolarization(Polarization.LINEAR_VERTICAL) - .withDirection(Direction.UPLINK) - .withGainOverTemperature(42.13096F) - .withEirpdBW(18.452417F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("mwsrcrgvxpvgo") - .withCenterFrequencyMHz(89.06268f) - .withBandwidthMHz(8.818239f) - .withEndPoint(new EndPoint().withIpAddress("fmisg") - .withEndPointName("bnbbeldawkz") - .withPort("ali") - .withProtocol(Protocol.TCP)) - .withModulationConfiguration("qhakauhashsf") - .withDemodulationConfiguration("osow") - .withEncodingConfiguration("cugicjoox") - .withDecodingConfiguration("ebwpucwwfvo"), - new ContactProfileLinkChannel().withName("bvmeuecivy") - .withCenterFrequencyMHz(56.92287f) - .withBandwidthMHz(8.0055895f) - .withEndPoint(new EndPoint().withIpAddress("euojgjrwju") - .withEndPointName("iotwmcdytdxwit") - .withPort("nrjawgqwg") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("isk") - .withDemodulationConfiguration("bkpyc") - .withEncodingConfiguration("lwn") - .withDecodingConfiguration("hjdauwhvylwz"), - new ContactProfileLinkChannel().withName("tdhxujznbmpowuwp") - .withCenterFrequencyMHz(92.36481f) - .withBandwidthMHz(76.77147f) - .withEndPoint(new EndPoint().withIpAddress("lve") - .withEndPointName("alupjm") - .withPort("hfxobbcswsrtj") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("lrbpbewtghfgbl") - .withDemodulationConfiguration("wxzvlvqhjkb") - .withEncodingConfiguration("ibtnmxiebwwaloay") - .withDecodingConfiguration("gwrtzju"), - new ContactProfileLinkChannel().withName("gwyzm") - .withCenterFrequencyMHz(22.303885f) - .withBandwidthMHz(95.666405f) - .withEndPoint(new EndPoint().withIpAddress("ongmtsa") - .withEndPointName("jcbpwxqpsrknft") - .withPort("uvriuhprwm") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("xqtayriwwro") - .withDemodulationConfiguration("bexrmcq") - .withEncodingConfiguration("ycnojvknmefqsg") - .withDecodingConfiguration("ah"))), - new ContactProfileLink().withName("pjyzhpv") - .withPolarization(Polarization.LINEAR_VERTICAL) - .withDirection(Direction.DOWNLINK) - .withGainOverTemperature(3.2978177F) - .withEirpdBW(87.9586F) - .withChannels(Arrays.asList( - new ContactProfileLinkChannel().withName("djzlmwlx") - .withCenterFrequencyMHz(12.278867f) - .withBandwidthMHz(9.6262455f) - .withEndPoint(new EndPoint().withIpAddress("gfhzovawjvzunlut") - .withEndPointName("nnprn") - .withPort("i") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("lpjzuaejxdu") - .withDemodulationConfiguration("skzbb") - .withEncodingConfiguration("zumveekgpwo") - .withDecodingConfiguration("hkfpbs"), - new ContactProfileLinkChannel().withName("yofd") - .withCenterFrequencyMHz(13.230478f) - .withBandwidthMHz(62.09696f) - .withEndPoint(new EndPoint().withIpAddress("us") - .withEndPointName("ttouwaboekqvkel") - .withPort("smv") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("yjsflhhcaalnji") - .withDemodulationConfiguration("sxyawjoyaqcs") - .withEncodingConfiguration("jpkiidzyexznelix") - .withDecodingConfiguration("rzt"), - new ContactProfileLinkChannel().withName("o") - .withCenterFrequencyMHz(10.115522f) - .withBandwidthMHz(77.96445f) - .withEndPoint(new EndPoint().withIpAddress("nxknalaulp") - .withEndPointName("ggdtpnapnyiro") - .withPort("uhpigvp") - .withProtocol(Protocol.UDP)) - .withModulationConfiguration("gqgitxmedjvcsl") - .withDemodulationConfiguration("qwwncw") - .withEncodingConfiguration("hxg") - .withDecodingConfiguration("rmgucnap"))))); - model = BinaryData.fromObject(model).toObject(ContactProfilesProperties.class); - Assertions.assertEquals(ContactProfilesPropertiesProvisioningState.UPDATING, model.provisioningState()); - Assertions.assertEquals("hjfbebrjcxe", model.minimumViableContactDuration()); - Assertions.assertEquals(76.10287F, model.minimumElevationDegrees()); - Assertions.assertEquals(AutoTrackingConfiguration.DISABLED, model.autoTrackingConfiguration()); - Assertions.assertEquals("ttxfvjr", model.eventHubUri()); - Assertions.assertEquals("i", model.networkConfiguration().subnetId()); - Assertions.assertEquals("xepcyvahfn", model.thirdPartyConfigurations().get(0).providerName()); - Assertions.assertEquals("jky", model.thirdPartyConfigurations().get(0).missionConfiguration()); - Assertions.assertEquals("odebfqkkrbmpu", model.links().get(0).name()); - Assertions.assertEquals(Polarization.RHCP, model.links().get(0).polarization()); - Assertions.assertEquals(Direction.DOWNLINK, model.links().get(0).direction()); - Assertions.assertEquals(78.73024F, model.links().get(0).gainOverTemperature()); - Assertions.assertEquals(59.0843F, model.links().get(0).eirpdBW()); - Assertions.assertEquals("lfbxzpuzycisp", model.links().get(0).channels().get(0).name()); - Assertions.assertEquals(57.357258f, model.links().get(0).channels().get(0).centerFrequencyMHz()); - Assertions.assertEquals(99.49339f, model.links().get(0).channels().get(0).bandwidthMHz()); - Assertions.assertEquals("ahmgkbrp", model.links().get(0).channels().get(0).endPoint().ipAddress()); - Assertions.assertEquals("y", model.links().get(0).channels().get(0).endPoint().endPointName()); - Assertions.assertEquals("hibnuqqkpika", model.links().get(0).channels().get(0).endPoint().port()); - Assertions.assertEquals(Protocol.TCP, model.links().get(0).channels().get(0).endPoint().protocol()); - Assertions.assertEquals("vtq", model.links().get(0).channels().get(0).modulationConfiguration()); - Assertions.assertEquals("n", model.links().get(0).channels().get(0).demodulationConfiguration()); - Assertions.assertEquals("ynhijggme", model.links().get(0).channels().get(0).encodingConfiguration()); - Assertions.assertEquals("siarbutrcvpn", model.links().get(0).channels().get(0).decodingConfiguration()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsCreateMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsCreateMockTests.java deleted file mode 100644 index 4ebb51f9fd57..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsCreateMockTests.java +++ /dev/null @@ -1,52 +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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.Contact; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"providerCancelled\",\"reservationStartTime\":\"2021-08-15T03:14:49Z\",\"reservationEndTime\":\"2021-03-19T20:32:18Z\",\"rxStartTime\":\"2021-09-25T01:08:15Z\",\"rxEndTime\":\"2021-11-19T19:11:53Z\",\"txStartTime\":\"2021-01-24T00:59:15Z\",\"txEndTime\":\"2021-01-08T01:19:04Z\",\"errorMessage\":\"gbmhrixkwmyi\",\"maximumElevationDegrees\":98.3043,\"startAzimuthDegrees\":75.6699,\"endAzimuthDegrees\":12.116205,\"groundStationName\":\"hbpnaixexccbd\",\"startElevationDegrees\":7.074279,\"endElevationDegrees\":59.16115,\"antennaConfiguration\":{\"destinationIp\":\"xdrrvqahqkghtp\",\"sourceIps\":[\"nhyjsv\",\"ycxzbfvoo\"]},\"contactProfile\":{\"id\":\"vrvmtgjqppyost\"}},\"id\":\"nzm\",\"name\":\"hgfipnsxkmcw\",\"type\":\"ekrrjr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Contact response = manager.contacts() - .define("htjsying") - .withExistingSpacecraft("wccsnjvcdwxlpqek", "tn") - .withReservationStartTime(OffsetDateTime.parse("2021-04-16T00:09:41Z")) - .withReservationEndTime(OffsetDateTime.parse("2021-08-15T22:02:46Z")) - .withGroundStationName("kj") - .withContactProfile(new ContactsPropertiesContactProfile().withId("tkkgllqwjy")) - .withProvisioningState(ContactsPropertiesProvisioningState.DELETING) - .create(); - - Assertions.assertEquals(ContactsPropertiesProvisioningState.fromString("Succeeded"), - response.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T03:14:49Z"), response.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-19T20:32:18Z"), response.reservationEndTime()); - Assertions.assertEquals("hbpnaixexccbd", response.groundStationName()); - Assertions.assertEquals("vrvmtgjqppyost", response.contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsDeleteMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsDeleteMockTests.java deleted file mode 100644 index 8cfe6e417304..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsDeleteMockTests.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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.contacts().delete("vezrypqlmfeo", "erqwkyhkobopg", "edkowepbqpcrfk", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsGetWithResponseMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsGetWithResponseMockTests.java deleted file mode 100644 index ad72c769d3a9..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsGetWithResponseMockTests.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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.Contact; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"canceled\",\"status\":\"succeeded\",\"reservationStartTime\":\"2021-08-20T02:06:38Z\",\"reservationEndTime\":\"2021-03-18T11:58:55Z\",\"rxStartTime\":\"2021-10-18T15:07:25Z\",\"rxEndTime\":\"2021-11-21T07:49:51Z\",\"txStartTime\":\"2021-01-20T03:55:37Z\",\"txEndTime\":\"2021-05-02T09:33:50Z\",\"errorMessage\":\"dkfw\",\"maximumElevationDegrees\":96.910255,\"startAzimuthDegrees\":46.01294,\"endAzimuthDegrees\":33.797283,\"groundStationName\":\"vkay\",\"startElevationDegrees\":71.229416,\"endElevationDegrees\":28.091461,\"antennaConfiguration\":{\"destinationIp\":\"iatkzwpcnp\",\"sourceIps\":[\"jaesgvvsccya\",\"g\",\"qfhwyg\"]},\"contactProfile\":{\"id\":\"lvdnkfx\"}},\"id\":\"emdwzrmuhapfc\",\"name\":\"dpsqx\",\"type\":\"vpsvuoymgcce\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Contact response = manager.contacts() - .getWithResponse("guufzd", "syqtfi", "whbotzingamv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ContactsPropertiesProvisioningState.CANCELED, response.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-20T02:06:38Z"), response.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T11:58:55Z"), response.reservationEndTime()); - Assertions.assertEquals("vkay", response.groundStationName()); - Assertions.assertEquals("lvdnkfx", response.contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsListMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsListMockTests.java deleted file mode 100644 index 17376e127730..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsListMockTests.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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.Contact; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContactsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"canceled\",\"status\":\"failed\",\"reservationStartTime\":\"2021-07-29T01:36:25Z\",\"reservationEndTime\":\"2021-05-24T12:41:33Z\",\"rxStartTime\":\"2021-04-01T03:58:48Z\",\"rxEndTime\":\"2020-12-28T18:13:42Z\",\"txStartTime\":\"2021-10-21T00:35:55Z\",\"txEndTime\":\"2020-12-22T05:34:35Z\",\"errorMessage\":\"jylwbtlhflsj\",\"maximumElevationDegrees\":49.928276,\"startAzimuthDegrees\":59.380924,\"endAzimuthDegrees\":62.8989,\"groundStationName\":\"vfbgofeljagrqmqh\",\"startElevationDegrees\":31.824005,\"endElevationDegrees\":64.267334,\"antennaConfiguration\":{\"destinationIp\":\"ojnal\",\"sourceIps\":[\"kvtvsexso\"]},\"contactProfile\":{\"id\":\"ueluqhhahhxvrhmz\"}},\"id\":\"pjgwwspug\",\"name\":\"ftqsxhqxujxuk\",\"type\":\"dxdigr\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.contacts().list("rjqc", "rgz", "frl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ContactsPropertiesProvisioningState.CANCELED, - response.iterator().next().provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-29T01:36:25Z"), - response.iterator().next().reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T12:41:33Z"), - response.iterator().next().reservationEndTime()); - Assertions.assertEquals("vfbgofeljagrqmqh", response.iterator().next().groundStationName()); - Assertions.assertEquals("ueluqhhahhxvrhmz", response.iterator().next().contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesAntennaConfigurationTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesAntennaConfigurationTests.java deleted file mode 100644 index 0c2cce720368..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesAntennaConfigurationTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesAntennaConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactsPropertiesAntennaConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactsPropertiesAntennaConfiguration model - = BinaryData.fromString("{\"destinationIp\":\"cpr\",\"sourceIps\":[\"b\",\"gjvtbv\"]}") - .toObject(ContactsPropertiesAntennaConfiguration.class); - Assertions.assertEquals("cpr", model.destinationIp()); - Assertions.assertEquals("b", model.sourceIps().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactsPropertiesAntennaConfiguration model - = new ContactsPropertiesAntennaConfiguration().withDestinationIp("cpr") - .withSourceIps(Arrays.asList("b", "gjvtbv")); - model = BinaryData.fromObject(model).toObject(ContactsPropertiesAntennaConfiguration.class); - Assertions.assertEquals("cpr", model.destinationIp()); - Assertions.assertEquals("b", model.sourceIps().get(0)); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesContactProfileTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesContactProfileTests.java deleted file mode 100644 index c53916701018..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesContactProfileTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import org.junit.jupiter.api.Assertions; - -public final class ContactsPropertiesContactProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactsPropertiesContactProfile model - = BinaryData.fromString("{\"id\":\"ysszdnrujqguh\"}").toObject(ContactsPropertiesContactProfile.class); - Assertions.assertEquals("ysszdnrujqguh", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactsPropertiesContactProfile model = new ContactsPropertiesContactProfile().withId("ysszdnrujqguh"); - model = BinaryData.fromObject(model).toObject(ContactsPropertiesContactProfile.class); - Assertions.assertEquals("ysszdnrujqguh", model.id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesTests.java deleted file mode 100644 index 14781b7f648e..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ContactsPropertiesTests.java +++ /dev/null @@ -1,42 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.ContactsProperties; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesContactProfile; -import com.azure.resourcemanager.orbital.models.ContactsPropertiesProvisioningState; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ContactsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactsProperties model = BinaryData.fromString( - "{\"provisioningState\":\"failed\",\"status\":\"scheduled\",\"reservationStartTime\":\"2021-07-03T00:59:28Z\",\"reservationEndTime\":\"2020-12-29T19:26:23Z\",\"rxStartTime\":\"2021-07-17T14:29:41Z\",\"rxEndTime\":\"2021-10-23T18:32:55Z\",\"txStartTime\":\"2021-04-11T05:58:57Z\",\"txEndTime\":\"2021-09-17T16:41:16Z\",\"errorMessage\":\"ol\",\"maximumElevationDegrees\":53.948807,\"startAzimuthDegrees\":1.6021609,\"endAzimuthDegrees\":49.08141,\"groundStationName\":\"gbquxigj\",\"startElevationDegrees\":90.50798,\"endElevationDegrees\":53.750427,\"antennaConfiguration\":{\"destinationIp\":\"yfhrtxilnerkujy\",\"sourceIps\":[\"eju\"]},\"contactProfile\":{\"id\":\"fqawrlyxw\"}}") - .toObject(ContactsProperties.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-03T00:59:28Z"), model.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T19:26:23Z"), model.reservationEndTime()); - Assertions.assertEquals("gbquxigj", model.groundStationName()); - Assertions.assertEquals("fqawrlyxw", model.contactProfile().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactsProperties model - = new ContactsProperties().withProvisioningState(ContactsPropertiesProvisioningState.FAILED) - .withReservationStartTime(OffsetDateTime.parse("2021-07-03T00:59:28Z")) - .withReservationEndTime(OffsetDateTime.parse("2020-12-29T19:26:23Z")) - .withGroundStationName("gbquxigj") - .withContactProfile(new ContactsPropertiesContactProfile().withId("fqawrlyxw")); - model = BinaryData.fromObject(model).toObject(ContactsProperties.class); - Assertions.assertEquals(ContactsPropertiesProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-03T00:59:28Z"), model.reservationStartTime()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T19:26:23Z"), model.reservationEndTime()); - Assertions.assertEquals("gbquxigj", model.groundStationName()); - Assertions.assertEquals("fqawrlyxw", model.contactProfile().id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/EndPointTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/EndPointTests.java deleted file mode 100644 index c93d522a0468..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/EndPointTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.EndPoint; -import com.azure.resourcemanager.orbital.models.Protocol; -import org.junit.jupiter.api.Assertions; - -public final class EndPointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EndPoint model = BinaryData.fromString( - "{\"ipAddress\":\"dtws\",\"endPointName\":\"otftpvjzbexilz\",\"port\":\"nfqqnvwp\",\"protocol\":\"UDP\"}") - .toObject(EndPoint.class); - Assertions.assertEquals("dtws", model.ipAddress()); - Assertions.assertEquals("otftpvjzbexilz", model.endPointName()); - Assertions.assertEquals("nfqqnvwp", model.port()); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndPoint model = new EndPoint().withIpAddress("dtws") - .withEndPointName("otftpvjzbexilz") - .withPort("nfqqnvwp") - .withProtocol(Protocol.UDP); - model = BinaryData.fromObject(model).toObject(EndPoint.class); - Assertions.assertEquals("dtws", model.ipAddress()); - Assertions.assertEquals("otftpvjzbexilz", model.endPointName()); - Assertions.assertEquals("nfqqnvwp", model.port()); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationDisplayTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationDisplayTests.java deleted file mode 100644 index 13d974822689..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationDisplayTests.java +++ /dev/null @@ -1,23 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationInnerTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationInnerTests.java deleted file mode 100644 index cbc98f83a04e..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationInnerTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.fluent.models.OperationInner; -import com.azure.resourcemanager.orbital.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationListResultTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationListResultTests.java deleted file mode 100644 index 999f9a3a1eae..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationListResultTests.java +++ /dev/null @@ -1,23 +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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationsListMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationsListMockTests.java deleted file mode 100644 index f1736868d62c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/OperationsListMockTests.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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import com.azure.resourcemanager.orbital.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"maequiahxicslfa\",\"isDataAction\":false,\"display\":{\"provider\":\"yylhalnswhccsp\",\"resource\":\"aivwitqscywu\",\"operation\":\"woluhczbwemhair\",\"description\":\"rgzdwmsweyp\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.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); - - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ResourceReferenceTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ResourceReferenceTests.java deleted file mode 100644 index 81cdcae2188f..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/ResourceReferenceTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.ResourceReference; -import org.junit.jupiter.api.Assertions; - -public final class ResourceReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceReference model = BinaryData.fromString("{\"id\":\"uouq\"}").toObject(ResourceReference.class); - Assertions.assertEquals("uouq", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceReference model = new ResourceReference().withId("uouq"); - model = BinaryData.fromObject(model).toObject(ResourceReference.class); - Assertions.assertEquals("uouq", model.id()); - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/SpacecraftsDeleteMockTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/SpacecraftsDeleteMockTests.java deleted file mode 100644 index f277eeadf1ef..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/SpacecraftsDeleteMockTests.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.orbital.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.orbital.OrbitalManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SpacecraftsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OrbitalManager manager = OrbitalManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.spacecrafts().delete("eeyebi", "ikayuhqlbjbsybb", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/TagsObjectTests.java b/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/TagsObjectTests.java deleted file mode 100644 index 3e7fd95bb00c..000000000000 --- a/sdk/orbital/azure-resourcemanager-orbital/src/test/java/com/azure/resourcemanager/orbital/generated/TagsObjectTests.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.orbital.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.orbital.models.TagsObject; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TagsObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TagsObject model = BinaryData.fromString( - "{\"tags\":{\"fxxypininmayhuy\":\"ofpdvh\",\"mihe\":\"bkpodepooginuv\",\"usivye\":\"gnarxzxtheo\",\"nfygxgispemvtz\":\"cciqihnhungbwjz\"}}") - .toObject(TagsObject.class); - Assertions.assertEquals("ofpdvh", model.tags().get("fxxypininmayhuy")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TagsObject model = new TagsObject().withTags(mapOf("fxxypininmayhuy", "ofpdvh", "mihe", "bkpodepooginuv", - "usivye", "gnarxzxtheo", "nfygxgispemvtz", "cciqihnhungbwjz")); - model = BinaryData.fromObject(model).toObject(TagsObject.class); - Assertions.assertEquals("ofpdvh", model.tags().get("fxxypininmayhuy")); - } - - // Use "Map.of" if available - @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; - } -}