diff --git a/sdk/astro/azure-resourcemanager-astro/CHANGELOG.md b/sdk/astro/azure-resourcemanager-astro/CHANGELOG.md
index 417317312e95..ef35886fb746 100644
--- a/sdk/astro/azure-resourcemanager-astro/CHANGELOG.md
+++ b/sdk/astro/azure-resourcemanager-astro/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2024-09-23)
+
+- Azure Resource Manager Astro client library for Java. This package contains Microsoft Azure SDK for Astro Management SDK. Package tag package-2024-08-27. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/astro/azure-resourcemanager-astro/README.md b/sdk/astro/azure-resourcemanager-astro/README.md
index 920b46241980..bb5f6092315a 100644
--- a/sdk/astro/azure-resourcemanager-astro/README.md
+++ b/sdk/astro/azure-resourcemanager-astro/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Astro client library for Java.
-This package contains Microsoft Azure SDK for Astro Management SDK. Package tag package-2023-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Astro Management SDK. Package tag package-2024-08-27. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-astro
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
### Authentication
-By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
+Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
-- `AZURE_CLIENT_ID` for Azure client ID.
-- `AZURE_TENANT_ID` for Azure tenant ID.
-- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-
-With above configuration, `azure` client can be authenticated using the following code:
+Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -97,6 +93,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
+[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/astro/azure-resourcemanager-astro/SAMPLE.md b/sdk/astro/azure-resourcemanager-astro/SAMPLE.md
index dc85a3cab656..4599a3c282c9 100644
--- a/sdk/astro/azure-resourcemanager-astro/SAMPLE.md
+++ b/sdk/astro/azure-resourcemanager-astro/SAMPLE.md
@@ -21,7 +21,7 @@
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Operations_List_MaximumSet_Gen.json
*/
/**
@@ -32,6 +32,19 @@ public final class OperationsListSamples {
public static void operationsListGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
manager.operations().list(com.azure.core.util.Context.NONE);
}
+
+ /*
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
+ * Operations_List_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Operations_List - generated by [MinimumSet] rule.
+ *
+ * @param manager Entry point to AstroManager.
+ */
+ public static void operationsListGeneratedByMinimumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
+ manager.operations().list(com.azure.core.util.Context.NONE);
+ }
}
```
@@ -47,6 +60,7 @@ import com.azure.resourcemanager.astro.models.LiftrBaseUserDetails;
import com.azure.resourcemanager.astro.models.ManagedServiceIdentity;
import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
+import com.azure.resourcemanager.astro.models.RenewalMode;
import com.azure.resourcemanager.astro.models.SingleSignOnStates;
import java.util.Arrays;
import java.util.HashMap;
@@ -57,7 +71,7 @@ import java.util.Map;
*/
public final class OrganizationsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_CreateOrUpdate_MaximumSet_Gen.json
*/
/**
@@ -67,22 +81,36 @@ public final class OrganizationsCreateOrUpdateSamples {
*/
public static void
organizationsCreateOrUpdateGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
- manager.organizations().define("U.1-:7").withRegion("mhqthlsatwvqkl").withExistingResourceGroup("rgastronomer")
+ manager.organizations()
+ .define("U.1-:7")
+ .withRegion("pgfkugslgnsxeqpjs")
+ .withExistingResourceGroup("rgastronomer")
.withTags(mapOf())
.withProperties(new LiftrBaseDataOrganizationProperties()
- .withMarketplace(new LiftrBaseMarketplaceDetails().withSubscriptionId("ntthclydlpqmasr")
+ .withMarketplace(new LiftrBaseMarketplaceDetails().withSubscriptionId("emasc")
.withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START)
- .withOfferDetails(new LiftrBaseOfferDetails().withPublisherId("gfsqxygpnerxmvols")
- .withOfferId("krzkefmpxztqyusidzgpchfaswuyce").withPlanId("kndxzygsanuiqzwbfbbvoipv")
- .withPlanName("pwqjwlq").withTermUnit("xyygyzcazkuelz").withTermId("pwds")))
- .withUser(new LiftrBaseUserDetails().withFirstName("nfh").withLastName("lazfbstcccykibvcrxpmglqam")
- .withEmailAddress(".K_@e7N-g1.xjqnbPs").withUpn("xtutvycpxjrtoftx").withPhoneNumber("inxkscllh"))
+ .withOfferDetails(new LiftrBaseOfferDetails().withPublisherId("kt")
+ .withOfferId("tvidibzbxevtvnrdp")
+ .withPlanId("lwcvzdqecwkeracahmixnh")
+ .withPlanName("d")
+ .withTermUnit("rs")
+ .withTermId("kopnnjsp")
+ .withRenewalMode(RenewalMode.AUTO)))
+ .withUser(new LiftrBaseUserDetails().withFirstName("ucowvrccqpqpkdg")
+ .withLastName("fwwtnwggrtibghoijfzajrhgyo")
+ .withEmailAddress(".K_@e7N-g1.xjqnbPs")
+ .withUpn("zbdgbbqg")
+ .withPhoneNumber("brnngpezmqecvflklbhsibq"))
.withPartnerOrganizationProperties(
- new LiftrBaseDataPartnerOrganizationProperties().withOrganizationId("lskgzdmziusgrsucv")
- .withWorkspaceId("vcrupxwpaba").withOrganizationName("3-").withWorkspaceName("9.:06")
- .withSingleSignOnProperties(new LiftrBaseSingleSignOnProperties()
- .withSingleSignOnState(SingleSignOnStates.INITIAL).withEnterpriseAppId("mklfypyujwumgwdzae")
- .withSingleSignOnUrl("ymmtzkyghvinvhgnqlzwrr").withAadDomains(Arrays.asList("kfbleh")))))
+ new LiftrBaseDataPartnerOrganizationProperties().withOrganizationId("juomtfzwkjwnhhpodfnrqdv")
+ .withWorkspaceId("nnryjcmiohmkbvhngfgxigpodvhl")
+ .withOrganizationName("U.1-:7")
+ .withWorkspaceName("9.:06")
+ .withSingleSignOnProperties(
+ new LiftrBaseSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL)
+ .withEnterpriseAppId("srkwxktx")
+ .withSingleSignOnUrl("l")
+ .withAadDomains(Arrays.asList("fcnqoizqxcdclmy")))))
.withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE)
.withUserAssignedIdentities(mapOf()))
.create();
@@ -110,7 +138,7 @@ public final class OrganizationsCreateOrUpdateSamples {
*/
public final class OrganizationsDeleteSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_Delete_MaximumSet_Gen.json
*/
/**
@@ -120,7 +148,7 @@ public final class OrganizationsDeleteSamples {
*/
public static void
organizationsDeleteGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
- manager.organizations().delete("rgastronomer", "q:", com.azure.core.util.Context.NONE);
+ manager.organizations().delete("rgastronomer", "U.1-:7", com.azure.core.util.Context.NONE);
}
}
```
@@ -133,7 +161,7 @@ public final class OrganizationsDeleteSamples {
*/
public final class OrganizationsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_Get_MaximumSet_Gen.json
*/
/**
@@ -142,8 +170,8 @@ public final class OrganizationsGetByResourceGroupSamples {
* @param manager Entry point to AstroManager.
*/
public static void organizationsGetGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
- manager.organizations().getByResourceGroupWithResponse("rgastronomer", "S PS",
- com.azure.core.util.Context.NONE);
+ manager.organizations()
+ .getByResourceGroupWithResponse("rgastronomer", "U.1-:7", com.azure.core.util.Context.NONE);
}
}
```
@@ -156,7 +184,21 @@ public final class OrganizationsGetByResourceGroupSamples {
*/
public final class OrganizationsListSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
+ * Organizations_ListBySubscription_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Organizations_ListBySubscription - generated by [MinimumSet] rule.
+ *
+ * @param manager Entry point to AstroManager.
+ */
+ public static void
+ organizationsListBySubscriptionGeneratedByMinimumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
+ manager.organizations().list(com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_ListBySubscription_MaximumSet_Gen.json
*/
/**
@@ -179,7 +221,7 @@ public final class OrganizationsListSamples {
*/
public final class OrganizationsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_ListByResourceGroup_MaximumSet_Gen.json
*/
/**
@@ -191,6 +233,20 @@ public final class OrganizationsListByResourceGroupSamples {
com.azure.resourcemanager.astro.AstroManager manager) {
manager.organizations().listByResourceGroup("rgastronomer", com.azure.core.util.Context.NONE);
}
+
+ /*
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
+ * Organizations_ListByResourceGroup_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Organizations_ListByResourceGroup - generated by [MinimumSet] rule.
+ *
+ * @param manager Entry point to AstroManager.
+ */
+ public static void organizationsListByResourceGroupGeneratedByMinimumSetRule(
+ com.azure.resourcemanager.astro.AstroManager manager) {
+ manager.organizations().listByResourceGroup("rgastronomer", com.azure.core.util.Context.NONE);
+ }
}
```
@@ -198,12 +254,16 @@ public final class OrganizationsListByResourceGroupSamples {
```java
import com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationPropertiesUpdate;
+import com.azure.resourcemanager.astro.models.LiftrBaseMarketplaceDetailsUpdate;
+import com.azure.resourcemanager.astro.models.LiftrBaseOfferDetailsUpdate;
import com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties;
import com.azure.resourcemanager.astro.models.LiftrBaseUserDetailsUpdate;
import com.azure.resourcemanager.astro.models.ManagedServiceIdentity;
import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
import com.azure.resourcemanager.astro.models.OrganizationResource;
import com.azure.resourcemanager.astro.models.OrganizationResourceUpdateProperties;
+import com.azure.resourcemanager.astro.models.RenewalMode;
import com.azure.resourcemanager.astro.models.SingleSignOnStates;
import java.util.Arrays;
import java.util.HashMap;
@@ -214,30 +274,48 @@ import java.util.Map;
*/
public final class OrganizationsUpdateSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_Update_MaximumSet_Gen.json
*/
/**
- * Sample code: Organizations_Update.
+ * Sample code: Organizations_Update - generated by [MaximumSet] rule.
*
* @param manager Entry point to AstroManager.
*/
- public static void organizationsUpdate(com.azure.resourcemanager.astro.AstroManager manager) {
+ public static void
+ organizationsUpdateGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
OrganizationResource resource = manager.organizations()
- .getByResourceGroupWithResponse("rgastronomer", "6.", com.azure.core.util.Context.NONE).getValue();
- resource.update().withTags(mapOf("key1474", "fakeTokenPlaceholder"))
+ .getByResourceGroupWithResponse("rgastronomer", "U.1-:7", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withTags(mapOf())
.withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE)
.withUserAssignedIdentities(mapOf()))
.withProperties(new OrganizationResourceUpdateProperties()
- .withUser(new LiftrBaseUserDetailsUpdate().withFirstName("qeuofehzypzljgcuysugefbgxde")
- .withLastName("g").withEmailAddress(".K_@e7N-g1.xjqnbPs").withUpn("uwtprzdfpsqmktx")
- .withPhoneNumber("aqpyxznvqpgkzohevynofrjdfgoo"))
+ .withMarketplace(new LiftrBaseMarketplaceDetailsUpdate().withSubscriptionId("ujl")
+ .withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START)
+ .withOfferDetails(new LiftrBaseOfferDetailsUpdate().withPublisherId("bywzycdrucjkx")
+ .withOfferId("aljpaprqzpnivwol")
+ .withPlanId("fcpnstrwetlrajanh")
+ .withPlanName("wjgnlhqqkdi")
+ .withTermUnit("pvpk")
+ .withTermId("xg")
+ .withRenewalMode(RenewalMode.AUTO)))
+ .withUser(new LiftrBaseUserDetailsUpdate().withFirstName("wyoaxocyjfpgicvketuiayfxrxq")
+ .withLastName("vlwybhfayupjpwfhy")
+ .withEmailAddress(".K_@e7N-g1.xjqnbPs")
+ .withUpn("ezefcwbsbgcxrdiixmzphibt")
+ .withPhoneNumber("eibhsslqzufgshuzrjjyymsb"))
.withPartnerOrganizationProperties(new LiftrBaseDataPartnerOrganizationPropertiesUpdate()
- .withOrganizationId("lrtmbkvyvvoszhjevohkmyjhfyty").withWorkspaceId("xsepuskdhejaadusyxq")
- .withOrganizationName("U2P_").withWorkspaceName("L.-y_--:")
- .withSingleSignOnProperties(new LiftrBaseSingleSignOnProperties()
- .withSingleSignOnState(SingleSignOnStates.INITIAL).withEnterpriseAppId("mklfypyujwumgwdzae")
- .withSingleSignOnUrl("ymmtzkyghvinvhgnqlzwrr").withAadDomains(Arrays.asList("kfbleh")))))
+ .withOrganizationId("linzwcqhrpqrxpnghxjnxzetfdps")
+ .withWorkspaceId("tmmxzlagmdrc")
+ .withOrganizationName("U.1-:7")
+ .withWorkspaceName("9.:06")
+ .withSingleSignOnProperties(
+ new LiftrBaseSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL)
+ .withEnterpriseAppId("jspfkoxolosmvyixpktbwyoqrx")
+ .withSingleSignOnUrl("aatouxlmqqizijszlu")
+ .withAadDomains(Arrays.asList("gwzhrfmnhbeitagjdlzw")))))
.apply();
}
diff --git a/sdk/astro/azure-resourcemanager-astro/pom.xml b/sdk/astro/azure-resourcemanager-astro/pom.xml
index f0a1da060125..6573f46349d6 100644
--- a/sdk/astro/azure-resourcemanager-astro/pom.xml
+++ b/sdk/astro/azure-resourcemanager-astro/pom.xml
@@ -18,7 +18,7 @@
jar
Microsoft Azure SDK for Astro Management
- This package contains Microsoft Azure SDK for Astro Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-08-01.
+ This package contains Microsoft Azure SDK for Astro Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-08-27.
https://github.com/Azure/azure-sdk-for-java
@@ -48,6 +48,11 @@
true
+
+ com.azure
+ azure-json
+ 1.3.0
+
com.azure
azure-core
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/AstroManager.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/AstroManager.java
index 6b07523f7fb0..f80fc58af530 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/AstroManager.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/AstroManager.java
@@ -11,8 +11,8 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
-import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
@@ -50,8 +50,10 @@ private AstroManager(HttpPipeline httpPipeline, AzureProfile profile, Duration d
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject = new AstroMgmtClientBuilder().pipeline(httpPipeline)
- .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId())
- .defaultPollInterval(defaultPollInterval).buildClient();
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
}
/**
@@ -202,12 +204,19 @@ public AstroManager authenticate(TokenCredential credential, AzureProfile profil
Objects.requireNonNull(profile, "'profile' cannot be null.");
StringBuilder userAgentBuilder = new StringBuilder();
- userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.astro").append("/")
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.astro")
+ .append("/")
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
- userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
- .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
- .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)");
+ userAgentBuilder.append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}
@@ -226,18 +235,21 @@ public AstroManager authenticate(TokenCredential credential, AzureProfile profil
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
- policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList()));
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
- .policies(policies.toArray(new HttpPipelinePolicy[0])).build();
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
return new AstroManager(httpPipeline, profile, defaultPollInterval);
}
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/fluent/models/OperationInner.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/fluent/models/OperationInner.java
index 256e3aaae095..4e99554604d6 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/fluent/models/OperationInner.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/fluent/models/OperationInner.java
@@ -5,10 +5,14 @@
package com.azure.resourcemanager.astro.fluent.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 com.azure.resourcemanager.astro.models.ActionType;
import com.azure.resourcemanager.astro.models.OperationDisplay;
import com.azure.resourcemanager.astro.models.Origin;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* REST API Operation
@@ -16,38 +20,33 @@
* Details of a REST API operation, returned from the Resource Provider Operations API.
*/
@Fluent
-public final class OperationInner {
+public final class OperationInner implements JsonSerializable {
/*
* The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
* "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
* Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
* ARM/control-plane operations.
*/
- @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isDataAction;
/*
* Localized display information for this particular operation.
*/
- @JsonProperty(value = "display")
private OperationDisplay display;
/*
* The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
* value is "user,system"
*/
- @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
private Origin origin;
/*
* Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
*/
- @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
private ActionType actionType;
/**
@@ -126,4 +125,48 @@ public void validate() {
display().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner 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 OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/fluent/models/OrganizationResourceInner.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/fluent/models/OrganizationResourceInner.java
index aa8c5a6444ea..a6f583fce744 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/fluent/models/OrganizationResourceInner.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/fluent/models/OrganizationResourceInner.java
@@ -7,9 +7,12 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.astro.models.LiftrBaseDataOrganizationProperties;
import com.azure.resourcemanager.astro.models.ManagedServiceIdentity;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.Map;
/**
@@ -20,21 +23,33 @@ public final class OrganizationResourceInner extends Resource {
/*
* The resource-specific properties for this resource.
*/
- @JsonProperty(value = "properties")
private LiftrBaseDataOrganizationProperties properties;
/*
* The managed service identities assigned to this resource.
*/
- @JsonProperty(value = "identity")
private ManagedServiceIdentity identity;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of OrganizationResourceInner class.
*/
@@ -90,6 +105,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* {@inheritDoc}
*/
@@ -121,4 +166,60 @@ public void validate() {
identity().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OrganizationResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OrganizationResourceInner 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 OrganizationResourceInner.
+ */
+ public static OrganizationResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OrganizationResourceInner deserializedOrganizationResourceInner = new OrganizationResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedOrganizationResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedOrganizationResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedOrganizationResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedOrganizationResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedOrganizationResourceInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedOrganizationResourceInner.properties
+ = LiftrBaseDataOrganizationProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedOrganizationResourceInner.identity = ManagedServiceIdentity.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedOrganizationResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOrganizationResourceInner;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/AstroMgmtClientBuilder.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/AstroMgmtClientBuilder.java
index 13b3f231b0d4..abd121f27636 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/AstroMgmtClientBuilder.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/AstroMgmtClientBuilder.java
@@ -123,11 +123,13 @@ public AstroMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdap
public AstroMgmtClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
- HttpPipeline localPipeline = (pipeline != null) ? pipeline
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
: new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
Duration localDefaultPollInterval
= (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
- SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
AstroMgmtClientImpl client = new AstroMgmtClientImpl(localPipeline, localSerializerAdapter,
localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/AstroMgmtClientImpl.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/AstroMgmtClientImpl.java
index d55376bdfd42..cc9e23d39b09 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/AstroMgmtClientImpl.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/AstroMgmtClientImpl.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.astro.implementation;
import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpResponse;
@@ -12,8 +13,8 @@
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.exception.ManagementError;
import com.azure.core.management.exception.ManagementException;
-import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
@@ -168,7 +169,7 @@ public OrganizationsClient getOrganizations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-08-01";
+ this.apiVersion = "2024-08-27";
this.operations = new OperationsClientImpl(this);
this.organizations = new OrganizationsClientImpl(this);
}
@@ -233,8 +234,8 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
if (errorBody != null) {
// try to deserialize error body to ManagementError
try {
- managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class,
- SerializerEncoding.JSON);
+ managementError = this.getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
if (managementError.getCode() == null || managementError.getMessage() == null) {
managementError = null;
}
@@ -275,7 +276,7 @@ public int getStatusCode() {
}
public String getHeaderValue(String s) {
- return httpHeaders.getValue(s);
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
}
public HttpHeaders getHeaders() {
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OperationsClientImpl.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OperationsClientImpl.java
index bdfcdd10656e..8860e2a98ca9 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OperationsClientImpl.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OperationsClientImpl.java
@@ -183,9 +183,7 @@ public PagedIterable list(Context context) {
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @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.
@@ -211,9 +209,7 @@ private Mono> listNextSinglePageAsync(String nextL
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @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.
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OrganizationResourceImpl.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OrganizationResourceImpl.java
index a092cd6ffef3..461b82cdfa09 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OrganizationResourceImpl.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OrganizationResourceImpl.java
@@ -91,14 +91,16 @@ public OrganizationResourceImpl withExistingResourceGroup(String resourceGroupNa
}
public OrganizationResource create() {
- this.innerObject = serviceManager.serviceClient().getOrganizations().createOrUpdate(resourceGroupName,
- organizationName, this.innerModel(), Context.NONE);
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .createOrUpdate(resourceGroupName, organizationName, this.innerModel(), Context.NONE);
return this;
}
public OrganizationResource create(Context context) {
- this.innerObject = serviceManager.serviceClient().getOrganizations().createOrUpdate(resourceGroupName,
- organizationName, this.innerModel(), context);
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .createOrUpdate(resourceGroupName, organizationName, this.innerModel(), context);
return this;
}
@@ -114,14 +116,16 @@ public OrganizationResourceImpl update() {
}
public OrganizationResource apply() {
- this.innerObject = serviceManager.serviceClient().getOrganizations().update(resourceGroupName, organizationName,
- updateProperties, Context.NONE);
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .update(resourceGroupName, organizationName, updateProperties, Context.NONE);
return this;
}
public OrganizationResource apply(Context context) {
- this.innerObject = serviceManager.serviceClient().getOrganizations().update(resourceGroupName, organizationName,
- updateProperties, context);
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .update(resourceGroupName, organizationName, updateProperties, context);
return this;
}
@@ -134,14 +138,18 @@ public OrganizationResource apply(Context context) {
}
public OrganizationResource refresh() {
- this.innerObject = serviceManager.serviceClient().getOrganizations()
- .getByResourceGroupWithResponse(resourceGroupName, organizationName, Context.NONE).getValue();
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .getByResourceGroupWithResponse(resourceGroupName, organizationName, Context.NONE)
+ .getValue();
return this;
}
public OrganizationResource refresh(Context context) {
- this.innerObject = serviceManager.serviceClient().getOrganizations()
- .getByResourceGroupWithResponse(resourceGroupName, organizationName, context).getValue();
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .getByResourceGroupWithResponse(resourceGroupName, organizationName, context)
+ .getValue();
return this;
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OrganizationsClientImpl.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OrganizationsClientImpl.java
index 9b7e18f7b941..238897293a41 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OrganizationsClientImpl.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/OrganizationsClientImpl.java
@@ -1181,9 +1181,7 @@ public void delete(String resourceGroupName, String organizationName, Context co
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @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.
@@ -1211,9 +1209,7 @@ private Mono> listBySubscriptionNextSin
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @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.
@@ -1241,9 +1237,7 @@ private Mono> listBySubscriptionNextSin
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @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.
@@ -1271,9 +1265,7 @@ private Mono> listByResourceGroupNextSi
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @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.
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/ResourceManagerUtils.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/ResourceManagerUtils.java
index fda0396249d8..21483617f82d 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/ResourceManagerUtils.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/ResourceManagerUtils.java
@@ -41,7 +41,6 @@ static String getValueFromIdByName(String id, String name) {
}
}
return null;
-
}
static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
@@ -75,7 +74,6 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri
}
}
return null;
-
}
static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ActionType.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ActionType.java
index 5907499ec9f6..2be14adc2544 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ActionType.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ActionType.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -32,7 +31,6 @@ public ActionType() {
* @param name a name to look for.
* @return the corresponding ActionType.
*/
- @JsonCreator
public static ActionType fromString(String name) {
return fromString(name, ActionType.class);
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataOrganizationProperties.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataOrganizationProperties.java
index cb4d1c44dbe8..2c505793b6e6 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataOrganizationProperties.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataOrganizationProperties.java
@@ -6,35 +6,36 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+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 specific to Data Organization resource.
*/
@Fluent
-public final class LiftrBaseDataOrganizationProperties {
+public final class LiftrBaseDataOrganizationProperties
+ implements JsonSerializable {
/*
* Marketplace details of the resource.
*/
- @JsonProperty(value = "marketplace", required = true)
private LiftrBaseMarketplaceDetails marketplace;
/*
* Details of the user.
*/
- @JsonProperty(value = "user", required = true)
private LiftrBaseUserDetails user;
/*
* Provisioning state of the resource.
*/
- @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ResourceProvisioningState provisioningState;
/*
* Organization properties
*/
- @JsonProperty(value = "partnerOrganizationProperties")
private LiftrBaseDataPartnerOrganizationProperties partnerOrganizationProperties;
/**
@@ -120,14 +121,16 @@ public LiftrBaseDataPartnerOrganizationProperties partnerOrganizationProperties(
*/
public void validate() {
if (marketplace() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property marketplace in model LiftrBaseDataOrganizationProperties"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property marketplace in model LiftrBaseDataOrganizationProperties"));
} else {
marketplace().validate();
}
if (user() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property user in model LiftrBaseDataOrganizationProperties"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property user in model LiftrBaseDataOrganizationProperties"));
} else {
user().validate();
}
@@ -137,4 +140,53 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(LiftrBaseDataOrganizationProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("marketplace", this.marketplace);
+ jsonWriter.writeJsonField("user", this.user);
+ jsonWriter.writeJsonField("partnerOrganizationProperties", this.partnerOrganizationProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LiftrBaseDataOrganizationProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LiftrBaseDataOrganizationProperties 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 LiftrBaseDataOrganizationProperties.
+ */
+ public static LiftrBaseDataOrganizationProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LiftrBaseDataOrganizationProperties deserializedLiftrBaseDataOrganizationProperties
+ = new LiftrBaseDataOrganizationProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("marketplace".equals(fieldName)) {
+ deserializedLiftrBaseDataOrganizationProperties.marketplace
+ = LiftrBaseMarketplaceDetails.fromJson(reader);
+ } else if ("user".equals(fieldName)) {
+ deserializedLiftrBaseDataOrganizationProperties.user = LiftrBaseUserDetails.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedLiftrBaseDataOrganizationProperties.provisioningState
+ = ResourceProvisioningState.fromString(reader.getString());
+ } else if ("partnerOrganizationProperties".equals(fieldName)) {
+ deserializedLiftrBaseDataOrganizationProperties.partnerOrganizationProperties
+ = LiftrBaseDataPartnerOrganizationProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLiftrBaseDataOrganizationProperties;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataPartnerOrganizationProperties.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataPartnerOrganizationProperties.java
index 049edc5dca94..c9ec6b854aed 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataPartnerOrganizationProperties.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataPartnerOrganizationProperties.java
@@ -6,41 +6,41 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+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 specific to Partner's organization.
*/
@Fluent
-public final class LiftrBaseDataPartnerOrganizationProperties {
+public final class LiftrBaseDataPartnerOrganizationProperties
+ implements JsonSerializable {
/*
* Organization Id in partner's system
*/
- @JsonProperty(value = "organizationId")
private String organizationId;
/*
* Workspace Id in partner's system
*/
- @JsonProperty(value = "workspaceId")
private String workspaceId;
/*
* Organization name in partner's system
*/
- @JsonProperty(value = "organizationName", required = true)
private String organizationName;
/*
* Workspace name in partner's system
*/
- @JsonProperty(value = "workspaceName")
private String workspaceName;
/*
* Single Sign On properties for the organization
*/
- @JsonProperty(value = "singleSignOnProperties")
private LiftrBaseSingleSignOnProperties singleSignOnProperties;
/**
@@ -157,8 +157,9 @@ public LiftrBaseSingleSignOnProperties singleSignOnProperties() {
*/
public void validate() {
if (organizationName() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property organizationName in model LiftrBaseDataPartnerOrganizationProperties"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property organizationName in model LiftrBaseDataPartnerOrganizationProperties"));
}
if (singleSignOnProperties() != null) {
singleSignOnProperties().validate();
@@ -166,4 +167,55 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(LiftrBaseDataPartnerOrganizationProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("organizationName", this.organizationName);
+ jsonWriter.writeStringField("organizationId", this.organizationId);
+ jsonWriter.writeStringField("workspaceId", this.workspaceId);
+ jsonWriter.writeStringField("workspaceName", this.workspaceName);
+ jsonWriter.writeJsonField("singleSignOnProperties", this.singleSignOnProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LiftrBaseDataPartnerOrganizationProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LiftrBaseDataPartnerOrganizationProperties 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 LiftrBaseDataPartnerOrganizationProperties.
+ */
+ public static LiftrBaseDataPartnerOrganizationProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LiftrBaseDataPartnerOrganizationProperties deserializedLiftrBaseDataPartnerOrganizationProperties
+ = new LiftrBaseDataPartnerOrganizationProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("organizationName".equals(fieldName)) {
+ deserializedLiftrBaseDataPartnerOrganizationProperties.organizationName = reader.getString();
+ } else if ("organizationId".equals(fieldName)) {
+ deserializedLiftrBaseDataPartnerOrganizationProperties.organizationId = reader.getString();
+ } else if ("workspaceId".equals(fieldName)) {
+ deserializedLiftrBaseDataPartnerOrganizationProperties.workspaceId = reader.getString();
+ } else if ("workspaceName".equals(fieldName)) {
+ deserializedLiftrBaseDataPartnerOrganizationProperties.workspaceName = reader.getString();
+ } else if ("singleSignOnProperties".equals(fieldName)) {
+ deserializedLiftrBaseDataPartnerOrganizationProperties.singleSignOnProperties
+ = LiftrBaseSingleSignOnProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLiftrBaseDataPartnerOrganizationProperties;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataPartnerOrganizationPropertiesUpdate.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataPartnerOrganizationPropertiesUpdate.java
index 7c6ec33588a2..aae5a63380b0 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataPartnerOrganizationPropertiesUpdate.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseDataPartnerOrganizationPropertiesUpdate.java
@@ -5,41 +5,41 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+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 specific to Partner's organization.
*/
@Fluent
-public final class LiftrBaseDataPartnerOrganizationPropertiesUpdate {
+public final class LiftrBaseDataPartnerOrganizationPropertiesUpdate
+ implements JsonSerializable {
/*
* Organization Id in partner's system
*/
- @JsonProperty(value = "organizationId")
private String organizationId;
/*
* Workspace Id in partner's system
*/
- @JsonProperty(value = "workspaceId")
private String workspaceId;
/*
* Organization name in partner's system
*/
- @JsonProperty(value = "organizationName")
private String organizationName;
/*
* Workspace name in partner's system
*/
- @JsonProperty(value = "workspaceName")
private String workspaceName;
/*
* Single Sign On properties for the organization
*/
- @JsonProperty(value = "singleSignOnProperties")
private LiftrBaseSingleSignOnProperties singleSignOnProperties;
/**
@@ -159,4 +159,54 @@ public void validate() {
singleSignOnProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("organizationId", this.organizationId);
+ jsonWriter.writeStringField("workspaceId", this.workspaceId);
+ jsonWriter.writeStringField("organizationName", this.organizationName);
+ jsonWriter.writeStringField("workspaceName", this.workspaceName);
+ jsonWriter.writeJsonField("singleSignOnProperties", this.singleSignOnProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LiftrBaseDataPartnerOrganizationPropertiesUpdate from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LiftrBaseDataPartnerOrganizationPropertiesUpdate 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 LiftrBaseDataPartnerOrganizationPropertiesUpdate.
+ */
+ public static LiftrBaseDataPartnerOrganizationPropertiesUpdate fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LiftrBaseDataPartnerOrganizationPropertiesUpdate deserializedLiftrBaseDataPartnerOrganizationPropertiesUpdate
+ = new LiftrBaseDataPartnerOrganizationPropertiesUpdate();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("organizationId".equals(fieldName)) {
+ deserializedLiftrBaseDataPartnerOrganizationPropertiesUpdate.organizationId = reader.getString();
+ } else if ("workspaceId".equals(fieldName)) {
+ deserializedLiftrBaseDataPartnerOrganizationPropertiesUpdate.workspaceId = reader.getString();
+ } else if ("organizationName".equals(fieldName)) {
+ deserializedLiftrBaseDataPartnerOrganizationPropertiesUpdate.organizationName = reader.getString();
+ } else if ("workspaceName".equals(fieldName)) {
+ deserializedLiftrBaseDataPartnerOrganizationPropertiesUpdate.workspaceName = reader.getString();
+ } else if ("singleSignOnProperties".equals(fieldName)) {
+ deserializedLiftrBaseDataPartnerOrganizationPropertiesUpdate.singleSignOnProperties
+ = LiftrBaseSingleSignOnProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLiftrBaseDataPartnerOrganizationPropertiesUpdate;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseMarketplaceDetails.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseMarketplaceDetails.java
index ae917fc55e12..e45430544f4c 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseMarketplaceDetails.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseMarketplaceDetails.java
@@ -6,29 +6,30 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Marketplace details for an organization.
*/
@Fluent
-public final class LiftrBaseMarketplaceDetails {
+public final class LiftrBaseMarketplaceDetails implements JsonSerializable {
/*
* Azure subscription id for the the marketplace offer is purchased from
*/
- @JsonProperty(value = "subscriptionId", required = true)
private String subscriptionId;
/*
* Marketplace subscription status
*/
- @JsonProperty(value = "subscriptionStatus")
private MarketplaceSubscriptionStatus subscriptionStatus;
/*
* Offer details for the marketplace that is selected by the user
*/
- @JsonProperty(value = "offerDetails", required = true)
private LiftrBaseOfferDetails offerDetails;
/**
@@ -103,17 +104,59 @@ public LiftrBaseMarketplaceDetails withOfferDetails(LiftrBaseOfferDetails offerD
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (subscriptionId() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property subscriptionId in model LiftrBaseMarketplaceDetails"));
- }
if (offerDetails() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property offerDetails in model LiftrBaseMarketplaceDetails"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property offerDetails in model LiftrBaseMarketplaceDetails"));
} else {
offerDetails().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(LiftrBaseMarketplaceDetails.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("offerDetails", this.offerDetails);
+ jsonWriter.writeStringField("subscriptionId", this.subscriptionId);
+ jsonWriter.writeStringField("subscriptionStatus",
+ this.subscriptionStatus == null ? null : this.subscriptionStatus.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LiftrBaseMarketplaceDetails from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LiftrBaseMarketplaceDetails 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 LiftrBaseMarketplaceDetails.
+ */
+ public static LiftrBaseMarketplaceDetails fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LiftrBaseMarketplaceDetails deserializedLiftrBaseMarketplaceDetails = new LiftrBaseMarketplaceDetails();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("offerDetails".equals(fieldName)) {
+ deserializedLiftrBaseMarketplaceDetails.offerDetails = LiftrBaseOfferDetails.fromJson(reader);
+ } else if ("subscriptionId".equals(fieldName)) {
+ deserializedLiftrBaseMarketplaceDetails.subscriptionId = reader.getString();
+ } else if ("subscriptionStatus".equals(fieldName)) {
+ deserializedLiftrBaseMarketplaceDetails.subscriptionStatus
+ = MarketplaceSubscriptionStatus.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLiftrBaseMarketplaceDetails;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseMarketplaceDetailsUpdate.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseMarketplaceDetailsUpdate.java
new file mode 100644
index 000000000000..fdb536160332
--- /dev/null
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseMarketplaceDetailsUpdate.java
@@ -0,0 +1,156 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.astro.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;
+
+/**
+ * Marketplace details for an organization.
+ */
+@Fluent
+public final class LiftrBaseMarketplaceDetailsUpdate implements JsonSerializable {
+ /*
+ * Azure subscription id for the the marketplace offer is purchased from
+ */
+ private String subscriptionId;
+
+ /*
+ * Marketplace subscription status
+ */
+ private MarketplaceSubscriptionStatus subscriptionStatus;
+
+ /*
+ * Offer details for the marketplace that is selected by the user
+ */
+ private LiftrBaseOfferDetailsUpdate offerDetails;
+
+ /**
+ * Creates an instance of LiftrBaseMarketplaceDetailsUpdate class.
+ */
+ public LiftrBaseMarketplaceDetailsUpdate() {
+ }
+
+ /**
+ * Get the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Set the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from.
+ *
+ * @param subscriptionId the subscriptionId value to set.
+ * @return the LiftrBaseMarketplaceDetailsUpdate object itself.
+ */
+ public LiftrBaseMarketplaceDetailsUpdate withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /**
+ * Get the subscriptionStatus property: Marketplace subscription status.
+ *
+ * @return the subscriptionStatus value.
+ */
+ public MarketplaceSubscriptionStatus subscriptionStatus() {
+ return this.subscriptionStatus;
+ }
+
+ /**
+ * Set the subscriptionStatus property: Marketplace subscription status.
+ *
+ * @param subscriptionStatus the subscriptionStatus value to set.
+ * @return the LiftrBaseMarketplaceDetailsUpdate object itself.
+ */
+ public LiftrBaseMarketplaceDetailsUpdate withSubscriptionStatus(MarketplaceSubscriptionStatus subscriptionStatus) {
+ this.subscriptionStatus = subscriptionStatus;
+ return this;
+ }
+
+ /**
+ * Get the offerDetails property: Offer details for the marketplace that is selected by the user.
+ *
+ * @return the offerDetails value.
+ */
+ public LiftrBaseOfferDetailsUpdate offerDetails() {
+ return this.offerDetails;
+ }
+
+ /**
+ * Set the offerDetails property: Offer details for the marketplace that is selected by the user.
+ *
+ * @param offerDetails the offerDetails value to set.
+ * @return the LiftrBaseMarketplaceDetailsUpdate object itself.
+ */
+ public LiftrBaseMarketplaceDetailsUpdate withOfferDetails(LiftrBaseOfferDetailsUpdate offerDetails) {
+ this.offerDetails = offerDetails;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (offerDetails() != null) {
+ offerDetails().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("subscriptionId", this.subscriptionId);
+ jsonWriter.writeStringField("subscriptionStatus",
+ this.subscriptionStatus == null ? null : this.subscriptionStatus.toString());
+ jsonWriter.writeJsonField("offerDetails", this.offerDetails);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LiftrBaseMarketplaceDetailsUpdate from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LiftrBaseMarketplaceDetailsUpdate 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 LiftrBaseMarketplaceDetailsUpdate.
+ */
+ public static LiftrBaseMarketplaceDetailsUpdate fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LiftrBaseMarketplaceDetailsUpdate deserializedLiftrBaseMarketplaceDetailsUpdate
+ = new LiftrBaseMarketplaceDetailsUpdate();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("subscriptionId".equals(fieldName)) {
+ deserializedLiftrBaseMarketplaceDetailsUpdate.subscriptionId = reader.getString();
+ } else if ("subscriptionStatus".equals(fieldName)) {
+ deserializedLiftrBaseMarketplaceDetailsUpdate.subscriptionStatus
+ = MarketplaceSubscriptionStatus.fromString(reader.getString());
+ } else if ("offerDetails".equals(fieldName)) {
+ deserializedLiftrBaseMarketplaceDetailsUpdate.offerDetails
+ = LiftrBaseOfferDetailsUpdate.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLiftrBaseMarketplaceDetailsUpdate;
+ });
+ }
+}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseOfferDetails.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseOfferDetails.java
index ff76541ddd91..1f533264920c 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseOfferDetails.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseOfferDetails.java
@@ -5,50 +5,60 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+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;
/**
* Offer details for the marketplace that is selected by the user.
*/
@Fluent
-public final class LiftrBaseOfferDetails {
+public final class LiftrBaseOfferDetails implements JsonSerializable {
/*
* Publisher Id for the marketplace offer
*/
- @JsonProperty(value = "publisherId", required = true)
private String publisherId;
/*
* Offer Id for the marketplace offer
*/
- @JsonProperty(value = "offerId", required = true)
private String offerId;
/*
* Plan Id for the marketplace offer
*/
- @JsonProperty(value = "planId", required = true)
private String planId;
/*
* Plan Name for the marketplace offer
*/
- @JsonProperty(value = "planName")
private String planName;
/*
* Plan Display Name for the marketplace offer
*/
- @JsonProperty(value = "termUnit")
private String termUnit;
/*
* Plan Display Name for the marketplace offer
*/
- @JsonProperty(value = "termId")
private String termId;
+ /*
+ * Subscription renewal mode
+ */
+ private RenewalMode renewalMode;
+
+ /*
+ * Current subscription end date and time
+ */
+ private OffsetDateTime endDate;
+
/**
* Creates an instance of LiftrBaseOfferDetails class.
*/
@@ -175,6 +185,35 @@ public LiftrBaseOfferDetails withTermId(String termId) {
return this;
}
+ /**
+ * Get the renewalMode property: Subscription renewal mode.
+ *
+ * @return the renewalMode value.
+ */
+ public RenewalMode renewalMode() {
+ return this.renewalMode;
+ }
+
+ /**
+ * Set the renewalMode property: Subscription renewal mode.
+ *
+ * @param renewalMode the renewalMode value to set.
+ * @return the LiftrBaseOfferDetails object itself.
+ */
+ public LiftrBaseOfferDetails withRenewalMode(RenewalMode renewalMode) {
+ this.renewalMode = renewalMode;
+ return this;
+ }
+
+ /**
+ * Get the endDate property: Current subscription end date and time.
+ *
+ * @return the endDate value.
+ */
+ public OffsetDateTime endDate() {
+ return this.endDate;
+ }
+
/**
* Validates the instance.
*
@@ -182,18 +221,77 @@ public LiftrBaseOfferDetails withTermId(String termId) {
*/
public void validate() {
if (publisherId() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property publisherId in model LiftrBaseOfferDetails"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property publisherId in model LiftrBaseOfferDetails"));
}
if (offerId() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property offerId in model LiftrBaseOfferDetails"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property offerId in model LiftrBaseOfferDetails"));
}
if (planId() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property planId in model LiftrBaseOfferDetails"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property planId in model LiftrBaseOfferDetails"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(LiftrBaseOfferDetails.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("publisherId", this.publisherId);
+ jsonWriter.writeStringField("offerId", this.offerId);
+ jsonWriter.writeStringField("planId", this.planId);
+ jsonWriter.writeStringField("planName", this.planName);
+ jsonWriter.writeStringField("termUnit", this.termUnit);
+ jsonWriter.writeStringField("termId", this.termId);
+ jsonWriter.writeStringField("renewalMode", this.renewalMode == null ? null : this.renewalMode.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LiftrBaseOfferDetails from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LiftrBaseOfferDetails 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 LiftrBaseOfferDetails.
+ */
+ public static LiftrBaseOfferDetails fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LiftrBaseOfferDetails deserializedLiftrBaseOfferDetails = new LiftrBaseOfferDetails();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("publisherId".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetails.publisherId = reader.getString();
+ } else if ("offerId".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetails.offerId = reader.getString();
+ } else if ("planId".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetails.planId = reader.getString();
+ } else if ("planName".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetails.planName = reader.getString();
+ } else if ("termUnit".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetails.termUnit = reader.getString();
+ } else if ("termId".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetails.termId = reader.getString();
+ } else if ("renewalMode".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetails.renewalMode = RenewalMode.fromString(reader.getString());
+ } else if ("endDate".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetails.endDate = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLiftrBaseOfferDetails;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseOfferDetailsUpdate.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseOfferDetailsUpdate.java
new file mode 100644
index 000000000000..9e8873db4e19
--- /dev/null
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseOfferDetailsUpdate.java
@@ -0,0 +1,261 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.astro.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;
+
+/**
+ * Offer details for the marketplace that is selected by the user.
+ */
+@Fluent
+public final class LiftrBaseOfferDetailsUpdate implements JsonSerializable {
+ /*
+ * Publisher Id for the marketplace offer
+ */
+ private String publisherId;
+
+ /*
+ * Offer Id for the marketplace offer
+ */
+ private String offerId;
+
+ /*
+ * Plan Id for the marketplace offer
+ */
+ private String planId;
+
+ /*
+ * Plan Name for the marketplace offer
+ */
+ private String planName;
+
+ /*
+ * Plan Display Name for the marketplace offer
+ */
+ private String termUnit;
+
+ /*
+ * Plan Display Name for the marketplace offer
+ */
+ private String termId;
+
+ /*
+ * Subscription renewal mode
+ */
+ private RenewalMode renewalMode;
+
+ /**
+ * Creates an instance of LiftrBaseOfferDetailsUpdate class.
+ */
+ public LiftrBaseOfferDetailsUpdate() {
+ }
+
+ /**
+ * Get the publisherId property: Publisher Id for the marketplace offer.
+ *
+ * @return the publisherId value.
+ */
+ public String publisherId() {
+ return this.publisherId;
+ }
+
+ /**
+ * Set the publisherId property: Publisher Id for the marketplace offer.
+ *
+ * @param publisherId the publisherId value to set.
+ * @return the LiftrBaseOfferDetailsUpdate object itself.
+ */
+ public LiftrBaseOfferDetailsUpdate withPublisherId(String publisherId) {
+ this.publisherId = publisherId;
+ return this;
+ }
+
+ /**
+ * Get the offerId property: Offer Id for the marketplace offer.
+ *
+ * @return the offerId value.
+ */
+ public String offerId() {
+ return this.offerId;
+ }
+
+ /**
+ * Set the offerId property: Offer Id for the marketplace offer.
+ *
+ * @param offerId the offerId value to set.
+ * @return the LiftrBaseOfferDetailsUpdate object itself.
+ */
+ public LiftrBaseOfferDetailsUpdate withOfferId(String offerId) {
+ this.offerId = offerId;
+ return this;
+ }
+
+ /**
+ * Get the planId property: Plan Id for the marketplace offer.
+ *
+ * @return the planId value.
+ */
+ public String planId() {
+ return this.planId;
+ }
+
+ /**
+ * Set the planId property: Plan Id for the marketplace offer.
+ *
+ * @param planId the planId value to set.
+ * @return the LiftrBaseOfferDetailsUpdate object itself.
+ */
+ public LiftrBaseOfferDetailsUpdate withPlanId(String planId) {
+ this.planId = planId;
+ return this;
+ }
+
+ /**
+ * Get the planName property: Plan Name for the marketplace offer.
+ *
+ * @return the planName value.
+ */
+ public String planName() {
+ return this.planName;
+ }
+
+ /**
+ * Set the planName property: Plan Name for the marketplace offer.
+ *
+ * @param planName the planName value to set.
+ * @return the LiftrBaseOfferDetailsUpdate object itself.
+ */
+ public LiftrBaseOfferDetailsUpdate withPlanName(String planName) {
+ this.planName = planName;
+ return this;
+ }
+
+ /**
+ * Get the termUnit property: Plan Display Name for the marketplace offer.
+ *
+ * @return the termUnit value.
+ */
+ public String termUnit() {
+ return this.termUnit;
+ }
+
+ /**
+ * Set the termUnit property: Plan Display Name for the marketplace offer.
+ *
+ * @param termUnit the termUnit value to set.
+ * @return the LiftrBaseOfferDetailsUpdate object itself.
+ */
+ public LiftrBaseOfferDetailsUpdate withTermUnit(String termUnit) {
+ this.termUnit = termUnit;
+ return this;
+ }
+
+ /**
+ * Get the termId property: Plan Display Name for the marketplace offer.
+ *
+ * @return the termId value.
+ */
+ public String termId() {
+ return this.termId;
+ }
+
+ /**
+ * Set the termId property: Plan Display Name for the marketplace offer.
+ *
+ * @param termId the termId value to set.
+ * @return the LiftrBaseOfferDetailsUpdate object itself.
+ */
+ public LiftrBaseOfferDetailsUpdate withTermId(String termId) {
+ this.termId = termId;
+ return this;
+ }
+
+ /**
+ * Get the renewalMode property: Subscription renewal mode.
+ *
+ * @return the renewalMode value.
+ */
+ public RenewalMode renewalMode() {
+ return this.renewalMode;
+ }
+
+ /**
+ * Set the renewalMode property: Subscription renewal mode.
+ *
+ * @param renewalMode the renewalMode value to set.
+ * @return the LiftrBaseOfferDetailsUpdate object itself.
+ */
+ public LiftrBaseOfferDetailsUpdate withRenewalMode(RenewalMode renewalMode) {
+ this.renewalMode = renewalMode;
+ 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("publisherId", this.publisherId);
+ jsonWriter.writeStringField("offerId", this.offerId);
+ jsonWriter.writeStringField("planId", this.planId);
+ jsonWriter.writeStringField("planName", this.planName);
+ jsonWriter.writeStringField("termUnit", this.termUnit);
+ jsonWriter.writeStringField("termId", this.termId);
+ jsonWriter.writeStringField("renewalMode", this.renewalMode == null ? null : this.renewalMode.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LiftrBaseOfferDetailsUpdate from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LiftrBaseOfferDetailsUpdate 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 LiftrBaseOfferDetailsUpdate.
+ */
+ public static LiftrBaseOfferDetailsUpdate fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LiftrBaseOfferDetailsUpdate deserializedLiftrBaseOfferDetailsUpdate = new LiftrBaseOfferDetailsUpdate();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("publisherId".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetailsUpdate.publisherId = reader.getString();
+ } else if ("offerId".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetailsUpdate.offerId = reader.getString();
+ } else if ("planId".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetailsUpdate.planId = reader.getString();
+ } else if ("planName".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetailsUpdate.planName = reader.getString();
+ } else if ("termUnit".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetailsUpdate.termUnit = reader.getString();
+ } else if ("termId".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetailsUpdate.termId = reader.getString();
+ } else if ("renewalMode".equals(fieldName)) {
+ deserializedLiftrBaseOfferDetailsUpdate.renewalMode = RenewalMode.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLiftrBaseOfferDetailsUpdate;
+ });
+ }
+}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseSingleSignOnProperties.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseSingleSignOnProperties.java
index e3510b2a9d8b..1a4f74bee2ca 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseSingleSignOnProperties.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseSingleSignOnProperties.java
@@ -5,42 +5,41 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+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.util.List;
/**
* Properties specific to Single Sign On Resource.
*/
@Fluent
-public final class LiftrBaseSingleSignOnProperties {
+public final class LiftrBaseSingleSignOnProperties implements JsonSerializable {
/*
* State of the Single Sign On for the organization
*/
- @JsonProperty(value = "singleSignOnState")
private SingleSignOnStates singleSignOnState;
/*
* AAD enterprise application Id used to setup SSO
*/
- @JsonProperty(value = "enterpriseAppId")
private String enterpriseAppId;
/*
* URL for SSO to be used by the partner to redirect the user to their system
*/
- @JsonProperty(value = "singleSignOnUrl")
private String singleSignOnUrl;
/*
* List of AAD domains fetched from Microsoft Graph for user.
*/
- @JsonProperty(value = "aadDomains")
private List aadDomains;
/*
* Provisioning State of the resource
*/
- @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ResourceProvisioningState provisioningState;
/**
@@ -145,4 +144,56 @@ public ResourceProvisioningState provisioningState() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("singleSignOnState",
+ this.singleSignOnState == null ? null : this.singleSignOnState.toString());
+ jsonWriter.writeStringField("enterpriseAppId", this.enterpriseAppId);
+ jsonWriter.writeStringField("singleSignOnUrl", this.singleSignOnUrl);
+ jsonWriter.writeArrayField("aadDomains", this.aadDomains, (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LiftrBaseSingleSignOnProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LiftrBaseSingleSignOnProperties 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 LiftrBaseSingleSignOnProperties.
+ */
+ public static LiftrBaseSingleSignOnProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LiftrBaseSingleSignOnProperties deserializedLiftrBaseSingleSignOnProperties
+ = new LiftrBaseSingleSignOnProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("singleSignOnState".equals(fieldName)) {
+ deserializedLiftrBaseSingleSignOnProperties.singleSignOnState
+ = SingleSignOnStates.fromString(reader.getString());
+ } else if ("enterpriseAppId".equals(fieldName)) {
+ deserializedLiftrBaseSingleSignOnProperties.enterpriseAppId = reader.getString();
+ } else if ("singleSignOnUrl".equals(fieldName)) {
+ deserializedLiftrBaseSingleSignOnProperties.singleSignOnUrl = reader.getString();
+ } else if ("aadDomains".equals(fieldName)) {
+ List aadDomains = reader.readArray(reader1 -> reader1.getString());
+ deserializedLiftrBaseSingleSignOnProperties.aadDomains = aadDomains;
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedLiftrBaseSingleSignOnProperties.provisioningState
+ = ResourceProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLiftrBaseSingleSignOnProperties;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseUserDetails.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseUserDetails.java
index 3d63d6a2efbc..d34f6c36acf2 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseUserDetails.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseUserDetails.java
@@ -6,41 +6,40 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* User details for an organization.
*/
@Fluent
-public final class LiftrBaseUserDetails {
+public final class LiftrBaseUserDetails implements JsonSerializable {
/*
* First name of the user
*/
- @JsonProperty(value = "firstName", required = true)
private String firstName;
/*
* Last name of the user
*/
- @JsonProperty(value = "lastName", required = true)
private String lastName;
/*
* Email address of the user
*/
- @JsonProperty(value = "emailAddress", required = true)
private String emailAddress;
/*
* User's principal name
*/
- @JsonProperty(value = "upn")
private String upn;
/*
* User's phone number
*/
- @JsonProperty(value = "phoneNumber")
private String phoneNumber;
/**
@@ -156,18 +155,68 @@ public LiftrBaseUserDetails withPhoneNumber(String phoneNumber) {
*/
public void validate() {
if (firstName() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property firstName in model LiftrBaseUserDetails"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property firstName in model LiftrBaseUserDetails"));
}
if (lastName() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property lastName in model LiftrBaseUserDetails"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property lastName in model LiftrBaseUserDetails"));
}
if (emailAddress() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property emailAddress in model LiftrBaseUserDetails"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property emailAddress in model LiftrBaseUserDetails"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(LiftrBaseUserDetails.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("firstName", this.firstName);
+ jsonWriter.writeStringField("lastName", this.lastName);
+ jsonWriter.writeStringField("emailAddress", this.emailAddress);
+ jsonWriter.writeStringField("upn", this.upn);
+ jsonWriter.writeStringField("phoneNumber", this.phoneNumber);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LiftrBaseUserDetails from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LiftrBaseUserDetails 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 LiftrBaseUserDetails.
+ */
+ public static LiftrBaseUserDetails fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LiftrBaseUserDetails deserializedLiftrBaseUserDetails = new LiftrBaseUserDetails();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("firstName".equals(fieldName)) {
+ deserializedLiftrBaseUserDetails.firstName = reader.getString();
+ } else if ("lastName".equals(fieldName)) {
+ deserializedLiftrBaseUserDetails.lastName = reader.getString();
+ } else if ("emailAddress".equals(fieldName)) {
+ deserializedLiftrBaseUserDetails.emailAddress = reader.getString();
+ } else if ("upn".equals(fieldName)) {
+ deserializedLiftrBaseUserDetails.upn = reader.getString();
+ } else if ("phoneNumber".equals(fieldName)) {
+ deserializedLiftrBaseUserDetails.phoneNumber = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLiftrBaseUserDetails;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseUserDetailsUpdate.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseUserDetailsUpdate.java
index 9fc2e7656480..c91adba6d881 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseUserDetailsUpdate.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/LiftrBaseUserDetailsUpdate.java
@@ -5,41 +5,40 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* User details for an organization.
*/
@Fluent
-public final class LiftrBaseUserDetailsUpdate {
+public final class LiftrBaseUserDetailsUpdate implements JsonSerializable {
/*
* First name of the user
*/
- @JsonProperty(value = "firstName")
private String firstName;
/*
* Last name of the user
*/
- @JsonProperty(value = "lastName")
private String lastName;
/*
* Email address of the user
*/
- @JsonProperty(value = "emailAddress")
private String emailAddress;
/*
* User's principal name
*/
- @JsonProperty(value = "upn")
private String upn;
/*
* User's phone number
*/
- @JsonProperty(value = "phoneNumber")
private String phoneNumber;
/**
@@ -155,4 +154,52 @@ public LiftrBaseUserDetailsUpdate withPhoneNumber(String phoneNumber) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("firstName", this.firstName);
+ jsonWriter.writeStringField("lastName", this.lastName);
+ jsonWriter.writeStringField("emailAddress", this.emailAddress);
+ jsonWriter.writeStringField("upn", this.upn);
+ jsonWriter.writeStringField("phoneNumber", this.phoneNumber);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LiftrBaseUserDetailsUpdate from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LiftrBaseUserDetailsUpdate 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 LiftrBaseUserDetailsUpdate.
+ */
+ public static LiftrBaseUserDetailsUpdate fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LiftrBaseUserDetailsUpdate deserializedLiftrBaseUserDetailsUpdate = new LiftrBaseUserDetailsUpdate();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("firstName".equals(fieldName)) {
+ deserializedLiftrBaseUserDetailsUpdate.firstName = reader.getString();
+ } else if ("lastName".equals(fieldName)) {
+ deserializedLiftrBaseUserDetailsUpdate.lastName = reader.getString();
+ } else if ("emailAddress".equals(fieldName)) {
+ deserializedLiftrBaseUserDetailsUpdate.emailAddress = reader.getString();
+ } else if ("upn".equals(fieldName)) {
+ deserializedLiftrBaseUserDetailsUpdate.upn = reader.getString();
+ } else if ("phoneNumber".equals(fieldName)) {
+ deserializedLiftrBaseUserDetailsUpdate.phoneNumber = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLiftrBaseUserDetailsUpdate;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ManagedServiceIdentity.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ManagedServiceIdentity.java
index 73099a20e307..66f33eeb4551 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ManagedServiceIdentity.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ManagedServiceIdentity.java
@@ -6,8 +6,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
+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.util.Map;
import java.util.UUID;
@@ -15,36 +18,30 @@
* Managed service identity (system assigned and/or user assigned identities).
*/
@Fluent
-public final class ManagedServiceIdentity {
+public final class ManagedServiceIdentity implements JsonSerializable {
/*
* The service principal ID of the system assigned identity. This property will only be provided for a system
* assigned identity.
*/
- @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
private UUID principalId;
/*
* The tenant ID of the system assigned identity. This property will only be provided for a system assigned
* identity.
*/
- @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
private UUID tenantId;
/*
* Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
*/
- @JsonProperty(value = "type", required = true)
private ManagedServiceIdentityType type;
/*
- * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys
- * will be ARM resource ids in the form:
+ * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will
+ * be ARM resource ids in the form:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/
- * userAssignedIdentities/{identityName}.
- * The dictionary values can be empty objects ({}) in requests.
+ * userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.
*/
- @JsonProperty(value = "userAssignedIdentities")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map userAssignedIdentities;
/**
@@ -64,8 +61,8 @@ public UUID principalId() {
}
/**
- * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided
- * for a system assigned identity.
+ * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for
+ * a system assigned identity.
*
* @return the tenantId value.
*/
@@ -128,8 +125,8 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map {
@@ -141,4 +138,53 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString());
+ jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities,
+ (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ManagedServiceIdentity from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ManagedServiceIdentity 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 ManagedServiceIdentity.
+ */
+ public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("type".equals(fieldName)) {
+ deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString());
+ } else if ("principalId".equals(fieldName)) {
+ deserializedManagedServiceIdentity.principalId
+ = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()));
+ } else if ("tenantId".equals(fieldName)) {
+ deserializedManagedServiceIdentity.tenantId
+ = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()));
+ } else if ("userAssignedIdentities".equals(fieldName)) {
+ Map userAssignedIdentities
+ = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1));
+ deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedManagedServiceIdentity;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ManagedServiceIdentityType.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ManagedServiceIdentityType.java
index 00e09ed078cb..82e1416c3013 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ManagedServiceIdentityType.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ManagedServiceIdentityType.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -48,7 +47,6 @@ public ManagedServiceIdentityType() {
* @param name a name to look for.
* @return the corresponding ManagedServiceIdentityType.
*/
- @JsonCreator
public static ManagedServiceIdentityType fromString(String name) {
return fromString(name, ManagedServiceIdentityType.class);
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/MarketplaceSubscriptionStatus.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/MarketplaceSubscriptionStatus.java
index ca34f38cd931..e4be1007f07b 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/MarketplaceSubscriptionStatus.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/MarketplaceSubscriptionStatus.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -47,7 +46,6 @@ public MarketplaceSubscriptionStatus() {
* @param name a name to look for.
* @return the corresponding MarketplaceSubscriptionStatus.
*/
- @JsonCreator
public static MarketplaceSubscriptionStatus fromString(String name) {
return fromString(name, MarketplaceSubscriptionStatus.class);
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OperationDisplay.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OperationDisplay.java
index 82ae8472af04..5afed31b3f1c 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OperationDisplay.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OperationDisplay.java
@@ -5,38 +5,38 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Localized display information for this particular operation.
*/
@Immutable
-public final class OperationDisplay {
+public final class OperationDisplay implements JsonSerializable {
/*
- * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
- * Compute".
+ * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or
+ * "Microsoft Compute".
*/
- @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
private String provider;
/*
- * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
- * Schedule Collections".
+ * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or
+ * "Job Schedule Collections".
*/
- @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY)
private String resource;
/*
- * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
- * Machine", "Restart Virtual Machine".
+ * The concise, localized friendly name for the operation; suitable for dropdowns. E.g.
+ * "Create or Update Virtual Machine", "Restart Virtual Machine".
*/
- @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY)
private String operation;
/*
* The short, localized friendly description of the operation; suitable for tool tips and detailed views.
*/
- @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
private String description;
/**
@@ -92,4 +92,45 @@ public String description() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationDisplay from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationDisplay 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 OperationDisplay.
+ */
+ public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationDisplay deserializedOperationDisplay = new OperationDisplay();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("provider".equals(fieldName)) {
+ deserializedOperationDisplay.provider = reader.getString();
+ } else if ("resource".equals(fieldName)) {
+ deserializedOperationDisplay.resource = reader.getString();
+ } else if ("operation".equals(fieldName)) {
+ deserializedOperationDisplay.operation = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ deserializedOperationDisplay.description = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationDisplay;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OperationListResult.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OperationListResult.java
index 93d226cde860..54295f17a4a5 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OperationListResult.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OperationListResult.java
@@ -5,26 +5,28 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.astro.fluent.models.OperationInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
- * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set
- * of results.
+ * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ * results.
*/
@Immutable
-public final class OperationListResult {
+public final class OperationListResult implements JsonSerializable {
/*
* List of operations supported by the resource provider
*/
- @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
private List value;
/*
* URL to get the next set of operation list results (if there are any).
*/
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
/**
@@ -61,4 +63,42 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationListResult 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 OperationListResult.
+ */
+ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationListResult deserializedOperationListResult = new OperationListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1));
+ deserializedOperationListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedOperationListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationListResult;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResource.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResource.java
index 6879f7ea99f0..2ea577f144a0 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResource.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResource.java
@@ -273,9 +273,9 @@ interface WithIdentity {
*/
interface WithProperties {
/**
- * Specifies the properties property: The updatable properties of the OrganizationResource..
+ * Specifies the properties property: The resource-specific properties for this resource..
*
- * @param properties The updatable properties of the OrganizationResource.
+ * @param properties The resource-specific properties for this resource.
* @return the next definition stage.
*/
Update withProperties(OrganizationResourceUpdateProperties properties);
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceListResult.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceListResult.java
index 210b2ed992fd..f4fb3e762c8a 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceListResult.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceListResult.java
@@ -6,25 +6,27 @@
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;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.astro.fluent.models.OrganizationResourceInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* The response of a OrganizationResource list operation.
*/
@Fluent
-public final class OrganizationResourceListResult {
+public final class OrganizationResourceListResult implements JsonSerializable {
/*
* The OrganizationResource items on this page
*/
- @JsonProperty(value = "value", required = true)
private List value;
/*
* The link to the next page of items
*/
- @JsonProperty(value = "nextLink")
private String nextLink;
/**
@@ -80,12 +82,56 @@ public OrganizationResourceListResult withNextLink(String nextLink) {
*/
public void validate() {
if (value() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property value in model OrganizationResourceListResult"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property value in model OrganizationResourceListResult"));
} else {
value().forEach(e -> e.validate());
}
}
private static final ClientLogger LOGGER = new ClientLogger(OrganizationResourceListResult.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ 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();
+ }
+
+ /**
+ * Reads an instance of OrganizationResourceListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OrganizationResourceListResult 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 OrganizationResourceListResult.
+ */
+ public static OrganizationResourceListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OrganizationResourceListResult deserializedOrganizationResourceListResult
+ = new OrganizationResourceListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> OrganizationResourceInner.fromJson(reader1));
+ deserializedOrganizationResourceListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedOrganizationResourceListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOrganizationResourceListResult;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceUpdate.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceUpdate.java
index f6a3085964b7..030735327827 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceUpdate.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceUpdate.java
@@ -5,32 +5,31 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
+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.util.Map;
/**
* The type used for update operations of the OrganizationResource.
*/
@Fluent
-public final class OrganizationResourceUpdate {
+public final class OrganizationResourceUpdate implements JsonSerializable {
/*
* The managed service identities assigned to this resource.
*/
- @JsonProperty(value = "identity")
private ManagedServiceIdentity identity;
/*
* Resource tags.
*/
- @JsonProperty(value = "tags")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
/*
- * The updatable properties of the OrganizationResource.
+ * The resource-specific properties for this resource.
*/
- @JsonProperty(value = "properties")
private OrganizationResourceUpdateProperties properties;
/**
@@ -80,7 +79,7 @@ public OrganizationResourceUpdate withTags(Map tags) {
}
/**
- * Get the properties property: The updatable properties of the OrganizationResource.
+ * Get the properties property: The resource-specific properties for this resource.
*
* @return the properties value.
*/
@@ -89,7 +88,7 @@ public OrganizationResourceUpdateProperties properties() {
}
/**
- * Set the properties property: The updatable properties of the OrganizationResource.
+ * Set the properties property: The resource-specific properties for this resource.
*
* @param properties the properties value to set.
* @return the OrganizationResourceUpdate object itself.
@@ -112,4 +111,48 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("identity", this.identity);
+ jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OrganizationResourceUpdate from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OrganizationResourceUpdate 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 OrganizationResourceUpdate.
+ */
+ public static OrganizationResourceUpdate fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OrganizationResourceUpdate deserializedOrganizationResourceUpdate = new OrganizationResourceUpdate();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("identity".equals(fieldName)) {
+ deserializedOrganizationResourceUpdate.identity = ManagedServiceIdentity.fromJson(reader);
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedOrganizationResourceUpdate.tags = tags;
+ } else if ("properties".equals(fieldName)) {
+ deserializedOrganizationResourceUpdate.properties
+ = OrganizationResourceUpdateProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOrganizationResourceUpdate;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceUpdateProperties.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceUpdateProperties.java
index ab455945448b..e0d6858bdc51 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceUpdateProperties.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/OrganizationResourceUpdateProperties.java
@@ -5,23 +5,31 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* The updatable properties of the OrganizationResource.
*/
@Fluent
-public final class OrganizationResourceUpdateProperties {
+public final class OrganizationResourceUpdateProperties
+ implements JsonSerializable {
+ /*
+ * Marketplace details of the resource.
+ */
+ private LiftrBaseMarketplaceDetailsUpdate marketplace;
+
/*
* Details of the user.
*/
- @JsonProperty(value = "user")
private LiftrBaseUserDetailsUpdate user;
/*
* Organization properties
*/
- @JsonProperty(value = "partnerOrganizationProperties")
private LiftrBaseDataPartnerOrganizationPropertiesUpdate partnerOrganizationProperties;
/**
@@ -30,6 +38,26 @@ public final class OrganizationResourceUpdateProperties {
public OrganizationResourceUpdateProperties() {
}
+ /**
+ * Get the marketplace property: Marketplace details of the resource.
+ *
+ * @return the marketplace value.
+ */
+ public LiftrBaseMarketplaceDetailsUpdate marketplace() {
+ return this.marketplace;
+ }
+
+ /**
+ * Set the marketplace property: Marketplace details of the resource.
+ *
+ * @param marketplace the marketplace value to set.
+ * @return the OrganizationResourceUpdateProperties object itself.
+ */
+ public OrganizationResourceUpdateProperties withMarketplace(LiftrBaseMarketplaceDetailsUpdate marketplace) {
+ this.marketplace = marketplace;
+ return this;
+ }
+
/**
* Get the user property: Details of the user.
*
@@ -77,6 +105,9 @@ public OrganizationResourceUpdateProperties withPartnerOrganizationProperties(
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (marketplace() != null) {
+ marketplace().validate();
+ }
if (user() != null) {
user().validate();
}
@@ -84,4 +115,49 @@ public void validate() {
partnerOrganizationProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("marketplace", this.marketplace);
+ jsonWriter.writeJsonField("user", this.user);
+ jsonWriter.writeJsonField("partnerOrganizationProperties", this.partnerOrganizationProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OrganizationResourceUpdateProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OrganizationResourceUpdateProperties 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 OrganizationResourceUpdateProperties.
+ */
+ public static OrganizationResourceUpdateProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OrganizationResourceUpdateProperties deserializedOrganizationResourceUpdateProperties
+ = new OrganizationResourceUpdateProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("marketplace".equals(fieldName)) {
+ deserializedOrganizationResourceUpdateProperties.marketplace
+ = LiftrBaseMarketplaceDetailsUpdate.fromJson(reader);
+ } else if ("user".equals(fieldName)) {
+ deserializedOrganizationResourceUpdateProperties.user = LiftrBaseUserDetailsUpdate.fromJson(reader);
+ } else if ("partnerOrganizationProperties".equals(fieldName)) {
+ deserializedOrganizationResourceUpdateProperties.partnerOrganizationProperties
+ = LiftrBaseDataPartnerOrganizationPropertiesUpdate.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOrganizationResourceUpdateProperties;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/Origin.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/Origin.java
index 4b0187690873..499f8de0fb92 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/Origin.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/Origin.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -43,7 +42,6 @@ public Origin() {
* @param name a name to look for.
* @return the corresponding Origin.
*/
- @JsonCreator
public static Origin fromString(String name) {
return fromString(name, Origin.class);
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/RenewalMode.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/RenewalMode.java
new file mode 100644
index 000000000000..dd17518fb745
--- /dev/null
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/RenewalMode.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.astro.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Subscription renewal mode.
+ */
+public final class RenewalMode extends ExpandableStringEnum {
+ /**
+ * Static value Auto for RenewalMode.
+ */
+ public static final RenewalMode AUTO = fromString("Auto");
+
+ /**
+ * Static value Manual for RenewalMode.
+ */
+ public static final RenewalMode MANUAL = fromString("Manual");
+
+ /**
+ * Creates a new instance of RenewalMode value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public RenewalMode() {
+ }
+
+ /**
+ * Creates or finds a RenewalMode from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding RenewalMode.
+ */
+ public static RenewalMode fromString(String name) {
+ return fromString(name, RenewalMode.class);
+ }
+
+ /**
+ * Gets known RenewalMode values.
+ *
+ * @return known RenewalMode values.
+ */
+ public static Collection values() {
+ return values(RenewalMode.class);
+ }
+}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ResourceProvisioningState.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ResourceProvisioningState.java
index 8c3c3711f188..c24c69d18a4b 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ResourceProvisioningState.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/ResourceProvisioningState.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -42,7 +41,6 @@ public ResourceProvisioningState() {
* @param name a name to look for.
* @return the corresponding ResourceProvisioningState.
*/
- @JsonCreator
public static ResourceProvisioningState fromString(String name) {
return fromString(name, ResourceProvisioningState.class);
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/SingleSignOnStates.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/SingleSignOnStates.java
index 202c211d3bf0..9f2934088f26 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/SingleSignOnStates.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/SingleSignOnStates.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -42,7 +41,6 @@ public SingleSignOnStates() {
* @param name a name to look for.
* @return the corresponding SingleSignOnStates.
*/
- @JsonCreator
public static SingleSignOnStates fromString(String name) {
return fromString(name, SingleSignOnStates.class);
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/UserAssignedIdentity.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/UserAssignedIdentity.java
index 4a1a345ac1dc..ae9217711b6b 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/UserAssignedIdentity.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/models/UserAssignedIdentity.java
@@ -5,24 +5,26 @@
package com.azure.resourcemanager.astro.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+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.util.UUID;
/**
* User assigned identity properties.
*/
@Immutable
-public final class UserAssignedIdentity {
+public final class UserAssignedIdentity implements JsonSerializable {
/*
* The principal ID of the assigned identity.
*/
- @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
private UUID principalId;
/*
* The client ID of the assigned identity.
*/
- @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
private UUID clientId;
/**
@@ -56,4 +58,43 @@ public UUID clientId() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of UserAssignedIdentity from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of UserAssignedIdentity 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 UserAssignedIdentity.
+ */
+ public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("principalId".equals(fieldName)) {
+ deserializedUserAssignedIdentity.principalId
+ = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()));
+ } else if ("clientId".equals(fieldName)) {
+ deserializedUserAssignedIdentity.clientId
+ = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedUserAssignedIdentity;
+ });
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/java/module-info.java b/sdk/astro/azure-resourcemanager-astro/src/main/java/module-info.java
index bf66eb6157b6..0c102d5060d6 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/java/module-info.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/java/module-info.java
@@ -8,6 +8,6 @@
exports com.azure.resourcemanager.astro.fluent;
exports com.azure.resourcemanager.astro.fluent.models;
exports com.azure.resourcemanager.astro.models;
- opens com.azure.resourcemanager.astro.fluent.models to com.azure.core, com.fasterxml.jackson.databind;
- opens com.azure.resourcemanager.astro.models to com.azure.core, com.fasterxml.jackson.databind;
-}
+ opens com.azure.resourcemanager.astro.fluent.models to com.azure.core;
+ opens com.azure.resourcemanager.astro.models to com.azure.core;
+}
\ No newline at end of file
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-astro/proxy-config.json b/sdk/astro/azure-resourcemanager-astro/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-astro/proxy-config.json
index 070f77c390db..cf98241e6c23 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-astro/proxy-config.json
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-astro/proxy-config.json
@@ -1 +1 @@
-[ [ "com.azure.resourcemanager.astro.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.astro.implementation.OrganizationsClientImpl$OrganizationsService" ] ]
\ No newline at end of file
+[["com.azure.resourcemanager.astro.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.astro.implementation.OrganizationsClientImpl$OrganizationsService"]]
\ No newline at end of file
diff --git a/sdk/astro/azure-resourcemanager-astro/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-astro/reflect-config.json b/sdk/astro/azure-resourcemanager-astro/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-astro/reflect-config.json
index 9c170b933572..0637a088a01e 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-astro/reflect-config.json
+++ b/sdk/astro/azure-resourcemanager-astro/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-astro/reflect-config.json
@@ -1,116 +1 @@
-[ {
- "name" : "com.azure.resourcemanager.astro.models.OperationListResult",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.fluent.models.OperationInner",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.OperationDisplay",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.OrganizationResourceListResult",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.fluent.models.OrganizationResourceInner",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.LiftrBaseDataOrganizationProperties",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.LiftrBaseMarketplaceDetails",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.LiftrBaseOfferDetails",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.LiftrBaseUserDetails",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationProperties",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.ManagedServiceIdentity",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.UserAssignedIdentity",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.OrganizationResourceUpdate",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.OrganizationResourceUpdateProperties",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.LiftrBaseUserDetailsUpdate",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationPropertiesUpdate",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.Origin",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.ActionType",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.ResourceProvisioningState",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.SingleSignOnStates",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-}, {
- "name" : "com.azure.resourcemanager.astro.models.ManagedServiceIdentityType",
- "allDeclaredConstructors" : true,
- "allDeclaredFields" : true,
- "allDeclaredMethods" : true
-} ]
\ No newline at end of file
+[]
\ No newline at end of file
diff --git a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OperationsListSamples.java b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OperationsListSamples.java
index 2bbb53fc802a..f4f6117dbe71 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OperationsListSamples.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OperationsListSamples.java
@@ -9,7 +9,7 @@
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Operations_List_MaximumSet_Gen.json
*/
/**
@@ -20,4 +20,17 @@ public final class OperationsListSamples {
public static void operationsListGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
manager.operations().list(com.azure.core.util.Context.NONE);
}
+
+ /*
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
+ * Operations_List_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Operations_List - generated by [MinimumSet] rule.
+ *
+ * @param manager Entry point to AstroManager.
+ */
+ public static void operationsListGeneratedByMinimumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
+ manager.operations().list(com.azure.core.util.Context.NONE);
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsCreateOrUpdateSamples.java b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsCreateOrUpdateSamples.java
index 0d9d2173e003..39da94a8ef51 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsCreateOrUpdateSamples.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsCreateOrUpdateSamples.java
@@ -13,6 +13,7 @@
import com.azure.resourcemanager.astro.models.ManagedServiceIdentity;
import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
+import com.azure.resourcemanager.astro.models.RenewalMode;
import com.azure.resourcemanager.astro.models.SingleSignOnStates;
import java.util.Arrays;
import java.util.HashMap;
@@ -23,7 +24,7 @@
*/
public final class OrganizationsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_CreateOrUpdate_MaximumSet_Gen.json
*/
/**
@@ -33,22 +34,36 @@ public final class OrganizationsCreateOrUpdateSamples {
*/
public static void
organizationsCreateOrUpdateGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
- manager.organizations().define("U.1-:7").withRegion("mhqthlsatwvqkl").withExistingResourceGroup("rgastronomer")
+ manager.organizations()
+ .define("U.1-:7")
+ .withRegion("pgfkugslgnsxeqpjs")
+ .withExistingResourceGroup("rgastronomer")
.withTags(mapOf())
.withProperties(new LiftrBaseDataOrganizationProperties()
- .withMarketplace(new LiftrBaseMarketplaceDetails().withSubscriptionId("ntthclydlpqmasr")
+ .withMarketplace(new LiftrBaseMarketplaceDetails().withSubscriptionId("emasc")
.withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START)
- .withOfferDetails(new LiftrBaseOfferDetails().withPublisherId("gfsqxygpnerxmvols")
- .withOfferId("krzkefmpxztqyusidzgpchfaswuyce").withPlanId("kndxzygsanuiqzwbfbbvoipv")
- .withPlanName("pwqjwlq").withTermUnit("xyygyzcazkuelz").withTermId("pwds")))
- .withUser(new LiftrBaseUserDetails().withFirstName("nfh").withLastName("lazfbstcccykibvcrxpmglqam")
- .withEmailAddress(".K_@e7N-g1.xjqnbPs").withUpn("xtutvycpxjrtoftx").withPhoneNumber("inxkscllh"))
+ .withOfferDetails(new LiftrBaseOfferDetails().withPublisherId("kt")
+ .withOfferId("tvidibzbxevtvnrdp")
+ .withPlanId("lwcvzdqecwkeracahmixnh")
+ .withPlanName("d")
+ .withTermUnit("rs")
+ .withTermId("kopnnjsp")
+ .withRenewalMode(RenewalMode.AUTO)))
+ .withUser(new LiftrBaseUserDetails().withFirstName("ucowvrccqpqpkdg")
+ .withLastName("fwwtnwggrtibghoijfzajrhgyo")
+ .withEmailAddress(".K_@e7N-g1.xjqnbPs")
+ .withUpn("zbdgbbqg")
+ .withPhoneNumber("brnngpezmqecvflklbhsibq"))
.withPartnerOrganizationProperties(
- new LiftrBaseDataPartnerOrganizationProperties().withOrganizationId("lskgzdmziusgrsucv")
- .withWorkspaceId("vcrupxwpaba").withOrganizationName("3-").withWorkspaceName("9.:06")
- .withSingleSignOnProperties(new LiftrBaseSingleSignOnProperties()
- .withSingleSignOnState(SingleSignOnStates.INITIAL).withEnterpriseAppId("mklfypyujwumgwdzae")
- .withSingleSignOnUrl("ymmtzkyghvinvhgnqlzwrr").withAadDomains(Arrays.asList("kfbleh")))))
+ new LiftrBaseDataPartnerOrganizationProperties().withOrganizationId("juomtfzwkjwnhhpodfnrqdv")
+ .withWorkspaceId("nnryjcmiohmkbvhngfgxigpodvhl")
+ .withOrganizationName("U.1-:7")
+ .withWorkspaceName("9.:06")
+ .withSingleSignOnProperties(
+ new LiftrBaseSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL)
+ .withEnterpriseAppId("srkwxktx")
+ .withSingleSignOnUrl("l")
+ .withAadDomains(Arrays.asList("fcnqoizqxcdclmy")))))
.withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE)
.withUserAssignedIdentities(mapOf()))
.create();
diff --git a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsDeleteSamples.java b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsDeleteSamples.java
index 8d93a8f7e217..665592d8971b 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsDeleteSamples.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsDeleteSamples.java
@@ -9,7 +9,7 @@
*/
public final class OrganizationsDeleteSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_Delete_MaximumSet_Gen.json
*/
/**
@@ -19,6 +19,6 @@ public final class OrganizationsDeleteSamples {
*/
public static void
organizationsDeleteGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
- manager.organizations().delete("rgastronomer", "q:", com.azure.core.util.Context.NONE);
+ manager.organizations().delete("rgastronomer", "U.1-:7", com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsGetByResourceGroupSamples.java b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsGetByResourceGroupSamples.java
index e950f378a5ae..5124e1318485 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsGetByResourceGroupSamples.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsGetByResourceGroupSamples.java
@@ -9,7 +9,7 @@
*/
public final class OrganizationsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_Get_MaximumSet_Gen.json
*/
/**
@@ -18,7 +18,7 @@ public final class OrganizationsGetByResourceGroupSamples {
* @param manager Entry point to AstroManager.
*/
public static void organizationsGetGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
- manager.organizations().getByResourceGroupWithResponse("rgastronomer", "S PS",
- com.azure.core.util.Context.NONE);
+ manager.organizations()
+ .getByResourceGroupWithResponse("rgastronomer", "U.1-:7", com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsListByResourceGroupSamples.java b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsListByResourceGroupSamples.java
index c12840918fc5..cf935758a0aa 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsListByResourceGroupSamples.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsListByResourceGroupSamples.java
@@ -9,7 +9,7 @@
*/
public final class OrganizationsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_ListByResourceGroup_MaximumSet_Gen.json
*/
/**
@@ -21,4 +21,18 @@ public static void organizationsListByResourceGroupGeneratedByMaximumSetRule(
com.azure.resourcemanager.astro.AstroManager manager) {
manager.organizations().listByResourceGroup("rgastronomer", com.azure.core.util.Context.NONE);
}
+
+ /*
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
+ * Organizations_ListByResourceGroup_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Organizations_ListByResourceGroup - generated by [MinimumSet] rule.
+ *
+ * @param manager Entry point to AstroManager.
+ */
+ public static void organizationsListByResourceGroupGeneratedByMinimumSetRule(
+ com.azure.resourcemanager.astro.AstroManager manager) {
+ manager.organizations().listByResourceGroup("rgastronomer", com.azure.core.util.Context.NONE);
+ }
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsListSamples.java b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsListSamples.java
index c4bef2f95893..f3f27a2ec46b 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsListSamples.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsListSamples.java
@@ -9,7 +9,21 @@
*/
public final class OrganizationsListSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
+ * Organizations_ListBySubscription_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Organizations_ListBySubscription - generated by [MinimumSet] rule.
+ *
+ * @param manager Entry point to AstroManager.
+ */
+ public static void
+ organizationsListBySubscriptionGeneratedByMinimumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
+ manager.organizations().list(com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_ListBySubscription_MaximumSet_Gen.json
*/
/**
diff --git a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsUpdateSamples.java b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsUpdateSamples.java
index dff8ca722146..099fade64588 100644
--- a/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsUpdateSamples.java
+++ b/sdk/astro/azure-resourcemanager-astro/src/samples/java/com/azure/resourcemanager/astro/generated/OrganizationsUpdateSamples.java
@@ -5,12 +5,16 @@
package com.azure.resourcemanager.astro.generated;
import com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationPropertiesUpdate;
+import com.azure.resourcemanager.astro.models.LiftrBaseMarketplaceDetailsUpdate;
+import com.azure.resourcemanager.astro.models.LiftrBaseOfferDetailsUpdate;
import com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties;
import com.azure.resourcemanager.astro.models.LiftrBaseUserDetailsUpdate;
import com.azure.resourcemanager.astro.models.ManagedServiceIdentity;
import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
import com.azure.resourcemanager.astro.models.OrganizationResource;
import com.azure.resourcemanager.astro.models.OrganizationResourceUpdateProperties;
+import com.azure.resourcemanager.astro.models.RenewalMode;
import com.azure.resourcemanager.astro.models.SingleSignOnStates;
import java.util.Arrays;
import java.util.HashMap;
@@ -21,30 +25,48 @@
*/
public final class OrganizationsUpdateSamples {
/*
- * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
+ * x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
* Organizations_Update_MaximumSet_Gen.json
*/
/**
- * Sample code: Organizations_Update.
+ * Sample code: Organizations_Update - generated by [MaximumSet] rule.
*
* @param manager Entry point to AstroManager.
*/
- public static void organizationsUpdate(com.azure.resourcemanager.astro.AstroManager manager) {
+ public static void
+ organizationsUpdateGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
OrganizationResource resource = manager.organizations()
- .getByResourceGroupWithResponse("rgastronomer", "6.", com.azure.core.util.Context.NONE).getValue();
- resource.update().withTags(mapOf("key1474", "fakeTokenPlaceholder"))
+ .getByResourceGroupWithResponse("rgastronomer", "U.1-:7", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withTags(mapOf())
.withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE)
.withUserAssignedIdentities(mapOf()))
.withProperties(new OrganizationResourceUpdateProperties()
- .withUser(new LiftrBaseUserDetailsUpdate().withFirstName("qeuofehzypzljgcuysugefbgxde")
- .withLastName("g").withEmailAddress(".K_@e7N-g1.xjqnbPs").withUpn("uwtprzdfpsqmktx")
- .withPhoneNumber("aqpyxznvqpgkzohevynofrjdfgoo"))
+ .withMarketplace(new LiftrBaseMarketplaceDetailsUpdate().withSubscriptionId("ujl")
+ .withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START)
+ .withOfferDetails(new LiftrBaseOfferDetailsUpdate().withPublisherId("bywzycdrucjkx")
+ .withOfferId("aljpaprqzpnivwol")
+ .withPlanId("fcpnstrwetlrajanh")
+ .withPlanName("wjgnlhqqkdi")
+ .withTermUnit("pvpk")
+ .withTermId("xg")
+ .withRenewalMode(RenewalMode.AUTO)))
+ .withUser(new LiftrBaseUserDetailsUpdate().withFirstName("wyoaxocyjfpgicvketuiayfxrxq")
+ .withLastName("vlwybhfayupjpwfhy")
+ .withEmailAddress(".K_@e7N-g1.xjqnbPs")
+ .withUpn("ezefcwbsbgcxrdiixmzphibt")
+ .withPhoneNumber("eibhsslqzufgshuzrjjyymsb"))
.withPartnerOrganizationProperties(new LiftrBaseDataPartnerOrganizationPropertiesUpdate()
- .withOrganizationId("lrtmbkvyvvoszhjevohkmyjhfyty").withWorkspaceId("xsepuskdhejaadusyxq")
- .withOrganizationName("U2P_").withWorkspaceName("L.-y_--:")
- .withSingleSignOnProperties(new LiftrBaseSingleSignOnProperties()
- .withSingleSignOnState(SingleSignOnStates.INITIAL).withEnterpriseAppId("mklfypyujwumgwdzae")
- .withSingleSignOnUrl("ymmtzkyghvinvhgnqlzwrr").withAadDomains(Arrays.asList("kfbleh")))))
+ .withOrganizationId("linzwcqhrpqrxpnghxjnxzetfdps")
+ .withWorkspaceId("tmmxzlagmdrc")
+ .withOrganizationName("U.1-:7")
+ .withWorkspaceName("9.:06")
+ .withSingleSignOnProperties(
+ new LiftrBaseSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL)
+ .withEnterpriseAppId("jspfkoxolosmvyixpktbwyoqrx")
+ .withSingleSignOnUrl("aatouxlmqqizijszlu")
+ .withAadDomains(Arrays.asList("gwzhrfmnhbeitagjdlzw")))))
.apply();
}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseDataOrganizationPropertiesTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseDataOrganizationPropertiesTests.java
deleted file mode 100644
index e267a7bbc2f2..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseDataOrganizationPropertiesTests.java
+++ /dev/null
@@ -1,96 +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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataOrganizationProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseMarketplaceDetails;
-import com.azure.resourcemanager.astro.models.LiftrBaseOfferDetails;
-import com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseUserDetails;
-import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class LiftrBaseDataOrganizationPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LiftrBaseDataOrganizationProperties model = BinaryData.fromString(
- "{\"marketplace\":{\"subscriptionId\":\"ytb\",\"subscriptionStatus\":\"PendingFulfillmentStart\",\"offerDetails\":{\"publisherId\":\"fouflmmnkzsmo\",\"offerId\":\"mglougpbkw\",\"planId\":\"mutduqktaps\",\"planName\":\"gcue\",\"termUnit\":\"umkdosvqwhbmd\",\"termId\":\"bjf\"}},\"user\":{\"firstName\":\"dgmb\",\"lastName\":\"bexppb\",\"emailAddress\":\"tq\",\"upn\":\"ol\",\"phoneNumber\":\"fpsalgbqu\"},\"provisioningState\":\"Succeeded\",\"partnerOrganizationProperties\":{\"organizationId\":\"jgzjaoyfhrtx\",\"workspaceId\":\"n\",\"organizationName\":\"rkujy\",\"workspaceName\":\"l\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"qawrlyxwj\",\"singleSignOnUrl\":\"prbnwbxgjvtbv\",\"aadDomains\":[\"szdnr\",\"jq\"],\"provisioningState\":\"Canceled\"}}}")
- .toObject(LiftrBaseDataOrganizationProperties.class);
- Assertions.assertEquals("ytb", model.marketplace().subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START,
- model.marketplace().subscriptionStatus());
- Assertions.assertEquals("fouflmmnkzsmo", model.marketplace().offerDetails().publisherId());
- Assertions.assertEquals("mglougpbkw", model.marketplace().offerDetails().offerId());
- Assertions.assertEquals("mutduqktaps", model.marketplace().offerDetails().planId());
- Assertions.assertEquals("gcue", model.marketplace().offerDetails().planName());
- Assertions.assertEquals("umkdosvqwhbmd", model.marketplace().offerDetails().termUnit());
- Assertions.assertEquals("bjf", model.marketplace().offerDetails().termId());
- Assertions.assertEquals("dgmb", model.user().firstName());
- Assertions.assertEquals("bexppb", model.user().lastName());
- Assertions.assertEquals("tq", model.user().emailAddress());
- Assertions.assertEquals("ol", model.user().upn());
- Assertions.assertEquals("fpsalgbqu", model.user().phoneNumber());
- Assertions.assertEquals("jgzjaoyfhrtx", model.partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("n", model.partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("rkujy", model.partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("l", model.partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.DISABLE,
- model.partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("qawrlyxwj",
- model.partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("prbnwbxgjvtbv",
- model.partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("szdnr",
- model.partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LiftrBaseDataOrganizationProperties model = new LiftrBaseDataOrganizationProperties()
- .withMarketplace(new LiftrBaseMarketplaceDetails().withSubscriptionId("ytb")
- .withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START)
- .withOfferDetails(new LiftrBaseOfferDetails().withPublisherId("fouflmmnkzsmo").withOfferId("mglougpbkw")
- .withPlanId("mutduqktaps").withPlanName("gcue").withTermUnit("umkdosvqwhbmd").withTermId("bjf")))
- .withUser(new LiftrBaseUserDetails().withFirstName("dgmb").withLastName("bexppb").withEmailAddress("tq")
- .withUpn("ol").withPhoneNumber("fpsalgbqu"))
- .withPartnerOrganizationProperties(
- new LiftrBaseDataPartnerOrganizationProperties().withOrganizationId("jgzjaoyfhrtx").withWorkspaceId("n")
- .withOrganizationName("rkujy").withWorkspaceName("l")
- .withSingleSignOnProperties(new LiftrBaseSingleSignOnProperties()
- .withSingleSignOnState(SingleSignOnStates.DISABLE).withEnterpriseAppId("qawrlyxwj")
- .withSingleSignOnUrl("prbnwbxgjvtbv").withAadDomains(Arrays.asList("szdnr", "jq"))));
- model = BinaryData.fromObject(model).toObject(LiftrBaseDataOrganizationProperties.class);
- Assertions.assertEquals("ytb", model.marketplace().subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START,
- model.marketplace().subscriptionStatus());
- Assertions.assertEquals("fouflmmnkzsmo", model.marketplace().offerDetails().publisherId());
- Assertions.assertEquals("mglougpbkw", model.marketplace().offerDetails().offerId());
- Assertions.assertEquals("mutduqktaps", model.marketplace().offerDetails().planId());
- Assertions.assertEquals("gcue", model.marketplace().offerDetails().planName());
- Assertions.assertEquals("umkdosvqwhbmd", model.marketplace().offerDetails().termUnit());
- Assertions.assertEquals("bjf", model.marketplace().offerDetails().termId());
- Assertions.assertEquals("dgmb", model.user().firstName());
- Assertions.assertEquals("bexppb", model.user().lastName());
- Assertions.assertEquals("tq", model.user().emailAddress());
- Assertions.assertEquals("ol", model.user().upn());
- Assertions.assertEquals("fpsalgbqu", model.user().phoneNumber());
- Assertions.assertEquals("jgzjaoyfhrtx", model.partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("n", model.partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("rkujy", model.partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("l", model.partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.DISABLE,
- model.partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("qawrlyxwj",
- model.partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("prbnwbxgjvtbv",
- model.partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("szdnr",
- model.partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0));
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseDataPartnerOrganizationPropertiesTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseDataPartnerOrganizationPropertiesTests.java
deleted file mode 100644
index ddb329bc341b..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseDataPartnerOrganizationPropertiesTests.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class LiftrBaseDataPartnerOrganizationPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LiftrBaseDataPartnerOrganizationProperties model = BinaryData.fromString(
- "{\"organizationId\":\"fiyipjxsqwpgrj\",\"workspaceId\":\"norcjxvsnbyxqab\",\"organizationName\":\"mocpc\",\"workspaceName\":\"hurzafblj\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"oq\",\"singleSignOnUrl\":\"mkljavb\",\"aadDomains\":[\"tqajzyulpkudjkrl\",\"hbzhfepg\",\"gqexzlocxs\",\"paierh\"],\"provisioningState\":\"Failed\"}}")
- .toObject(LiftrBaseDataPartnerOrganizationProperties.class);
- Assertions.assertEquals("fiyipjxsqwpgrj", model.organizationId());
- Assertions.assertEquals("norcjxvsnbyxqab", model.workspaceId());
- Assertions.assertEquals("mocpc", model.organizationName());
- Assertions.assertEquals("hurzafblj", model.workspaceName());
- Assertions.assertEquals(SingleSignOnStates.DISABLE, model.singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("oq", model.singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("mkljavb", model.singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("tqajzyulpkudjkrl", model.singleSignOnProperties().aadDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LiftrBaseDataPartnerOrganizationProperties model = new LiftrBaseDataPartnerOrganizationProperties()
- .withOrganizationId("fiyipjxsqwpgrj").withWorkspaceId("norcjxvsnbyxqab").withOrganizationName("mocpc")
- .withWorkspaceName("hurzafblj").withSingleSignOnProperties(
- new LiftrBaseSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.DISABLE)
- .withEnterpriseAppId("oq").withSingleSignOnUrl("mkljavb")
- .withAadDomains(Arrays.asList("tqajzyulpkudjkrl", "hbzhfepg", "gqexzlocxs", "paierh")));
- model = BinaryData.fromObject(model).toObject(LiftrBaseDataPartnerOrganizationProperties.class);
- Assertions.assertEquals("fiyipjxsqwpgrj", model.organizationId());
- Assertions.assertEquals("norcjxvsnbyxqab", model.workspaceId());
- Assertions.assertEquals("mocpc", model.organizationName());
- Assertions.assertEquals("hurzafblj", model.workspaceName());
- Assertions.assertEquals(SingleSignOnStates.DISABLE, model.singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("oq", model.singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("mkljavb", model.singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("tqajzyulpkudjkrl", model.singleSignOnProperties().aadDomains().get(0));
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseDataPartnerOrganizationPropertiesUpdateTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseDataPartnerOrganizationPropertiesUpdateTests.java
deleted file mode 100644
index c602ef014310..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseDataPartnerOrganizationPropertiesUpdateTests.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationPropertiesUpdate;
-import com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class LiftrBaseDataPartnerOrganizationPropertiesUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LiftrBaseDataPartnerOrganizationPropertiesUpdate model = BinaryData.fromString(
- "{\"organizationId\":\"gual\",\"workspaceId\":\"xxhejjzzvd\",\"organizationName\":\"gwdslfhotwm\",\"workspaceName\":\"npwlbjnpg\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"dehxnltyfsoppu\",\"singleSignOnUrl\":\"esnzwde\",\"aadDomains\":[\"vorxzdmohct\"],\"provisioningState\":\"Canceled\"}}")
- .toObject(LiftrBaseDataPartnerOrganizationPropertiesUpdate.class);
- Assertions.assertEquals("gual", model.organizationId());
- Assertions.assertEquals("xxhejjzzvd", model.workspaceId());
- Assertions.assertEquals("gwdslfhotwm", model.organizationName());
- Assertions.assertEquals("npwlbjnpg", model.workspaceName());
- Assertions.assertEquals(SingleSignOnStates.ENABLE, model.singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("dehxnltyfsoppu", model.singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("esnzwde", model.singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("vorxzdmohct", model.singleSignOnProperties().aadDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LiftrBaseDataPartnerOrganizationPropertiesUpdate model
- = new LiftrBaseDataPartnerOrganizationPropertiesUpdate().withOrganizationId("gual")
- .withWorkspaceId("xxhejjzzvd").withOrganizationName("gwdslfhotwm").withWorkspaceName("npwlbjnpg")
- .withSingleSignOnProperties(new LiftrBaseSingleSignOnProperties()
- .withSingleSignOnState(SingleSignOnStates.ENABLE).withEnterpriseAppId("dehxnltyfsoppu")
- .withSingleSignOnUrl("esnzwde").withAadDomains(Arrays.asList("vorxzdmohct")));
- model = BinaryData.fromObject(model).toObject(LiftrBaseDataPartnerOrganizationPropertiesUpdate.class);
- Assertions.assertEquals("gual", model.organizationId());
- Assertions.assertEquals("xxhejjzzvd", model.workspaceId());
- Assertions.assertEquals("gwdslfhotwm", model.organizationName());
- Assertions.assertEquals("npwlbjnpg", model.workspaceName());
- Assertions.assertEquals(SingleSignOnStates.ENABLE, model.singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("dehxnltyfsoppu", model.singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("esnzwde", model.singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("vorxzdmohct", model.singleSignOnProperties().aadDomains().get(0));
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseMarketplaceDetailsTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseMarketplaceDetailsTests.java
deleted file mode 100644
index ec5d12041d94..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseMarketplaceDetailsTests.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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.LiftrBaseMarketplaceDetails;
-import com.azure.resourcemanager.astro.models.LiftrBaseOfferDetails;
-import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
-import org.junit.jupiter.api.Assertions;
-
-public final class LiftrBaseMarketplaceDetailsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LiftrBaseMarketplaceDetails model = BinaryData.fromString(
- "{\"subscriptionId\":\"muouqfp\",\"subscriptionStatus\":\"PendingFulfillmentStart\",\"offerDetails\":{\"publisherId\":\"wbnguitnwui\",\"offerId\":\"gazxuf\",\"planId\":\"zuckyfi\",\"planName\":\"fidfvzw\",\"termUnit\":\"uht\",\"termId\":\"wisdkft\"}}")
- .toObject(LiftrBaseMarketplaceDetails.class);
- Assertions.assertEquals("muouqfp", model.subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START, model.subscriptionStatus());
- Assertions.assertEquals("wbnguitnwui", model.offerDetails().publisherId());
- Assertions.assertEquals("gazxuf", model.offerDetails().offerId());
- Assertions.assertEquals("zuckyfi", model.offerDetails().planId());
- Assertions.assertEquals("fidfvzw", model.offerDetails().planName());
- Assertions.assertEquals("uht", model.offerDetails().termUnit());
- Assertions.assertEquals("wisdkft", model.offerDetails().termId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LiftrBaseMarketplaceDetails model = new LiftrBaseMarketplaceDetails().withSubscriptionId("muouqfp")
- .withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START)
- .withOfferDetails(new LiftrBaseOfferDetails().withPublisherId("wbnguitnwui").withOfferId("gazxuf")
- .withPlanId("zuckyfi").withPlanName("fidfvzw").withTermUnit("uht").withTermId("wisdkft"));
- model = BinaryData.fromObject(model).toObject(LiftrBaseMarketplaceDetails.class);
- Assertions.assertEquals("muouqfp", model.subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START, model.subscriptionStatus());
- Assertions.assertEquals("wbnguitnwui", model.offerDetails().publisherId());
- Assertions.assertEquals("gazxuf", model.offerDetails().offerId());
- Assertions.assertEquals("zuckyfi", model.offerDetails().planId());
- Assertions.assertEquals("fidfvzw", model.offerDetails().planName());
- Assertions.assertEquals("uht", model.offerDetails().termUnit());
- Assertions.assertEquals("wisdkft", model.offerDetails().termId());
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseOfferDetailsTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseOfferDetailsTests.java
deleted file mode 100644
index 4b2606233a76..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseOfferDetailsTests.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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.LiftrBaseOfferDetails;
-import org.junit.jupiter.api.Assertions;
-
-public final class LiftrBaseOfferDetailsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LiftrBaseOfferDetails model = BinaryData.fromString(
- "{\"publisherId\":\"wxmnteiwao\",\"offerId\":\"vkmijcmmxdcuf\",\"planId\":\"fsrpymzidnse\",\"planName\":\"xtbzsgfyccsne\",\"termUnit\":\"dwzjeiach\",\"termId\":\"osfln\"}")
- .toObject(LiftrBaseOfferDetails.class);
- Assertions.assertEquals("wxmnteiwao", model.publisherId());
- Assertions.assertEquals("vkmijcmmxdcuf", model.offerId());
- Assertions.assertEquals("fsrpymzidnse", model.planId());
- Assertions.assertEquals("xtbzsgfyccsne", model.planName());
- Assertions.assertEquals("dwzjeiach", model.termUnit());
- Assertions.assertEquals("osfln", model.termId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LiftrBaseOfferDetails model
- = new LiftrBaseOfferDetails().withPublisherId("wxmnteiwao").withOfferId("vkmijcmmxdcuf")
- .withPlanId("fsrpymzidnse").withPlanName("xtbzsgfyccsne").withTermUnit("dwzjeiach").withTermId("osfln");
- model = BinaryData.fromObject(model).toObject(LiftrBaseOfferDetails.class);
- Assertions.assertEquals("wxmnteiwao", model.publisherId());
- Assertions.assertEquals("vkmijcmmxdcuf", model.offerId());
- Assertions.assertEquals("fsrpymzidnse", model.planId());
- Assertions.assertEquals("xtbzsgfyccsne", model.planName());
- Assertions.assertEquals("dwzjeiach", model.termUnit());
- Assertions.assertEquals("osfln", model.termId());
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseSingleSignOnPropertiesTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseSingleSignOnPropertiesTests.java
deleted file mode 100644
index ca1b2badcdef..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseSingleSignOnPropertiesTests.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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class LiftrBaseSingleSignOnPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LiftrBaseSingleSignOnProperties model = BinaryData.fromString(
- "{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"ummajtjaod\",\"singleSignOnUrl\":\"bnbdxkqpxokajion\",\"aadDomains\":[\"ex\",\"stxgc\",\"odgmaajrmvdjwz\"],\"provisioningState\":\"Canceled\"}")
- .toObject(LiftrBaseSingleSignOnProperties.class);
- Assertions.assertEquals(SingleSignOnStates.ENABLE, model.singleSignOnState());
- Assertions.assertEquals("ummajtjaod", model.enterpriseAppId());
- Assertions.assertEquals("bnbdxkqpxokajion", model.singleSignOnUrl());
- Assertions.assertEquals("ex", model.aadDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LiftrBaseSingleSignOnProperties model = new LiftrBaseSingleSignOnProperties()
- .withSingleSignOnState(SingleSignOnStates.ENABLE).withEnterpriseAppId("ummajtjaod")
- .withSingleSignOnUrl("bnbdxkqpxokajion").withAadDomains(Arrays.asList("ex", "stxgc", "odgmaajrmvdjwz"));
- model = BinaryData.fromObject(model).toObject(LiftrBaseSingleSignOnProperties.class);
- Assertions.assertEquals(SingleSignOnStates.ENABLE, model.singleSignOnState());
- Assertions.assertEquals("ummajtjaod", model.enterpriseAppId());
- Assertions.assertEquals("bnbdxkqpxokajion", model.singleSignOnUrl());
- Assertions.assertEquals("ex", model.aadDomains().get(0));
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseUserDetailsTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseUserDetailsTests.java
deleted file mode 100644
index 2a71648e8110..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseUserDetailsTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.LiftrBaseUserDetails;
-import org.junit.jupiter.api.Assertions;
-
-public final class LiftrBaseUserDetailsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LiftrBaseUserDetails model = BinaryData.fromString(
- "{\"firstName\":\"osfqpteehzzv\",\"lastName\":\"pyqr\",\"emailAddress\":\"mzinpvswjdk\",\"upn\":\"soodqxhcrmnoh\",\"phoneNumber\":\"ckwhds\"}")
- .toObject(LiftrBaseUserDetails.class);
- Assertions.assertEquals("osfqpteehzzv", model.firstName());
- Assertions.assertEquals("pyqr", model.lastName());
- Assertions.assertEquals("mzinpvswjdk", model.emailAddress());
- Assertions.assertEquals("soodqxhcrmnoh", model.upn());
- Assertions.assertEquals("ckwhds", model.phoneNumber());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LiftrBaseUserDetails model = new LiftrBaseUserDetails().withFirstName("osfqpteehzzv").withLastName("pyqr")
- .withEmailAddress("mzinpvswjdk").withUpn("soodqxhcrmnoh").withPhoneNumber("ckwhds");
- model = BinaryData.fromObject(model).toObject(LiftrBaseUserDetails.class);
- Assertions.assertEquals("osfqpteehzzv", model.firstName());
- Assertions.assertEquals("pyqr", model.lastName());
- Assertions.assertEquals("mzinpvswjdk", model.emailAddress());
- Assertions.assertEquals("soodqxhcrmnoh", model.upn());
- Assertions.assertEquals("ckwhds", model.phoneNumber());
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseUserDetailsUpdateTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseUserDetailsUpdateTests.java
deleted file mode 100644
index 4603d2b9a40d..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/LiftrBaseUserDetailsUpdateTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.LiftrBaseUserDetailsUpdate;
-import org.junit.jupiter.api.Assertions;
-
-public final class LiftrBaseUserDetailsUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LiftrBaseUserDetailsUpdate model = BinaryData.fromString(
- "{\"firstName\":\"bonqvpkvlrxnjeas\",\"lastName\":\"pheoflokeyy\",\"emailAddress\":\"nj\",\"upn\":\"lwtgrhpdj\",\"phoneNumber\":\"umasxazjpq\"}")
- .toObject(LiftrBaseUserDetailsUpdate.class);
- Assertions.assertEquals("bonqvpkvlrxnjeas", model.firstName());
- Assertions.assertEquals("pheoflokeyy", model.lastName());
- Assertions.assertEquals("nj", model.emailAddress());
- Assertions.assertEquals("lwtgrhpdj", model.upn());
- Assertions.assertEquals("umasxazjpq", model.phoneNumber());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LiftrBaseUserDetailsUpdate model = new LiftrBaseUserDetailsUpdate().withFirstName("bonqvpkvlrxnjeas")
- .withLastName("pheoflokeyy").withEmailAddress("nj").withUpn("lwtgrhpdj").withPhoneNumber("umasxazjpq");
- model = BinaryData.fromObject(model).toObject(LiftrBaseUserDetailsUpdate.class);
- Assertions.assertEquals("bonqvpkvlrxnjeas", model.firstName());
- Assertions.assertEquals("pheoflokeyy", model.lastName());
- Assertions.assertEquals("nj", model.emailAddress());
- Assertions.assertEquals("lwtgrhpdj", model.upn());
- Assertions.assertEquals("umasxazjpq", model.phoneNumber());
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/ManagedServiceIdentityTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/ManagedServiceIdentityTests.java
deleted file mode 100644
index 88ea1017a01c..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/ManagedServiceIdentityTests.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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.astro.models.UserAssignedIdentity;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ManagedServiceIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ManagedServiceIdentity model = BinaryData.fromString(
- "{\"principalId\":\"ba871653-783a-4112-94f3-f0ee24f4fb8b\",\"tenantId\":\"d3f8a658-ed33-4fae-b96c-b34b9d20ce00\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"j\":{\"principalId\":\"da91cbef-1718-46cc-82a5-17c645d02377\",\"clientId\":\"8165d87b-0f2e-40ff-980e-bc55c064ee92\"},\"jctbza\":{\"principalId\":\"eb5f00c6-e7d2-4644-bba5-99f74866c5d5\",\"clientId\":\"8940c25a-f3f5-4737-bbf4-ee361f89dc44\"},\"sycbkbfk\":{\"principalId\":\"92f4df9d-3855-4662-806b-89501444aedc\",\"clientId\":\"f3cfbe55-3af4-4772-976e-a6c4a96d7634\"},\"dkexxppofm\":{\"principalId\":\"07629af5-c039-4599-aa8c-2dce75dc1644\",\"clientId\":\"807da0f0-675e-4daa-b227-31390fef093d\"}}}")
- .toObject(ManagedServiceIdentity.class);
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ManagedServiceIdentity model
- = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf("j", new UserAssignedIdentity(), "jctbza", new UserAssignedIdentity(),
- "sycbkbfk", new UserAssignedIdentity(), "dkexxppofm", new UserAssignedIdentity()));
- model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class);
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type());
- }
-
- // 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/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OperationDisplayTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OperationDisplayTests.java
deleted file mode 100644
index 962da9b431e9..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.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/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OperationInnerTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OperationInnerTests.java
deleted file mode 100644
index a935c8bf2d1f..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.fluent.models.OperationInner;
-import com.azure.resourcemanager.astro.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/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OperationListResultTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OperationListResultTests.java
deleted file mode 100644
index 58a1198e5ffb..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.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/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OperationsListMockTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OperationsListMockTests.java
deleted file mode 100644
index a167cb89c26c..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OperationsListMockTests.java
+++ /dev/null
@@ -1,54 +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.astro.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.astro.AstroManager;
-import com.azure.resourcemanager.astro.models.Operation;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OperationsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr
- = "{\"value\":[{\"name\":\"dwxdndnv\",\"isDataAction\":true,\"display\":{\"provider\":\"jugwdkcglhsl\",\"resource\":\"jdyggdtji\",\"operation\":\"b\",\"description\":\"ofqweykhmenevfye\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito.when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito.when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AstroManager manager = AstroManager.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/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceInnerTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceInnerTests.java
deleted file mode 100644
index 514db2f544c4..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceInnerTests.java
+++ /dev/null
@@ -1,125 +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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.fluent.models.OrganizationResourceInner;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataOrganizationProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseMarketplaceDetails;
-import com.azure.resourcemanager.astro.models.LiftrBaseOfferDetails;
-import com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseUserDetails;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import com.azure.resourcemanager.astro.models.UserAssignedIdentity;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class OrganizationResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OrganizationResourceInner model = BinaryData.fromString(
- "{\"properties\":{\"marketplace\":{\"subscriptionId\":\"jofxqe\",\"subscriptionStatus\":\"PendingFulfillmentStart\",\"offerDetails\":{\"publisherId\":\"aeqjhqjbasvms\",\"offerId\":\"jqul\",\"planId\":\"gsntnbybkzgcwr\",\"planName\":\"lxxwrljdouskc\",\"termUnit\":\"kocrcjdkwtnhx\",\"termId\":\"jbiksqrglssai\"}},\"user\":{\"firstName\":\"qpjwnzlljfm\",\"lastName\":\"pee\",\"emailAddress\":\"vmgxsab\",\"upn\":\"qduujitcjczdz\",\"phoneNumber\":\"ndhkrw\"},\"provisioningState\":\"Failed\",\"partnerOrganizationProperties\":{\"organizationId\":\"dsbdkvwrwjf\",\"workspaceId\":\"snhu\",\"organizationName\":\"je\",\"workspaceName\":\"mrldhu\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"atqxho\",\"singleSignOnUrl\":\"geablgphuticndvk\",\"aadDomains\":[\"wyiftyhxhur\",\"k\",\"tyxolniwpwc\"],\"provisioningState\":\"Failed\"}}},\"identity\":{\"principalId\":\"5266b6b1-f132-4667-af22-219439f39985\",\"tenantId\":\"85f6f9c0-8a65-4fb4-b763-c5db4c67fe9f\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"lryplwckbasyy\":{\"principalId\":\"a01f29f8-275f-4483-bd4e-4cd4affdf1fe\",\"clientId\":\"67189864-bf71-4916-8df9-6f95146aab84\"}}},\"location\":\"ddhsgcbacphe\",\"tags\":{\"ndlik\":\"tynqgoul\"},\"id\":\"yqkgfg\",\"name\":\"bmadgak\",\"type\":\"qsrxybzqqed\"}")
- .toObject(OrganizationResourceInner.class);
- Assertions.assertEquals("ddhsgcbacphe", model.location());
- Assertions.assertEquals("tynqgoul", model.tags().get("ndlik"));
- Assertions.assertEquals("jofxqe", model.properties().marketplace().subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START,
- model.properties().marketplace().subscriptionStatus());
- Assertions.assertEquals("aeqjhqjbasvms", model.properties().marketplace().offerDetails().publisherId());
- Assertions.assertEquals("jqul", model.properties().marketplace().offerDetails().offerId());
- Assertions.assertEquals("gsntnbybkzgcwr", model.properties().marketplace().offerDetails().planId());
- Assertions.assertEquals("lxxwrljdouskc", model.properties().marketplace().offerDetails().planName());
- Assertions.assertEquals("kocrcjdkwtnhx", model.properties().marketplace().offerDetails().termUnit());
- Assertions.assertEquals("jbiksqrglssai", model.properties().marketplace().offerDetails().termId());
- Assertions.assertEquals("qpjwnzlljfm", model.properties().user().firstName());
- Assertions.assertEquals("pee", model.properties().user().lastName());
- Assertions.assertEquals("vmgxsab", model.properties().user().emailAddress());
- Assertions.assertEquals("qduujitcjczdz", model.properties().user().upn());
- Assertions.assertEquals("ndhkrw", model.properties().user().phoneNumber());
- Assertions.assertEquals("dsbdkvwrwjf", model.properties().partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("snhu", model.properties().partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("je", model.properties().partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("mrldhu", model.properties().partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.INITIAL,
- model.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("atqxho",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("geablgphuticndvk",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("wyiftyhxhur",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OrganizationResourceInner model
- = new OrganizationResourceInner().withLocation("ddhsgcbacphe").withTags(mapOf("ndlik", "tynqgoul"))
- .withProperties(new LiftrBaseDataOrganizationProperties()
- .withMarketplace(new LiftrBaseMarketplaceDetails().withSubscriptionId("jofxqe")
- .withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START)
- .withOfferDetails(new LiftrBaseOfferDetails().withPublisherId("aeqjhqjbasvms")
- .withOfferId("jqul").withPlanId("gsntnbybkzgcwr").withPlanName("lxxwrljdouskc")
- .withTermUnit("kocrcjdkwtnhx").withTermId("jbiksqrglssai")))
- .withUser(new LiftrBaseUserDetails().withFirstName("qpjwnzlljfm").withLastName("pee")
- .withEmailAddress("vmgxsab").withUpn("qduujitcjczdz").withPhoneNumber("ndhkrw"))
- .withPartnerOrganizationProperties(new LiftrBaseDataPartnerOrganizationProperties()
- .withOrganizationId("dsbdkvwrwjf").withWorkspaceId("snhu").withOrganizationName("je")
- .withWorkspaceName("mrldhu").withSingleSignOnProperties(
- new LiftrBaseSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL)
- .withEnterpriseAppId("atqxho").withSingleSignOnUrl("geablgphuticndvk")
- .withAadDomains(Arrays.asList("wyiftyhxhur", "k", "tyxolniwpwc")))))
- .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)
- .withUserAssignedIdentities(mapOf("lryplwckbasyy", new UserAssignedIdentity())));
- model = BinaryData.fromObject(model).toObject(OrganizationResourceInner.class);
- Assertions.assertEquals("ddhsgcbacphe", model.location());
- Assertions.assertEquals("tynqgoul", model.tags().get("ndlik"));
- Assertions.assertEquals("jofxqe", model.properties().marketplace().subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START,
- model.properties().marketplace().subscriptionStatus());
- Assertions.assertEquals("aeqjhqjbasvms", model.properties().marketplace().offerDetails().publisherId());
- Assertions.assertEquals("jqul", model.properties().marketplace().offerDetails().offerId());
- Assertions.assertEquals("gsntnbybkzgcwr", model.properties().marketplace().offerDetails().planId());
- Assertions.assertEquals("lxxwrljdouskc", model.properties().marketplace().offerDetails().planName());
- Assertions.assertEquals("kocrcjdkwtnhx", model.properties().marketplace().offerDetails().termUnit());
- Assertions.assertEquals("jbiksqrglssai", model.properties().marketplace().offerDetails().termId());
- Assertions.assertEquals("qpjwnzlljfm", model.properties().user().firstName());
- Assertions.assertEquals("pee", model.properties().user().lastName());
- Assertions.assertEquals("vmgxsab", model.properties().user().emailAddress());
- Assertions.assertEquals("qduujitcjczdz", model.properties().user().upn());
- Assertions.assertEquals("ndhkrw", model.properties().user().phoneNumber());
- Assertions.assertEquals("dsbdkvwrwjf", model.properties().partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("snhu", model.properties().partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("je", model.properties().partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("mrldhu", model.properties().partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.INITIAL,
- model.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("atqxho",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("geablgphuticndvk",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("wyiftyhxhur",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type());
- }
-
- // 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/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceListResultTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceListResultTests.java
deleted file mode 100644
index d9b3522e23ef..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceListResultTests.java
+++ /dev/null
@@ -1,144 +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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.fluent.models.OrganizationResourceInner;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataOrganizationProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseMarketplaceDetails;
-import com.azure.resourcemanager.astro.models.LiftrBaseOfferDetails;
-import com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseUserDetails;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
-import com.azure.resourcemanager.astro.models.OrganizationResourceListResult;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import com.azure.resourcemanager.astro.models.UserAssignedIdentity;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class OrganizationResourceListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OrganizationResourceListResult model = BinaryData.fromString(
- "{\"value\":[{\"properties\":{\"marketplace\":{\"subscriptionId\":\"git\",\"subscriptionStatus\":\"Unsubscribed\",\"offerDetails\":{\"publisherId\":\"hab\",\"offerId\":\"fpikxwczb\",\"planId\":\"scnpqxuhivy\",\"planName\":\"iwbybrkxvdumjg\",\"termUnit\":\"fwvuk\",\"termId\":\"audccsnhs\"}},\"user\":{\"firstName\":\"cnyejhkryhtnapcz\",\"lastName\":\"lokjyemkk\",\"emailAddress\":\"ni\",\"upn\":\"oxzjnchgejspod\",\"phoneNumber\":\"ilzyd\"},\"provisioningState\":\"Succeeded\",\"partnerOrganizationProperties\":{\"organizationId\":\"yahux\",\"workspaceId\":\"pmqnja\",\"organizationName\":\"wixjsprozvcp\",\"workspaceName\":\"eg\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"datscmd\",\"singleSignOnUrl\":\"jhulsuuvmkjo\",\"aadDomains\":[\"wfndiodjpsl\",\"ej\"],\"provisioningState\":\"Succeeded\"}}},\"identity\":{\"principalId\":\"f345d1dd-84ed-4137-a8ac-041c6e9263e8\",\"tenantId\":\"9206dbad-6511-4700-91b0-09e6654cabe4\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"acctazakljla\":{\"principalId\":\"5b8c2542-054a-4119-b929-2af73c1f7fff\",\"clientId\":\"971818de-3310-451d-95ac-61ea613d7ed9\"},\"ryffdfdosy\":{\"principalId\":\"68df7cb7-56e9-4eb6-b467-dd50504fea27\",\"clientId\":\"14dd993a-21c5-417e-bb85-9c31c083c79c\"},\"paojakhmsbzjh\":{\"principalId\":\"deba250f-1fa4-465c-9a2c-9c5221e004f8\",\"clientId\":\"738bf263-f59a-4f01-8001-207c1b17da42\"},\"evdphlxaol\":{\"principalId\":\"16fb1148-d6a2-4723-8dd4-01ee257f425f\",\"clientId\":\"43d63226-eaa0-40b1-bbbf-75b587043232\"}}},\"location\":\"qtrgqjbpfzfsinzg\",\"tags\":{\"j\":\"jrwzox\",\"fpjkjlxofp\":\"felluwfzitonpe\",\"uybbkpodep\":\"vhpfxxypininmay\",\"zxtheotusivyevcc\":\"oginuvamiheognar\"},\"id\":\"qi\",\"name\":\"nhungbw\",\"type\":\"zrnf\"}],\"nextLink\":\"xgispemvtzfkufu\"}")
- .toObject(OrganizationResourceListResult.class);
- Assertions.assertEquals("qtrgqjbpfzfsinzg", model.value().get(0).location());
- Assertions.assertEquals("jrwzox", model.value().get(0).tags().get("j"));
- Assertions.assertEquals("git", model.value().get(0).properties().marketplace().subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.UNSUBSCRIBED,
- model.value().get(0).properties().marketplace().subscriptionStatus());
- Assertions.assertEquals("hab", model.value().get(0).properties().marketplace().offerDetails().publisherId());
- Assertions.assertEquals("fpikxwczb", model.value().get(0).properties().marketplace().offerDetails().offerId());
- Assertions.assertEquals("scnpqxuhivy", model.value().get(0).properties().marketplace().offerDetails().planId());
- Assertions.assertEquals("iwbybrkxvdumjg",
- model.value().get(0).properties().marketplace().offerDetails().planName());
- Assertions.assertEquals("fwvuk", model.value().get(0).properties().marketplace().offerDetails().termUnit());
- Assertions.assertEquals("audccsnhs", model.value().get(0).properties().marketplace().offerDetails().termId());
- Assertions.assertEquals("cnyejhkryhtnapcz", model.value().get(0).properties().user().firstName());
- Assertions.assertEquals("lokjyemkk", model.value().get(0).properties().user().lastName());
- Assertions.assertEquals("ni", model.value().get(0).properties().user().emailAddress());
- Assertions.assertEquals("oxzjnchgejspod", model.value().get(0).properties().user().upn());
- Assertions.assertEquals("ilzyd", model.value().get(0).properties().user().phoneNumber());
- Assertions.assertEquals("yahux",
- model.value().get(0).properties().partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("pmqnja",
- model.value().get(0).properties().partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("wixjsprozvcp",
- model.value().get(0).properties().partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("eg",
- model.value().get(0).properties().partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.ENABLE, model.value().get(0).properties()
- .partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("datscmd", model.value().get(0).properties().partnerOrganizationProperties()
- .singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("jhulsuuvmkjo", model.value().get(0).properties().partnerOrganizationProperties()
- .singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("wfndiodjpsl", model.value().get(0).properties().partnerOrganizationProperties()
- .singleSignOnProperties().aadDomains().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type());
- Assertions.assertEquals("xgispemvtzfkufu", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OrganizationResourceListResult model = new OrganizationResourceListResult()
- .withValue(Arrays.asList(new OrganizationResourceInner().withLocation("qtrgqjbpfzfsinzg")
- .withTags(mapOf("j", "jrwzox", "fpjkjlxofp", "felluwfzitonpe", "uybbkpodep", "vhpfxxypininmay",
- "zxtheotusivyevcc", "oginuvamiheognar"))
- .withProperties(new LiftrBaseDataOrganizationProperties()
- .withMarketplace(new LiftrBaseMarketplaceDetails().withSubscriptionId("git")
- .withSubscriptionStatus(MarketplaceSubscriptionStatus.UNSUBSCRIBED)
- .withOfferDetails(new LiftrBaseOfferDetails().withPublisherId("hab").withOfferId("fpikxwczb")
- .withPlanId("scnpqxuhivy").withPlanName("iwbybrkxvdumjg").withTermUnit("fwvuk")
- .withTermId("audccsnhs")))
- .withUser(new LiftrBaseUserDetails().withFirstName("cnyejhkryhtnapcz").withLastName("lokjyemkk")
- .withEmailAddress("ni").withUpn("oxzjnchgejspod").withPhoneNumber("ilzyd"))
- .withPartnerOrganizationProperties(new LiftrBaseDataPartnerOrganizationProperties()
- .withOrganizationId("yahux").withWorkspaceId("pmqnja").withOrganizationName("wixjsprozvcp")
- .withWorkspaceName("eg")
- .withSingleSignOnProperties(new LiftrBaseSingleSignOnProperties()
- .withSingleSignOnState(SingleSignOnStates.ENABLE).withEnterpriseAppId("datscmd")
- .withSingleSignOnUrl("jhulsuuvmkjo").withAadDomains(Arrays.asList("wfndiodjpsl", "ej")))))
- .withIdentity(
- new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)
- .withUserAssignedIdentities(mapOf("acctazakljla", new UserAssignedIdentity(), "ryffdfdosy",
- new UserAssignedIdentity(), "paojakhmsbzjh", new UserAssignedIdentity(), "evdphlxaol",
- new UserAssignedIdentity())))))
- .withNextLink("xgispemvtzfkufu");
- model = BinaryData.fromObject(model).toObject(OrganizationResourceListResult.class);
- Assertions.assertEquals("qtrgqjbpfzfsinzg", model.value().get(0).location());
- Assertions.assertEquals("jrwzox", model.value().get(0).tags().get("j"));
- Assertions.assertEquals("git", model.value().get(0).properties().marketplace().subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.UNSUBSCRIBED,
- model.value().get(0).properties().marketplace().subscriptionStatus());
- Assertions.assertEquals("hab", model.value().get(0).properties().marketplace().offerDetails().publisherId());
- Assertions.assertEquals("fpikxwczb", model.value().get(0).properties().marketplace().offerDetails().offerId());
- Assertions.assertEquals("scnpqxuhivy", model.value().get(0).properties().marketplace().offerDetails().planId());
- Assertions.assertEquals("iwbybrkxvdumjg",
- model.value().get(0).properties().marketplace().offerDetails().planName());
- Assertions.assertEquals("fwvuk", model.value().get(0).properties().marketplace().offerDetails().termUnit());
- Assertions.assertEquals("audccsnhs", model.value().get(0).properties().marketplace().offerDetails().termId());
- Assertions.assertEquals("cnyejhkryhtnapcz", model.value().get(0).properties().user().firstName());
- Assertions.assertEquals("lokjyemkk", model.value().get(0).properties().user().lastName());
- Assertions.assertEquals("ni", model.value().get(0).properties().user().emailAddress());
- Assertions.assertEquals("oxzjnchgejspod", model.value().get(0).properties().user().upn());
- Assertions.assertEquals("ilzyd", model.value().get(0).properties().user().phoneNumber());
- Assertions.assertEquals("yahux",
- model.value().get(0).properties().partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("pmqnja",
- model.value().get(0).properties().partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("wixjsprozvcp",
- model.value().get(0).properties().partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("eg",
- model.value().get(0).properties().partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.ENABLE, model.value().get(0).properties()
- .partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("datscmd", model.value().get(0).properties().partnerOrganizationProperties()
- .singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("jhulsuuvmkjo", model.value().get(0).properties().partnerOrganizationProperties()
- .singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("wfndiodjpsl", model.value().get(0).properties().partnerOrganizationProperties()
- .singleSignOnProperties().aadDomains().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type());
- Assertions.assertEquals("xgispemvtzfkufu", model.nextLink());
- }
-
- // 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/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceUpdatePropertiesTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceUpdatePropertiesTests.java
deleted file mode 100644
index 5cdb1c3f7390..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceUpdatePropertiesTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationPropertiesUpdate;
-import com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseUserDetailsUpdate;
-import com.azure.resourcemanager.astro.models.OrganizationResourceUpdateProperties;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class OrganizationResourceUpdatePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OrganizationResourceUpdateProperties model = BinaryData.fromString(
- "{\"user\":{\"firstName\":\"pphrcgynco\",\"lastName\":\"ecfvmm\",\"emailAddress\":\"ofsx\",\"upn\":\"evgbmqjq\",\"phoneNumber\":\"c\"},\"partnerOrganizationProperties\":{\"organizationId\":\"ivkwlzuvccfwnfnb\",\"workspaceId\":\"fionl\",\"organizationName\":\"x\",\"workspaceName\":\"qgtz\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"bqqwxrj\",\"singleSignOnUrl\":\"al\",\"aadDomains\":[\"sub\",\"snjampmng\",\"zscxaqwo\"],\"provisioningState\":\"Succeeded\"}}}")
- .toObject(OrganizationResourceUpdateProperties.class);
- Assertions.assertEquals("pphrcgynco", model.user().firstName());
- Assertions.assertEquals("ecfvmm", model.user().lastName());
- Assertions.assertEquals("ofsx", model.user().emailAddress());
- Assertions.assertEquals("evgbmqjq", model.user().upn());
- Assertions.assertEquals("c", model.user().phoneNumber());
- Assertions.assertEquals("ivkwlzuvccfwnfnb", model.partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("fionl", model.partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("x", model.partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("qgtz", model.partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.DISABLE,
- model.partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("bqqwxrj",
- model.partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("al", model.partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("sub",
- model.partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OrganizationResourceUpdateProperties model
- = new OrganizationResourceUpdateProperties()
- .withUser(new LiftrBaseUserDetailsUpdate().withFirstName("pphrcgynco").withLastName("ecfvmm")
- .withEmailAddress("ofsx").withUpn("evgbmqjq").withPhoneNumber("c"))
- .withPartnerOrganizationProperties(
- new LiftrBaseDataPartnerOrganizationPropertiesUpdate().withOrganizationId("ivkwlzuvccfwnfnb")
- .withWorkspaceId("fionl").withOrganizationName("x").withWorkspaceName("qgtz")
- .withSingleSignOnProperties(new LiftrBaseSingleSignOnProperties()
- .withSingleSignOnState(SingleSignOnStates.DISABLE).withEnterpriseAppId("bqqwxrj")
- .withSingleSignOnUrl("al").withAadDomains(Arrays.asList("sub", "snjampmng", "zscxaqwo"))));
- model = BinaryData.fromObject(model).toObject(OrganizationResourceUpdateProperties.class);
- Assertions.assertEquals("pphrcgynco", model.user().firstName());
- Assertions.assertEquals("ecfvmm", model.user().lastName());
- Assertions.assertEquals("ofsx", model.user().emailAddress());
- Assertions.assertEquals("evgbmqjq", model.user().upn());
- Assertions.assertEquals("c", model.user().phoneNumber());
- Assertions.assertEquals("ivkwlzuvccfwnfnb", model.partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("fionl", model.partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("x", model.partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("qgtz", model.partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.DISABLE,
- model.partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("bqqwxrj",
- model.partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("al", model.partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("sub",
- model.partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0));
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceUpdateTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceUpdateTests.java
deleted file mode 100644
index acf0acea68b7..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationResourceUpdateTests.java
+++ /dev/null
@@ -1,98 +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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationPropertiesUpdate;
-import com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseUserDetailsUpdate;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.astro.models.OrganizationResourceUpdate;
-import com.azure.resourcemanager.astro.models.OrganizationResourceUpdateProperties;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import com.azure.resourcemanager.astro.models.UserAssignedIdentity;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class OrganizationResourceUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OrganizationResourceUpdate model = BinaryData.fromString(
- "{\"identity\":{\"principalId\":\"7171041d-1d80-4bb9-b5c0-5a4a400ee11e\",\"tenantId\":\"8fccb072-1b62-4a8c-887a-b5f97fbf7731\",\"type\":\"None\",\"userAssignedIdentities\":{\"ocjjxhvpmouexh\":{\"principalId\":\"73c14fcb-3b23-45b7-8f87-4f48f0427483\",\"clientId\":\"23afc0eb-e766-48c6-94cd-9cc9cd28205d\"},\"i\":{\"principalId\":\"3587ce5f-5b26-46ad-af7f-2d6aee29d0e1\",\"clientId\":\"aeaaf221-9fc4-4694-b325-16a3794dafb3\"},\"ojnxqbzvdd\":{\"principalId\":\"d0be851b-93e1-452d-a37e-48fe0355054f\",\"clientId\":\"004fc17c-8c9d-480f-bdb2-6e3d7c28a490\"}}},\"tags\":{\"btwnpzaoqvuhrhcf\":\"ndei\",\"pyeicxm\":\"cyddglmjthjqk\",\"ixuigdtopbobj\":\"ciwqvhk\"},\"properties\":{\"user\":{\"firstName\":\"e\",\"lastName\":\"a\",\"emailAddress\":\"uhrzayvvt\",\"upn\":\"vdfgiotk\",\"phoneNumber\":\"utqxlngx\"},\"partnerOrganizationProperties\":{\"organizationId\":\"gug\",\"workspaceId\":\"krxd\",\"organizationName\":\"i\",\"workspaceName\":\"thz\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"abhjybi\",\"singleSignOnUrl\":\"h\",\"aadDomains\":[\"bowsk\",\"nyktzlcuiy\",\"gqywgndrv\"],\"provisioningState\":\"Succeeded\"}}}}")
- .toObject(OrganizationResourceUpdate.class);
- Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type());
- Assertions.assertEquals("ndei", model.tags().get("btwnpzaoqvuhrhcf"));
- Assertions.assertEquals("e", model.properties().user().firstName());
- Assertions.assertEquals("a", model.properties().user().lastName());
- Assertions.assertEquals("uhrzayvvt", model.properties().user().emailAddress());
- Assertions.assertEquals("vdfgiotk", model.properties().user().upn());
- Assertions.assertEquals("utqxlngx", model.properties().user().phoneNumber());
- Assertions.assertEquals("gug", model.properties().partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("krxd", model.properties().partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("i", model.properties().partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("thz", model.properties().partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.DISABLE,
- model.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("abhjybi",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("h",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("bowsk",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OrganizationResourceUpdate model = new OrganizationResourceUpdate()
- .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE)
- .withUserAssignedIdentities(mapOf("ocjjxhvpmouexh", new UserAssignedIdentity(), "i",
- new UserAssignedIdentity(), "ojnxqbzvdd", new UserAssignedIdentity())))
- .withTags(mapOf("btwnpzaoqvuhrhcf", "ndei", "pyeicxm", "cyddglmjthjqk", "ixuigdtopbobj", "ciwqvhk"))
- .withProperties(new OrganizationResourceUpdateProperties()
- .withUser(new LiftrBaseUserDetailsUpdate().withFirstName("e").withLastName("a")
- .withEmailAddress("uhrzayvvt").withUpn("vdfgiotk").withPhoneNumber("utqxlngx"))
- .withPartnerOrganizationProperties(new LiftrBaseDataPartnerOrganizationPropertiesUpdate()
- .withOrganizationId("gug").withWorkspaceId("krxd").withOrganizationName("i")
- .withWorkspaceName("thz")
- .withSingleSignOnProperties(new LiftrBaseSingleSignOnProperties()
- .withSingleSignOnState(SingleSignOnStates.DISABLE).withEnterpriseAppId("abhjybi")
- .withSingleSignOnUrl("h").withAadDomains(Arrays.asList("bowsk", "nyktzlcuiy", "gqywgndrv")))));
- model = BinaryData.fromObject(model).toObject(OrganizationResourceUpdate.class);
- Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type());
- Assertions.assertEquals("ndei", model.tags().get("btwnpzaoqvuhrhcf"));
- Assertions.assertEquals("e", model.properties().user().firstName());
- Assertions.assertEquals("a", model.properties().user().lastName());
- Assertions.assertEquals("uhrzayvvt", model.properties().user().emailAddress());
- Assertions.assertEquals("vdfgiotk", model.properties().user().upn());
- Assertions.assertEquals("utqxlngx", model.properties().user().phoneNumber());
- Assertions.assertEquals("gug", model.properties().partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("krxd", model.properties().partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("i", model.properties().partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("thz", model.properties().partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.DISABLE,
- model.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("abhjybi",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("h",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("bowsk",
- model.properties().partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0));
- }
-
- // 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/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsCreateOrUpdateMockTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsCreateOrUpdateMockTests.java
deleted file mode 100644
index 04539744c9f8..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsCreateOrUpdateMockTests.java
+++ /dev/null
@@ -1,127 +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.astro.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.astro.AstroManager;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataOrganizationProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseDataPartnerOrganizationProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseMarketplaceDetails;
-import com.azure.resourcemanager.astro.models.LiftrBaseOfferDetails;
-import com.azure.resourcemanager.astro.models.LiftrBaseSingleSignOnProperties;
-import com.azure.resourcemanager.astro.models.LiftrBaseUserDetails;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
-import com.azure.resourcemanager.astro.models.OrganizationResource;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import com.azure.resourcemanager.astro.models.UserAssignedIdentity;
-import java.nio.ByteBuffer;
-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 org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OrganizationsCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr
- = "{\"properties\":{\"marketplace\":{\"subscriptionId\":\"yudxytlmoy\",\"subscriptionStatus\":\"Unsubscribed\",\"offerDetails\":{\"publisherId\":\"wfudwpzntxhdzhl\",\"offerId\":\"qj\",\"planId\":\"hckfrlhrx\",\"planName\":\"kyv\",\"termUnit\":\"ca\",\"termId\":\"z\"}},\"user\":{\"firstName\":\"p\",\"lastName\":\"kafkuwbcrnwbm\",\"emailAddress\":\"hhseyv\",\"upn\":\"srtslhspkdeem\",\"phoneNumber\":\"fm\"},\"provisioningState\":\"Succeeded\",\"partnerOrganizationProperties\":{\"organizationId\":\"t\",\"workspaceId\":\"lmqkrhahvlj\",\"organizationName\":\"ahaquh\",\"workspaceName\":\"hmdua\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"pvfadmwsrcr\",\"singleSignOnUrl\":\"xpvgo\",\"aadDomains\":[\"fmisg\"],\"provisioningState\":\"Canceled\"}}},\"identity\":{\"principalId\":\"7b173769-6f47-4f90-bd6b-174679e68faf\",\"tenantId\":\"69f055d0-3943-46e7-b013-3ba073df585b\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"zbaliourqha\":{\"principalId\":\"811d9437-a9e5-4d8f-8c9b-ea3e4948818b\",\"clientId\":\"d3c5045e-70bd-47f0-a9d7-9038d4e01fc8\"}}},\"location\":\"uhashsfwx\",\"tags\":{\"xcug\":\"w\",\"ovbvmeueciv\":\"cjooxdjebwpucwwf\"},\"id\":\"hzceuojgjrwjue\",\"name\":\"otwmcdyt\",\"type\":\"x\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito.when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito.when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AstroManager manager = AstroManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OrganizationResource response = manager.organizations().define("wz").withRegion("njbkcnxdhbttkph")
- .withExistingResourceGroup("bniwdj")
- .withTags(mapOf("t", "nv", "crpab", "qnermclfplphoxu", "sbj", "ye", "wfqkquj", "azqugxywpmueefj"))
- .withProperties(new LiftrBaseDataOrganizationProperties()
- .withMarketplace(new LiftrBaseMarketplaceDetails().withSubscriptionId("dbpgnxytxhp")
- .withSubscriptionStatus(MarketplaceSubscriptionStatus.SUBSCRIBED)
- .withOfferDetails(new LiftrBaseOfferDetails().withPublisherId("zpfzabglc").withOfferId("hxw")
- .withPlanId("ctyqik").withPlanName("bovpl").withTermUnit("bhvgy").withTermId("uosvmkfssxqukk")))
- .withUser(new LiftrBaseUserDetails().withFirstName("plgmgsxnk").withLastName("zkd")
- .withEmailAddress("slpvlop").withUpn("yighxpk").withPhoneNumber("zb"))
- .withPartnerOrganizationProperties(new LiftrBaseDataPartnerOrganizationProperties()
- .withOrganizationId("baumnyqupedeoj").withWorkspaceId("bckhsmtxpsi")
- .withOrganizationName("btfhvpesaps").withWorkspaceName("dqmh")
- .withSingleSignOnProperties(new LiftrBaseSingleSignOnProperties()
- .withSingleSignOnState(SingleSignOnStates.DISABLE).withEnterpriseAppId("ldwkyzxuutkn")
- .withSingleSignOnUrl("scwsv").withAadDomains(Arrays.asList("togt", "rupqsxvnmicy", "vce")))))
- .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf("fj", new UserAssignedIdentity())))
- .create();
-
- Assertions.assertEquals("uhashsfwx", response.location());
- Assertions.assertEquals("w", response.tags().get("xcug"));
- Assertions.assertEquals("yudxytlmoy", response.properties().marketplace().subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.UNSUBSCRIBED,
- response.properties().marketplace().subscriptionStatus());
- Assertions.assertEquals("wfudwpzntxhdzhl", response.properties().marketplace().offerDetails().publisherId());
- Assertions.assertEquals("qj", response.properties().marketplace().offerDetails().offerId());
- Assertions.assertEquals("hckfrlhrx", response.properties().marketplace().offerDetails().planId());
- Assertions.assertEquals("kyv", response.properties().marketplace().offerDetails().planName());
- Assertions.assertEquals("ca", response.properties().marketplace().offerDetails().termUnit());
- Assertions.assertEquals("z", response.properties().marketplace().offerDetails().termId());
- Assertions.assertEquals("p", response.properties().user().firstName());
- Assertions.assertEquals("kafkuwbcrnwbm", response.properties().user().lastName());
- Assertions.assertEquals("hhseyv", response.properties().user().emailAddress());
- Assertions.assertEquals("srtslhspkdeem", response.properties().user().upn());
- Assertions.assertEquals("fm", response.properties().user().phoneNumber());
- Assertions.assertEquals("t", response.properties().partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("lmqkrhahvlj", response.properties().partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("ahaquh", response.properties().partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("hmdua", response.properties().partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.INITIAL,
- response.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("pvfadmwsrcr",
- response.properties().partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("xpvgo",
- response.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("fmisg",
- response.properties().partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type());
- }
-
- // 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/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsGetByResourceGroupWithResponseMockTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsGetByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index 7566010aa383..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsGetByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.astro.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.astro.AstroManager;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
-import com.azure.resourcemanager.astro.models.OrganizationResource;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OrganizationsGetByResourceGroupWithResponseMockTests {
- @Test
- public void testGetByResourceGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr
- = "{\"properties\":{\"marketplace\":{\"subscriptionId\":\"brjcxe\",\"subscriptionStatus\":\"Unsubscribed\",\"offerDetails\":{\"publisherId\":\"wutttxfvjrbi\",\"offerId\":\"phxepcyvahf\",\"planId\":\"ljkyqxjvuuj\",\"planName\":\"idokgjlj\",\"termUnit\":\"xgvcl\",\"termId\":\"gsncghkjeszz\"}},\"user\":{\"firstName\":\"bijhtxfvgxbf\",\"lastName\":\"mxnehmp\",\"emailAddress\":\"ec\",\"upn\":\"odebfqkkrbmpu\",\"phoneNumber\":\"riwflzlfb\"},\"provisioningState\":\"Succeeded\",\"partnerOrganizationProperties\":{\"organizationId\":\"ycispnqzahmgkb\",\"workspaceId\":\"yydhibnuqqk\",\"organizationName\":\"ik\",\"workspaceName\":\"rgvtqag\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"hijggme\",\"singleSignOnUrl\":\"siarbutrcvpn\",\"aadDomains\":[\"mhjrunmpxttdbhr\",\"nlankxmyskpb\",\"enbtkcxywny\"],\"provisioningState\":\"Failed\"}}},\"identity\":{\"principalId\":\"4e9d45d5-9993-4d5e-956e-afa53d820d11\",\"tenantId\":\"0bd69aea-19b9-464a-894d-f0c666a4f28c\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"by\":{\"principalId\":\"59e2d09a-be5b-4633-b0d0-8d448a9a2d68\",\"clientId\":\"9e6dc9ad-5317-4565-a2ba-2d9d95c40f9a\"},\"fclhaaxdbabphlwr\":{\"principalId\":\"1bbf30c6-ac2d-4140-bb61-9e8e1800d572\",\"clientId\":\"a0ecb2b4-9432-4c28-8ffc-f726050b1133\"},\"ktsthsucocmny\":{\"principalId\":\"8eeb914e-fa06-45f5-94bb-d9a976cfd92a\",\"clientId\":\"3d80fb79-7470-40fd-9c1e-cd36b3203fa2\"}}},\"location\":\"zt\",\"tags\":{\"uedck\":\"wwrq\",\"bxu\":\"ywbiexzfeyueax\"},\"id\":\"wbhqwal\",\"name\":\"uzyoxaep\",\"type\":\"kzjancuxrhdwbav\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito.when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito.when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AstroManager manager = AstroManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OrganizationResource response = manager.organizations()
- .getByResourceGroupWithResponse("ctq", "jf", com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals("zt", response.location());
- Assertions.assertEquals("wwrq", response.tags().get("uedck"));
- Assertions.assertEquals("brjcxe", response.properties().marketplace().subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.UNSUBSCRIBED,
- response.properties().marketplace().subscriptionStatus());
- Assertions.assertEquals("wutttxfvjrbi", response.properties().marketplace().offerDetails().publisherId());
- Assertions.assertEquals("phxepcyvahf", response.properties().marketplace().offerDetails().offerId());
- Assertions.assertEquals("ljkyqxjvuuj", response.properties().marketplace().offerDetails().planId());
- Assertions.assertEquals("idokgjlj", response.properties().marketplace().offerDetails().planName());
- Assertions.assertEquals("xgvcl", response.properties().marketplace().offerDetails().termUnit());
- Assertions.assertEquals("gsncghkjeszz", response.properties().marketplace().offerDetails().termId());
- Assertions.assertEquals("bijhtxfvgxbf", response.properties().user().firstName());
- Assertions.assertEquals("mxnehmp", response.properties().user().lastName());
- Assertions.assertEquals("ec", response.properties().user().emailAddress());
- Assertions.assertEquals("odebfqkkrbmpu", response.properties().user().upn());
- Assertions.assertEquals("riwflzlfb", response.properties().user().phoneNumber());
- Assertions.assertEquals("ycispnqzahmgkb",
- response.properties().partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("yydhibnuqqk", response.properties().partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("ik", response.properties().partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("rgvtqag", response.properties().partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.DISABLE,
- response.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("hijggme",
- response.properties().partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("siarbutrcvpn",
- response.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("mhjrunmpxttdbhr",
- response.properties().partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type());
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsListByResourceGroupMockTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsListByResourceGroupMockTests.java
deleted file mode 100644
index 6e5037753b49..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsListByResourceGroupMockTests.java
+++ /dev/null
@@ -1,97 +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.astro.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.astro.AstroManager;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
-import com.azure.resourcemanager.astro.models.OrganizationResource;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OrganizationsListByResourceGroupMockTests {
- @Test
- public void testListByResourceGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr
- = "{\"value\":[{\"properties\":{\"marketplace\":{\"subscriptionId\":\"leggzfbu\",\"subscriptionStatus\":\"Unsubscribed\",\"offerDetails\":{\"publisherId\":\"vfaxkffeiith\",\"offerId\":\"vmezy\",\"planId\":\"shxmzsbbzoggigrx\",\"planName\":\"ur\",\"termUnit\":\"xxjnspydptk\",\"termId\":\"nkoukn\"}},\"user\":{\"firstName\":\"udwtiukbl\",\"lastName\":\"ngkpocipazy\",\"emailAddress\":\"o\",\"upn\":\"ukgjnpiucgygevq\",\"phoneNumber\":\"typmrbpizcdrqjsd\"},\"provisioningState\":\"Succeeded\",\"partnerOrganizationProperties\":{\"organizationId\":\"yhxdeoejzicwi\",\"workspaceId\":\"jttgzf\",\"organizationName\":\"ishc\",\"workspaceName\":\"hajdeyeamdpha\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"uxwgipwho\",\"singleSignOnUrl\":\"wkgshwa\",\"aadDomains\":[\"xzbinjeputt\",\"rywn\",\"zoqftiyqzrnkcqvy\",\"lwh\"],\"provisioningState\":\"Failed\"}}},\"identity\":{\"principalId\":\"91d6c3b6-fc72-4c81-ab77-d9248cc8c483\",\"tenantId\":\"8fe438a3-0658-44f5-9c82-7cdb2daad567\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wvl\":{\"principalId\":\"e83f22ab-be36-48b9-94a3-d64016f455e2\",\"clientId\":\"f48b4c2f-9a0d-4e8b-9d1d-e309ae839006\"}}},\"location\":\"avwhheunm\",\"tags\":{\"noc\":\"gyxzk\",\"uconuqszfkbey\":\"koklya\",\"senhwlrs\":\"ewrmjmwvvjektc\"},\"id\":\"frzpwvlqdqgb\",\"name\":\"qylihkaetckt\",\"type\":\"fcivfsnkym\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito.when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito.when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AstroManager manager = AstroManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response
- = manager.organizations().listByResourceGroup("pclhocohslk", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("avwhheunm", response.iterator().next().location());
- Assertions.assertEquals("gyxzk", response.iterator().next().tags().get("noc"));
- Assertions.assertEquals("leggzfbu", response.iterator().next().properties().marketplace().subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.UNSUBSCRIBED,
- response.iterator().next().properties().marketplace().subscriptionStatus());
- Assertions.assertEquals("vfaxkffeiith",
- response.iterator().next().properties().marketplace().offerDetails().publisherId());
- Assertions.assertEquals("vmezy",
- response.iterator().next().properties().marketplace().offerDetails().offerId());
- Assertions.assertEquals("shxmzsbbzoggigrx",
- response.iterator().next().properties().marketplace().offerDetails().planId());
- Assertions.assertEquals("ur", response.iterator().next().properties().marketplace().offerDetails().planName());
- Assertions.assertEquals("xxjnspydptk",
- response.iterator().next().properties().marketplace().offerDetails().termUnit());
- Assertions.assertEquals("nkoukn",
- response.iterator().next().properties().marketplace().offerDetails().termId());
- Assertions.assertEquals("udwtiukbl", response.iterator().next().properties().user().firstName());
- Assertions.assertEquals("ngkpocipazy", response.iterator().next().properties().user().lastName());
- Assertions.assertEquals("o", response.iterator().next().properties().user().emailAddress());
- Assertions.assertEquals("ukgjnpiucgygevq", response.iterator().next().properties().user().upn());
- Assertions.assertEquals("typmrbpizcdrqjsd", response.iterator().next().properties().user().phoneNumber());
- Assertions.assertEquals("yhxdeoejzicwi",
- response.iterator().next().properties().partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("jttgzf",
- response.iterator().next().properties().partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("ishc",
- response.iterator().next().properties().partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("hajdeyeamdpha",
- response.iterator().next().properties().partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.ENABLE, response.iterator().next().properties()
- .partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("uxwgipwho", response.iterator().next().properties().partnerOrganizationProperties()
- .singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("wkgshwa", response.iterator().next().properties().partnerOrganizationProperties()
- .singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("xzbinjeputt", response.iterator().next().properties().partnerOrganizationProperties()
- .singleSignOnProperties().aadDomains().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type());
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsListMockTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsListMockTests.java
deleted file mode 100644
index 47134db3d973..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/OrganizationsListMockTests.java
+++ /dev/null
@@ -1,99 +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.astro.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.astro.AstroManager;
-import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
-import com.azure.resourcemanager.astro.models.OrganizationResource;
-import com.azure.resourcemanager.astro.models.SingleSignOnStates;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OrganizationsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr
- = "{\"value\":[{\"properties\":{\"marketplace\":{\"subscriptionId\":\"cibvyvdcsitynn\",\"subscriptionStatus\":\"Unsubscribed\",\"offerDetails\":{\"publisherId\":\"dectehfiqsc\",\"offerId\":\"eypvhezrkg\",\"planId\":\"hcjrefovgmk\",\"planName\":\"leyyvx\",\"termUnit\":\"jpkcattpng\",\"termId\":\"rcczsqpjhvmd\"}},\"user\":{\"firstName\":\"jvnysounqe\",\"lastName\":\"a\",\"emailAddress\":\"oaeupfhyhltrpmo\",\"upn\":\"mcmatuokthfuiu\",\"phoneNumber\":\"dsfcpkvxodpuoz\"},\"provisioningState\":\"Failed\",\"partnerOrganizationProperties\":{\"organizationId\":\"agfuaxbezyiu\",\"workspaceId\":\"ktwh\",\"organizationName\":\"dxwzywqsmbsurexi\",\"workspaceName\":\"ryocfsfksymdd\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"iuxhqyudxorr\",\"singleSignOnUrl\":\"b\",\"aadDomains\":[\"zvyifqrvkdvj\",\"llr\"],\"provisioningState\":\"Canceled\"}}},\"identity\":{\"principalId\":\"df62dde2-7fd5-4220-9ad9-3e31becb278e\",\"tenantId\":\"2033f9e8-4945-4ea4-acec-aa16be17e8d6\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"pulexxbczw\":{\"principalId\":\"3af2e207-5f30-47fc-84f8-4e62e83f5855\",\"clientId\":\"9613cc8a-b06f-4b62-9a84-cc3b4af72bda\"},\"wiqzbqjvsovmyo\":{\"principalId\":\"a32499ba-1e48-443d-9dbc-81d7f2ce2e6f\",\"clientId\":\"aa7e207d-a3ed-4290-9ecc-a2a4bc4341a4\"},\"spkwlhzdobpxjm\":{\"principalId\":\"157df892-7a9f-4a55-9a57-b6393db7c013\",\"clientId\":\"407a9cce-2283-4ff7-a4d4-c09c9f875c4e\"},\"vvnchrkcc\":{\"principalId\":\"631179ce-e327-4d99-b258-0919aa4ce089\",\"clientId\":\"36a6c1e6-2798-4ebf-a07c-bb5143f66ed8\"}}},\"location\":\"wzjuqk\",\"tags\":{\"oskg\":\"ajiwkuo\"},\"id\":\"sauuimj\",\"name\":\"vxieduugidyj\",\"type\":\"rfbyaosvexcso\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito.when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito.when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- AstroManager manager = AstroManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.organizations().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("wzjuqk", response.iterator().next().location());
- Assertions.assertEquals("ajiwkuo", response.iterator().next().tags().get("oskg"));
- Assertions.assertEquals("cibvyvdcsitynn",
- response.iterator().next().properties().marketplace().subscriptionId());
- Assertions.assertEquals(MarketplaceSubscriptionStatus.UNSUBSCRIBED,
- response.iterator().next().properties().marketplace().subscriptionStatus());
- Assertions.assertEquals("dectehfiqsc",
- response.iterator().next().properties().marketplace().offerDetails().publisherId());
- Assertions.assertEquals("eypvhezrkg",
- response.iterator().next().properties().marketplace().offerDetails().offerId());
- Assertions.assertEquals("hcjrefovgmk",
- response.iterator().next().properties().marketplace().offerDetails().planId());
- Assertions.assertEquals("leyyvx",
- response.iterator().next().properties().marketplace().offerDetails().planName());
- Assertions.assertEquals("jpkcattpng",
- response.iterator().next().properties().marketplace().offerDetails().termUnit());
- Assertions.assertEquals("rcczsqpjhvmd",
- response.iterator().next().properties().marketplace().offerDetails().termId());
- Assertions.assertEquals("jvnysounqe", response.iterator().next().properties().user().firstName());
- Assertions.assertEquals("a", response.iterator().next().properties().user().lastName());
- Assertions.assertEquals("oaeupfhyhltrpmo", response.iterator().next().properties().user().emailAddress());
- Assertions.assertEquals("mcmatuokthfuiu", response.iterator().next().properties().user().upn());
- Assertions.assertEquals("dsfcpkvxodpuoz", response.iterator().next().properties().user().phoneNumber());
- Assertions.assertEquals("agfuaxbezyiu",
- response.iterator().next().properties().partnerOrganizationProperties().organizationId());
- Assertions.assertEquals("ktwh",
- response.iterator().next().properties().partnerOrganizationProperties().workspaceId());
- Assertions.assertEquals("dxwzywqsmbsurexi",
- response.iterator().next().properties().partnerOrganizationProperties().organizationName());
- Assertions.assertEquals("ryocfsfksymdd",
- response.iterator().next().properties().partnerOrganizationProperties().workspaceName());
- Assertions.assertEquals(SingleSignOnStates.DISABLE, response.iterator().next().properties()
- .partnerOrganizationProperties().singleSignOnProperties().singleSignOnState());
- Assertions.assertEquals("iuxhqyudxorr", response.iterator().next().properties().partnerOrganizationProperties()
- .singleSignOnProperties().enterpriseAppId());
- Assertions.assertEquals("b", response.iterator().next().properties().partnerOrganizationProperties()
- .singleSignOnProperties().singleSignOnUrl());
- Assertions.assertEquals("zvyifqrvkdvj", response.iterator().next().properties().partnerOrganizationProperties()
- .singleSignOnProperties().aadDomains().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED,
- response.iterator().next().identity().type());
- }
-}
diff --git a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/UserAssignedIdentityTests.java b/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/UserAssignedIdentityTests.java
deleted file mode 100644
index 50b56108087a..000000000000
--- a/sdk/astro/azure-resourcemanager-astro/src/test/java/com/azure/resourcemanager/astro/generated/UserAssignedIdentityTests.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.astro.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.astro.models.UserAssignedIdentity;
-
-public final class UserAssignedIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UserAssignedIdentity model = BinaryData.fromString(
- "{\"principalId\":\"d4c59a80-b5f8-4017-b9e8-0604545774bf\",\"clientId\":\"efcb5a0a-3225-4212-b512-f67c717a1975\"}")
- .toObject(UserAssignedIdentity.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UserAssignedIdentity model = new UserAssignedIdentity();
- model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class);
- }
-}
diff --git a/sdk/fabric/azure-resourcemanager-fabric/pom.xml b/sdk/fabric/azure-resourcemanager-fabric/pom.xml
index 7a77f7f6000d..ce4f5692fb68 100644
--- a/sdk/fabric/azure-resourcemanager-fabric/pom.xml
+++ b/sdk/fabric/azure-resourcemanager-fabric/pom.xml
@@ -66,7 +66,7 @@
com.azure
azure-core-test
- 1.26.2
+ 1.27.0-beta.1
test