diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 9f3d9929a12e0..c430ade280ace 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -3,86 +3,86 @@ "dir": "azure-resourcemanager-appplatform", "source": "specification/appplatform/resource-manager/readme.md", "package": "com.azure.resourcemanager.appplatform", - "args": "--tag=package-2023-12 --remove-inner=TestKeys,ResourceSku,ResourceUploadDefinition,CustomDomainValidateResult,NameAvailability" + "args": "--tag=package-2023-12 --remove-inner=TestKeys,ResourceSku,ResourceUploadDefinition,CustomDomainValidateResult,NameAvailability --stream-style-serialization=false" }, "appservice": { "dir": "azure-resourcemanager-appservice", "source": "specification/web/resource-manager/readme.md", "package": "com.azure.resourcemanager.appservice", - "args": "--tag=package-2023-12 --add-inner=AppServiceCertificate --remove-inner=CsmDeploymentStatus --name-for-ungrouped-operations=ResourceProvider" + "args": "--tag=package-2023-12 --add-inner=AppServiceCertificate --remove-inner=CsmDeploymentStatus --name-for-ungrouped-operations=ResourceProvider --stream-style-serialization=false" }, "appservice-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-appservice", "source": "specification/web/resource-manager/readme.md", "package": "com.azure.resourcemanager.appservice", - "args": "--tag=profile-hybrid-2020-09-01 --add-inner=AppServiceCertificate --name-for-ungrouped-operations=ResourceProvider", + "args": "--tag=profile-hybrid-2020-09-01 --add-inner=AppServiceCertificate --name-for-ungrouped-operations=ResourceProvider --stream-style-serialization=false", "note": "Add status code '200' to 'syncFunctionTriggers'" }, "authorization": { "dir": "azure-resourcemanager-authorization", "source": "specification/authorization/resource-manager/readme.md", "package": "com.azure.resourcemanager.authorization", - "args": "--tag=package-2022-04-01" + "args": "--tag=package-2022-04-01 --stream-style-serialization=false" }, "authorization-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-authorization", "source": "specification/authorization/resource-manager/readme.md", "package": "com.azure.resourcemanager.authorization", - "args": "--tag=profile-hybrid-2020-09-01" + "args": "--tag=profile-hybrid-2020-09-01 --stream-style-serialization=false" }, "cdn": { "dir": "azure-resourcemanager-cdn", "source": "specification/cdn/resource-manager/readme.md", "package": "com.azure.resourcemanager.cdn", - "args": "--tag=package-2024-02 --rename-model=CdnEndpoint:EndpointResource" + "args": "--tag=package-2024-02 --rename-model=CdnEndpoint:EndpointResource --stream-style-serialization=false" }, "compute": { "dir": "azure-resourcemanager-compute", "source": "specification/compute/resource-manager/readme.md", "package": "com.azure.resourcemanager.compute", - "args": "--tag=package-2024-03-02 --modelerfour.lenient-model-deduplication=true --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities --preserve-model=AvailabilitySetSkuTypes --remove-inner=StorageProfile" + "args": "--tag=package-2024-03-02 --modelerfour.lenient-model-deduplication=true --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities --preserve-model=AvailabilitySetSkuTypes --remove-inner=StorageProfile --stream-style-serialization=false" }, "compute-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-compute", "source": "specification/compute/resource-manager/readme.md", "package": "com.azure.resourcemanager.compute", - "args": "--tag=profile-hybrid-2020-09-01 --modelerfour.lenient-model-deduplication=true --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities --preserve-model=AvailabilitySetSkuTypes" + "args": "--tag=profile-hybrid-2020-09-01 --modelerfour.lenient-model-deduplication=true --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities --preserve-model=AvailabilitySetSkuTypes --stream-style-serialization=false" }, "containerinstance": { "dir": "azure-resourcemanager-containerinstance", "source": "specification/containerinstance/resource-manager/readme.md", "package": "com.azure.resourcemanager.containerinstance", - "args": "--tag=package-2023-05 --remove-inner=Container,Operation,CachedImages,Capabilities --rename-model=ContainerGroupPropertiesProperties:ContainerGroupProperties,UserAssignedIdentities:ContainerGroupIdentityUserAssignedIdentities" + "args": "--tag=package-2023-05 --remove-inner=Container,Operation,CachedImages,Capabilities --rename-model=ContainerGroupPropertiesProperties:ContainerGroupProperties,UserAssignedIdentities:ContainerGroupIdentityUserAssignedIdentities --stream-style-serialization=false" }, "containerregistry": { "dir": "azure-resourcemanager-containerregistry", "source": "specification/containerregistry/resource-manager/readme.md", "package": "com.azure.resourcemanager.containerregistry", - "args": "--tag=package-2023-07 --modelerfour.lenient-model-deduplication=true" + "args": "--tag=package-2023-07 --modelerfour.lenient-model-deduplication=true --stream-style-serialization=false" }, "containerregistry-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-containerregistry", "source": "specification/containerregistry/resource-manager/readme.md", "package": "com.azure.resourcemanager.containerregistry", - "args": "--tag=package-2019-05" + "args": "--tag=package-2019-05 --stream-style-serialization=false" }, "containerservice": { "dir": "azure-resourcemanager-containerservice", "source": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md", "package": "com.azure.resourcemanager.containerservice", - "args": "--tag=package-2024-05 --modelerfour.lenient-model-deduplication --preserve-model=ContainerServiceVMSizeTypes --rename-model=Ossku:OSSku" + "args": "--tag=package-2024-05 --modelerfour.lenient-model-deduplication --preserve-model=ContainerServiceVMSizeTypes --rename-model=Ossku:OSSku --stream-style-serialization=false" }, "containerservice-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-containerservice", "source": "specification/containerservice/resource-manager/readme.md", "package": "com.azure.resourcemanager.containerservice", - "args": "--tag=profile-hybrid-2020-09-01 --preserve-model=ContainerServiceVMSizeTypes" + "args": "--tag=profile-hybrid-2020-09-01 --preserve-model=ContainerServiceVMSizeTypes --stream-style-serialization=false" }, "cosmos": { "dir": "azure-resourcemanager-cosmos", "source": "specification/cosmos-db/resource-manager/readme.md", "package": "com.azure.resourcemanager.cosmos", - "args": "--tag=package-2024-05" + "args": "--tag=package-2024-05 --stream-style-serialization=false" }, "deploymentstacks": { "dir": "azure-resourcemanager-resources", @@ -94,25 +94,25 @@ "dir": "azure-resourcemanager-dns", "source": "specification/dns/resource-manager/readme.md", "package": "com.azure.resourcemanager.dns", - "args": "--tag=package-2018-05" + "args": "--tag=package-2018-05 --stream-style-serialization=false" }, "dns-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-dns", "source": "specification/dns/resource-manager/readme.md", "package": "com.azure.resourcemanager.dns", - "args": "--tag=package-2016-04" + "args": "--tag=package-2016-04 --stream-style-serialization=false" }, "eventhubs": { "dir": "azure-resourcemanager-eventhubs", "source": "specification/eventhub/resource-manager/readme.md", "package": "com.azure.resourcemanager.eventhubs", - "args": "--tag=package-2024-01" + "args": "--tag=package-2024-01 --stream-style-serialization=false" }, "eventhubs-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-eventhubs", "source": "specification/eventhub/resource-manager/readme.md", "package": "com.azure.resourcemanager.eventhubs", - "args": "--tag=profile-hybrid-2020-09-01" + "args": "--tag=profile-hybrid-2020-09-01 --stream-style-serialization=false" }, "features": { "dir": "azure-resourcemanager-resources", @@ -131,26 +131,26 @@ "dir": "azure-resourcemanager-authorization", "source": "azure-resourcemanager-authorization/swagger/swagger.md", "package": "com.azure.resourcemanager.authorization", - "args": "--tag=v1.0 --graalvm-config-suffix=msgraph --title=MicrosoftGraphClient --models-subpackage=fluent.models" + "args": "--tag=v1.0 --graalvm-config-suffix=msgraph --title=MicrosoftGraphClient --models-subpackage=fluent.models --stream-style-serialization=false" }, "msgraph-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-authorization", "source": "specification/graphrbac/data-plane/readme.md", "package": "com.azure.resourcemanager.authorization", - "args": "--tag=1.6" + "args": "--tag=1.6 --stream-style-serialization=false" }, "keyvault": { "dir": "azure-resourcemanager-keyvault", "source": "specification/keyvault/resource-manager/readme.md", "package": "com.azure.resourcemanager.keyvault", - "args": "--tag=package-2023-07", + "args": "--tag=package-2023-07 --stream-style-serialization=false", "note": "use local azure-rest-api-specs and remove keys.json, secrets.json and keysManagedHsm.json in README.md tag" }, "keyvault-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-keyvault", "source": "specification/keyvault/resource-manager/readme.md", "package": "com.azure.resourcemanager.keyvault", - "args": "--tag=package-2019-09" + "args": "--tag=package-2019-09 --stream-style-serialization=false" }, "locks": { "dir": "azure-resourcemanager-resources", @@ -162,33 +162,33 @@ "dir": "../resourcemanagerhybrid/azure-resourcemanager-resources", "source": "specification/resources/resource-manager/readme.md", "package": "com.azure.resourcemanager.resources", - "args": "--tag=package-locks-2016-09" + "args": "--tag=package-locks-2016-09 --stream-style-serialization=false" }, "monitor": { "dir": "azure-resourcemanager-monitor", "source": "specification/monitor/resource-manager/readme.md", "package": "com.azure.resourcemanager.monitor", - "args": "--tag=package-composite-v1 --modelerfour.lenient-model-deduplication=true --add-inner=AutoscaleProfile,ScaleRule,LocalizableString,DiagnosticSettingsCategoryResourceCollection --rename-model=MetricUnit:Unit", + "args": "--tag=package-composite-v1 --modelerfour.lenient-model-deduplication=true --add-inner=AutoscaleProfile,ScaleRule,LocalizableString,DiagnosticSettingsCategoryResourceCollection --rename-model=MetricUnit:Unit --stream-style-serialization=false", "note": "Use commit c0f92082a788895368a738a9200e24971157d7ca, and remove Swagger from Microsoft.Monitor" }, "monitor-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-monitor", "source": "specification/monitor/resource-manager/readme.md", "package": "com.azure.resourcemanager.monitor", - "args": "--tag=package-2021-04 --add-inner=AutoscaleProfile,ScaleRule,LocalizableString --rename-model=MetricUnit:Unit" + "args": "--tag=package-2021-04 --add-inner=AutoscaleProfile,ScaleRule,LocalizableString --rename-model=MetricUnit:Unit --stream-style-serialization=false" }, "network": { "dir": "azure-resourcemanager-network", "source": "specification/network/resource-manager/readme.md", "package": "com.azure.resourcemanager.network", - "args": "--tag=package-2024-01 --add-inner=ApplicationGatewayIpConfiguration,ApplicationGatewayPathRule,ApplicationGatewayProbe,ApplicationGatewayRedirectConfiguration,ApplicationGatewayRequestRoutingRule,ApplicationGatewaySslCertificate,ApplicationGatewayUrlPathMap,ApplicationGatewayAuthenticationCertificate,VirtualNetworkGatewayIpConfiguration,ConnectionMonitor,PacketCapture,ApplicationGateway,ApplicationGatewayListener", + "args": "--tag=package-2024-01 --add-inner=ApplicationGatewayIpConfiguration,ApplicationGatewayPathRule,ApplicationGatewayProbe,ApplicationGatewayRedirectConfiguration,ApplicationGatewayRequestRoutingRule,ApplicationGatewaySslCertificate,ApplicationGatewayUrlPathMap,ApplicationGatewayAuthenticationCertificate,VirtualNetworkGatewayIpConfiguration,ConnectionMonitor,PacketCapture,ApplicationGateway,ApplicationGatewayListener --stream-style-serialization=false", "note": "Run DeprecateApplicationGatewaySku to deprecate v1 sku/tier in ApplicationGatewaySku." }, "network-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-network", "source": "specification/network/resource-manager/readme.md", "package": "com.azure.resourcemanager.network", - "args": "--tag=profile-hybrid-2020-09-01 --add-inner=ApplicationGatewayIpConfiguration,ApplicationGatewayPathRule,ApplicationGatewayProbe,ApplicationGatewayRedirectConfiguration,ApplicationGatewayRequestRoutingRule,ApplicationGatewaySslCertificate,ApplicationGatewayUrlPathMap,ApplicationGatewayAuthenticationCertificate,VirtualNetworkGatewayIpConfiguration,ConnectionMonitor,PacketCapture --remove-inner=Ipv6ExpressRouteCircuitPeeringConfig" + "args": "--tag=profile-hybrid-2020-09-01 --add-inner=ApplicationGatewayIpConfiguration,ApplicationGatewayPathRule,ApplicationGatewayProbe,ApplicationGatewayRedirectConfiguration,ApplicationGatewayRequestRoutingRule,ApplicationGatewaySslCertificate,ApplicationGatewayUrlPathMap,ApplicationGatewayAuthenticationCertificate,VirtualNetworkGatewayIpConfiguration,ConnectionMonitor,PacketCapture --remove-inner=Ipv6ExpressRouteCircuitPeeringConfig --stream-style-serialization=false" }, "policy": { "dir": "azure-resourcemanager-resources", @@ -201,26 +201,26 @@ "dir": "../resourcemanagerhybrid/azure-resourcemanager-resources", "source": "specification/resources/resource-manager/readme.md", "package": "com.azure.resourcemanager.resources", - "args": "--tag=package-policy-2016-12" + "args": "--tag=package-policy-2016-12 --stream-style-serialization=false" }, "privatedns": { "dir": "azure-resourcemanager-privatedns", "source": "specification/privatedns/resource-manager/readme.md", "package": "com.azure.resourcemanager.privatedns", - "args": "--tag=package-2020-06" + "args": "--tag=package-2020-06 --stream-style-serialization=false" }, "redis": { "dir": "azure-resourcemanager-redis", "source": "specification/redis/resource-manager/readme.md", "package": "com.azure.resourcemanager.redis", - "args": "--tag=package-2024-03 --rename-model=ErrorDetailAutoGenerated:ErrorDetail,RedisCommonPropertiesRedisConfiguration:RedisConfiguration --remove-inner=OperationStatusResult", + "args": "--tag=package-2024-03 --rename-model=ErrorDetailAutoGenerated:ErrorDetail,RedisCommonPropertiesRedisConfiguration:RedisConfiguration --remove-inner=OperationStatusResult --stream-style-serialization=false", "note": "run RedisConfigurationTests.generateConfigurationUtils and copy output code snippet to ConfigurationUtils" }, "relay": { "dir": "azure-resourcemanager-relay", "source": "specification/relay/resource-manager/readme.md", "package": "com.microsoft.azure.resourcemanager.relay", - "args": "--tag=package-2017-04" + "args": "--tag=package-2017-04 --stream-style-serialization=false" }, "resources": { "dir": "azure-resourcemanager-resources", @@ -232,39 +232,39 @@ "dir": "../resourcemanagerhybrid/azure-resourcemanager-resources", "source": "specification/resources/resource-manager/readme.md", "package": "com.azure.resourcemanager.resources", - "args": "--tag=package-resources-2019-10 --add-inner=Deployment" + "args": "--tag=package-resources-2019-10 --add-inner=Deployment --stream-style-serialization=false" }, "search": { "dir": "azure-resourcemanager-search", "source": "specification/search/resource-manager/readme.md", "package": "com.azure.resourcemanager.search", - "args": "--tag=package-2023-11 --remove-inner=CheckNameAvailabilityOutput" + "args": "--tag=package-2023-11 --remove-inner=CheckNameAvailabilityOutput --stream-style-serialization=false" }, "servicebus": { "dir": "azure-resourcemanager-servicebus", "source": "specification/servicebus/resource-manager/readme.md", "package": "com.azure.resourcemanager.servicebus", - "args": "--tag=package-2021-11", + "args": "--tag=package-2021-11 --stream-style-serialization=false", "note": "1. Add '@JsonSerialize(using = DurationSerializer.class)' to properties of 'Duration' type of class 'SBTopicInnerProperties', 'SBTopicInnerProperties', 'SBTopicInnerProperties'; 2. Change parent class of class 'SBTopicInner', 'SBQueueInner' and 'SBSubscriptionInner' to 'Resource', not 'ProxyResource'" }, "sql": { "dir": "azure-resourcemanager-sql", "source": "specification/sql/resource-manager/readme.md", "package": "com.azure.resourcemanager.sql", - "args": "--tag=package-2021-11 --modelerfour.lenient-model-deduplication=true --rename-model=SecurityAlertsPolicyState:SecurityAlertPolicyState", + "args": "--tag=package-2021-11 --modelerfour.lenient-model-deduplication=true --rename-model=SecurityAlertsPolicyState:SecurityAlertPolicyState --stream-style-serialization=false", "note": "Add '\"x-ms-long-running-operation\": true' to TransparentDataEncryptions_CreateOrUpdate in specs file TransparentDataEncryptions.json" }, "storage": { "dir": "azure-resourcemanager-storage", "source": "specification/storage/resource-manager/readme.md", "package": "com.azure.resourcemanager.storage", - "args": "--tag=package-2023-05 --modelerfour.lenient-model-deduplication --rename-model=AllowedMethods:CorsRuleAllowedMethodsItem,AccountType:ActiveDirectoryPropertiesAccountType --property-include-always=EncryptionIdentity.encryptionUserAssignedIdentity" + "args": "--tag=package-2023-05 --modelerfour.lenient-model-deduplication --rename-model=AllowedMethods:CorsRuleAllowedMethodsItem,AccountType:ActiveDirectoryPropertiesAccountType --property-include-always=EncryptionIdentity.encryptionUserAssignedIdentity --stream-style-serialization=false" }, "storage-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-storage", "source": "specification/storage/resource-manager/readme.md", "package": "com.azure.resourcemanager.storage", - "args": "--tag=profile-hybrid-2020-09-01" + "args": "--tag=profile-hybrid-2020-09-01 --stream-style-serialization=false" }, "subscriptions": { "dir": "azure-resourcemanager-resources", @@ -276,19 +276,19 @@ "dir": "../resourcemanagerhybrid/azure-resourcemanager-resources", "source": "specification/resources/resource-manager/readme.md", "package": "com.azure.resourcemanager.resources", - "args": "--tag=package-subscriptions-2016-06 --name-for-ungrouped-operations=ResourceName" + "args": "--tag=package-subscriptions-2016-06 --name-for-ungrouped-operations=ResourceName --stream-style-serialization=false" }, "trafficmanager": { "dir": "azure-resourcemanager-trafficmanager", "source": "specification/trafficmanager/resource-manager/readme.md", "package": "com.azure.resourcemanager.trafficmanager", - "args": "--tag=package-2022-04 --rename-model=EndpointType:EndpointTypes" + "args": "--tag=package-2022-04 --rename-model=EndpointType:EndpointTypes --stream-style-serialization=false" }, "msi": { "dir": "azure-resourcemanager-msi", "source": "specification/msi/resource-manager/readme.md", "package": "com.azure.resourcemanager.msi", - "args": "--tag=package-2023-01-31 --add-client-flatten=Identity" + "args": "--tag=package-2023-01-31 --add-client-flatten=Identity --stream-style-serialization=false" }, "changes": { "dir": "azure-resourcemanager-resources", diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml index 694bdb11886f2..79b49affee09f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml @@ -67,6 +67,11 @@ azure-core-management 1.15.1 + + com.azure + azure-json + 1.2.0 + org.slf4j slf4j-simple diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java index 5b32e07c46644..c21c898c0a3fa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/TagOperationsClient.java @@ -334,7 +334,7 @@ public interface TagOperationsClient { * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -351,7 +351,7 @@ public interface TagOperationsClient { * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -368,7 +368,7 @@ PollerFlux, TagsResourceInner> beginCreateOrUpdate * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -385,7 +385,7 @@ SyncPoller, TagsResourceInner> beginCreateOrUpdate * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -403,7 +403,7 @@ SyncPoller, TagsResourceInner> beginCreateOrUpdate * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -419,7 +419,7 @@ SyncPoller, TagsResourceInner> beginCreateOrUpdate * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -435,7 +435,7 @@ SyncPoller, TagsResourceInner> beginCreateOrUpdate * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -455,7 +455,7 @@ SyncPoller, TagsResourceInner> beginCreateOrUpdate * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -475,7 +475,7 @@ SyncPoller, TagsResourceInner> beginCreateOrUpdate * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -495,7 +495,7 @@ PollerFlux, TagsResourceInner> beginUpdateAtScopeA * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -515,7 +515,7 @@ SyncPoller, TagsResourceInner> beginUpdateAtScope( * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -536,7 +536,7 @@ SyncPoller, TagsResourceInner> beginUpdateAtScope( * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -555,7 +555,7 @@ SyncPoller, TagsResourceInner> beginUpdateAtScope( * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -574,7 +574,7 @@ SyncPoller, TagsResourceInner> beginUpdateAtScope( * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ChangeResourceResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ChangeResourceResultInner.java index 9dca7b1710dc8..147d51ec1e61b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ChangeResourceResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ChangeResourceResultInner.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.ChangeProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Change Resource. @@ -17,9 +20,23 @@ public final class ChangeResourceResultInner extends ProxyResource { /* * The properties of a change */ - @JsonProperty(value = "properties") private ChangeProperties properties; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of ChangeResourceResultInner class. */ @@ -46,6 +63,36 @@ public ChangeResourceResultInner withProperties(ChangeProperties properties) { return this; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Validates the instance. * @@ -56,4 +103,47 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeResourceResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeResourceResultInner 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 ChangeResourceResultInner. + */ + public static ChangeResourceResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeResourceResultInner deserializedChangeResourceResultInner = new ChangeResourceResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedChangeResourceResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedChangeResourceResultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedChangeResourceResultInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedChangeResourceResultInner.properties = ChangeProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeResourceResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/CheckResourceNameResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/CheckResourceNameResultInner.java index 766eeecacbafc..d256286a102a9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/CheckResourceNameResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/CheckResourceNameResultInner.java @@ -5,30 +5,31 @@ package com.azure.resourcemanager.resources.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.resources.models.ResourceNameStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Resource Name valid if not a reserved word, does not contain a reserved word and does not start with a reserved word. */ @Fluent -public final class CheckResourceNameResultInner { +public final class CheckResourceNameResultInner implements JsonSerializable { /* * Name of Resource */ - @JsonProperty(value = "name") private String name; /* * Type of Resource */ - @JsonProperty(value = "type") private String type; /* * Is the resource name Allowed or Reserved */ - @JsonProperty(value = "status") private ResourceNameStatus status; /** @@ -104,4 +105,46 @@ public CheckResourceNameResultInner withStatus(ResourceNameStatus status) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckResourceNameResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckResourceNameResultInner 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 CheckResourceNameResultInner. + */ + public static CheckResourceNameResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckResourceNameResultInner deserializedCheckResourceNameResultInner = new CheckResourceNameResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedCheckResourceNameResultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCheckResourceNameResultInner.type = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedCheckResourceNameResultInner.status = ResourceNameStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckResourceNameResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/CheckZonePeersResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/CheckZonePeersResultInner.java index 06b465b2cc29f..c0a2c44d72d12 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/CheckZonePeersResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/CheckZonePeersResultInner.java @@ -5,31 +5,32 @@ package com.azure.resourcemanager.resources.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.resources.models.AvailabilityZonePeers; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Result of the Check zone peers operation. */ @Fluent -public final class CheckZonePeersResultInner { +public final class CheckZonePeersResultInner implements JsonSerializable { /* * The subscription ID. */ - @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; /* * the location of the subscription. */ - @JsonProperty(value = "location") private String location; /* * The Availability Zones shared by the subscriptions. */ - @JsonProperty(value = "availabilityZonePeers") private List availabilityZonePeers; /** @@ -97,4 +98,48 @@ public void validate() { availabilityZonePeers().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeArrayField("availabilityZonePeers", this.availabilityZonePeers, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckZonePeersResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckZonePeersResultInner 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 CheckZonePeersResultInner. + */ + public static CheckZonePeersResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckZonePeersResultInner deserializedCheckZonePeersResultInner = new CheckZonePeersResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("subscriptionId".equals(fieldName)) { + deserializedCheckZonePeersResultInner.subscriptionId = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedCheckZonePeersResultInner.location = reader.getString(); + } else if ("availabilityZonePeers".equals(fieldName)) { + List availabilityZonePeers + = reader.readArray(reader1 -> AvailabilityZonePeers.fromJson(reader1)); + deserializedCheckZonePeersResultInner.availabilityZonePeers = availabilityZonePeers; + } else { + reader.skipChildren(); + } + } + + return deserializedCheckZonePeersResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataManifestResourceFunctionsDefinition.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataManifestResourceFunctionsDefinition.java index 3de9854d85366..cd691970ae08c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataManifestResourceFunctionsDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataManifestResourceFunctionsDefinition.java @@ -5,25 +5,28 @@ package com.azure.resourcemanager.resources.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.resources.models.DataManifestCustomResourceFunctionDefinition; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The resource functions supported by a manifest. */ @Fluent -public final class DataManifestResourceFunctionsDefinition { +public final class DataManifestResourceFunctionsDefinition + implements JsonSerializable { /* * The standard resource functions (subscription and/or resourceGroup). */ - @JsonProperty(value = "standard") private List standard; /* * An array of data manifest custom resource definition. */ - @JsonProperty(value = "custom") private List custom; /** @@ -83,4 +86,47 @@ public void validate() { custom().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("standard", this.standard, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("custom", this.custom, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataManifestResourceFunctionsDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataManifestResourceFunctionsDefinition 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 DataManifestResourceFunctionsDefinition. + */ + public static DataManifestResourceFunctionsDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataManifestResourceFunctionsDefinition deserializedDataManifestResourceFunctionsDefinition + = new DataManifestResourceFunctionsDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("standard".equals(fieldName)) { + List standard = reader.readArray(reader1 -> reader1.getString()); + deserializedDataManifestResourceFunctionsDefinition.standard = standard; + } else if ("custom".equals(fieldName)) { + List custom + = reader.readArray(reader1 -> DataManifestCustomResourceFunctionDefinition.fromJson(reader1)); + deserializedDataManifestResourceFunctionsDefinition.custom = custom; + } else { + reader.skipChildren(); + } + } + + return deserializedDataManifestResourceFunctionsDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataPolicyManifestInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataPolicyManifestInner.java index 6b787167ee331..11aaf2002ed46 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataPolicyManifestInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataPolicyManifestInner.java @@ -6,10 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.DataEffect; import com.azure.resourcemanager.resources.models.DataManifestCustomResourceFunctionDefinition; import com.azure.resourcemanager.resources.models.ResourceTypeAliases; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -20,9 +23,23 @@ public final class DataPolicyManifestInner extends ProxyResource { /* * The data policy manifest properties. */ - @JsonProperty(value = "properties") private DataPolicyManifestProperties innerProperties; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of DataPolicyManifestInner class. */ @@ -38,6 +55,36 @@ private DataPolicyManifestProperties innerProperties() { return this.innerProperties; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the namespaces property: The list of namespaces for the data policy manifest. * @@ -232,4 +279,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataPolicyManifestInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataPolicyManifestInner 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 DataPolicyManifestInner. + */ + public static DataPolicyManifestInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataPolicyManifestInner deserializedDataPolicyManifestInner = new DataPolicyManifestInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDataPolicyManifestInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDataPolicyManifestInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDataPolicyManifestInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDataPolicyManifestInner.innerProperties = DataPolicyManifestProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDataPolicyManifestInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataPolicyManifestProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataPolicyManifestProperties.java index 0b97efd7558e3..55ff50b7f52a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataPolicyManifestProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DataPolicyManifestProperties.java @@ -5,57 +5,54 @@ package com.azure.resourcemanager.resources.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.resources.models.DataEffect; import com.azure.resourcemanager.resources.models.DataManifestCustomResourceFunctionDefinition; import com.azure.resourcemanager.resources.models.ResourceTypeAliases; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties of the data policy manifest. */ @Fluent -public final class DataPolicyManifestProperties { +public final class DataPolicyManifestProperties implements JsonSerializable { /* * The list of namespaces for the data policy manifest. */ - @JsonProperty(value = "namespaces") private List namespaces; /* * The policy mode of the data policy manifest. */ - @JsonProperty(value = "policyMode") private String policyMode; /* * A value indicating whether policy mode is allowed only in built-in definitions. */ - @JsonProperty(value = "isBuiltInOnly") private Boolean isBuiltInOnly; /* * An array of resource type aliases. */ - @JsonProperty(value = "resourceTypeAliases") private List resourceTypeAliases; /* * The effect definition. */ - @JsonProperty(value = "effects") private List effects; /* * The non-alias field accessor values that can be used in the policy rule. */ - @JsonProperty(value = "fieldValues") private List fieldValues; /* * The resource functions definition specified in the data manifest. */ - @JsonProperty(value = "resourceFunctions") private DataManifestResourceFunctionsDefinition innerResourceFunctions; /** @@ -255,4 +252,65 @@ public void validate() { innerResourceFunctions().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("namespaces", this.namespaces, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("policyMode", this.policyMode); + jsonWriter.writeBooleanField("isBuiltInOnly", this.isBuiltInOnly); + jsonWriter.writeArrayField("resourceTypeAliases", this.resourceTypeAliases, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("effects", this.effects, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("fieldValues", this.fieldValues, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("resourceFunctions", this.innerResourceFunctions); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataPolicyManifestProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataPolicyManifestProperties 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 DataPolicyManifestProperties. + */ + public static DataPolicyManifestProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataPolicyManifestProperties deserializedDataPolicyManifestProperties = new DataPolicyManifestProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("namespaces".equals(fieldName)) { + List namespaces = reader.readArray(reader1 -> reader1.getString()); + deserializedDataPolicyManifestProperties.namespaces = namespaces; + } else if ("policyMode".equals(fieldName)) { + deserializedDataPolicyManifestProperties.policyMode = reader.getString(); + } else if ("isBuiltInOnly".equals(fieldName)) { + deserializedDataPolicyManifestProperties.isBuiltInOnly = reader.getNullable(JsonReader::getBoolean); + } else if ("resourceTypeAliases".equals(fieldName)) { + List resourceTypeAliases + = reader.readArray(reader1 -> ResourceTypeAliases.fromJson(reader1)); + deserializedDataPolicyManifestProperties.resourceTypeAliases = resourceTypeAliases; + } else if ("effects".equals(fieldName)) { + List effects = reader.readArray(reader1 -> DataEffect.fromJson(reader1)); + deserializedDataPolicyManifestProperties.effects = effects; + } else if ("fieldValues".equals(fieldName)) { + List fieldValues = reader.readArray(reader1 -> reader1.getString()); + deserializedDataPolicyManifestProperties.fieldValues = fieldValues; + } else if ("resourceFunctions".equals(fieldName)) { + deserializedDataPolicyManifestProperties.innerResourceFunctions + = DataManifestResourceFunctionsDefinition.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDataPolicyManifestProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentExportResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentExportResultInner.java index 9a612dac2ff1c..f48b239f88296 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentExportResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentExportResultInner.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.resources.fluent.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 deployment export result. */ @Fluent -public final class DeploymentExportResultInner { +public final class DeploymentExportResultInner implements JsonSerializable { /* * The template content. */ - @JsonProperty(value = "template") private Object template; /** @@ -51,4 +54,40 @@ public DeploymentExportResultInner withTemplate(Object template) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeUntypedField("template", this.template); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentExportResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentExportResultInner 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 DeploymentExportResultInner. + */ + public static DeploymentExportResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentExportResultInner deserializedDeploymentExportResultInner = new DeploymentExportResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("template".equals(fieldName)) { + deserializedDeploymentExportResultInner.template = reader.readUntyped(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentExportResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentExtendedInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentExtendedInner.java index 63bee4a55871a..b548556552cf3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentExtendedInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentExtendedInner.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.DeploymentPropertiesExtended; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -18,9 +21,23 @@ public final class DeploymentExtendedInner extends Resource { /* * Deployment properties. */ - @JsonProperty(value = "properties") private DeploymentPropertiesExtended properties; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of DeploymentExtendedInner class. */ @@ -47,6 +64,36 @@ public DeploymentExtendedInner withProperties(DeploymentPropertiesExtended prope return this; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -75,4 +122,54 @@ public void validate() { properties().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); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentExtendedInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentExtendedInner 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 DeploymentExtendedInner. + */ + public static DeploymentExtendedInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentExtendedInner deserializedDeploymentExtendedInner = new DeploymentExtendedInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDeploymentExtendedInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDeploymentExtendedInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDeploymentExtendedInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedDeploymentExtendedInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDeploymentExtendedInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedDeploymentExtendedInner.properties = DeploymentPropertiesExtended.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentExtendedInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentInner.java index 9699f4cabedf0..2aeab634a7e06 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentInner.java @@ -6,33 +6,32 @@ 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.resources.models.DeploymentProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** * Deployment operation parameters. */ @Fluent -public final class DeploymentInner { +public final class DeploymentInner implements JsonSerializable { /* * The location to store the deployment data. */ - @JsonProperty(value = "location") private String location; /* * The deployment properties. */ - @JsonProperty(value = "properties", required = true) private DeploymentProperties properties; /* * Deployment tags */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** @@ -116,4 +115,48 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(DeploymentInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentInner 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 DeploymentInner. + */ + public static DeploymentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentInner deserializedDeploymentInner = new DeploymentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedDeploymentInner.properties = DeploymentProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedDeploymentInner.location = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDeploymentInner.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentOperationInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentOperationInner.java index e241e9863229e..28adea77c6765 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentOperationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentOperationInner.java @@ -5,30 +5,31 @@ package com.azure.resourcemanager.resources.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.resources.models.DeploymentOperationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Deployment operation information. */ @Fluent -public final class DeploymentOperationInner { +public final class DeploymentOperationInner implements JsonSerializable { /* * Full deployment operation ID. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * Deployment operation ID. */ - @JsonProperty(value = "operationId", access = JsonProperty.Access.WRITE_ONLY) private String operationId; /* * Deployment properties. */ - @JsonProperty(value = "properties") private DeploymentOperationProperties properties; /** @@ -85,4 +86,44 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentOperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentOperationInner 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 DeploymentOperationInner. + */ + public static DeploymentOperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentOperationInner deserializedDeploymentOperationInner = new DeploymentOperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDeploymentOperationInner.id = reader.getString(); + } else if ("operationId".equals(fieldName)) { + deserializedDeploymentOperationInner.operationId = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDeploymentOperationInner.properties = DeploymentOperationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentOperationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackInner.java index 1a5139cf4d260..e8c324210bc25 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackInner.java @@ -5,7 +5,11 @@ package com.azure.resourcemanager.resources.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; import com.azure.core.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.models.AzureResourceBase; import com.azure.resourcemanager.resources.models.DenySettings; @@ -17,8 +21,7 @@ import com.azure.resourcemanager.resources.models.ManagedResourceReference; import com.azure.resourcemanager.resources.models.ResourceReference; import com.azure.resourcemanager.resources.models.ResourceReferenceExtended; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -28,24 +31,41 @@ @Fluent public final class DeploymentStackInner extends AzureResourceBase { /* - * The location of the Deployment stack. It cannot be changed after creation. It must be one of the supported Azure locations. + * The location of the Deployment stack. It cannot be changed after creation. It must be one of the supported Azure + * locations. */ - @JsonProperty(value = "location") private String location; /* * Deployment stack resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Deployment stack properties. */ - @JsonProperty(value = "properties") private DeploymentStackProperties innerProperties; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /** * Creates an instance of DeploymentStackInner class. */ @@ -103,6 +123,46 @@ private DeploymentStackProperties innerProperties() { return this.innerProperties; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + @Override + public SystemData systemData() { + return this.systemData; + } + /** * Get the template property: The template content. You use this element when you want to pass the template syntax * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. @@ -479,4 +539,56 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStackInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStackInner 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 DeploymentStackInner. + */ + public static DeploymentStackInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStackInner deserializedDeploymentStackInner = new DeploymentStackInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDeploymentStackInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDeploymentStackInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDeploymentStackInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedDeploymentStackInner.systemData = SystemData.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedDeploymentStackInner.location = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDeploymentStackInner.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedDeploymentStackInner.innerProperties = DeploymentStackProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStackInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackProperties.java index b316f7c97303b..6d6df497998bf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackProperties.java @@ -7,6 +7,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; 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.resources.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.models.DenySettings; import com.azure.resourcemanager.resources.models.DeploymentParameter; @@ -17,8 +21,7 @@ import com.azure.resourcemanager.resources.models.ManagedResourceReference; import com.azure.resourcemanager.resources.models.ResourceReference; import com.azure.resourcemanager.resources.models.ResourceReferenceExtended; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -26,126 +29,119 @@ * Deployment stack properties. */ @Fluent -public final class DeploymentStackProperties { +public final class DeploymentStackProperties implements JsonSerializable { /* - * The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. + * The template content. You use this element when you want to pass the template syntax directly in the request + * rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the + * templateLink property or the template property, but not both. */ - @JsonProperty(value = "template") private Object template; /* * The URI of the template. Use either the templateLink property or the template property, but not both. */ - @JsonProperty(value = "templateLink") private DeploymentStacksTemplateLink templateLink; /* - * Name and value pairs that define the deployment parameters for the template. Use this element when providing the parameter values directly in the request, rather than linking to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. + * Name and value pairs that define the deployment parameters for the template. Use this element when providing the + * parameter values directly in the request, rather than linking to an existing parameter file. Use either the + * parametersLink property or the parameters property, but not both. */ - @JsonProperty(value = "parameters") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map parameters; /* - * The URI of parameters file. Use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both. + * The URI of parameters file. Use this element to link to an existing parameters file. Use either the + * parametersLink property or the parameters property, but not both. */ - @JsonProperty(value = "parametersLink") private DeploymentStacksParametersLink parametersLink; /* * Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. */ - @JsonProperty(value = "actionOnUnmanage", required = true) private ActionOnUnmanage actionOnUnmanage; /* * The debug setting of the deployment. */ - @JsonProperty(value = "debugSetting") private DeploymentStacksDebugSetting debugSetting; /* * Flag to bypass service errors that indicate the stack resource list is not correctly synchronized. */ - @JsonProperty(value = "bypassStackOutOfSyncError") private Boolean bypassStackOutOfSyncError; /* - * The scope at which the initial deployment should be created. If a scope is not specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + * The scope at which the initial deployment should be created. If a scope is not specified, it will default to the + * scope of the deployment stack. Valid scopes are: management group (format: + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). */ - @JsonProperty(value = "deploymentScope") private String deploymentScope; /* * Deployment stack description. Max length of 4096 characters. */ - @JsonProperty(value = "description") private String description; /* * Defines how resources deployed by the stack are locked. */ - @JsonProperty(value = "denySettings", required = true) private DenySettings denySettings; /* * State of the deployment stack. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private DeploymentStackProvisioningState provisioningState; /* - * The correlation id of the last Deployment stack upsert or delete operation. It is in GUID format and is used for tracing. + * The correlation id of the last Deployment stack upsert or delete operation. It is in GUID format and is used for + * tracing. */ - @JsonProperty(value = "correlationId", access = JsonProperty.Access.WRITE_ONLY) private String correlationId; /* - * An array of resources that were detached during the most recent Deployment stack update. Detached means that the resource was removed from the template, but no relevant deletion operations were specified. So, the resource still exists while no longer being associated with the stack. + * An array of resources that were detached during the most recent Deployment stack update. Detached means that the + * resource was removed from the template, but no relevant deletion operations were specified. So, the resource + * still exists while no longer being associated with the stack. */ - @JsonProperty(value = "detachedResources", access = JsonProperty.Access.WRITE_ONLY) private List detachedResources; /* - * An array of resources that were deleted during the most recent Deployment stack update. Deleted means that the resource was removed from the template and relevant deletion operations were specified. + * An array of resources that were deleted during the most recent Deployment stack update. Deleted means that the + * resource was removed from the template and relevant deletion operations were specified. */ - @JsonProperty(value = "deletedResources", access = JsonProperty.Access.WRITE_ONLY) private List deletedResources; /* - * An array of resources that failed to reach goal state during the most recent update. Each resourceId is accompanied by an error message. + * An array of resources that failed to reach goal state during the most recent update. Each resourceId is + * accompanied by an error message. */ - @JsonProperty(value = "failedResources", access = JsonProperty.Access.WRITE_ONLY) private List failedResources; /* * An array of resources currently managed by the deployment stack. */ - @JsonProperty(value = "resources", access = JsonProperty.Access.WRITE_ONLY) private List resources; /* * The resourceId of the deployment resource created by the deployment stack. */ - @JsonProperty(value = "deploymentId", access = JsonProperty.Access.WRITE_ONLY) private String deploymentId; /* * The outputs of the deployment resource created by the deployment stack. */ - @JsonProperty(value = "outputs", access = JsonProperty.Access.WRITE_ONLY) private Object outputs; /* * The duration of the last successful Deployment stack update. */ - @JsonProperty(value = "duration", access = JsonProperty.Access.WRITE_ONLY) private String duration; /* * The error detail. */ - @JsonProperty(value = "error") private ManagementError error; /** @@ -536,4 +532,102 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(DeploymentStackProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("actionOnUnmanage", this.actionOnUnmanage); + jsonWriter.writeJsonField("denySettings", this.denySettings); + jsonWriter.writeUntypedField("template", this.template); + jsonWriter.writeJsonField("templateLink", this.templateLink); + jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("parametersLink", this.parametersLink); + jsonWriter.writeJsonField("debugSetting", this.debugSetting); + jsonWriter.writeBooleanField("bypassStackOutOfSyncError", this.bypassStackOutOfSyncError); + jsonWriter.writeStringField("deploymentScope", this.deploymentScope); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStackProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStackProperties 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 DeploymentStackProperties. + */ + public static DeploymentStackProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStackProperties deserializedDeploymentStackProperties = new DeploymentStackProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actionOnUnmanage".equals(fieldName)) { + deserializedDeploymentStackProperties.actionOnUnmanage = ActionOnUnmanage.fromJson(reader); + } else if ("denySettings".equals(fieldName)) { + deserializedDeploymentStackProperties.denySettings = DenySettings.fromJson(reader); + } else if ("template".equals(fieldName)) { + deserializedDeploymentStackProperties.template = reader.readUntyped(); + } else if ("templateLink".equals(fieldName)) { + deserializedDeploymentStackProperties.templateLink = DeploymentStacksTemplateLink.fromJson(reader); + } else if ("parameters".equals(fieldName)) { + Map parameters + = reader.readMap(reader1 -> DeploymentParameter.fromJson(reader1)); + deserializedDeploymentStackProperties.parameters = parameters; + } else if ("parametersLink".equals(fieldName)) { + deserializedDeploymentStackProperties.parametersLink + = DeploymentStacksParametersLink.fromJson(reader); + } else if ("debugSetting".equals(fieldName)) { + deserializedDeploymentStackProperties.debugSetting = DeploymentStacksDebugSetting.fromJson(reader); + } else if ("bypassStackOutOfSyncError".equals(fieldName)) { + deserializedDeploymentStackProperties.bypassStackOutOfSyncError + = reader.getNullable(JsonReader::getBoolean); + } else if ("deploymentScope".equals(fieldName)) { + deserializedDeploymentStackProperties.deploymentScope = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedDeploymentStackProperties.description = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedDeploymentStackProperties.provisioningState + = DeploymentStackProvisioningState.fromString(reader.getString()); + } else if ("correlationId".equals(fieldName)) { + deserializedDeploymentStackProperties.correlationId = reader.getString(); + } else if ("detachedResources".equals(fieldName)) { + List detachedResources + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedDeploymentStackProperties.detachedResources = detachedResources; + } else if ("deletedResources".equals(fieldName)) { + List deletedResources + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedDeploymentStackProperties.deletedResources = deletedResources; + } else if ("failedResources".equals(fieldName)) { + List failedResources + = reader.readArray(reader1 -> ResourceReferenceExtended.fromJson(reader1)); + deserializedDeploymentStackProperties.failedResources = failedResources; + } else if ("resources".equals(fieldName)) { + List resources + = reader.readArray(reader1 -> ManagedResourceReference.fromJson(reader1)); + deserializedDeploymentStackProperties.resources = resources; + } else if ("deploymentId".equals(fieldName)) { + deserializedDeploymentStackProperties.deploymentId = reader.getString(); + } else if ("outputs".equals(fieldName)) { + deserializedDeploymentStackProperties.outputs = reader.readUntyped(); + } else if ("duration".equals(fieldName)) { + deserializedDeploymentStackProperties.duration = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedDeploymentStackProperties.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStackProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackTemplateDefinitionInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackTemplateDefinitionInner.java index 54111050d4b14..5b6ef68d86203 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackTemplateDefinitionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackTemplateDefinitionInner.java @@ -5,24 +5,29 @@ package com.azure.resourcemanager.resources.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.resources.models.DeploymentStacksTemplateLink; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Export Template specific properties of the Deployment stack. */ @Fluent -public final class DeploymentStackTemplateDefinitionInner { +public final class DeploymentStackTemplateDefinitionInner + implements JsonSerializable { /* - * The template content. Use this element to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. + * The template content. Use this element to pass the template syntax directly in the request rather than link to an + * existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the + * template property, but not both. */ - @JsonProperty(value = "template") private Object template; /* * The URI of the template. Use either the templateLink property or the template property, but not both. */ - @JsonProperty(value = "templateLink") private DeploymentStacksTemplateLink templateLink; /** @@ -87,4 +92,45 @@ public void validate() { templateLink().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeUntypedField("template", this.template); + jsonWriter.writeJsonField("templateLink", this.templateLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStackTemplateDefinitionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStackTemplateDefinitionInner 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 DeploymentStackTemplateDefinitionInner. + */ + public static DeploymentStackTemplateDefinitionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStackTemplateDefinitionInner deserializedDeploymentStackTemplateDefinitionInner + = new DeploymentStackTemplateDefinitionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("template".equals(fieldName)) { + deserializedDeploymentStackTemplateDefinitionInner.template = reader.readUntyped(); + } else if ("templateLink".equals(fieldName)) { + deserializedDeploymentStackTemplateDefinitionInner.templateLink + = DeploymentStacksTemplateLink.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStackTemplateDefinitionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackValidateResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackValidateResultInner.java index 0756a614c19d5..7f413898ec826 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackValidateResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentStackValidateResultInner.java @@ -5,10 +5,14 @@ package com.azure.resourcemanager.resources.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; import com.azure.core.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.AzureResourceBase; import com.azure.resourcemanager.resources.models.DeploymentStackValidateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The Deployment stack validation result. @@ -18,15 +22,33 @@ public final class DeploymentStackValidateResultInner extends AzureResourceBase /* * The validation result details. */ - @JsonProperty(value = "properties") private DeploymentStackValidateProperties properties; /* * The error detail. */ - @JsonProperty(value = "error") private ManagementError error; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /** * Creates an instance of DeploymentStackValidateResultInner class. */ @@ -73,6 +95,46 @@ public DeploymentStackValidateResultInner withError(ManagementError error) { return this; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + @Override + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. * @@ -85,4 +147,54 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStackValidateResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStackValidateResultInner 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 DeploymentStackValidateResultInner. + */ + public static DeploymentStackValidateResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStackValidateResultInner deserializedDeploymentStackValidateResultInner + = new DeploymentStackValidateResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDeploymentStackValidateResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDeploymentStackValidateResultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDeploymentStackValidateResultInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedDeploymentStackValidateResultInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedDeploymentStackValidateResultInner.properties + = DeploymentStackValidateProperties.fromJson(reader); + } else if ("error".equals(fieldName)) { + deserializedDeploymentStackValidateResultInner.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStackValidateResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentValidateResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentValidateResultInner.java index 30fc705a2c52f..56ccab7993f1b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentValidateResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentValidateResultInner.java @@ -6,26 +6,26 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.DeploymentPropertiesExtended; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Information from validate template deployment response. */ @Fluent -public final class DeploymentValidateResultInner { +public final class DeploymentValidateResultInner implements JsonSerializable { /* - * Error Response - * * The deployment validation error. */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) private ManagementError error; /* * The template deployment properties. */ - @JsonProperty(value = "properties") private DeploymentPropertiesExtended properties; /** @@ -35,9 +35,7 @@ public DeploymentValidateResultInner() { } /** - * Get the error property: Error Response - * - * The deployment validation error. + * Get the error property: The deployment validation error. * * @return the error value. */ @@ -75,4 +73,44 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentValidateResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentValidateResultInner 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 DeploymentValidateResultInner. + */ + public static DeploymentValidateResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentValidateResultInner deserializedDeploymentValidateResultInner + = new DeploymentValidateResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("error".equals(fieldName)) { + deserializedDeploymentValidateResultInner.error = ManagementError.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedDeploymentValidateResultInner.properties + = DeploymentPropertiesExtended.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentValidateResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/FeatureResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/FeatureResultInner.java index 38ca19917bd7d..276bc7f01c134 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/FeatureResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/FeatureResultInner.java @@ -5,36 +5,36 @@ package com.azure.resourcemanager.resources.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.resources.models.FeatureProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Previewed feature information. */ @Fluent -public final class FeatureResultInner { +public final class FeatureResultInner implements JsonSerializable { /* * The name of the feature. */ - @JsonProperty(value = "name") private String name; /* * Properties of the previewed feature. */ - @JsonProperty(value = "properties") private FeatureProperties properties; /* * The resource ID of the feature. */ - @JsonProperty(value = "id") private String id; /* * The resource type of the feature. */ - @JsonProperty(value = "type") private String type; /** @@ -133,4 +133,49 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("type", this.type); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureResultInner 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 FeatureResultInner. + */ + public static FeatureResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FeatureResultInner deserializedFeatureResultInner = new FeatureResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedFeatureResultInner.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedFeatureResultInner.properties = FeatureProperties.fromJson(reader); + } else if ("id".equals(fieldName)) { + deserializedFeatureResultInner.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedFeatureResultInner.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFeatureResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/GenericResourceExpandedInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/GenericResourceExpandedInner.java index e8818b9b980ae..5f338b726a779 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/GenericResourceExpandedInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/GenericResourceExpandedInner.java @@ -5,11 +5,15 @@ package com.azure.resourcemanager.resources.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.ExtendedLocation; import com.azure.resourcemanager.resources.models.Identity; import com.azure.resourcemanager.resources.models.Plan; import com.azure.resourcemanager.resources.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; @@ -21,21 +25,33 @@ public final class GenericResourceExpandedInner extends GenericResourceInner { /* * The created time of the resource. This is only present if requested via the $expand query parameter. */ - @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime createdTime; /* * The changed time of the resource. This is only present if requested via the $expand query parameter. */ - @JsonProperty(value = "changedTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime changedTime; /* * The provisioning state of the resource. This is only present if requested via the $expand query parameter. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of GenericResourceExpandedInner class. */ @@ -72,6 +88,36 @@ public String provisioningState() { return this.provisioningState; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -162,4 +208,80 @@ public GenericResourceExpandedInner withTags(Map tags) { public void validate() { super.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("plan", plan()); + jsonWriter.writeUntypedField("properties", properties()); + jsonWriter.writeStringField("kind", kind()); + jsonWriter.writeStringField("managedBy", managedBy()); + jsonWriter.writeJsonField("sku", sku()); + jsonWriter.writeJsonField("identity", identity()); + jsonWriter.writeJsonField("extendedLocation", extendedLocation()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GenericResourceExpandedInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GenericResourceExpandedInner 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 GenericResourceExpandedInner. + */ + public static GenericResourceExpandedInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GenericResourceExpandedInner deserializedGenericResourceExpandedInner = new GenericResourceExpandedInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGenericResourceExpandedInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGenericResourceExpandedInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGenericResourceExpandedInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedGenericResourceExpandedInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedGenericResourceExpandedInner.withTags(tags); + } else if ("plan".equals(fieldName)) { + deserializedGenericResourceExpandedInner.withPlan(Plan.fromJson(reader)); + } else if ("properties".equals(fieldName)) { + deserializedGenericResourceExpandedInner.withProperties(reader.readUntyped()); + } else if ("kind".equals(fieldName)) { + deserializedGenericResourceExpandedInner.withKind(reader.getString()); + } else if ("managedBy".equals(fieldName)) { + deserializedGenericResourceExpandedInner.withManagedBy(reader.getString()); + } else if ("sku".equals(fieldName)) { + deserializedGenericResourceExpandedInner.withSku(Sku.fromJson(reader)); + } else if ("identity".equals(fieldName)) { + deserializedGenericResourceExpandedInner.withIdentity(Identity.fromJson(reader)); + } else if ("extendedLocation".equals(fieldName)) { + deserializedGenericResourceExpandedInner.withExtendedLocation(ExtendedLocation.fromJson(reader)); + } else if ("createdTime".equals(fieldName)) { + deserializedGenericResourceExpandedInner.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("changedTime".equals(fieldName)) { + deserializedGenericResourceExpandedInner.changedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedGenericResourceExpandedInner.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGenericResourceExpandedInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/GenericResourceInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/GenericResourceInner.java index 9c8c1fe2df184..288368d0f9f8e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/GenericResourceInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/GenericResourceInner.java @@ -6,11 +6,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.ExtendedLocation; import com.azure.resourcemanager.resources.models.Identity; import com.azure.resourcemanager.resources.models.Plan; import com.azure.resourcemanager.resources.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -21,45 +24,53 @@ public class GenericResourceInner extends Resource { /* * The plan of the resource. */ - @JsonProperty(value = "plan") private Plan plan; /* * The resource properties. */ - @JsonProperty(value = "properties") private Object properties; /* * The kind of the resource. */ - @JsonProperty(value = "kind") private String kind; /* * ID of the resource that manages this resource. */ - @JsonProperty(value = "managedBy") private String managedBy; /* * The SKU of the resource. */ - @JsonProperty(value = "sku") private Sku sku; /* * The identity of the resource. */ - @JsonProperty(value = "identity") private Identity identity; /* * Resource extended location. */ - @JsonProperty(value = "extendedLocation") private ExtendedLocation extendedLocation; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of GenericResourceInner class. */ @@ -206,6 +217,36 @@ public GenericResourceInner withExtendedLocation(ExtendedLocation extendedLocati return this; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -243,4 +284,72 @@ public void validate() { extendedLocation().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("plan", this.plan); + jsonWriter.writeUntypedField("properties", this.properties); + jsonWriter.writeStringField("kind", this.kind); + jsonWriter.writeStringField("managedBy", this.managedBy); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GenericResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GenericResourceInner 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 GenericResourceInner. + */ + public static GenericResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GenericResourceInner deserializedGenericResourceInner = new GenericResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGenericResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGenericResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGenericResourceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedGenericResourceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedGenericResourceInner.withTags(tags); + } else if ("plan".equals(fieldName)) { + deserializedGenericResourceInner.plan = Plan.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedGenericResourceInner.properties = reader.readUntyped(); + } else if ("kind".equals(fieldName)) { + deserializedGenericResourceInner.kind = reader.getString(); + } else if ("managedBy".equals(fieldName)) { + deserializedGenericResourceInner.managedBy = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedGenericResourceInner.sku = Sku.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedGenericResourceInner.identity = Identity.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedGenericResourceInner.extendedLocation = ExtendedLocation.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGenericResourceInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/LocationInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/LocationInner.java index e994887b9bf14..c346bef1be5a2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/LocationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/LocationInner.java @@ -5,63 +5,60 @@ package com.azure.resourcemanager.resources.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.resources.models.AvailabilityZoneMappings; import com.azure.resourcemanager.resources.models.LocationMetadata; import com.azure.resourcemanager.resources.models.LocationType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Location information. */ @Fluent -public final class LocationInner { +public final class LocationInner implements JsonSerializable { /* - * The fully qualified ID of the location. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74/locations/westus. + * The fully qualified ID of the location. For example, + * /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74/locations/westus. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * The subscription ID. */ - @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; /* * The location name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The location type. */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private LocationType type; /* * The display name of the location. */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) private String displayName; /* * The display name of the location and its region. */ - @JsonProperty(value = "regionalDisplayName", access = JsonProperty.Access.WRITE_ONLY) private String regionalDisplayName; /* * Metadata of the location, such as lat/long, paired region, and others. */ - @JsonProperty(value = "metadata") private LocationMetadata metadata; /* * The availability zone mappings for this region. */ - @JsonProperty(value = "availabilityZoneMappings") private List availabilityZoneMappings; /** @@ -178,4 +175,58 @@ public void validate() { availabilityZoneMappings().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("metadata", this.metadata); + jsonWriter.writeArrayField("availabilityZoneMappings", this.availabilityZoneMappings, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocationInner 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 LocationInner. + */ + public static LocationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocationInner deserializedLocationInner = new LocationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLocationInner.id = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedLocationInner.subscriptionId = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLocationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLocationInner.type = LocationType.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedLocationInner.displayName = reader.getString(); + } else if ("regionalDisplayName".equals(fieldName)) { + deserializedLocationInner.regionalDisplayName = reader.getString(); + } else if ("metadata".equals(fieldName)) { + deserializedLocationInner.metadata = LocationMetadata.fromJson(reader); + } else if ("availabilityZoneMappings".equals(fieldName)) { + List availabilityZoneMappings + = reader.readArray(reader1 -> AvailabilityZoneMappings.fromJson(reader1)); + deserializedLocationInner.availabilityZoneMappings = availabilityZoneMappings; + } else { + reader.skipChildren(); + } + } + + return deserializedLocationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ManagementLockObjectInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ManagementLockObjectInner.java index e23dee97509c3..f51059a5e2434 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ManagementLockObjectInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ManagementLockObjectInner.java @@ -7,9 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.LockLevel; import com.azure.resourcemanager.resources.models.ManagementLockOwner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -20,9 +23,23 @@ public final class ManagementLockObjectInner extends ProxyResource { /* * The properties of the lock. */ - @JsonProperty(value = "properties", required = true) private ManagementLockProperties innerProperties = new ManagementLockProperties(); + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of ManagementLockObjectInner class. */ @@ -38,6 +55,36 @@ private ManagementLockProperties innerProperties() { return this.innerProperties; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the level property: The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. * CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means @@ -127,4 +174,47 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ManagementLockObjectInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagementLockObjectInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagementLockObjectInner 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 ManagementLockObjectInner. + */ + public static ManagementLockObjectInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagementLockObjectInner deserializedManagementLockObjectInner = new ManagementLockObjectInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagementLockObjectInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagementLockObjectInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagementLockObjectInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagementLockObjectInner.innerProperties = ManagementLockProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagementLockObjectInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ManagementLockProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ManagementLockProperties.java index 57b92f3f37307..8c677f21a0b31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ManagementLockProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ManagementLockProperties.java @@ -6,32 +6,35 @@ 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.resources.models.LockLevel; import com.azure.resourcemanager.resources.models.ManagementLockOwner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The lock properties. */ @Fluent -public final class ManagementLockProperties { +public final class ManagementLockProperties implements JsonSerializable { /* - * The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it. + * The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized + * users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read + * from a resource, but they can't modify or delete it. */ - @JsonProperty(value = "level", required = true) private LockLevel level; /* * Notes about the lock. Maximum of 512 characters. */ - @JsonProperty(value = "notes") private String notes; /* * The owners of the lock. */ - @JsonProperty(value = "owners") private List owners; /** @@ -120,4 +123,49 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ManagementLockProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("level", this.level == null ? null : this.level.toString()); + jsonWriter.writeStringField("notes", this.notes); + jsonWriter.writeArrayField("owners", this.owners, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagementLockProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagementLockProperties 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 ManagementLockProperties. + */ + public static ManagementLockProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagementLockProperties deserializedManagementLockProperties = new ManagementLockProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("level".equals(fieldName)) { + deserializedManagementLockProperties.level = LockLevel.fromString(reader.getString()); + } else if ("notes".equals(fieldName)) { + deserializedManagementLockProperties.notes = reader.getString(); + } else if ("owners".equals(fieldName)) { + List owners + = reader.readArray(reader1 -> ManagementLockOwner.fromJson(reader1)); + deserializedManagementLockProperties.owners = owners; + } else { + reader.skipChildren(); + } + } + + return deserializedManagementLockProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/OperationInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/OperationInner.java index d43ef8be20160..3c3798e29244c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/OperationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/OperationInner.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.resources.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.resources.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Microsoft.Resources operation. */ @Fluent -public final class OperationInner { +public final class OperationInner implements JsonSerializable { /* * Operation name: {provider}/{resource}/{operation} */ - @JsonProperty(value = "name") private String name; /* * The object that represents the operation. */ - @JsonProperty(value = "display") private OperationDisplay display; /** @@ -81,4 +83,43 @@ public void validate() { display().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + 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 ("display".equals(fieldName)) { + deserializedOperationInner.display = OperationDisplay.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentInner.java index 1a72216d5fd50..fd256c39cdde2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentInner.java @@ -7,13 +7,16 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.resources.models.EnforcementMode; import com.azure.resourcemanager.resources.models.Identity; import com.azure.resourcemanager.resources.models.NonComplianceMessage; import com.azure.resourcemanager.resources.models.OverrideModel; import com.azure.resourcemanager.resources.models.ParameterValuesValue; import com.azure.resourcemanager.resources.models.ResourceSelector; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -25,27 +28,38 @@ public final class PolicyAssignmentInner extends ProxyResource { /* * Properties for the policy assignment. */ - @JsonProperty(value = "properties") private PolicyAssignmentProperties innerProperties; /* * The location of the policy assignment. Only required when utilizing managed identity. */ - @JsonProperty(value = "location") private String location; /* * The managed identity associated with the policy assignment. */ - @JsonProperty(value = "identity") private Identity identity; /* * The system metadata relating to this resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of PolicyAssignmentInner class. */ @@ -110,6 +124,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the displayName property: The display name of the policy assignment. * @@ -368,4 +412,55 @@ public void validate() { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyAssignmentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyAssignmentInner 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 PolicyAssignmentInner. + */ + public static PolicyAssignmentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyAssignmentInner deserializedPolicyAssignmentInner = new PolicyAssignmentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPolicyAssignmentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPolicyAssignmentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPolicyAssignmentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPolicyAssignmentInner.innerProperties = PolicyAssignmentProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedPolicyAssignmentInner.location = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedPolicyAssignmentInner.identity = Identity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPolicyAssignmentInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyAssignmentInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentProperties.java index 5a88d4274ea3a..1d23bee8f077f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentProperties.java @@ -5,13 +5,16 @@ package com.azure.resourcemanager.resources.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.resources.models.EnforcementMode; import com.azure.resourcemanager.resources.models.NonComplianceMessage; import com.azure.resourcemanager.resources.models.OverrideModel; import com.azure.resourcemanager.resources.models.ParameterValuesValue; import com.azure.resourcemanager.resources.models.ResourceSelector; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -19,72 +22,61 @@ * The policy assignment properties. */ @Fluent -public final class PolicyAssignmentProperties { +public final class PolicyAssignmentProperties implements JsonSerializable { /* * The display name of the policy assignment. */ - @JsonProperty(value = "displayName") private String displayName; /* * The ID of the policy definition or policy set definition being assigned. */ - @JsonProperty(value = "policyDefinitionId") private String policyDefinitionId; /* * The scope for the policy assignment. */ - @JsonProperty(value = "scope", access = JsonProperty.Access.WRITE_ONLY) private String scope; /* * The policy's excluded scopes. */ - @JsonProperty(value = "notScopes") private List notScopes; /* * The parameter values for the assigned policy rule. The keys are the parameter names. */ - @JsonProperty(value = "parameters") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map parameters; /* * This message will be part of response in case of policy violation. */ - @JsonProperty(value = "description") private String description; /* - * The policy assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs. + * The policy assignment metadata. Metadata is an open ended object and is typically a collection of key value + * pairs. */ - @JsonProperty(value = "metadata") private Object metadata; /* * The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. */ - @JsonProperty(value = "enforcementMode") private EnforcementMode enforcementMode; /* * The messages that describe why a resource is non-compliant with the policy. */ - @JsonProperty(value = "nonComplianceMessages") private List nonComplianceMessages; /* * The resource selector list to filter policies by resource properties. */ - @JsonProperty(value = "resourceSelectors") private List resourceSelectors; /* * The policy property value override. */ - @JsonProperty(value = "overrides") private List overrides; /** @@ -331,4 +323,81 @@ public void validate() { overrides().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("policyDefinitionId", this.policyDefinitionId); + jsonWriter.writeArrayField("notScopes", this.notScopes, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeUntypedField("metadata", this.metadata); + jsonWriter.writeStringField("enforcementMode", + this.enforcementMode == null ? null : this.enforcementMode.toString()); + jsonWriter.writeArrayField("nonComplianceMessages", this.nonComplianceMessages, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("resourceSelectors", this.resourceSelectors, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("overrides", this.overrides, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyAssignmentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyAssignmentProperties 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 PolicyAssignmentProperties. + */ + public static PolicyAssignmentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyAssignmentProperties deserializedPolicyAssignmentProperties = new PolicyAssignmentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedPolicyAssignmentProperties.displayName = reader.getString(); + } else if ("policyDefinitionId".equals(fieldName)) { + deserializedPolicyAssignmentProperties.policyDefinitionId = reader.getString(); + } else if ("scope".equals(fieldName)) { + deserializedPolicyAssignmentProperties.scope = reader.getString(); + } else if ("notScopes".equals(fieldName)) { + List notScopes = reader.readArray(reader1 -> reader1.getString()); + deserializedPolicyAssignmentProperties.notScopes = notScopes; + } else if ("parameters".equals(fieldName)) { + Map parameters + = reader.readMap(reader1 -> ParameterValuesValue.fromJson(reader1)); + deserializedPolicyAssignmentProperties.parameters = parameters; + } else if ("description".equals(fieldName)) { + deserializedPolicyAssignmentProperties.description = reader.getString(); + } else if ("metadata".equals(fieldName)) { + deserializedPolicyAssignmentProperties.metadata = reader.readUntyped(); + } else if ("enforcementMode".equals(fieldName)) { + deserializedPolicyAssignmentProperties.enforcementMode + = EnforcementMode.fromString(reader.getString()); + } else if ("nonComplianceMessages".equals(fieldName)) { + List nonComplianceMessages + = reader.readArray(reader1 -> NonComplianceMessage.fromJson(reader1)); + deserializedPolicyAssignmentProperties.nonComplianceMessages = nonComplianceMessages; + } else if ("resourceSelectors".equals(fieldName)) { + List resourceSelectors + = reader.readArray(reader1 -> ResourceSelector.fromJson(reader1)); + deserializedPolicyAssignmentProperties.resourceSelectors = resourceSelectors; + } else if ("overrides".equals(fieldName)) { + List overrides = reader.readArray(reader1 -> OverrideModel.fromJson(reader1)); + deserializedPolicyAssignmentProperties.overrides = overrides; + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyAssignmentProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentUpdateProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentUpdateProperties.java index 29aebcad34ddf..d626b336c1975 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentUpdateProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyAssignmentUpdateProperties.java @@ -5,26 +5,28 @@ package com.azure.resourcemanager.resources.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.resources.models.OverrideModel; import com.azure.resourcemanager.resources.models.ResourceSelector; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The policy assignment properties for Patch request. */ @Fluent -public final class PolicyAssignmentUpdateProperties { +public final class PolicyAssignmentUpdateProperties implements JsonSerializable { /* * The resource selector list to filter policies by resource properties. */ - @JsonProperty(value = "resourceSelectors") private List resourceSelectors; /* * The policy property value override. */ - @JsonProperty(value = "overrides") private List overrides; /** @@ -86,4 +88,48 @@ public void validate() { overrides().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("resourceSelectors", this.resourceSelectors, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("overrides", this.overrides, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyAssignmentUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyAssignmentUpdateProperties 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 PolicyAssignmentUpdateProperties. + */ + public static PolicyAssignmentUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyAssignmentUpdateProperties deserializedPolicyAssignmentUpdateProperties + = new PolicyAssignmentUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceSelectors".equals(fieldName)) { + List resourceSelectors + = reader.readArray(reader1 -> ResourceSelector.fromJson(reader1)); + deserializedPolicyAssignmentUpdateProperties.resourceSelectors = resourceSelectors; + } else if ("overrides".equals(fieldName)) { + List overrides = reader.readArray(reader1 -> OverrideModel.fromJson(reader1)); + deserializedPolicyAssignmentUpdateProperties.overrides = overrides; + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyAssignmentUpdateProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionInner.java index 6a1f249b10259..9ac54d52d6aa1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionInner.java @@ -7,9 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.resources.models.ParameterDefinitionsValue; import com.azure.resourcemanager.resources.models.PolicyType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -20,15 +23,28 @@ public final class PolicyDefinitionInner extends ProxyResource { /* * The policy definition properties. */ - @JsonProperty(value = "properties") private PolicyDefinitionProperties innerProperties; /* * The system metadata relating to this resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of PolicyDefinitionInner class. */ @@ -53,6 +69,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the policyType property: The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, * and Static. @@ -230,4 +276,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyDefinitionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyDefinitionInner 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 PolicyDefinitionInner. + */ + public static PolicyDefinitionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyDefinitionInner deserializedPolicyDefinitionInner = new PolicyDefinitionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPolicyDefinitionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPolicyDefinitionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPolicyDefinitionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPolicyDefinitionInner.innerProperties = PolicyDefinitionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPolicyDefinitionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyDefinitionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionProperties.java index a1eeeefad3fd2..f1ee56a94f653 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyDefinitionProperties.java @@ -5,58 +5,54 @@ package com.azure.resourcemanager.resources.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.resources.models.ParameterDefinitionsValue; import com.azure.resourcemanager.resources.models.PolicyType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** * The policy definition properties. */ @Fluent -public final class PolicyDefinitionProperties { +public final class PolicyDefinitionProperties implements JsonSerializable { /* * The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. */ - @JsonProperty(value = "policyType") private PolicyType policyType; /* * The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data. */ - @JsonProperty(value = "mode") private String mode; /* * The display name of the policy definition. */ - @JsonProperty(value = "displayName") private String displayName; /* * The policy definition description. */ - @JsonProperty(value = "description") private String description; /* * The policy rule. */ - @JsonProperty(value = "policyRule") private Object policyRule; /* - * The policy definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. + * The policy definition metadata. Metadata is an open ended object and is typically a collection of key value + * pairs. */ - @JsonProperty(value = "metadata") private Object metadata; /* * The parameter definitions for parameters used in the policy rule. The keys are the parameter names. */ - @JsonProperty(value = "parameters") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map parameters; /** @@ -225,4 +221,60 @@ public void validate() { }); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); + jsonWriter.writeStringField("mode", this.mode); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeUntypedField("policyRule", this.policyRule); + jsonWriter.writeUntypedField("metadata", this.metadata); + jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyDefinitionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyDefinitionProperties 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 PolicyDefinitionProperties. + */ + public static PolicyDefinitionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyDefinitionProperties deserializedPolicyDefinitionProperties = new PolicyDefinitionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("policyType".equals(fieldName)) { + deserializedPolicyDefinitionProperties.policyType = PolicyType.fromString(reader.getString()); + } else if ("mode".equals(fieldName)) { + deserializedPolicyDefinitionProperties.mode = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedPolicyDefinitionProperties.displayName = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedPolicyDefinitionProperties.description = reader.getString(); + } else if ("policyRule".equals(fieldName)) { + deserializedPolicyDefinitionProperties.policyRule = reader.readUntyped(); + } else if ("metadata".equals(fieldName)) { + deserializedPolicyDefinitionProperties.metadata = reader.readUntyped(); + } else if ("parameters".equals(fieldName)) { + Map parameters + = reader.readMap(reader1 -> ParameterDefinitionsValue.fromJson(reader1)); + deserializedPolicyDefinitionProperties.parameters = parameters; + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyDefinitionProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionInner.java index 17683dee0cba8..8369bb495b8c5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionInner.java @@ -8,10 +8,13 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.AssignmentScopeValidation; import com.azure.resourcemanager.resources.models.ExemptionCategory; import com.azure.resourcemanager.resources.models.ResourceSelector; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; @@ -23,15 +26,28 @@ public final class PolicyExemptionInner extends ProxyResource { /* * Properties for the policy exemption. */ - @JsonProperty(value = "properties", required = true) private PolicyExemptionProperties innerProperties = new PolicyExemptionProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of PolicyExemptionInner class. */ @@ -56,6 +72,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the policyAssignmentId property: The ID of the policy assignment that is being exempted. * @@ -287,4 +333,49 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PolicyExemptionInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyExemptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyExemptionInner 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 PolicyExemptionInner. + */ + public static PolicyExemptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyExemptionInner deserializedPolicyExemptionInner = new PolicyExemptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPolicyExemptionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPolicyExemptionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPolicyExemptionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPolicyExemptionInner.innerProperties = PolicyExemptionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPolicyExemptionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyExemptionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionProperties.java index 7f0b19bffb8c1..5b6bf4e718202 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionProperties.java @@ -5,71 +5,69 @@ package com.azure.resourcemanager.resources.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; 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.resources.models.AssignmentScopeValidation; import com.azure.resourcemanager.resources.models.ExemptionCategory; import com.azure.resourcemanager.resources.models.ResourceSelector; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; import java.util.List; /** * The policy exemption properties. */ @Fluent -public final class PolicyExemptionProperties { +public final class PolicyExemptionProperties implements JsonSerializable { /* * The ID of the policy assignment that is being exempted. */ - @JsonProperty(value = "policyAssignmentId", required = true) private String policyAssignmentId; /* - * The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. + * The policy definition reference ID list when the associated policy assignment is an assignment of a policy set + * definition. */ - @JsonProperty(value = "policyDefinitionReferenceIds") private List policyDefinitionReferenceIds; /* * The policy exemption category. Possible values are Waiver and Mitigated. */ - @JsonProperty(value = "exemptionCategory", required = true) private ExemptionCategory exemptionCategory; /* * The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. */ - @JsonProperty(value = "expiresOn") private OffsetDateTime expiresOn; /* * The display name of the policy exemption. */ - @JsonProperty(value = "displayName") private String displayName; /* * The description of the policy exemption. */ - @JsonProperty(value = "description") private String description; /* * The policy exemption metadata. Metadata is an open ended object and is typically a collection of key value pairs. */ - @JsonProperty(value = "metadata") private Object metadata; /* * The resource selector list to filter policies by resource properties. */ - @JsonProperty(value = "resourceSelectors") private List resourceSelectors; /* * The option whether validate the exemption is at or under the assignment scope. */ - @JsonProperty(value = "assignmentScopeValidation") private AssignmentScopeValidation assignmentScopeValidation; /** @@ -289,4 +287,76 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PolicyExemptionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("policyAssignmentId", this.policyAssignmentId); + jsonWriter.writeStringField("exemptionCategory", + this.exemptionCategory == null ? null : this.exemptionCategory.toString()); + jsonWriter.writeArrayField("policyDefinitionReferenceIds", this.policyDefinitionReferenceIds, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("expiresOn", + this.expiresOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiresOn)); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeUntypedField("metadata", this.metadata); + jsonWriter.writeArrayField("resourceSelectors", this.resourceSelectors, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("assignmentScopeValidation", + this.assignmentScopeValidation == null ? null : this.assignmentScopeValidation.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyExemptionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyExemptionProperties 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 PolicyExemptionProperties. + */ + public static PolicyExemptionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyExemptionProperties deserializedPolicyExemptionProperties = new PolicyExemptionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("policyAssignmentId".equals(fieldName)) { + deserializedPolicyExemptionProperties.policyAssignmentId = reader.getString(); + } else if ("exemptionCategory".equals(fieldName)) { + deserializedPolicyExemptionProperties.exemptionCategory + = ExemptionCategory.fromString(reader.getString()); + } else if ("policyDefinitionReferenceIds".equals(fieldName)) { + List policyDefinitionReferenceIds = reader.readArray(reader1 -> reader1.getString()); + deserializedPolicyExemptionProperties.policyDefinitionReferenceIds = policyDefinitionReferenceIds; + } else if ("expiresOn".equals(fieldName)) { + deserializedPolicyExemptionProperties.expiresOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("displayName".equals(fieldName)) { + deserializedPolicyExemptionProperties.displayName = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedPolicyExemptionProperties.description = reader.getString(); + } else if ("metadata".equals(fieldName)) { + deserializedPolicyExemptionProperties.metadata = reader.readUntyped(); + } else if ("resourceSelectors".equals(fieldName)) { + List resourceSelectors + = reader.readArray(reader1 -> ResourceSelector.fromJson(reader1)); + deserializedPolicyExemptionProperties.resourceSelectors = resourceSelectors; + } else if ("assignmentScopeValidation".equals(fieldName)) { + deserializedPolicyExemptionProperties.assignmentScopeValidation + = AssignmentScopeValidation.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyExemptionProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionUpdateProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionUpdateProperties.java index 1d6005d08a69c..028b91e7c67e3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionUpdateProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicyExemptionUpdateProperties.java @@ -5,26 +5,28 @@ package com.azure.resourcemanager.resources.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.resources.models.AssignmentScopeValidation; import com.azure.resourcemanager.resources.models.ResourceSelector; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The policy exemption properties for Patch request. */ @Fluent -public final class PolicyExemptionUpdateProperties { +public final class PolicyExemptionUpdateProperties implements JsonSerializable { /* * The resource selector list to filter policies by resource properties. */ - @JsonProperty(value = "resourceSelectors") private List resourceSelectors; /* * The option whether validate the exemption is at or under the assignment scope. */ - @JsonProperty(value = "assignmentScopeValidation") private AssignmentScopeValidation assignmentScopeValidation; /** @@ -86,4 +88,49 @@ public void validate() { resourceSelectors().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("resourceSelectors", this.resourceSelectors, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("assignmentScopeValidation", + this.assignmentScopeValidation == null ? null : this.assignmentScopeValidation.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyExemptionUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyExemptionUpdateProperties 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 PolicyExemptionUpdateProperties. + */ + public static PolicyExemptionUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyExemptionUpdateProperties deserializedPolicyExemptionUpdateProperties + = new PolicyExemptionUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceSelectors".equals(fieldName)) { + List resourceSelectors + = reader.readArray(reader1 -> ResourceSelector.fromJson(reader1)); + deserializedPolicyExemptionUpdateProperties.resourceSelectors = resourceSelectors; + } else if ("assignmentScopeValidation".equals(fieldName)) { + deserializedPolicyExemptionUpdateProperties.assignmentScopeValidation + = AssignmentScopeValidation.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyExemptionUpdateProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicySetDefinitionInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicySetDefinitionInner.java index 9fce0186a8d53..681c95756a26a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicySetDefinitionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicySetDefinitionInner.java @@ -7,11 +7,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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.resources.models.ParameterDefinitionsValue; import com.azure.resourcemanager.resources.models.PolicyDefinitionGroup; import com.azure.resourcemanager.resources.models.PolicyDefinitionReference; import com.azure.resourcemanager.resources.models.PolicyType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -23,15 +26,28 @@ public final class PolicySetDefinitionInner extends ProxyResource { /* * The policy definition properties. */ - @JsonProperty(value = "properties") private PolicySetDefinitionProperties innerProperties; /* * The system metadata relating to this resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of PolicySetDefinitionInner class. */ @@ -56,6 +72,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the policyType property: The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, * and Static. @@ -235,4 +281,50 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicySetDefinitionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicySetDefinitionInner 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 PolicySetDefinitionInner. + */ + public static PolicySetDefinitionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicySetDefinitionInner deserializedPolicySetDefinitionInner = new PolicySetDefinitionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPolicySetDefinitionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPolicySetDefinitionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPolicySetDefinitionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPolicySetDefinitionInner.innerProperties + = PolicySetDefinitionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPolicySetDefinitionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicySetDefinitionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicySetDefinitionProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicySetDefinitionProperties.java index cbcc4b82cf01b..1ee84b6c138c2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicySetDefinitionProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/PolicySetDefinitionProperties.java @@ -6,12 +6,15 @@ 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.resources.models.ParameterDefinitionsValue; import com.azure.resourcemanager.resources.models.PolicyDefinitionGroup; import com.azure.resourcemanager.resources.models.PolicyDefinitionReference; import com.azure.resourcemanager.resources.models.PolicyType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -19,48 +22,41 @@ * The policy set definition properties. */ @Fluent -public final class PolicySetDefinitionProperties { +public final class PolicySetDefinitionProperties implements JsonSerializable { /* * The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. */ - @JsonProperty(value = "policyType") private PolicyType policyType; /* * The display name of the policy set definition. */ - @JsonProperty(value = "displayName") private String displayName; /* * The policy set definition description. */ - @JsonProperty(value = "description") private String description; /* - * The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. + * The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value + * pairs. */ - @JsonProperty(value = "metadata") private Object metadata; /* * The policy set definition parameters that can be used in policy definition references. */ - @JsonProperty(value = "parameters") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map parameters; /* * An array of policy definition references. */ - @JsonProperty(value = "policyDefinitions", required = true) private List policyDefinitions; /* * The metadata describing groups of policy definition references within the policy set definition. */ - @JsonProperty(value = "policyDefinitionGroups") private List policyDefinitionGroups; /** @@ -244,4 +240,68 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PolicySetDefinitionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("policyDefinitions", this.policyDefinitions, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeUntypedField("metadata", this.metadata); + jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("policyDefinitionGroups", this.policyDefinitionGroups, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicySetDefinitionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicySetDefinitionProperties 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 PolicySetDefinitionProperties. + */ + public static PolicySetDefinitionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicySetDefinitionProperties deserializedPolicySetDefinitionProperties + = new PolicySetDefinitionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("policyDefinitions".equals(fieldName)) { + List policyDefinitions + = reader.readArray(reader1 -> PolicyDefinitionReference.fromJson(reader1)); + deserializedPolicySetDefinitionProperties.policyDefinitions = policyDefinitions; + } else if ("policyType".equals(fieldName)) { + deserializedPolicySetDefinitionProperties.policyType = PolicyType.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedPolicySetDefinitionProperties.displayName = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedPolicySetDefinitionProperties.description = reader.getString(); + } else if ("metadata".equals(fieldName)) { + deserializedPolicySetDefinitionProperties.metadata = reader.readUntyped(); + } else if ("parameters".equals(fieldName)) { + Map parameters + = reader.readMap(reader1 -> ParameterDefinitionsValue.fromJson(reader1)); + deserializedPolicySetDefinitionProperties.parameters = parameters; + } else if ("policyDefinitionGroups".equals(fieldName)) { + List policyDefinitionGroups + = reader.readArray(reader1 -> PolicyDefinitionGroup.fromJson(reader1)); + deserializedPolicySetDefinitionProperties.policyDefinitionGroups = policyDefinitionGroups; + } else { + reader.skipChildren(); + } + } + + return deserializedPolicySetDefinitionProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderInner.java index 723022bf80ef2..db64afa5ce6c3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderInner.java @@ -5,50 +5,48 @@ package com.azure.resourcemanager.resources.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.resources.models.ProviderAuthorizationConsentState; import com.azure.resourcemanager.resources.models.ProviderResourceType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Resource provider information. */ @Fluent -public final class ProviderInner { +public final class ProviderInner implements JsonSerializable { /* * The provider ID. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * The namespace of the resource provider. */ - @JsonProperty(value = "namespace") private String namespace; /* * The registration state of the resource provider. */ - @JsonProperty(value = "registrationState", access = JsonProperty.Access.WRITE_ONLY) private String registrationState; /* * The registration policy of the resource provider. */ - @JsonProperty(value = "registrationPolicy", access = JsonProperty.Access.WRITE_ONLY) private String registrationPolicy; /* * The collection of provider resource types. */ - @JsonProperty(value = "resourceTypes", access = JsonProperty.Access.WRITE_ONLY) private List resourceTypes; /* * The provider authorization consent state. */ - @JsonProperty(value = "providerAuthorizationConsentState") private ProviderAuthorizationConsentState providerAuthorizationConsentState; /** @@ -144,4 +142,55 @@ public void validate() { resourceTypes().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("namespace", this.namespace); + jsonWriter.writeStringField("providerAuthorizationConsentState", + this.providerAuthorizationConsentState == null ? null : this.providerAuthorizationConsentState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProviderInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderInner 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 ProviderInner. + */ + public static ProviderInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderInner deserializedProviderInner = new ProviderInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedProviderInner.id = reader.getString(); + } else if ("namespace".equals(fieldName)) { + deserializedProviderInner.namespace = reader.getString(); + } else if ("registrationState".equals(fieldName)) { + deserializedProviderInner.registrationState = reader.getString(); + } else if ("registrationPolicy".equals(fieldName)) { + deserializedProviderInner.registrationPolicy = reader.getString(); + } else if ("resourceTypes".equals(fieldName)) { + List resourceTypes + = reader.readArray(reader1 -> ProviderResourceType.fromJson(reader1)); + deserializedProviderInner.resourceTypes = resourceTypes; + } else if ("providerAuthorizationConsentState".equals(fieldName)) { + deserializedProviderInner.providerAuthorizationConsentState + = ProviderAuthorizationConsentState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedProviderInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderPermissionListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderPermissionListResultInner.java index d98aa6e0965ac..430a6c05f0e30 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderPermissionListResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderPermissionListResultInner.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.models.ProviderPermission; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of provider permissions. */ @Fluent -public final class ProviderPermissionListResultInner { +public final class ProviderPermissionListResultInner implements JsonSerializable { /* * An array of provider permissions. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** @@ -71,4 +73,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProviderPermissionListResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderPermissionListResultInner 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 ProviderPermissionListResultInner. + */ + public static ProviderPermissionListResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderPermissionListResultInner deserializedProviderPermissionListResultInner + = new ProviderPermissionListResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ProviderPermission.fromJson(reader1)); + deserializedProviderPermissionListResultInner.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedProviderPermissionListResultInner.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedProviderPermissionListResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderResourceTypeListResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderResourceTypeListResultInner.java index 6aedeb43970ee..1ca79f7c7cac0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderResourceTypeListResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ProviderResourceTypeListResultInner.java @@ -5,25 +5,28 @@ package com.azure.resourcemanager.resources.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.resources.models.ProviderResourceType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of resource types of a resource provider. */ @Fluent -public final class ProviderResourceTypeListResultInner { +public final class ProviderResourceTypeListResultInner + implements JsonSerializable { /* * An array of resource types. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** @@ -71,4 +74,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProviderResourceTypeListResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderResourceTypeListResultInner 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 ProviderResourceTypeListResultInner. + */ + public static ProviderResourceTypeListResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderResourceTypeListResultInner deserializedProviderResourceTypeListResultInner + = new ProviderResourceTypeListResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ProviderResourceType.fromJson(reader1)); + deserializedProviderResourceTypeListResultInner.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedProviderResourceTypeListResultInner.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedProviderResourceTypeListResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ResourceGroupExportResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ResourceGroupExportResultInner.java index 4c25cf3bf6831..a61b19da05963 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ResourceGroupExportResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ResourceGroupExportResultInner.java @@ -6,31 +6,30 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; -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; /** * Resource group export result. */ @Fluent -public final class ResourceGroupExportResultInner { +public final class ResourceGroupExportResultInner implements JsonSerializable { /* * The template content. Used if outputFormat is empty or set to 'Json'. */ - @JsonProperty(value = "template") private Object template; /* * The formatted export content. Used if outputFormat is set to 'Bicep'. */ - @JsonProperty(value = "output") private String output; /* - * Error Response - * * The template export error. */ - @JsonProperty(value = "error") private ManagementError error; /** @@ -80,9 +79,7 @@ public ResourceGroupExportResultInner withOutput(String output) { } /** - * Get the error property: Error Response - * - * The template export error. + * Get the error property: The template export error. * * @return the error value. */ @@ -91,9 +88,7 @@ public ManagementError error() { } /** - * Set the error property: Error Response - * - * The template export error. + * Set the error property: The template export error. * * @param error the error value to set. * @return the ResourceGroupExportResultInner object itself. @@ -110,4 +105,47 @@ public ResourceGroupExportResultInner withError(ManagementError error) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeUntypedField("template", this.template); + jsonWriter.writeStringField("output", this.output); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceGroupExportResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceGroupExportResultInner 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 ResourceGroupExportResultInner. + */ + public static ResourceGroupExportResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceGroupExportResultInner deserializedResourceGroupExportResultInner + = new ResourceGroupExportResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("template".equals(fieldName)) { + deserializedResourceGroupExportResultInner.template = reader.readUntyped(); + } else if ("output".equals(fieldName)) { + deserializedResourceGroupExportResultInner.output = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedResourceGroupExportResultInner.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceGroupExportResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ResourceGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ResourceGroupInner.java index 14bdbfdd07666..940ace373c3e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ResourceGroupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ResourceGroupInner.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.ResourceGroupProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -18,15 +21,28 @@ public final class ResourceGroupInner extends Resource { /* * The resource group properties. */ - @JsonProperty(value = "properties") private ResourceGroupProperties properties; /* * The ID of the resource that manages this resource group. */ - @JsonProperty(value = "managedBy") private String managedBy; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of ResourceGroupInner class. */ @@ -73,6 +89,36 @@ public ResourceGroupInner withManagedBy(String managedBy) { return this; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -101,4 +147,57 @@ public void validate() { properties().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.writeStringField("managedBy", this.managedBy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceGroupInner 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 ResourceGroupInner. + */ + public static ResourceGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceGroupInner deserializedResourceGroupInner = new ResourceGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedResourceGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedResourceGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedResourceGroupInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedResourceGroupInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedResourceGroupInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedResourceGroupInner.properties = ResourceGroupProperties.fromJson(reader); + } else if ("managedBy".equals(fieldName)) { + deserializedResourceGroupInner.managedBy = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceGroupInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/SubscriptionFeatureRegistrationInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/SubscriptionFeatureRegistrationInner.java index 8fb91c3052e4c..0a57c5fbb7117 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/SubscriptionFeatureRegistrationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/SubscriptionFeatureRegistrationInner.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.SubscriptionFeatureRegistrationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Subscription feature registration details. @@ -17,9 +20,23 @@ public final class SubscriptionFeatureRegistrationInner extends ProxyResource { /* * The properties property. */ - @JsonProperty(value = "properties") private SubscriptionFeatureRegistrationProperties properties; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of SubscriptionFeatureRegistrationInner class. */ @@ -46,6 +63,36 @@ public SubscriptionFeatureRegistrationInner withProperties(SubscriptionFeatureRe return this; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Validates the instance. * @@ -56,4 +103,49 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionFeatureRegistrationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionFeatureRegistrationInner 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 SubscriptionFeatureRegistrationInner. + */ + public static SubscriptionFeatureRegistrationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionFeatureRegistrationInner deserializedSubscriptionFeatureRegistrationInner + = new SubscriptionFeatureRegistrationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationInner.properties + = SubscriptionFeatureRegistrationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionFeatureRegistrationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/SubscriptionInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/SubscriptionInner.java index 894033753a85a..767c245c576c8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/SubscriptionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/SubscriptionInner.java @@ -5,11 +5,14 @@ package com.azure.resourcemanager.resources.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.resources.models.ManagedByTenant; import com.azure.resourcemanager.resources.models.SubscriptionPolicies; import com.azure.resourcemanager.resources.models.SubscriptionState; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -17,60 +20,51 @@ * Subscription information. */ @Fluent -public final class SubscriptionInner { +public final class SubscriptionInner implements JsonSerializable { /* * The fully qualified ID for the subscription. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74 */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * The subscription ID. */ - @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; /* * The subscription display name. */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) private String displayName; /* * The subscription tenant ID. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; /* * The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private SubscriptionState state; /* * The subscription policies. */ - @JsonProperty(value = "subscriptionPolicies") private SubscriptionPolicies subscriptionPolicies; /* - * The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'. + * The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, + * Bypassed, Direct and Management. For example, 'Legacy, RoleBased'. */ - @JsonProperty(value = "authorizationSource") private String authorizationSource; /* * An array containing the tenants managing the subscription. */ - @JsonProperty(value = "managedByTenants") private List managedByTenants; /* * The tags attached to the subscription. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** @@ -221,4 +215,63 @@ public void validate() { managedByTenants().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("subscriptionPolicies", this.subscriptionPolicies); + jsonWriter.writeStringField("authorizationSource", this.authorizationSource); + jsonWriter.writeArrayField("managedByTenants", this.managedByTenants, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionInner 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 SubscriptionInner. + */ + public static SubscriptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionInner deserializedSubscriptionInner = new SubscriptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSubscriptionInner.id = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedSubscriptionInner.subscriptionId = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedSubscriptionInner.displayName = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedSubscriptionInner.tenantId = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedSubscriptionInner.state = SubscriptionState.fromString(reader.getString()); + } else if ("subscriptionPolicies".equals(fieldName)) { + deserializedSubscriptionInner.subscriptionPolicies = SubscriptionPolicies.fromJson(reader); + } else if ("authorizationSource".equals(fieldName)) { + deserializedSubscriptionInner.authorizationSource = reader.getString(); + } else if ("managedByTenants".equals(fieldName)) { + List managedByTenants + = reader.readArray(reader1 -> ManagedByTenant.fromJson(reader1)); + deserializedSubscriptionInner.managedByTenants = managedByTenants; + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSubscriptionInner.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagDetailsInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagDetailsInner.java index 6ed92c3c65e23..0a5cefe67e9f6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagDetailsInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagDetailsInner.java @@ -5,37 +5,38 @@ package com.azure.resourcemanager.resources.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.resources.models.TagCount; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Tag details. */ @Fluent -public final class TagDetailsInner { +public final class TagDetailsInner implements JsonSerializable { /* * The tag name ID. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * The tag name. */ - @JsonProperty(value = "tagName") private String tagName; /* - * The total number of resources that use the resource tag. When a tag is initially created and has no associated resources, the value is 0. + * The total number of resources that use the resource tag. When a tag is initially created and has no associated + * resources, the value is 0. */ - @JsonProperty(value = "count") private TagCount count; /* * The list of tag values. */ - @JsonProperty(value = "values") private List values; /** @@ -128,4 +129,49 @@ public void validate() { values().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("tagName", this.tagName); + jsonWriter.writeJsonField("count", this.count); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TagDetailsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TagDetailsInner 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 TagDetailsInner. + */ + public static TagDetailsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TagDetailsInner deserializedTagDetailsInner = new TagDetailsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTagDetailsInner.id = reader.getString(); + } else if ("tagName".equals(fieldName)) { + deserializedTagDetailsInner.tagName = reader.getString(); + } else if ("count".equals(fieldName)) { + deserializedTagDetailsInner.count = TagCount.fromJson(reader); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> TagValueInner.fromJson(reader1)); + deserializedTagDetailsInner.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedTagDetailsInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagValueInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagValueInner.java index 62b2ef0f03c6c..3353e8f3c20b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagValueInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagValueInner.java @@ -5,30 +5,31 @@ package com.azure.resourcemanager.resources.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.resources.models.TagCount; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Tag information. */ @Fluent -public final class TagValueInner { +public final class TagValueInner implements JsonSerializable { /* * The tag value ID. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * The tag value. */ - @JsonProperty(value = "tagValue") private String tagValue; /* * The tag value count. */ - @JsonProperty(value = "count") private TagCount count; /** @@ -96,4 +97,45 @@ public void validate() { count().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("tagValue", this.tagValue); + jsonWriter.writeJsonField("count", this.count); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TagValueInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TagValueInner 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 TagValueInner. + */ + public static TagValueInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TagValueInner deserializedTagValueInner = new TagValueInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTagValueInner.id = reader.getString(); + } else if ("tagValue".equals(fieldName)) { + deserializedTagValueInner.tagValue = reader.getString(); + } else if ("count".equals(fieldName)) { + deserializedTagValueInner.count = TagCount.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTagValueInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagsResourceInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagsResourceInner.java index 69859c2556c1d..30ed6c0b0bcb3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagsResourceInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TagsResourceInner.java @@ -7,8 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.Tags; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Wrapper resource for tags API requests and responses. @@ -18,9 +21,23 @@ public final class TagsResourceInner extends ProxyResource { /* * The set of tags. */ - @JsonProperty(value = "properties", required = true) private Tags properties; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of TagsResourceInner class. */ @@ -47,6 +64,36 @@ public TagsResourceInner withProperties(Tags properties) { return this; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Validates the instance. * @@ -62,4 +109,47 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(TagsResourceInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TagsResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TagsResourceInner 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 TagsResourceInner. + */ + public static TagsResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TagsResourceInner deserializedTagsResourceInner = new TagsResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTagsResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTagsResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTagsResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedTagsResourceInner.properties = Tags.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTagsResourceInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TemplateHashResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TemplateHashResultInner.java index b1bf3a1e5b02e..c299bdd1d9721 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TemplateHashResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TemplateHashResultInner.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.resources.fluent.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; /** * Result of the request to calculate template hash. It contains a string of minified template and its hash. */ @Fluent -public final class TemplateHashResultInner { +public final class TemplateHashResultInner implements JsonSerializable { /* * The minified template string. */ - @JsonProperty(value = "minifiedTemplate") private String minifiedTemplate; /* * The template hash. */ - @JsonProperty(value = "templateHash") private String templateHash; /** @@ -77,4 +79,43 @@ public TemplateHashResultInner withTemplateHash(String templateHash) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("minifiedTemplate", this.minifiedTemplate); + jsonWriter.writeStringField("templateHash", this.templateHash); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TemplateHashResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TemplateHashResultInner 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 TemplateHashResultInner. + */ + public static TemplateHashResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TemplateHashResultInner deserializedTemplateHashResultInner = new TemplateHashResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("minifiedTemplate".equals(fieldName)) { + deserializedTemplateHashResultInner.minifiedTemplate = reader.getString(); + } else if ("templateHash".equals(fieldName)) { + deserializedTemplateHashResultInner.templateHash = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTemplateHashResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TenantIdDescriptionInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TenantIdDescriptionInner.java index 7e5386f4a15a2..05e55c956f117 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TenantIdDescriptionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/TenantIdDescriptionInner.java @@ -5,73 +5,67 @@ package com.azure.resourcemanager.resources.fluent.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.resources.models.TenantCategory; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Tenant Id information. */ @Immutable -public final class TenantIdDescriptionInner { +public final class TenantIdDescriptionInner implements JsonSerializable { /* * The fully qualified ID of the tenant. For example, /tenants/8d65815f-a5b6-402f-9298-045155da7d74 */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * The tenant ID. For example, 8d65815f-a5b6-402f-9298-045155da7d74 */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; /* * Category of the tenant. */ - @JsonProperty(value = "tenantCategory", access = JsonProperty.Access.WRITE_ONLY) private TenantCategory tenantCategory; /* * Country/region name of the address for the tenant. */ - @JsonProperty(value = "country", access = JsonProperty.Access.WRITE_ONLY) private String country; /* * Country/region abbreviation for the tenant. */ - @JsonProperty(value = "countryCode", access = JsonProperty.Access.WRITE_ONLY) private String countryCode; /* * The display name of the tenant. */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) private String displayName; /* * The list of domains for the tenant. */ - @JsonProperty(value = "domains", access = JsonProperty.Access.WRITE_ONLY) private List domains; /* * The default domain for the tenant. */ - @JsonProperty(value = "defaultDomain", access = JsonProperty.Access.WRITE_ONLY) private String defaultDomain; /* * The tenant type. Only available for 'Home' tenant category. */ - @JsonProperty(value = "tenantType", access = JsonProperty.Access.WRITE_ONLY) private String tenantType; /* * The tenant's branding logo URL. Only available for 'Home' tenant category. */ - @JsonProperty(value = "tenantBrandingLogoUrl", access = JsonProperty.Access.WRITE_ONLY) private String tenantBrandingLogoUrl; /** @@ -179,4 +173,58 @@ public String tenantBrandingLogoUrl() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TenantIdDescriptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantIdDescriptionInner 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 TenantIdDescriptionInner. + */ + public static TenantIdDescriptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TenantIdDescriptionInner deserializedTenantIdDescriptionInner = new TenantIdDescriptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTenantIdDescriptionInner.id = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedTenantIdDescriptionInner.tenantId = reader.getString(); + } else if ("tenantCategory".equals(fieldName)) { + deserializedTenantIdDescriptionInner.tenantCategory = TenantCategory.fromString(reader.getString()); + } else if ("country".equals(fieldName)) { + deserializedTenantIdDescriptionInner.country = reader.getString(); + } else if ("countryCode".equals(fieldName)) { + deserializedTenantIdDescriptionInner.countryCode = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedTenantIdDescriptionInner.displayName = reader.getString(); + } else if ("domains".equals(fieldName)) { + List domains = reader.readArray(reader1 -> reader1.getString()); + deserializedTenantIdDescriptionInner.domains = domains; + } else if ("defaultDomain".equals(fieldName)) { + deserializedTenantIdDescriptionInner.defaultDomain = reader.getString(); + } else if ("tenantType".equals(fieldName)) { + deserializedTenantIdDescriptionInner.tenantType = reader.getString(); + } else if ("tenantBrandingLogoUrl".equals(fieldName)) { + deserializedTenantIdDescriptionInner.tenantBrandingLogoUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTenantIdDescriptionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java index 171627c32d7dc..ac33341b5d4be 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationProperties.java @@ -5,19 +5,22 @@ package com.azure.resourcemanager.resources.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.resources.models.WhatIfChange; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Deployment operation properties. */ @Fluent -public final class WhatIfOperationProperties { +public final class WhatIfOperationProperties implements JsonSerializable { /* * List of resource changes predicted by What-If operation. */ - @JsonProperty(value = "changes") private List changes; /** @@ -56,4 +59,41 @@ public void validate() { changes().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("changes", this.changes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WhatIfOperationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WhatIfOperationProperties 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 WhatIfOperationProperties. + */ + public static WhatIfOperationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WhatIfOperationProperties deserializedWhatIfOperationProperties = new WhatIfOperationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("changes".equals(fieldName)) { + List changes = reader.readArray(reader1 -> WhatIfChange.fromJson(reader1)); + deserializedWhatIfOperationProperties.changes = changes; + } else { + reader.skipChildren(); + } + } + + return deserializedWhatIfOperationProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java index f17b40a0a9835..31a900c9cc0de 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/WhatIfOperationResultInner.java @@ -6,8 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.models.WhatIfChange; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -15,25 +19,20 @@ * results. */ @Fluent -public final class WhatIfOperationResultInner { +public final class WhatIfOperationResultInner implements JsonSerializable { /* * Status of the What-If operation. */ - @JsonProperty(value = "status") private String status; /* * What-If operation properties. */ - @JsonProperty(value = "properties") private WhatIfOperationProperties innerProperties; /* - * Error Response - * * Error when What-If operation fails. */ - @JsonProperty(value = "error") private ManagementError error; /** @@ -72,9 +71,7 @@ private WhatIfOperationProperties innerProperties() { } /** - * Get the error property: Error Response - * - * Error when What-If operation fails. + * Get the error property: Error when What-If operation fails. * * @return the error value. */ @@ -83,9 +80,7 @@ public ManagementError error() { } /** - * Set the error property: Error Response - * - * Error when What-If operation fails. + * Set the error property: Error when What-If operation fails. * * @param error the error value to set. * @return the WhatIfOperationResultInner object itself. @@ -128,4 +123,46 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WhatIfOperationResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WhatIfOperationResultInner 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 WhatIfOperationResultInner. + */ + public static WhatIfOperationResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WhatIfOperationResultInner deserializedWhatIfOperationResultInner = new WhatIfOperationResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedWhatIfOperationResultInner.status = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWhatIfOperationResultInner.innerProperties = WhatIfOperationProperties.fromJson(reader); + } else if ("error".equals(fieldName)) { + deserializedWhatIfOperationResultInner.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWhatIfOperationResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/CheckNameAvailabilityReason.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/CheckNameAvailabilityReason.java index 561da74cd3ae4..e9ff51b812b98 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/CheckNameAvailabilityReason.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/arm/models/CheckNameAvailabilityReason.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.resources.fluentcore.arm.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; @@ -23,7 +22,6 @@ public final class CheckNameAvailabilityReason extends ExpandableStringEnum voidResponse(PollResponse> pollRes } } - private static class ResourceWithProvisioningState { - @JsonProperty(value = "properties") + private static class ResourceWithProvisioningState implements JsonSerializable { private Properties properties; private String getProvisioningState() { @@ -308,9 +310,58 @@ private String getProvisioningState() { } } - private static class Properties { - @JsonProperty(value = "provisioningState") + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter + .writeStartObject() + .writeJsonField("properties", properties) + .writeEndObject(); + } + + public static ResourceWithProvisioningState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceWithProvisioningState resourceWithProvisioningState = new ResourceWithProvisioningState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + resourceWithProvisioningState.properties = reader.readObject(Properties::fromJson); + } else { + reader.skipChildren(); + } + } + return resourceWithProvisioningState; + }); + } + + private static class Properties implements JsonSerializable { private String provisioningState; + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter + .writeStartObject() + .writeStringField("provisioningState", provisioningState) + .writeEndObject(); + } + + public static Properties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Properties result = new Properties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + result.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + return result; + }); + } } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/AuthorizationOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/AuthorizationOperationsClientImpl.java index 6d7c1ac7aa1b2..19c46830117bb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/AuthorizationOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/AuthorizationOperationsClientImpl.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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ChangesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ChangesClientImpl.java index d04da0ce3767e..4d6ffb42e438c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ChangesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ChangesClientImpl.java @@ -467,9 +467,7 @@ public ChangeResourceResultInner get(String resourceGroupName, String resourcePr /** * 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. @@ -494,9 +492,7 @@ private Mono> listNextSinglePageAsync(S /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataPolicyManifestsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataPolicyManifestsClientImpl.java index ace3ddb0251e4..079af00565d79 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataPolicyManifestsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataPolicyManifestsClientImpl.java @@ -359,9 +359,7 @@ public PagedIterable list(String filter, Context contex /** * 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. @@ -386,9 +384,7 @@ private Mono> listNextSinglePageAsync(Str /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentExportResultImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentExportResultImpl.java index 7b60685ba5f6e..30a92cb15a784 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentExportResultImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentExportResultImpl.java @@ -3,11 +3,14 @@ package com.azure.resourcemanager.resources.implementation; -import com.azure.resourcemanager.resources.models.DeploymentExportResult; -import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.resources.fluent.models.DeploymentExportResultInner; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; +import com.azure.resourcemanager.resources.models.DeploymentExportResult; + +import java.io.IOException; /** * Implementation for {@link DeploymentExportResult}. @@ -17,11 +20,11 @@ final class DeploymentExportResultImpl extends implements DeploymentExportResult { - private ObjectMapper mapper; + private SerializerAdapter serializerAdapter; DeploymentExportResultImpl(DeploymentExportResultInner innerModel) { super(innerModel); - mapper = new ObjectMapper(); + serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); } @Override @@ -32,8 +35,8 @@ public Object template() { @Override public String templateAsJson() { try { - return mapper.writeValueAsString(template()); - } catch (JsonProcessingException e) { + return serializerAdapter.serialize(template(), SerializerEncoding.JSON); + } catch (IOException e) { return null; } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentImpl.java index 2540ed7e5b172..34c2e3eb6a0e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentImpl.java @@ -3,6 +3,7 @@ package com.azure.resourcemanager.resources.implementation; +import com.azure.core.management.Region; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.Context; @@ -10,10 +11,19 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.core.util.serializer.TypeReference; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluent.models.DeploymentExtendedInner; +import com.azure.resourcemanager.resources.fluent.models.DeploymentInner; +import com.azure.resourcemanager.resources.fluent.models.ProviderInner; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; import com.azure.resourcemanager.resources.fluentcore.model.Accepted; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; import com.azure.resourcemanager.resources.fluentcore.model.implementation.AcceptedImpl; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.CreatableUpdatableImpl; import com.azure.resourcemanager.resources.models.DebugSetting; import com.azure.resourcemanager.resources.models.Dependency; import com.azure.resourcemanager.resources.models.Deployment; @@ -34,15 +44,6 @@ import com.azure.resourcemanager.resources.models.TemplateLink; import com.azure.resourcemanager.resources.models.WhatIfOperationResult; import com.azure.resourcemanager.resources.models.WhatIfResultFormat; -import com.azure.core.management.Region; -import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; -import com.azure.resourcemanager.resources.fluentcore.model.Creatable; -import com.azure.resourcemanager.resources.fluentcore.model.implementation.CreatableUpdatableImpl; -import com.azure.resourcemanager.resources.fluent.models.DeploymentExtendedInner; -import com.azure.resourcemanager.resources.fluent.models.DeploymentInner; -import com.azure.resourcemanager.resources.fluent.models.ProviderInner; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; import reactor.core.publisher.Mono; import java.io.IOException; @@ -66,7 +67,6 @@ public final class DeploymentImpl extends private final ClientLogger logger = new ClientLogger(DeploymentImpl.class); - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private static final SerializerAdapter SERIALIZER_ADAPTER = SerializerFactory.createDefaultManagementSerializerAdapter(); private static final TypeReference> TYPE_REFERENCE_MAP_DEPLOYMENT_PARAMETER = @@ -276,7 +276,9 @@ public DeploymentImpl withTemplate(Object template) { @Override public DeploymentImpl withTemplate(String templateJson) throws IOException { - return withTemplate(OBJECT_MAPPER.readTree(templateJson)); + try (JsonReader jsonReader = JsonProviders.createReader(templateJson)) { + return withTemplate(jsonReader.readUntyped()); + } } @Override @@ -617,7 +619,7 @@ private Map getParametersFromObject(Object paramete private Map getParametersFromJsonString(String parametersJson) throws IOException { return SERIALIZER_ADAPTER.deserialize( parametersJson, - TYPE_REFERENCE_MAP_DEPLOYMENT_PARAMETER.getType(), + TYPE_REFERENCE_MAP_DEPLOYMENT_PARAMETER.getJavaType(), SerializerEncoding.JSON); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentOperationsClientImpl.java index f65b11a61a753..ed1a7cbba3a8d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentOperationsClientImpl.java @@ -1567,9 +1567,7 @@ public PagedIterable listByResourceGroup(String resour /** * 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. @@ -1595,9 +1593,7 @@ private Mono> listAtScopeNextSinglePageA /** * 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. @@ -1624,9 +1620,7 @@ private Mono> listAtScopeNextSinglePageA /** * 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. @@ -1652,9 +1646,7 @@ private Mono> listAtTenantScopeNextSingl /** * 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. @@ -1681,9 +1673,7 @@ private Mono> listAtTenantScopeNextSingl /** * 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. @@ -1711,9 +1701,7 @@ private Mono> listAtTenantScopeNextSingl /** * 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. @@ -1740,9 +1728,7 @@ private Mono> listAtManagementGroupScope /** * 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. @@ -1769,9 +1755,7 @@ private Mono> listAtSubscriptionScopeNex /** * 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. @@ -1798,9 +1782,7 @@ private Mono> listAtSubscriptionScopeNex /** * 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. @@ -1825,9 +1807,7 @@ private Mono> listNextSinglePageAsync(St /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentStacksClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentStacksClientImpl.java index 0ccf9b73d953f..630c437d7f9ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentStacksClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentStacksClientImpl.java @@ -3790,9 +3790,7 @@ public DeploymentStackValidateResultInner validateStackAtManagementGroup(String /** * 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. @@ -3819,9 +3817,7 @@ private Mono> listAtResourceGroupNextSingleP /** * 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. @@ -3848,9 +3844,7 @@ private Mono> listAtResourceGroupNextSingleP /** * 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. @@ -3877,9 +3871,7 @@ private Mono> listAtSubscriptionNextSinglePa /** * 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. @@ -3906,9 +3898,7 @@ private Mono> listAtSubscriptionNextSinglePa /** * 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. @@ -3935,9 +3925,7 @@ private Mono> listAtManagementGroupNextSingl /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentsClientImpl.java index 733646bc0a043..86910b4f28eb0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentsClientImpl.java @@ -8170,9 +8170,7 @@ public TemplateHashResultInner calculateTemplateHash(Object template) { /** * 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. @@ -8198,9 +8196,7 @@ private Mono> listAtScopeNextSinglePageAs /** * 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. @@ -8227,9 +8223,7 @@ private Mono> listAtScopeNextSinglePageAs /** * 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. @@ -8255,9 +8249,7 @@ private Mono> listAtTenantScopeNextSingle /** * 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. @@ -8284,9 +8276,7 @@ private Mono> listAtTenantScopeNextSingle /** * 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. @@ -8314,9 +8304,7 @@ private Mono> listAtTenantScopeNextSingle /** * 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. @@ -8343,9 +8331,7 @@ private Mono> listAtManagementGroupScopeN /** * 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. @@ -8372,9 +8358,7 @@ private Mono> listAtSubscriptionScopeNext /** * 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. @@ -8401,9 +8385,7 @@ private Mono> listAtSubscriptionScopeNext /** * 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. @@ -8430,9 +8412,7 @@ private Mono> listByResourceGroupNextSing /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeatureClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeatureClientImpl.java index e6abd87f54751..bfefa5c8ba433 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeatureClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeatureClientImpl.java @@ -310,9 +310,7 @@ public PagedIterable listOperations(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. @@ -339,9 +337,7 @@ private Mono> listOperationsNextSinglePageAsync(St /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeaturesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeaturesClientImpl.java index bb416803f3b4e..a44fd61381034 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeaturesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeaturesClientImpl.java @@ -727,9 +727,7 @@ public FeatureResultInner unregister(String resourceProviderNamespace, String fe /** * 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. @@ -755,9 +753,7 @@ private Mono> listAllNextSinglePageAsync(Strin /** * 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. @@ -783,9 +779,7 @@ private Mono> listAllNextSinglePageAsync(Strin /** * 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. @@ -810,9 +804,7 @@ private Mono> listNextSinglePageAsync(String n /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ManagementLocksClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ManagementLocksClientImpl.java index edca30716d3b3..ce702480234ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ManagementLocksClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ManagementLocksClientImpl.java @@ -2667,9 +2667,7 @@ public PagedIterable listByScope(String scope, String /** * 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. @@ -2697,9 +2695,7 @@ public PagedIterable listByScope(String scope, String /** * 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. @@ -2726,9 +2722,7 @@ private Mono> listAtResourceGroupLevelN /** * 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. @@ -2755,9 +2749,7 @@ private Mono> listAtResourceLevelNextSi /** * 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. @@ -2784,9 +2776,7 @@ private Mono> listAtResourceLevelNextSi /** * 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. @@ -2813,9 +2803,7 @@ private Mono> listAtSubscriptionLevelNe /** * 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. @@ -2842,9 +2830,7 @@ private Mono> listAtSubscriptionLevelNe /** * 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. @@ -2870,9 +2856,7 @@ private Mono> listByScopeNextSinglePage /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/OperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/OperationsClientImpl.java index 9477b3d4dbff0..8d56948aab5d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/OperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsClientImpl.java index a58677e59eafd..4de8a3102d6e4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsClientImpl.java @@ -2622,9 +2622,7 @@ public PolicyAssignmentInner updateById(String policyAssignmentId, PolicyAssignm /** * 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. @@ -2651,9 +2649,7 @@ private Mono> listForResourceGroupNextSingl /** * 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. @@ -2680,9 +2676,7 @@ private Mono> listForResourceGroupNextSingl /** * 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. @@ -2708,9 +2702,7 @@ private Mono> listForResourceNextSinglePage /** * 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. @@ -2737,9 +2729,7 @@ private Mono> listForResourceNextSinglePage /** * 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. @@ -2766,9 +2756,7 @@ private Mono> listForManagementGroupNextSin /** * 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. @@ -2795,9 +2783,7 @@ private Mono> listForManagementGroupNextSin /** * 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. @@ -2822,9 +2808,7 @@ private Mono> listNextSinglePageAsync(Strin /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionImpl.java index ff390563d7c37..920fb733de60c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionImpl.java @@ -4,14 +4,15 @@ package com.azure.resourcemanager.resources.implementation; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; +import com.azure.resourcemanager.resources.fluent.PolicyDefinitionsClient; +import com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionInner; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.CreatableUpdatableImpl; import com.azure.resourcemanager.resources.models.ParameterDefinitionsValue; import com.azure.resourcemanager.resources.models.ParameterType; import com.azure.resourcemanager.resources.models.PolicyDefinition; import com.azure.resourcemanager.resources.models.PolicyType; -import com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionInner; -import com.azure.resourcemanager.resources.fluent.PolicyDefinitionsClient; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.azure.resourcemanager.resources.fluentcore.model.implementation.CreatableUpdatableImpl; import reactor.core.publisher.Mono; import java.io.IOException; @@ -31,6 +32,7 @@ final class PolicyDefinitionImpl extends private final PolicyDefinitionsClient innerCollection; private final ClientLogger logger = new ClientLogger(getClass()); + PolicyDefinitionImpl(String name, PolicyDefinitionInner innerModel, PolicyDefinitionsClient innerCollection) { super(name, innerModel); this.innerCollection = innerCollection; @@ -103,8 +105,9 @@ public PolicyDefinitionImpl withPolicyRule(Object policyRule) { @Override public PolicyDefinitionImpl withPolicyRuleJson(String policyRuleJson) { - try { - innerModel().withPolicyRule(new ObjectMapper().readTree(policyRuleJson)); + try (JsonReader jsonReader = JsonProviders.createReader(policyRuleJson)) { + Object policyRule = jsonReader.readUntyped(); + innerModel().withPolicyRule(policyRule); } catch (IOException e) { throw logger.logExceptionAsError(new RuntimeException(e)); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsClientImpl.java index 62119b0aea459..5b5fcefbf0622 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsClientImpl.java @@ -1736,9 +1736,7 @@ public PagedIterable listByManagementGroup(String managem /** * 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. @@ -1763,9 +1761,7 @@ private Mono> listNextSinglePageAsync(Strin /** * 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. @@ -1791,9 +1787,7 @@ private Mono> listNextSinglePageAsync(Strin /** * 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. @@ -1819,9 +1813,7 @@ private Mono> listBuiltInNextSinglePageAsyn /** * 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. @@ -1848,9 +1840,7 @@ private Mono> listBuiltInNextSinglePageAsyn /** * 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. @@ -1877,9 +1867,7 @@ private Mono> listByManagementGroupNextSing /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyExemptionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyExemptionsClientImpl.java index b5b680a71434a..b627ff0d1f4a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyExemptionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyExemptionsClientImpl.java @@ -1877,9 +1877,7 @@ public PagedIterable listForManagementGroup(String managem /** * 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. @@ -1904,9 +1902,7 @@ private Mono> listNextSinglePageAsync(String /** * 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. @@ -1932,9 +1928,7 @@ private Mono> listNextSinglePageAsync(String /** * 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. @@ -1961,9 +1955,7 @@ private Mono> listForResourceGroupNextSingle /** * 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. @@ -1990,9 +1982,7 @@ private Mono> listForResourceGroupNextSingle /** * 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. @@ -2018,9 +2008,7 @@ private Mono> listForResourceNextSinglePageA /** * 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. @@ -2047,9 +2035,7 @@ private Mono> listForResourceNextSinglePageA /** * 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. @@ -2076,9 +2062,7 @@ private Mono> listForManagementGroupNextSing /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionsClientImpl.java index 345ee8b1eed01..7082f73ceb7c2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionsClientImpl.java @@ -1727,9 +1727,7 @@ public PagedIterable listByManagementGroup(String mana /** * 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. @@ -1754,9 +1752,7 @@ private Mono> listNextSinglePageAsync(St /** * 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. @@ -1782,9 +1778,7 @@ private Mono> listNextSinglePageAsync(St /** * 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. @@ -1810,9 +1804,7 @@ private Mono> listBuiltInNextSinglePageA /** * 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. @@ -1839,9 +1831,7 @@ private Mono> listBuiltInNextSinglePageA /** * 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. @@ -1868,9 +1858,7 @@ private Mono> listByManagementGroupNextS /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProvidersClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProvidersClientImpl.java index 8f5c94707741b..e8b976c82b366 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProvidersClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ProvidersClientImpl.java @@ -1098,9 +1098,7 @@ public ProviderInner getAtTenantScope(String resourceProviderNamespace) { /** * 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. @@ -1125,9 +1123,7 @@ private Mono> listNextSinglePageAsync(String nextLi /** * 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. @@ -1153,9 +1149,7 @@ private Mono> listNextSinglePageAsync(String nextLi /** * 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. @@ -1181,9 +1175,7 @@ private Mono> listAtTenantScopeNextSinglePageAsync( /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupExportResultImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupExportResultImpl.java index 2b13476ddd98f..38ed391f1fad9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupExportResultImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupExportResultImpl.java @@ -4,12 +4,15 @@ package com.azure.resourcemanager.resources.implementation; import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.resources.fluent.models.ResourceGroupExportResultInner; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; import com.azure.resourcemanager.resources.models.DeploymentExportResult; import com.azure.resourcemanager.resources.models.ResourceGroupExportResult; -import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; -import com.azure.resourcemanager.resources.fluent.models.ResourceGroupExportResultInner; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.IOException; /** * Implementation for {@link DeploymentExportResult}. @@ -19,11 +22,11 @@ final class ResourceGroupExportResultImpl extends implements ResourceGroupExportResult { - private ObjectMapper mapper; + private final SerializerAdapter serializerAdapter; ResourceGroupExportResultImpl(ResourceGroupExportResultInner innerModel) { super(innerModel); - mapper = new ObjectMapper(); + this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); } @Override @@ -34,8 +37,8 @@ public Object template() { @Override public String templateJson() { try { - return mapper.writeValueAsString(template()); - } catch (JsonProcessingException e) { + return serializerAdapter.serialize(template(), SerializerEncoding.JSON); + } catch (IOException e) { return null; } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupsClientImpl.java index 4b0e2d85ab63e..5dfa5ce67ab55 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceGroupsClientImpl.java @@ -1253,9 +1253,7 @@ public PagedIterable list(String filter, Integer top, Contex /** * 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. @@ -1280,9 +1278,7 @@ private Mono> listNextSinglePageAsync(String n /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java index 9fa723d5c78ac..29f7b71464d25 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java @@ -3483,9 +3483,7 @@ public GenericResourceInner getById(String resourceId, String apiVersion) { /** * 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. @@ -3512,9 +3510,7 @@ private Mono> listByResourceGroupNex /** * 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. @@ -3541,9 +3537,7 @@ private Mono> listByResourceGroupNex /** * 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. @@ -3568,9 +3562,7 @@ private Mono> listNextSinglePageAsyn /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionFeatureRegistrationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionFeatureRegistrationsClientImpl.java index 33bcb58fa55c3..5d4f54a2d28fb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionFeatureRegistrationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionFeatureRegistrationsClientImpl.java @@ -744,9 +744,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. @@ -775,9 +773,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. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -805,9 +801,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. @@ -836,9 +830,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. * @param context The 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionsClientImpl.java index 77a86db12c210..0f6762708ceda 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/SubscriptionsClientImpl.java @@ -579,9 +579,7 @@ public CheckZonePeersResultInner checkZonePeers(String subscriptionId, CheckZone /** * 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. @@ -607,9 +605,7 @@ private Mono> listNextSinglePageAsync(String ne /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagOperationsClientImpl.java index b6097a2240e41..f757e18b19115 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagOperationsClientImpl.java @@ -790,7 +790,7 @@ public PagedIterable list(Context context) { * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -826,7 +826,7 @@ public Mono>> createOrUpdateAtScopeWithResponseAsync(S * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -862,7 +862,7 @@ private Mono>> createOrUpdateAtScopeWithResponseAsync( * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -883,7 +883,7 @@ public PollerFlux, TagsResourceInner> beginCreateO * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -906,7 +906,7 @@ private PollerFlux, TagsResourceInner> beginCreate * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -925,7 +925,7 @@ public SyncPoller, TagsResourceInner> beginCreateO * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -945,7 +945,7 @@ public SyncPoller, TagsResourceInner> beginCreateO * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -963,7 +963,7 @@ public Mono createOrUpdateAtScopeAsync(String scope, TagsReso * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -984,7 +984,7 @@ private Mono createOrUpdateAtScopeAsync(String scope, TagsRes * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1002,7 +1002,7 @@ public TagsResourceInner createOrUpdateAtScope(String scope, TagsResourceInner p * specified entity can have a maximum of 50 tags. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags API requests and responses. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1024,7 +1024,7 @@ public TagsResourceInner createOrUpdateAtScope(String scope, TagsResourceInner p * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1062,7 +1062,7 @@ public Mono>> updateAtScopeWithResponseAsync(String sc * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1101,7 +1101,7 @@ private Mono>> updateAtScopeWithResponseAsync(String s * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1125,7 +1125,7 @@ public PollerFlux, TagsResourceInner> beginUpdateA * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1151,7 +1151,7 @@ private PollerFlux, TagsResourceInner> beginUpdate * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1173,7 +1173,7 @@ public SyncPoller, TagsResourceInner> beginUpdateA * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1196,7 +1196,7 @@ public SyncPoller, TagsResourceInner> beginUpdateA * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1217,7 +1217,7 @@ public Mono updateAtScopeAsync(String scope, TagsPatchResourc * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1240,7 +1240,7 @@ private Mono updateAtScopeAsync(String scope, TagsPatchResour * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1261,7 +1261,7 @@ public TagsResourceInner updateAtScope(String scope, TagsPatchResource parameter * name/value pairs. * * @param scope The resource scope. - * @param parameters Wrapper resource for tags patch API request only. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1538,9 +1538,7 @@ public void deleteAtScope(String scope, 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. @@ -1565,9 +1563,7 @@ private Mono> listNextSinglePageAsync(String next /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TenantsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TenantsClientImpl.java index 31ad9dcdaa668..ec2bbc58a8874 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TenantsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TenantsClientImpl.java @@ -176,9 +176,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. @@ -203,9 +201,7 @@ private Mono> listNextSinglePageAsync(St /** * 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ActionOnUnmanage.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ActionOnUnmanage.java index 434c652e72bfa..72c2b2cade2cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ActionOnUnmanage.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ActionOnUnmanage.java @@ -6,29 +6,33 @@ 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; /** * Defines the behavior of resources that are no longer managed after the stack is updated or deleted. */ @Fluent -public final class ActionOnUnmanage { +public final class ActionOnUnmanage implements JsonSerializable { /* - * Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state. + * Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach + * will leave the resource in it's current state. */ - @JsonProperty(value = "resources", required = true) private DeploymentStacksDeleteDetachEnum resources; /* - * Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state. + * Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach + * will leave the resource in it's current state. */ - @JsonProperty(value = "resourceGroups") private DeploymentStacksDeleteDetachEnum resourceGroups; /* - * Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state. + * Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach + * will leave the resource in it's current state. */ - @JsonProperty(value = "managementGroups") private DeploymentStacksDeleteDetachEnum managementGroups; /** @@ -116,4 +120,52 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ActionOnUnmanage.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resources", this.resources == null ? null : this.resources.toString()); + jsonWriter.writeStringField("resourceGroups", + this.resourceGroups == null ? null : this.resourceGroups.toString()); + jsonWriter.writeStringField("managementGroups", + this.managementGroups == null ? null : this.managementGroups.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionOnUnmanage from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionOnUnmanage 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 ActionOnUnmanage. + */ + public static ActionOnUnmanage fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionOnUnmanage deserializedActionOnUnmanage = new ActionOnUnmanage(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resources".equals(fieldName)) { + deserializedActionOnUnmanage.resources + = DeploymentStacksDeleteDetachEnum.fromString(reader.getString()); + } else if ("resourceGroups".equals(fieldName)) { + deserializedActionOnUnmanage.resourceGroups + = DeploymentStacksDeleteDetachEnum.fromString(reader.getString()); + } else if ("managementGroups".equals(fieldName)) { + deserializedActionOnUnmanage.managementGroups + = DeploymentStacksDeleteDetachEnum.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedActionOnUnmanage; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Alias.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Alias.java index 259f057658c5c..23b0f32049972 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Alias.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Alias.java @@ -5,48 +5,46 @@ package com.azure.resourcemanager.resources.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; /** * The alias type. */ @Fluent -public final class Alias { +public final class Alias implements JsonSerializable { /* * The alias name. */ - @JsonProperty(value = "name") private String name; /* * The paths for an alias. */ - @JsonProperty(value = "paths") private List paths; /* * The type of the alias. */ - @JsonProperty(value = "type") private AliasType type; /* * The default path for an alias. */ - @JsonProperty(value = "defaultPath") private String defaultPath; /* * The default pattern for an alias. */ - @JsonProperty(value = "defaultPattern") private AliasPattern defaultPattern; /* * The default alias path metadata. Applies to the default path and to any alias path that doesn't have metadata */ - @JsonProperty(value = "defaultMetadata", access = JsonProperty.Access.WRITE_ONLY) private AliasPathMetadata defaultMetadata; /** @@ -181,4 +179,55 @@ public void validate() { defaultMetadata().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("paths", this.paths, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("defaultPath", this.defaultPath); + jsonWriter.writeJsonField("defaultPattern", this.defaultPattern); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Alias from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Alias 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 Alias. + */ + public static Alias fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Alias deserializedAlias = new Alias(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedAlias.name = reader.getString(); + } else if ("paths".equals(fieldName)) { + List paths = reader.readArray(reader1 -> AliasPath.fromJson(reader1)); + deserializedAlias.paths = paths; + } else if ("type".equals(fieldName)) { + deserializedAlias.type = AliasType.fromString(reader.getString()); + } else if ("defaultPath".equals(fieldName)) { + deserializedAlias.defaultPath = reader.getString(); + } else if ("defaultPattern".equals(fieldName)) { + deserializedAlias.defaultPattern = AliasPattern.fromJson(reader); + } else if ("defaultMetadata".equals(fieldName)) { + deserializedAlias.defaultMetadata = AliasPathMetadata.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAlias; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPath.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPath.java index c2273d135ab2d..f91f26ffb59cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPath.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPath.java @@ -5,36 +5,36 @@ package com.azure.resourcemanager.resources.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; /** * The type of the paths for alias. */ @Fluent -public final class AliasPath { +public final class AliasPath implements JsonSerializable { /* * The path of an alias. */ - @JsonProperty(value = "path") private String path; /* * The API versions. */ - @JsonProperty(value = "apiVersions") private List apiVersions; /* * The pattern for an alias path. */ - @JsonProperty(value = "pattern") private AliasPattern pattern; /* * The metadata of the alias path. If missing, fall back to the default metadata of the alias. */ - @JsonProperty(value = "metadata", access = JsonProperty.Access.WRITE_ONLY) private AliasPathMetadata metadata; /** @@ -126,4 +126,49 @@ public void validate() { metadata().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeArrayField("apiVersions", this.apiVersions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("pattern", this.pattern); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AliasPath from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AliasPath 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 AliasPath. + */ + public static AliasPath fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AliasPath deserializedAliasPath = new AliasPath(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("path".equals(fieldName)) { + deserializedAliasPath.path = reader.getString(); + } else if ("apiVersions".equals(fieldName)) { + List apiVersions = reader.readArray(reader1 -> reader1.getString()); + deserializedAliasPath.apiVersions = apiVersions; + } else if ("pattern".equals(fieldName)) { + deserializedAliasPath.pattern = AliasPattern.fromJson(reader); + } else if ("metadata".equals(fieldName)) { + deserializedAliasPath.metadata = AliasPathMetadata.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAliasPath; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathAttributes.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathAttributes.java index e842b24f4e86c..2040439d8b7c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathAttributes.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathAttributes.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public AliasPathAttributes() { * @param name a name to look for. * @return the corresponding AliasPathAttributes. */ - @JsonCreator public static AliasPathAttributes fromString(String name) { return fromString(name, AliasPathAttributes.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathMetadata.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathMetadata.java index 6e96eee0e40f2..98fb3a447205d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathMetadata.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathMetadata.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.resources.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; /** * The AliasPathMetadata model. */ @Immutable -public final class AliasPathMetadata { +public final class AliasPathMetadata implements JsonSerializable { /* * The type of the token that the alias path is referring to. */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private AliasPathTokenType type; /* * The attributes of the token that the alias path is referring to. */ - @JsonProperty(value = "attributes", access = JsonProperty.Access.WRITE_ONLY) private AliasPathAttributes attributes; /** @@ -55,4 +57,41 @@ public AliasPathAttributes attributes() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AliasPathMetadata from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AliasPathMetadata 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 AliasPathMetadata. + */ + public static AliasPathMetadata fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AliasPathMetadata deserializedAliasPathMetadata = new AliasPathMetadata(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedAliasPathMetadata.type = AliasPathTokenType.fromString(reader.getString()); + } else if ("attributes".equals(fieldName)) { + deserializedAliasPathMetadata.attributes = AliasPathAttributes.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAliasPathMetadata; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathTokenType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathTokenType.java index fafbe6fdebe5c..c9d515537563a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathTokenType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPathTokenType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -67,7 +66,6 @@ public AliasPathTokenType() { * @param name a name to look for. * @return the corresponding AliasPathTokenType. */ - @JsonCreator public static AliasPathTokenType fromString(String name) { return fromString(name, AliasPathTokenType.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPattern.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPattern.java index 15be1bb90e566..81325bc912c74 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPattern.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPattern.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.resources.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 type of the pattern for an alias path. */ @Fluent -public final class AliasPattern { +public final class AliasPattern implements JsonSerializable { /* * The alias pattern phrase. */ - @JsonProperty(value = "phrase") private String phrase; /* * The alias pattern variable. */ - @JsonProperty(value = "variable") private String variable; /* * The type of alias pattern */ - @JsonProperty(value = "type") private AliasPatternType type; /** @@ -103,4 +104,46 @@ public AliasPattern withType(AliasPatternType type) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("phrase", this.phrase); + jsonWriter.writeStringField("variable", this.variable); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AliasPattern from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AliasPattern 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 AliasPattern. + */ + public static AliasPattern fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AliasPattern deserializedAliasPattern = new AliasPattern(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("phrase".equals(fieldName)) { + deserializedAliasPattern.phrase = reader.getString(); + } else if ("variable".equals(fieldName)) { + deserializedAliasPattern.variable = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAliasPattern.type = AliasPatternType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAliasPattern; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPatternType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPatternType.java index 13be6f1b965f8..2b887cb8d9cb9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPatternType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasPatternType.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The type of alias pattern. */ @@ -36,7 +33,6 @@ public enum AliasPatternType { * @param value the serialized value to parse. * @return the parsed AliasPatternType object, or null if unable to parse. */ - @JsonCreator public static AliasPatternType fromString(String value) { if (value == null) { return null; @@ -53,7 +49,6 @@ public static AliasPatternType fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasType.java index b0676f7e8c999..83f124d5ce1a5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AliasType.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The type of the alias. */ @@ -41,7 +38,6 @@ public enum AliasType { * @param value the serialized value to parse. * @return the parsed AliasType object, or null if unable to parse. */ - @JsonCreator public static AliasType fromString(String value) { if (value == null) { return null; @@ -58,7 +54,6 @@ public static AliasType fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ApiProfile.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ApiProfile.java index 7fd956be07d02..c6a6cbfbfc748 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ApiProfile.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ApiProfile.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.resources.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; /** * The ApiProfile model. */ @Immutable -public final class ApiProfile { +public final class ApiProfile implements JsonSerializable { /* * The profile version. */ - @JsonProperty(value = "profileVersion", access = JsonProperty.Access.WRITE_ONLY) private String profileVersion; /* * The API version. */ - @JsonProperty(value = "apiVersion", access = JsonProperty.Access.WRITE_ONLY) private String apiVersion; /** @@ -55,4 +57,41 @@ public String apiVersion() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ApiProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ApiProfile 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 ApiProfile. + */ + public static ApiProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ApiProfile deserializedApiProfile = new ApiProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("profileVersion".equals(fieldName)) { + deserializedApiProfile.profileVersion = reader.getString(); + } else if ("apiVersion".equals(fieldName)) { + deserializedApiProfile.apiVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedApiProfile; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AssignmentScopeValidation.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AssignmentScopeValidation.java index 65c15b7d9c46b..33e36ce2e9249 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AssignmentScopeValidation.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AssignmentScopeValidation.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public AssignmentScopeValidation() { * @param name a name to look for. * @return the corresponding AssignmentScopeValidation. */ - @JsonCreator public static AssignmentScopeValidation fromString(String name) { return fromString(name, AssignmentScopeValidation.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AuthorizationProfile.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AuthorizationProfile.java index b8486aedeedbb..e42b69d6f6aa3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AuthorizationProfile.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AuthorizationProfile.java @@ -5,42 +5,42 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; /** * Authorization Profile. */ @Immutable -public final class AuthorizationProfile { +public final class AuthorizationProfile implements JsonSerializable { /* * The requested time */ - @JsonProperty(value = "requestedTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime requestedTime; /* * The requester */ - @JsonProperty(value = "requester", access = JsonProperty.Access.WRITE_ONLY) private String requester; /* * The requester object id */ - @JsonProperty(value = "requesterObjectId", access = JsonProperty.Access.WRITE_ONLY) private String requesterObjectId; /* * The approved time */ - @JsonProperty(value = "approvedTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime approvedTime; /* * The approver */ - @JsonProperty(value = "approver", access = JsonProperty.Access.WRITE_ONLY) private String approver; /** @@ -101,4 +101,49 @@ public String approver() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AuthorizationProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthorizationProfile 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 AuthorizationProfile. + */ + public static AuthorizationProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuthorizationProfile deserializedAuthorizationProfile = new AuthorizationProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("requestedTime".equals(fieldName)) { + deserializedAuthorizationProfile.requestedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("requester".equals(fieldName)) { + deserializedAuthorizationProfile.requester = reader.getString(); + } else if ("requesterObjectId".equals(fieldName)) { + deserializedAuthorizationProfile.requesterObjectId = reader.getString(); + } else if ("approvedTime".equals(fieldName)) { + deserializedAuthorizationProfile.approvedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("approver".equals(fieldName)) { + deserializedAuthorizationProfile.approver = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthorizationProfile; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AvailabilityZoneMappings.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AvailabilityZoneMappings.java index 92f069069bedb..f63d1592f6ffe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AvailabilityZoneMappings.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AvailabilityZoneMappings.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.resources.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; /** * Availability zone mappings for the region. */ @Immutable -public final class AvailabilityZoneMappings { +public final class AvailabilityZoneMappings implements JsonSerializable { /* * The logical zone id for the availability zone */ - @JsonProperty(value = "logicalZone", access = JsonProperty.Access.WRITE_ONLY) private String logicalZone; /* * The fully qualified physical zone id of availability zone to which logical zone id is mapped to */ - @JsonProperty(value = "physicalZone", access = JsonProperty.Access.WRITE_ONLY) private String physicalZone; /** @@ -56,4 +58,41 @@ public String physicalZone() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailabilityZoneMappings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailabilityZoneMappings 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 AvailabilityZoneMappings. + */ + public static AvailabilityZoneMappings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AvailabilityZoneMappings deserializedAvailabilityZoneMappings = new AvailabilityZoneMappings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("logicalZone".equals(fieldName)) { + deserializedAvailabilityZoneMappings.logicalZone = reader.getString(); + } else if ("physicalZone".equals(fieldName)) { + deserializedAvailabilityZoneMappings.physicalZone = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAvailabilityZoneMappings; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AvailabilityZonePeers.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AvailabilityZonePeers.java index b4705b7b4c65a..37657619020a0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AvailabilityZonePeers.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AvailabilityZonePeers.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.resources.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; /** * List of availability zones shared by the subscriptions. */ @Fluent -public final class AvailabilityZonePeers { +public final class AvailabilityZonePeers implements JsonSerializable { /* * The availabilityZone. */ - @JsonProperty(value = "availabilityZone", access = JsonProperty.Access.WRITE_ONLY) private String availabilityZone; /* * Details of shared availability zone. */ - @JsonProperty(value = "peers") private List peers; /** @@ -70,4 +72,43 @@ public void validate() { peers().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("peers", this.peers, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailabilityZonePeers from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailabilityZonePeers 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 AvailabilityZonePeers. + */ + public static AvailabilityZonePeers fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AvailabilityZonePeers deserializedAvailabilityZonePeers = new AvailabilityZonePeers(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("availabilityZone".equals(fieldName)) { + deserializedAvailabilityZonePeers.availabilityZone = reader.getString(); + } else if ("peers".equals(fieldName)) { + List peers = reader.readArray(reader1 -> Peers.fromJson(reader1)); + deserializedAvailabilityZonePeers.peers = peers; + } else { + reader.skipChildren(); + } + } + + return deserializedAvailabilityZonePeers; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AzureResourceBase.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AzureResourceBase.java index c964dda1155b4..a66d177c8a5eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AzureResourceBase.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/AzureResourceBase.java @@ -7,7 +7,10 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Common properties for all Azure resources. @@ -17,9 +20,23 @@ public class AzureResourceBase extends ProxyResource { /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of AzureResourceBase class. */ @@ -35,6 +52,47 @@ public SystemData systemData() { return this.systemData; } + /** + * Set the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @param systemData the systemData value to set. + * @return the AzureResourceBase object itself. + */ + AzureResourceBase withSystemData(SystemData systemData) { + this.systemData = systemData; + return this; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Validates the instance. * @@ -42,4 +100,46 @@ public SystemData systemData() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureResourceBase from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureResourceBase 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 AzureResourceBase. + */ + public static AzureResourceBase fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureResourceBase deserializedAzureResourceBase = new AzureResourceBase(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAzureResourceBase.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAzureResourceBase.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAzureResourceBase.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedAzureResourceBase.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureResourceBase; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/BasicDependency.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/BasicDependency.java index 0cda1efea7ed8..0f1aaba75e3ce 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/BasicDependency.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/BasicDependency.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.resources.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; /** * Deployment dependency information. */ @Fluent -public final class BasicDependency { +public final class BasicDependency implements JsonSerializable { /* * The ID of the dependency. */ - @JsonProperty(value = "id") private String id; /* * The dependency resource type. */ - @JsonProperty(value = "resourceType") private String resourceType; /* * The dependency resource name. */ - @JsonProperty(value = "resourceName") private String resourceName; /** @@ -103,4 +104,46 @@ public BasicDependency withResourceName(String resourceName) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("resourceType", this.resourceType); + jsonWriter.writeStringField("resourceName", this.resourceName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BasicDependency from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BasicDependency 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 BasicDependency. + */ + public static BasicDependency fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BasicDependency deserializedBasicDependency = new BasicDependency(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBasicDependency.id = reader.getString(); + } else if ("resourceType".equals(fieldName)) { + deserializedBasicDependency.resourceType = reader.getString(); + } else if ("resourceName".equals(fieldName)) { + deserializedBasicDependency.resourceName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBasicDependency; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeAttributes.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeAttributes.java index 8365deef3890a..a5499c8158392 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeAttributes.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeAttributes.java @@ -5,41 +5,40 @@ package com.azure.resourcemanager.resources.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; /** * Details about the change resource. */ @Immutable -public final class ChangeAttributes { +public final class ChangeAttributes implements JsonSerializable { /* * The ARM correlation ID of the change resource */ - @JsonProperty(value = "correlationId", access = JsonProperty.Access.WRITE_ONLY) private String correlationId; /* * The time the change(s) on the target resource ocurred */ - @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) private String timestamp; /* * The number of changes this resource captures */ - @JsonProperty(value = "changesCount", access = JsonProperty.Access.WRITE_ONLY) private Long changesCount; /* * The GUID of the previous snapshot */ - @JsonProperty(value = "previousResourceSnapshotId", access = JsonProperty.Access.WRITE_ONLY) private String previousResourceSnapshotId; /* * The GUID of the new snapshot */ - @JsonProperty(value = "newResourceSnapshotId", access = JsonProperty.Access.WRITE_ONLY) private String newResourceSnapshotId; /** @@ -100,4 +99,47 @@ public String newResourceSnapshotId() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeAttributes from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeAttributes 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 ChangeAttributes. + */ + public static ChangeAttributes fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeAttributes deserializedChangeAttributes = new ChangeAttributes(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("correlationId".equals(fieldName)) { + deserializedChangeAttributes.correlationId = reader.getString(); + } else if ("timestamp".equals(fieldName)) { + deserializedChangeAttributes.timestamp = reader.getString(); + } else if ("changesCount".equals(fieldName)) { + deserializedChangeAttributes.changesCount = reader.getNullable(JsonReader::getLong); + } else if ("previousResourceSnapshotId".equals(fieldName)) { + deserializedChangeAttributes.previousResourceSnapshotId = reader.getString(); + } else if ("newResourceSnapshotId".equals(fieldName)) { + deserializedChangeAttributes.newResourceSnapshotId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeAttributes; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeBase.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeBase.java index 2e93a1c20bad6..98f7f284dbb90 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeBase.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeBase.java @@ -5,35 +5,35 @@ package com.azure.resourcemanager.resources.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; /** * An individual change on the target resource. */ @Immutable -public final class ChangeBase { +public final class ChangeBase implements JsonSerializable { /* * The type of change that occurred */ - @JsonProperty(value = "propertyChangeType", access = JsonProperty.Access.WRITE_ONLY) private ResourcePropertyChangeType propertyChangeType; /* * The entity that made the change */ - @JsonProperty(value = "changeCategory", access = JsonProperty.Access.WRITE_ONLY) private ChangeCategory changeCategory; /* * The target resource property value before the change */ - @JsonProperty(value = "previousValue", access = JsonProperty.Access.WRITE_ONLY) private String previousValue; /* * The target resource property value after the change */ - @JsonProperty(value = "newValue", access = JsonProperty.Access.WRITE_ONLY) private String newValue; /** @@ -85,4 +85,46 @@ public String newValue() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeBase from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeBase 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 ChangeBase. + */ + public static ChangeBase fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeBase deserializedChangeBase = new ChangeBase(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("propertyChangeType".equals(fieldName)) { + deserializedChangeBase.propertyChangeType + = ResourcePropertyChangeType.fromString(reader.getString()); + } else if ("changeCategory".equals(fieldName)) { + deserializedChangeBase.changeCategory = ChangeCategory.fromString(reader.getString()); + } else if ("previousValue".equals(fieldName)) { + deserializedChangeBase.previousValue = reader.getString(); + } else if ("newValue".equals(fieldName)) { + deserializedChangeBase.newValue = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeBase; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeCategory.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeCategory.java index ccd0835948711..130d26dde31ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeCategory.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeCategory.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The entity that made the change. */ @@ -36,7 +33,6 @@ public enum ChangeCategory { * @param value the serialized value to parse. * @return the parsed ChangeCategory object, or null if unable to parse. */ - @JsonCreator public static ChangeCategory fromString(String value) { if (value == null) { return null; @@ -53,7 +49,6 @@ public static ChangeCategory fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeProperties.java index e4266920aa3ea..883ea093a6aba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeProperties.java @@ -5,44 +5,41 @@ package com.azure.resourcemanager.resources.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 properties of a change. */ @Fluent -public final class ChangeProperties { +public final class ChangeProperties implements JsonSerializable { /* * The fully qualified ID of the target resource that was changed */ - @JsonProperty(value = "targetResourceId", access = JsonProperty.Access.WRITE_ONLY) private String targetResourceId; /* * The namespace and type of the resource */ - @JsonProperty(value = "targetResourceType", access = JsonProperty.Access.WRITE_ONLY) private String targetResourceType; /* * The type of change that was captured in the resource */ - @JsonProperty(value = "changeType", access = JsonProperty.Access.WRITE_ONLY) private ResourceChangeType changeType; /* * Details about the change resource */ - @JsonProperty(value = "changeAttributes") private ChangeAttributes changeAttributes; /* * A dictionary with changed property name as a key and the change details as the value */ - @JsonProperty(value = "changes") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map changes; /** @@ -135,4 +132,50 @@ public void validate() { }); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("changeAttributes", this.changeAttributes); + jsonWriter.writeMapField("changes", this.changes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeProperties 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 ChangeProperties. + */ + public static ChangeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeProperties deserializedChangeProperties = new ChangeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetResourceId".equals(fieldName)) { + deserializedChangeProperties.targetResourceId = reader.getString(); + } else if ("targetResourceType".equals(fieldName)) { + deserializedChangeProperties.targetResourceType = reader.getString(); + } else if ("changeType".equals(fieldName)) { + deserializedChangeProperties.changeType = ResourceChangeType.fromString(reader.getString()); + } else if ("changeAttributes".equals(fieldName)) { + deserializedChangeProperties.changeAttributes = ChangeAttributes.fromJson(reader); + } else if ("changes".equals(fieldName)) { + Map changes = reader.readMap(reader1 -> ChangeBase.fromJson(reader1)); + deserializedChangeProperties.changes = changes; + } else { + reader.skipChildren(); + } + } + + return deserializedChangeProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeResourceListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeResourceListResult.java index c2606ce1b2e41..994d78f6dee66 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeResourceListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeResourceListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.ChangeResourceResultInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The list of resources. */ @Fluent -public final class ChangeResourceListResult { +public final class ChangeResourceListResult implements JsonSerializable { /* * The link used to get the next page of Change Resources */ - @JsonProperty(value = "nextLink") private String nextLink; /* * The list of resources */ - @JsonProperty(value = "value") private List value; /** @@ -82,4 +84,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeResourceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeResourceListResult 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 ChangeResourceListResult. + */ + public static ChangeResourceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeResourceListResult deserializedChangeResourceListResult = new ChangeResourceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedChangeResourceListResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ChangeResourceResultInner.fromJson(reader1)); + deserializedChangeResourceListResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedChangeResourceListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeType.java index ba1a7189fc42b..023ba7104b831 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ChangeType.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * Type of change that will be made to the resource when the deployment is executed. */ @@ -61,7 +58,6 @@ public enum ChangeType { * @param value the serialized value to parse. * @return the parsed ChangeType object, or null if unable to parse. */ - @JsonCreator public static ChangeType fromString(String value) { if (value == null) { return null; @@ -78,7 +74,6 @@ public static ChangeType fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/CheckZonePeersRequest.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/CheckZonePeersRequest.java index a6b825f7a3aed..d4e855d1a2dc4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/CheckZonePeersRequest.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/CheckZonePeersRequest.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.resources.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; /** * Check zone peers request parameters. */ @Fluent -public final class CheckZonePeersRequest { +public final class CheckZonePeersRequest implements JsonSerializable { /* * The Microsoft location. */ - @JsonProperty(value = "location") private String location; /* * The peer Microsoft Azure subscription ID. */ - @JsonProperty(value = "subscriptionIds") private List subscriptionIds; /** @@ -78,4 +80,45 @@ public CheckZonePeersRequest withSubscriptionIds(List subscriptionIds) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeArrayField("subscriptionIds", this.subscriptionIds, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckZonePeersRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckZonePeersRequest 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 CheckZonePeersRequest. + */ + public static CheckZonePeersRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckZonePeersRequest deserializedCheckZonePeersRequest = new CheckZonePeersRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedCheckZonePeersRequest.location = reader.getString(); + } else if ("subscriptionIds".equals(fieldName)) { + List subscriptionIds = reader.readArray(reader1 -> reader1.getString()); + deserializedCheckZonePeersRequest.subscriptionIds = subscriptionIds; + } else { + reader.skipChildren(); + } + } + + return deserializedCheckZonePeersRequest; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataEffect.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataEffect.java index d990490254371..9c076f3243090 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataEffect.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataEffect.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.resources.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 data effect definition. */ @Fluent -public final class DataEffect { +public final class DataEffect implements JsonSerializable { /* * The data effect name. */ - @JsonProperty(value = "name") private String name; /* * The data effect details schema. */ - @JsonProperty(value = "detailsSchema") private Object detailsSchema; /** @@ -77,4 +79,43 @@ public DataEffect withDetailsSchema(Object detailsSchema) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeUntypedField("detailsSchema", this.detailsSchema); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataEffect from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataEffect 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 DataEffect. + */ + public static DataEffect fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataEffect deserializedDataEffect = new DataEffect(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedDataEffect.name = reader.getString(); + } else if ("detailsSchema".equals(fieldName)) { + deserializedDataEffect.detailsSchema = reader.readUntyped(); + } else { + reader.skipChildren(); + } + } + + return deserializedDataEffect; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataManifestCustomResourceFunctionDefinition.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataManifestCustomResourceFunctionDefinition.java index 76aa11bca702d..be4d2375da143 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataManifestCustomResourceFunctionDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataManifestCustomResourceFunctionDefinition.java @@ -5,36 +5,39 @@ package com.azure.resourcemanager.resources.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; /** * The custom resource function definition. */ @Fluent -public final class DataManifestCustomResourceFunctionDefinition { +public final class DataManifestCustomResourceFunctionDefinition + implements JsonSerializable { /* * The function name as it will appear in the policy rule. eg - 'vault'. */ - @JsonProperty(value = "name") private String name; /* * The fully qualified control plane resource type that this function represents. eg - 'Microsoft.KeyVault/vaults'. */ - @JsonProperty(value = "fullyQualifiedResourceType") private String fullyQualifiedResourceType; /* - * The top-level properties that can be selected on the function's output. eg - [ "name", "location" ] if vault().name and vault().location are supported + * The top-level properties that can be selected on the function's output. eg - [ "name", "location" ] if + * vault().name and vault().location are supported */ - @JsonProperty(value = "defaultProperties") private List defaultProperties; /* - * A value indicating whether the custom properties within the property bag are allowed. Needs api-version to be specified in the policy rule eg - vault('2019-06-01'). + * A value indicating whether the custom properties within the property bag are allowed. Needs api-version to be + * specified in the policy rule eg - vault('2019-06-01'). */ - @JsonProperty(value = "allowCustomProperties") private Boolean allowCustomProperties; /** @@ -137,4 +140,54 @@ public DataManifestCustomResourceFunctionDefinition withAllowCustomProperties(Bo */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("fullyQualifiedResourceType", this.fullyQualifiedResourceType); + jsonWriter.writeArrayField("defaultProperties", this.defaultProperties, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("allowCustomProperties", this.allowCustomProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataManifestCustomResourceFunctionDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataManifestCustomResourceFunctionDefinition 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 DataManifestCustomResourceFunctionDefinition. + */ + public static DataManifestCustomResourceFunctionDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataManifestCustomResourceFunctionDefinition deserializedDataManifestCustomResourceFunctionDefinition + = new DataManifestCustomResourceFunctionDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedDataManifestCustomResourceFunctionDefinition.name = reader.getString(); + } else if ("fullyQualifiedResourceType".equals(fieldName)) { + deserializedDataManifestCustomResourceFunctionDefinition.fullyQualifiedResourceType + = reader.getString(); + } else if ("defaultProperties".equals(fieldName)) { + List defaultProperties = reader.readArray(reader1 -> reader1.getString()); + deserializedDataManifestCustomResourceFunctionDefinition.defaultProperties = defaultProperties; + } else if ("allowCustomProperties".equals(fieldName)) { + deserializedDataManifestCustomResourceFunctionDefinition.allowCustomProperties + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedDataManifestCustomResourceFunctionDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataPolicyManifestListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataPolicyManifestListResult.java index 3022ccc019d0b..b6c953932ff9f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataPolicyManifestListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DataPolicyManifestListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.DataPolicyManifestInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of data policy manifests. */ @Fluent -public final class DataPolicyManifestListResult { +public final class DataPolicyManifestListResult implements JsonSerializable { /* * An array of data policy manifests. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@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 DataPolicyManifestListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataPolicyManifestListResult 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 DataPolicyManifestListResult. + */ + public static DataPolicyManifestListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataPolicyManifestListResult deserializedDataPolicyManifestListResult = new DataPolicyManifestListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DataPolicyManifestInner.fromJson(reader1)); + deserializedDataPolicyManifestListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDataPolicyManifestListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDataPolicyManifestListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DebugSetting.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DebugSetting.java index 2961b0b3c0c08..b87c6aa3169f9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DebugSetting.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DebugSetting.java @@ -5,17 +5,24 @@ package com.azure.resourcemanager.resources.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 debug setting. */ @Fluent -public final class DebugSetting { +public final class DebugSetting implements JsonSerializable { /* - * Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information you are passing in during deployment. By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations. + * Specifies the type of information to log for debugging. The permitted values are none, requestContent, + * responseContent, or both requestContent and responseContent separated by a comma. The default is none. When + * setting this value, carefully consider the type of information you are passing in during deployment. By logging + * information about the request or response, you could potentially expose sensitive data that is retrieved through + * the deployment operations. */ - @JsonProperty(value = "detailLevel") private String detailLevel; /** @@ -59,4 +66,40 @@ public DebugSetting withDetailLevel(String detailLevel) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("detailLevel", this.detailLevel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DebugSetting from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DebugSetting 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 DebugSetting. + */ + public static DebugSetting fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DebugSetting deserializedDebugSetting = new DebugSetting(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("detailLevel".equals(fieldName)) { + deserializedDebugSetting.detailLevel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDebugSetting; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenySettings.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenySettings.java index fbe06352053f4..5e6e1b65f5a2f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenySettings.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenySettings.java @@ -6,36 +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; import java.util.List; /** * Defines how resources deployed by the Deployment stack are locked. */ @Fluent -public final class DenySettings { +public final class DenySettings implements JsonSerializable { /* * denySettings Mode that defines denied actions. */ - @JsonProperty(value = "mode", required = true) private DenySettingsMode mode; /* * List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted. */ - @JsonProperty(value = "excludedPrincipals") private List excludedPrincipals; /* - * List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed. + * List of role-based management operations that are excluded from the denySettings. Up to 200 actions are + * permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically + * appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is + * set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': + * 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed. */ - @JsonProperty(value = "excludedActions") private List excludedActions; /* * DenySettings will be applied to child resource scopes of every managed resource with a deny assignment. */ - @JsonProperty(value = "applyToChildScopes") private Boolean applyToChildScopes; /** @@ -151,4 +155,54 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(DenySettings.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeArrayField("excludedPrincipals", this.excludedPrincipals, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("excludedActions", this.excludedActions, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("applyToChildScopes", this.applyToChildScopes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DenySettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DenySettings 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 DenySettings. + */ + public static DenySettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DenySettings deserializedDenySettings = new DenySettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedDenySettings.mode = DenySettingsMode.fromString(reader.getString()); + } else if ("excludedPrincipals".equals(fieldName)) { + List excludedPrincipals = reader.readArray(reader1 -> reader1.getString()); + deserializedDenySettings.excludedPrincipals = excludedPrincipals; + } else if ("excludedActions".equals(fieldName)) { + List excludedActions = reader.readArray(reader1 -> reader1.getString()); + deserializedDenySettings.excludedActions = excludedActions; + } else if ("applyToChildScopes".equals(fieldName)) { + deserializedDenySettings.applyToChildScopes = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedDenySettings; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenySettingsMode.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenySettingsMode.java index 7ad21358e7e1d..17b25c8b63145 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenySettingsMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenySettingsMode.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public DenySettingsMode() { * @param name a name to look for. * @return the corresponding DenySettingsMode. */ - @JsonCreator public static DenySettingsMode fromString(String name) { return fromString(name, DenySettingsMode.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenyStatusMode.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenyStatusMode.java index 2748530ae2743..1c7d79ae8fb30 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenyStatusMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DenyStatusMode.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public DenyStatusMode() { * @param name a name to look for. * @return the corresponding DenyStatusMode. */ - @JsonCreator public static DenyStatusMode fromString(String name) { return fromString(name, DenyStatusMode.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Dependency.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Dependency.java index 64db954a0e34c..af737928a23ac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Dependency.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Dependency.java @@ -5,36 +5,36 @@ package com.azure.resourcemanager.resources.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; /** * Deployment dependency information. */ @Fluent -public final class Dependency { +public final class Dependency implements JsonSerializable { /* * The list of dependencies. */ - @JsonProperty(value = "dependsOn") private List dependsOn; /* * The ID of the dependency. */ - @JsonProperty(value = "id") private String id; /* * The dependency resource type. */ - @JsonProperty(value = "resourceType") private String resourceType; /* * The dependency resource name. */ - @JsonProperty(value = "resourceName") private String resourceName; /** @@ -133,4 +133,50 @@ public void validate() { dependsOn().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("dependsOn", this.dependsOn, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("resourceType", this.resourceType); + jsonWriter.writeStringField("resourceName", this.resourceName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Dependency from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Dependency 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 Dependency. + */ + public static Dependency fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Dependency deserializedDependency = new Dependency(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dependsOn".equals(fieldName)) { + List dependsOn = reader.readArray(reader1 -> BasicDependency.fromJson(reader1)); + deserializedDependency.dependsOn = dependsOn; + } else if ("id".equals(fieldName)) { + deserializedDependency.id = reader.getString(); + } else if ("resourceType".equals(fieldName)) { + deserializedDependency.resourceType = reader.getString(); + } else if ("resourceName".equals(fieldName)) { + deserializedDependency.resourceName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDependency; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentListResult.java index bba2a8d3ba3d2..8dceb337e98c6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.DeploymentExtendedInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of deployments. */ @Fluent -public final class DeploymentListResult { +public final class DeploymentListResult implements JsonSerializable { /* * An array of deployments. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** @@ -71,4 +73,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentListResult 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 DeploymentListResult. + */ + public static DeploymentListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentListResult deserializedDeploymentListResult = new DeploymentListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DeploymentExtendedInner.fromJson(reader1)); + deserializedDeploymentListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDeploymentListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentMode.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentMode.java index 45d3088c0a00a..a699f11feae29 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentMode.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, * resources are deployed without deleting existing resources that are not included in the template. In Complete mode, @@ -39,7 +36,6 @@ public enum DeploymentMode { * @param value the serialized value to parse. * @return the parsed DeploymentMode object, or null if unable to parse. */ - @JsonCreator public static DeploymentMode fromString(String value) { if (value == null) { return null; @@ -56,7 +52,6 @@ public static DeploymentMode fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentOperationProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentOperationProperties.java index 0a0a7f5521f25..9b32b08361f68 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentOperationProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentOperationProperties.java @@ -5,72 +5,69 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; /** * Deployment operation properties. */ @Immutable -public final class DeploymentOperationProperties { +public final class DeploymentOperationProperties implements JsonSerializable { /* * The name of the current provisioning operation. */ - @JsonProperty(value = "provisioningOperation", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningOperation provisioningOperation; /* * The state of the provisioning. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /* * The date and time of the operation. */ - @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime timestamp; /* * The duration of the operation. */ - @JsonProperty(value = "duration", access = JsonProperty.Access.WRITE_ONLY) private String duration; /* * Deployment operation service request id. */ - @JsonProperty(value = "serviceRequestId", access = JsonProperty.Access.WRITE_ONLY) private String serviceRequestId; /* - * Operation status code from the resource provider. This property may not be set if a response has not yet been received. + * Operation status code from the resource provider. This property may not be set if a response has not yet been + * received. */ - @JsonProperty(value = "statusCode", access = JsonProperty.Access.WRITE_ONLY) private String statusCode; /* - * Operation status message from the resource provider. This property is optional. It will only be provided if an error was received from the resource provider. + * Operation status message from the resource provider. This property is optional. It will only be provided if an + * error was received from the resource provider. */ - @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) private StatusMessage statusMessage; /* * The target resource. */ - @JsonProperty(value = "targetResource", access = JsonProperty.Access.WRITE_ONLY) private TargetResource targetResource; /* * The HTTP request message. */ - @JsonProperty(value = "request", access = JsonProperty.Access.WRITE_ONLY) private HttpMessage request; /* * The HTTP response message. */ - @JsonProperty(value = "response", access = JsonProperty.Access.WRITE_ONLY) private HttpMessage response; /** @@ -190,4 +187,60 @@ public void validate() { response().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentOperationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentOperationProperties 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 DeploymentOperationProperties. + */ + public static DeploymentOperationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentOperationProperties deserializedDeploymentOperationProperties + = new DeploymentOperationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningOperation".equals(fieldName)) { + deserializedDeploymentOperationProperties.provisioningOperation + = ProvisioningOperation.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedDeploymentOperationProperties.provisioningState = reader.getString(); + } else if ("timestamp".equals(fieldName)) { + deserializedDeploymentOperationProperties.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("duration".equals(fieldName)) { + deserializedDeploymentOperationProperties.duration = reader.getString(); + } else if ("serviceRequestId".equals(fieldName)) { + deserializedDeploymentOperationProperties.serviceRequestId = reader.getString(); + } else if ("statusCode".equals(fieldName)) { + deserializedDeploymentOperationProperties.statusCode = reader.getString(); + } else if ("statusMessage".equals(fieldName)) { + deserializedDeploymentOperationProperties.statusMessage = StatusMessage.fromJson(reader); + } else if ("targetResource".equals(fieldName)) { + deserializedDeploymentOperationProperties.targetResource = TargetResource.fromJson(reader); + } else if ("request".equals(fieldName)) { + deserializedDeploymentOperationProperties.request = HttpMessage.fromJson(reader); + } else if ("response".equals(fieldName)) { + deserializedDeploymentOperationProperties.response = HttpMessage.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentOperationProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentOperationsListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentOperationsListResult.java index ce537ff0e3ecc..2bb20ef8c660d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentOperationsListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentOperationsListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.DeploymentOperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of deployment operations. */ @Fluent -public final class DeploymentOperationsListResult { +public final class DeploymentOperationsListResult implements JsonSerializable { /* * An array of deployment operations. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** @@ -71,4 +73,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentOperationsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentOperationsListResult 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 DeploymentOperationsListResult. + */ + public static DeploymentOperationsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentOperationsListResult deserializedDeploymentOperationsListResult + = new DeploymentOperationsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DeploymentOperationInner.fromJson(reader1)); + deserializedDeploymentOperationsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDeploymentOperationsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentOperationsListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentParameter.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentParameter.java index c745b7177db49..bd6302f56c89d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentParameter.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentParameter.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.resources.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; /** * Deployment parameter for the template. */ @Fluent -public final class DeploymentParameter { +public final class DeploymentParameter implements JsonSerializable { /* * Input value to the parameter . */ - @JsonProperty(value = "value") private Object value; /* * Azure Key Vault parameter reference. */ - @JsonProperty(value = "reference") private KeyVaultParameterReference reference; /** @@ -80,4 +82,43 @@ public void validate() { reference().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeUntypedField("value", this.value); + jsonWriter.writeJsonField("reference", this.reference); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentParameter 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 DeploymentParameter. + */ + public static DeploymentParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentParameter deserializedDeploymentParameter = new DeploymentParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedDeploymentParameter.value = reader.readUntyped(); + } else if ("reference".equals(fieldName)) { + deserializedDeploymentParameter.reference = KeyVaultParameterReference.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentParameter; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentProperties.java index d2958b24148a4..274180bb102e0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentProperties.java @@ -6,62 +6,66 @@ 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; /** * Deployment properties. */ @Fluent -public class DeploymentProperties { +public class DeploymentProperties implements JsonSerializable { /* - * The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. + * The template content. You use this element when you want to pass the template syntax directly in the request + * rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the + * templateLink property or the template property, but not both. */ - @JsonProperty(value = "template") private Object template; /* * The URI of the template. Use either the templateLink property or the template property, but not both. */ - @JsonProperty(value = "templateLink") private TemplateLink templateLink; /* - * Name and value pairs that define the deployment parameters for the template. You use this element when you want to provide the parameter values directly in the request rather than link to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. It can be a JObject or a well formed JSON string. + * Name and value pairs that define the deployment parameters for the template. You use this element when you want + * to provide the parameter values directly in the request rather than link to an existing parameter file. Use + * either the parametersLink property or the parameters property, but not both. It can be a JObject or a well formed + * JSON string. */ - @JsonProperty(value = "parameters") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map parameters; /* - * The URI of parameters file. You use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both. + * The URI of parameters file. You use this element to link to an existing parameters file. Use either the + * parametersLink property or the parameters property, but not both. */ - @JsonProperty(value = "parametersLink") private ParametersLink parametersLink; /* - * The mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, resources are deployed without deleting existing resources that are not included in the template. In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted. Be careful when using Complete mode as you may unintentionally delete resources. + * The mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, + * resources are deployed without deleting existing resources that are not included in the template. In Complete + * mode, resources are deployed and existing resources in the resource group that are not included in the template + * are deleted. Be careful when using Complete mode as you may unintentionally delete resources. */ - @JsonProperty(value = "mode", required = true) private DeploymentMode mode; /* * The debug setting of the deployment. */ - @JsonProperty(value = "debugSetting") private DebugSetting debugSetting; /* * The deployment on error behavior. */ - @JsonProperty(value = "onErrorDeployment") private OnErrorDeployment onErrorDeployment; /* - * Specifies whether template expressions are evaluated within the scope of the parent template or nested template. Only applicable to nested templates. If not specified, default value is outer. + * Specifies whether template expressions are evaluated within the scope of the parent template or nested template. + * Only applicable to nested templates. If not specified, default value is outer. */ - @JsonProperty(value = "expressionEvaluationOptions") private ExpressionEvaluationOptions expressionEvaluationOptions; /** @@ -292,4 +296,65 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(DeploymentProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeUntypedField("template", this.template); + jsonWriter.writeJsonField("templateLink", this.templateLink); + jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("parametersLink", this.parametersLink); + jsonWriter.writeJsonField("debugSetting", this.debugSetting); + jsonWriter.writeJsonField("onErrorDeployment", this.onErrorDeployment); + jsonWriter.writeJsonField("expressionEvaluationOptions", this.expressionEvaluationOptions); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentProperties 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 DeploymentProperties. + */ + public static DeploymentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentProperties deserializedDeploymentProperties = new DeploymentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedDeploymentProperties.mode = DeploymentMode.fromString(reader.getString()); + } else if ("template".equals(fieldName)) { + deserializedDeploymentProperties.template = reader.readUntyped(); + } else if ("templateLink".equals(fieldName)) { + deserializedDeploymentProperties.templateLink = TemplateLink.fromJson(reader); + } else if ("parameters".equals(fieldName)) { + Map parameters + = reader.readMap(reader1 -> DeploymentParameter.fromJson(reader1)); + deserializedDeploymentProperties.parameters = parameters; + } else if ("parametersLink".equals(fieldName)) { + deserializedDeploymentProperties.parametersLink = ParametersLink.fromJson(reader); + } else if ("debugSetting".equals(fieldName)) { + deserializedDeploymentProperties.debugSetting = DebugSetting.fromJson(reader); + } else if ("onErrorDeployment".equals(fieldName)) { + deserializedDeploymentProperties.onErrorDeployment = OnErrorDeployment.fromJson(reader); + } else if ("expressionEvaluationOptions".equals(fieldName)) { + deserializedDeploymentProperties.expressionEvaluationOptions + = ExpressionEvaluationOptions.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentPropertiesExtended.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentPropertiesExtended.java index 00081a5c8df75..ee3d906776405 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentPropertiesExtended.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentPropertiesExtended.java @@ -6,8 +6,13 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.fluent.models.ProviderInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; @@ -15,109 +20,90 @@ * Deployment properties with additional details. */ @Immutable -public final class DeploymentPropertiesExtended { +public final class DeploymentPropertiesExtended implements JsonSerializable { /* * Denotes the state of provisioning. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* * The correlation ID of the deployment. */ - @JsonProperty(value = "correlationId", access = JsonProperty.Access.WRITE_ONLY) private String correlationId; /* * The timestamp of the template deployment. */ - @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime timestamp; /* * The duration of the template deployment. */ - @JsonProperty(value = "duration", access = JsonProperty.Access.WRITE_ONLY) private String duration; /* * Key/value pairs that represent deployment output. */ - @JsonProperty(value = "outputs", access = JsonProperty.Access.WRITE_ONLY) private Object outputs; /* * The list of resource providers needed for the deployment. */ - @JsonProperty(value = "providers", access = JsonProperty.Access.WRITE_ONLY) private List providers; /* * The list of deployment dependencies. */ - @JsonProperty(value = "dependencies", access = JsonProperty.Access.WRITE_ONLY) private List dependencies; /* * The URI referencing the template. */ - @JsonProperty(value = "templateLink", access = JsonProperty.Access.WRITE_ONLY) private TemplateLink templateLink; /* - * Deployment parameters. + * Deployment parameters. */ - @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) private Object parameters; /* - * The URI referencing the parameters. + * The URI referencing the parameters. */ - @JsonProperty(value = "parametersLink", access = JsonProperty.Access.WRITE_ONLY) private ParametersLink parametersLink; /* * The deployment mode. Possible values are Incremental and Complete. */ - @JsonProperty(value = "mode", access = JsonProperty.Access.WRITE_ONLY) private DeploymentMode mode; /* * The debug setting of the deployment. */ - @JsonProperty(value = "debugSetting", access = JsonProperty.Access.WRITE_ONLY) private DebugSetting debugSetting; /* * The deployment on error behavior. */ - @JsonProperty(value = "onErrorDeployment", access = JsonProperty.Access.WRITE_ONLY) private OnErrorDeploymentExtended onErrorDeployment; /* * The hash produced for the template. */ - @JsonProperty(value = "templateHash", access = JsonProperty.Access.WRITE_ONLY) private String templateHash; /* * Array of provisioned resources. */ - @JsonProperty(value = "outputResources", access = JsonProperty.Access.WRITE_ONLY) private List outputResources; /* * Array of validated resources. */ - @JsonProperty(value = "validatedResources", access = JsonProperty.Access.WRITE_ONLY) private List validatedResources; /* - * Error Response - * * The deployment error. */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) private ManagementError error; /** @@ -271,9 +257,7 @@ public List validatedResources() { } /** - * Get the error property: Error Response - * - * The deployment error. + * Get the error property: The deployment error. * * @return the error value. */ @@ -312,4 +296,80 @@ public void validate() { validatedResources().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentPropertiesExtended from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentPropertiesExtended 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 DeploymentPropertiesExtended. + */ + public static DeploymentPropertiesExtended fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentPropertiesExtended deserializedDeploymentPropertiesExtended = new DeploymentPropertiesExtended(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("correlationId".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.correlationId = reader.getString(); + } else if ("timestamp".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("duration".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.duration = reader.getString(); + } else if ("outputs".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.outputs = reader.readUntyped(); + } else if ("providers".equals(fieldName)) { + List providers = reader.readArray(reader1 -> ProviderInner.fromJson(reader1)); + deserializedDeploymentPropertiesExtended.providers = providers; + } else if ("dependencies".equals(fieldName)) { + List dependencies = reader.readArray(reader1 -> Dependency.fromJson(reader1)); + deserializedDeploymentPropertiesExtended.dependencies = dependencies; + } else if ("templateLink".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.templateLink = TemplateLink.fromJson(reader); + } else if ("parameters".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.parameters = reader.readUntyped(); + } else if ("parametersLink".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.parametersLink = ParametersLink.fromJson(reader); + } else if ("mode".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.mode = DeploymentMode.fromString(reader.getString()); + } else if ("debugSetting".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.debugSetting = DebugSetting.fromJson(reader); + } else if ("onErrorDeployment".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.onErrorDeployment + = OnErrorDeploymentExtended.fromJson(reader); + } else if ("templateHash".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.templateHash = reader.getString(); + } else if ("outputResources".equals(fieldName)) { + List outputResources + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedDeploymentPropertiesExtended.outputResources = outputResources; + } else if ("validatedResources".equals(fieldName)) { + List validatedResources + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedDeploymentPropertiesExtended.validatedResources = validatedResources; + } else if ("error".equals(fieldName)) { + deserializedDeploymentPropertiesExtended.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentPropertiesExtended; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackListResult.java index b31d0a031677d..4a1b4a8b2c8ab 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.DeploymentStackInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of Deployment stacks. */ @Fluent -public final class DeploymentStackListResult { +public final class DeploymentStackListResult implements JsonSerializable { /* * An array of Deployment stacks. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** @@ -71,4 +73,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStackListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStackListResult 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 DeploymentStackListResult. + */ + public static DeploymentStackListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStackListResult deserializedDeploymentStackListResult = new DeploymentStackListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DeploymentStackInner.fromJson(reader1)); + deserializedDeploymentStackListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDeploymentStackListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStackListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackProvisioningState.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackProvisioningState.java index 77422cb0b70ab..5d23ca8810379 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackProvisioningState.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -83,7 +82,6 @@ public DeploymentStackProvisioningState() { * @param name a name to look for. * @return the corresponding DeploymentStackProvisioningState. */ - @JsonCreator public static DeploymentStackProvisioningState fromString(String name) { return fromString(name, DeploymentStackProvisioningState.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackValidateProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackValidateProperties.java index 8d7a917b9dfa3..32979d3cd3b63 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackValidateProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStackValidateProperties.java @@ -5,8 +5,11 @@ package com.azure.resourcemanager.resources.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.List; import java.util.Map; @@ -14,54 +17,45 @@ * The Deployment stack validation result details. */ @Fluent -public final class DeploymentStackValidateProperties { +public final class DeploymentStackValidateProperties implements JsonSerializable { /* * Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. */ - @JsonProperty(value = "actionOnUnmanage") private ActionOnUnmanage actionOnUnmanage; /* * The correlation id of the Deployment stack validate operation. It is in GUID format and is used for tracing. */ - @JsonProperty(value = "correlationId") private String correlationId; /* * The Deployment stack deny settings. */ - @JsonProperty(value = "denySettings") private DenySettings denySettings; /* * The Deployment stack deployment scope. */ - @JsonProperty(value = "deploymentScope") private String deploymentScope; /* * The Deployment stack validation description. */ - @JsonProperty(value = "description") private String description; /* * Deployment parameters. */ - @JsonProperty(value = "parameters") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map parameters; /* * The URI of the template. */ - @JsonProperty(value = "templateLink") private DeploymentStacksTemplateLink templateLink; /* * The array of resources that were validated. */ - @JsonProperty(value = "validatedResources") private List validatedResources; /** @@ -260,4 +254,68 @@ public void validate() { validatedResources().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("actionOnUnmanage", this.actionOnUnmanage); + jsonWriter.writeStringField("correlationId", this.correlationId); + jsonWriter.writeJsonField("denySettings", this.denySettings); + jsonWriter.writeStringField("deploymentScope", this.deploymentScope); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("templateLink", this.templateLink); + jsonWriter.writeArrayField("validatedResources", this.validatedResources, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStackValidateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStackValidateProperties 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 DeploymentStackValidateProperties. + */ + public static DeploymentStackValidateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStackValidateProperties deserializedDeploymentStackValidateProperties + = new DeploymentStackValidateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actionOnUnmanage".equals(fieldName)) { + deserializedDeploymentStackValidateProperties.actionOnUnmanage = ActionOnUnmanage.fromJson(reader); + } else if ("correlationId".equals(fieldName)) { + deserializedDeploymentStackValidateProperties.correlationId = reader.getString(); + } else if ("denySettings".equals(fieldName)) { + deserializedDeploymentStackValidateProperties.denySettings = DenySettings.fromJson(reader); + } else if ("deploymentScope".equals(fieldName)) { + deserializedDeploymentStackValidateProperties.deploymentScope = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedDeploymentStackValidateProperties.description = reader.getString(); + } else if ("parameters".equals(fieldName)) { + Map parameters + = reader.readMap(reader1 -> DeploymentParameter.fromJson(reader1)); + deserializedDeploymentStackValidateProperties.parameters = parameters; + } else if ("templateLink".equals(fieldName)) { + deserializedDeploymentStackValidateProperties.templateLink + = DeploymentStacksTemplateLink.fromJson(reader); + } else if ("validatedResources".equals(fieldName)) { + List validatedResources + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedDeploymentStackValidateProperties.validatedResources = validatedResources; + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStackValidateProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksDebugSetting.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksDebugSetting.java index a0d2f290b65ee..b72657329e311 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksDebugSetting.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksDebugSetting.java @@ -5,17 +5,24 @@ package com.azure.resourcemanager.resources.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 debug setting. */ @Fluent -public final class DeploymentStacksDebugSetting { +public final class DeploymentStacksDebugSetting implements JsonSerializable { /* - * Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information that is being passed in during deployment. By logging information about the request or response, sensitive data that is retrieved through the deployment operations could potentially be exposed. + * Specifies the type of information to log for debugging. The permitted values are none, requestContent, + * responseContent, or both requestContent and responseContent separated by a comma. The default is none. When + * setting this value, carefully consider the type of information that is being passed in during deployment. By + * logging information about the request or response, sensitive data that is retrieved through the deployment + * operations could potentially be exposed. */ - @JsonProperty(value = "detailLevel") private String detailLevel; /** @@ -59,4 +66,40 @@ public DeploymentStacksDebugSetting withDetailLevel(String detailLevel) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("detailLevel", this.detailLevel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksDebugSetting from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksDebugSetting 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 DeploymentStacksDebugSetting. + */ + public static DeploymentStacksDebugSetting fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksDebugSetting deserializedDeploymentStacksDebugSetting = new DeploymentStacksDebugSetting(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("detailLevel".equals(fieldName)) { + deserializedDeploymentStacksDebugSetting.detailLevel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksDebugSetting; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksDeleteDetachEnum.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksDeleteDetachEnum.java index 72a7fa8645932..4e9319644aa9e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksDeleteDetachEnum.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksDeleteDetachEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -38,7 +37,6 @@ public DeploymentStacksDeleteDetachEnum() { * @param name a name to look for. * @return the corresponding DeploymentStacksDeleteDetachEnum. */ - @JsonCreator public static DeploymentStacksDeleteDetachEnum fromString(String name) { return fromString(name, DeploymentStacksDeleteDetachEnum.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksParametersLink.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksParametersLink.java index 490e65e74f2ce..607d3d4b1165c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksParametersLink.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksParametersLink.java @@ -6,23 +6,25 @@ 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; /** * Entity representing the reference to the deployment parameters. */ @Fluent -public final class DeploymentStacksParametersLink { +public final class DeploymentStacksParametersLink implements JsonSerializable { /* * The URI of the parameters file. */ - @JsonProperty(value = "uri", required = true) private String uri; /* * If included, must match the ContentVersion in the template. */ - @JsonProperty(value = "contentVersion") private String contentVersion; /** @@ -85,4 +87,45 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(DeploymentStacksParametersLink.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("contentVersion", this.contentVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksParametersLink from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksParametersLink 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 DeploymentStacksParametersLink. + */ + public static DeploymentStacksParametersLink fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksParametersLink deserializedDeploymentStacksParametersLink + = new DeploymentStacksParametersLink(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uri".equals(fieldName)) { + deserializedDeploymentStacksParametersLink.uri = reader.getString(); + } else if ("contentVersion".equals(fieldName)) { + deserializedDeploymentStacksParametersLink.contentVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksParametersLink; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksTemplateLink.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksTemplateLink.java index 758b5d2cf00b2..1b30e1a26da5f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksTemplateLink.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentStacksTemplateLink.java @@ -5,41 +5,42 @@ package com.azure.resourcemanager.resources.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; /** * Entity representing the reference to the template. */ @Fluent -public final class DeploymentStacksTemplateLink { +public final class DeploymentStacksTemplateLink implements JsonSerializable { /* * The URI of the template to deploy. Use either the uri or id property, but not both. */ - @JsonProperty(value = "uri") private String uri; /* * The resourceId of a Template Spec. Use either the id or uri property, but not both. */ - @JsonProperty(value = "id") private String id; /* - * The relativePath property can be used to deploy a linked template at a location relative to the parent. If the parent template was linked with a TemplateSpec, this will reference an artifact in the TemplateSpec. If the parent was linked with a URI, the child deployment will be a combination of the parent and relativePath URIs. + * The relativePath property can be used to deploy a linked template at a location relative to the parent. If the + * parent template was linked with a TemplateSpec, this will reference an artifact in the TemplateSpec. If the + * parent was linked with a URI, the child deployment will be a combination of the parent and relativePath URIs. */ - @JsonProperty(value = "relativePath") private String relativePath; /* * The query string (for example, a SAS token) to be used with the templateLink URI. */ - @JsonProperty(value = "queryString") private String queryString; /* * If included, must match the ContentVersion in the template. */ - @JsonProperty(value = "contentVersion") private String contentVersion; /** @@ -161,4 +162,52 @@ public DeploymentStacksTemplateLink withContentVersion(String contentVersion) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("relativePath", this.relativePath); + jsonWriter.writeStringField("queryString", this.queryString); + jsonWriter.writeStringField("contentVersion", this.contentVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksTemplateLink from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksTemplateLink 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 DeploymentStacksTemplateLink. + */ + public static DeploymentStacksTemplateLink fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksTemplateLink deserializedDeploymentStacksTemplateLink = new DeploymentStacksTemplateLink(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uri".equals(fieldName)) { + deserializedDeploymentStacksTemplateLink.uri = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedDeploymentStacksTemplateLink.id = reader.getString(); + } else if ("relativePath".equals(fieldName)) { + deserializedDeploymentStacksTemplateLink.relativePath = reader.getString(); + } else if ("queryString".equals(fieldName)) { + deserializedDeploymentStacksTemplateLink.queryString = reader.getString(); + } else if ("contentVersion".equals(fieldName)) { + deserializedDeploymentStacksTemplateLink.contentVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksTemplateLink; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIf.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIf.java index a051b79cfc4f2..7b966a16783a2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIf.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIf.java @@ -6,23 +6,25 @@ 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; /** * Deployment What-if operation parameters. */ @Fluent -public final class DeploymentWhatIf { +public final class DeploymentWhatIf implements JsonSerializable { /* * The location to store the deployment data. */ - @JsonProperty(value = "location") private String location; /* * The deployment properties. */ - @JsonProperty(value = "properties", required = true) private DeploymentWhatIfProperties properties; /** @@ -86,4 +88,44 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(DeploymentWhatIf.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("location", this.location); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentWhatIf from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentWhatIf 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 DeploymentWhatIf. + */ + public static DeploymentWhatIf fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentWhatIf deserializedDeploymentWhatIf = new DeploymentWhatIf(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedDeploymentWhatIf.properties = DeploymentWhatIfProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedDeploymentWhatIf.location = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentWhatIf; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIfProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIfProperties.java index 7f7d7914ca225..44ceefb76f2c5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIfProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIfProperties.java @@ -5,7 +5,10 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; /** @@ -16,7 +19,6 @@ public final class DeploymentWhatIfProperties extends DeploymentProperties { /* * Optional What-If operation settings. */ - @JsonProperty(value = "whatIfSettings") private DeploymentWhatIfSettings whatIfSettings; /** @@ -130,4 +132,68 @@ public void validate() { whatIfSettings().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", mode() == null ? null : mode().toString()); + jsonWriter.writeUntypedField("template", template()); + jsonWriter.writeJsonField("templateLink", templateLink()); + jsonWriter.writeMapField("parameters", parameters(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("parametersLink", parametersLink()); + jsonWriter.writeJsonField("debugSetting", debugSetting()); + jsonWriter.writeJsonField("onErrorDeployment", onErrorDeployment()); + jsonWriter.writeJsonField("expressionEvaluationOptions", expressionEvaluationOptions()); + jsonWriter.writeJsonField("whatIfSettings", this.whatIfSettings); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentWhatIfProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentWhatIfProperties 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 DeploymentWhatIfProperties. + */ + public static DeploymentWhatIfProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentWhatIfProperties deserializedDeploymentWhatIfProperties = new DeploymentWhatIfProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedDeploymentWhatIfProperties.withMode(DeploymentMode.fromString(reader.getString())); + } else if ("template".equals(fieldName)) { + deserializedDeploymentWhatIfProperties.withTemplate(reader.readUntyped()); + } else if ("templateLink".equals(fieldName)) { + deserializedDeploymentWhatIfProperties.withTemplateLink(TemplateLink.fromJson(reader)); + } else if ("parameters".equals(fieldName)) { + Map parameters + = reader.readMap(reader1 -> DeploymentParameter.fromJson(reader1)); + deserializedDeploymentWhatIfProperties.withParameters(parameters); + } else if ("parametersLink".equals(fieldName)) { + deserializedDeploymentWhatIfProperties.withParametersLink(ParametersLink.fromJson(reader)); + } else if ("debugSetting".equals(fieldName)) { + deserializedDeploymentWhatIfProperties.withDebugSetting(DebugSetting.fromJson(reader)); + } else if ("onErrorDeployment".equals(fieldName)) { + deserializedDeploymentWhatIfProperties.withOnErrorDeployment(OnErrorDeployment.fromJson(reader)); + } else if ("expressionEvaluationOptions".equals(fieldName)) { + deserializedDeploymentWhatIfProperties + .withExpressionEvaluationOptions(ExpressionEvaluationOptions.fromJson(reader)); + } else if ("whatIfSettings".equals(fieldName)) { + deserializedDeploymentWhatIfProperties.whatIfSettings = DeploymentWhatIfSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentWhatIfProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIfSettings.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIfSettings.java index 0bd37c6feef80..9949e288c9fb2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIfSettings.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentWhatIfSettings.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.resources.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; /** * Deployment What-If operation settings. */ @Fluent -public final class DeploymentWhatIfSettings { +public final class DeploymentWhatIfSettings implements JsonSerializable { /* * The format of the What-If results */ - @JsonProperty(value = "resultFormat") private WhatIfResultFormat resultFormat; /** @@ -51,4 +54,41 @@ public DeploymentWhatIfSettings withResultFormat(WhatIfResultFormat resultFormat */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resultFormat", this.resultFormat == null ? null : this.resultFormat.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentWhatIfSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentWhatIfSettings 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 DeploymentWhatIfSettings. + */ + public static DeploymentWhatIfSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentWhatIfSettings deserializedDeploymentWhatIfSettings = new DeploymentWhatIfSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resultFormat".equals(fieldName)) { + deserializedDeploymentWhatIfSettings.resultFormat + = WhatIfResultFormat.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentWhatIfSettings; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/EnforcementMode.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/EnforcementMode.java index ff7cfbb0a6b52..a5f55da18fbf8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/EnforcementMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/EnforcementMode.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public EnforcementMode() { * @param name a name to look for. * @return the corresponding EnforcementMode. */ - @JsonCreator public static EnforcementMode fromString(String name) { return fromString(name, EnforcementMode.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExemptionCategory.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExemptionCategory.java index 838d1920a04dc..f4baa90d77b2b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExemptionCategory.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExemptionCategory.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public ExemptionCategory() { * @param name a name to look for. * @return the corresponding ExemptionCategory. */ - @JsonCreator public static ExemptionCategory fromString(String name) { return fromString(name, ExemptionCategory.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExportTemplateOutputFormat.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExportTemplateOutputFormat.java index 3d6f0f6be293b..72555156bb7ea 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExportTemplateOutputFormat.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExportTemplateOutputFormat.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public ExportTemplateOutputFormat() { * @param name a name to look for. * @return the corresponding ExportTemplateOutputFormat. */ - @JsonCreator public static ExportTemplateOutputFormat fromString(String name) { return fromString(name, ExportTemplateOutputFormat.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExportTemplateRequest.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExportTemplateRequest.java index 0b2fc54f5779b..cdadd4e657538 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExportTemplateRequest.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExportTemplateRequest.java @@ -5,30 +5,32 @@ package com.azure.resourcemanager.resources.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; /** * Export resource group template request parameters. */ @Fluent -public final class ExportTemplateRequest { +public final class ExportTemplateRequest implements JsonSerializable { /* * The IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'. */ - @JsonProperty(value = "resources") private List resources; /* - * The export template options. A CSV-formatted list containing zero or more of the following: 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 'SkipAllParameterization' + * The export template options. A CSV-formatted list containing zero or more of the following: + * 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 'SkipAllParameterization' */ - @JsonProperty(value = "options") private String options; /* * The output format for the exported resources. */ - @JsonProperty(value = "outputFormat") private ExportTemplateOutputFormat outputFormat; /** @@ -110,4 +112,48 @@ public ExportTemplateRequest withOutputFormat(ExportTemplateOutputFormat outputF */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("resources", this.resources, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("options", this.options); + jsonWriter.writeStringField("outputFormat", this.outputFormat == null ? null : this.outputFormat.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportTemplateRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportTemplateRequest 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 ExportTemplateRequest. + */ + public static ExportTemplateRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportTemplateRequest deserializedExportTemplateRequest = new ExportTemplateRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resources".equals(fieldName)) { + List resources = reader.readArray(reader1 -> reader1.getString()); + deserializedExportTemplateRequest.resources = resources; + } else if ("options".equals(fieldName)) { + deserializedExportTemplateRequest.options = reader.getString(); + } else if ("outputFormat".equals(fieldName)) { + deserializedExportTemplateRequest.outputFormat + = ExportTemplateOutputFormat.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExportTemplateRequest; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExpressionEvaluationOptions.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExpressionEvaluationOptions.java index d7a701014b747..118aa381ff089 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExpressionEvaluationOptions.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExpressionEvaluationOptions.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.resources.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; /** * Specifies whether template expressions are evaluated within the scope of the parent template or nested template. */ @Fluent -public final class ExpressionEvaluationOptions { +public final class ExpressionEvaluationOptions implements JsonSerializable { /* * The scope to be used for evaluation of parameters, variables and functions in a nested template. */ - @JsonProperty(value = "scope") private ExpressionEvaluationOptionsScopeType scope; /** @@ -53,4 +56,41 @@ public ExpressionEvaluationOptions withScope(ExpressionEvaluationOptionsScopeTyp */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scope", this.scope == null ? null : this.scope.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExpressionEvaluationOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExpressionEvaluationOptions 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 ExpressionEvaluationOptions. + */ + public static ExpressionEvaluationOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExpressionEvaluationOptions deserializedExpressionEvaluationOptions = new ExpressionEvaluationOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scope".equals(fieldName)) { + deserializedExpressionEvaluationOptions.scope + = ExpressionEvaluationOptionsScopeType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExpressionEvaluationOptions; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExpressionEvaluationOptionsScopeType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExpressionEvaluationOptionsScopeType.java index ea2ac07d189e4..3659035bda39d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExpressionEvaluationOptionsScopeType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExpressionEvaluationOptionsScopeType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -43,7 +42,6 @@ public ExpressionEvaluationOptionsScopeType() { * @param name a name to look for. * @return the corresponding ExpressionEvaluationOptionsScopeType. */ - @JsonCreator public static ExpressionEvaluationOptionsScopeType fromString(String name) { return fromString(name, ExpressionEvaluationOptionsScopeType.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExtendedLocation.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExtendedLocation.java index 8a4c752629cdc..622683b6fd4a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExtendedLocation.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExtendedLocation.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.resources.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; /** * Resource extended location. */ @Fluent -public final class ExtendedLocation { +public final class ExtendedLocation implements JsonSerializable { /* * The extended location type. */ - @JsonProperty(value = "type") private ExtendedLocationType type; /* * The extended location name. */ - @JsonProperty(value = "name") private String name; /** @@ -77,4 +79,43 @@ public ExtendedLocation withName(String name) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtendedLocation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtendedLocation 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 ExtendedLocation. + */ + public static ExtendedLocation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtendedLocation deserializedExtendedLocation = new ExtendedLocation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedExtendedLocation.type = ExtendedLocationType.fromString(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedExtendedLocation.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExtendedLocation; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExtendedLocationType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExtendedLocationType.java index 069b92350685b..807d004fed8f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExtendedLocationType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ExtendedLocationType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public ExtendedLocationType() { * @param name a name to look for. * @return the corresponding ExtendedLocationType. */ - @JsonCreator public static ExtendedLocationType fromString(String name) { return fromString(name, ExtendedLocationType.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/FeatureOperationsListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/FeatureOperationsListResult.java index 500a954faeaca..01d985b8e0095 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/FeatureOperationsListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/FeatureOperationsListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.FeatureResultInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of previewed features. */ @Fluent -public final class FeatureOperationsListResult { +public final class FeatureOperationsListResult implements JsonSerializable { /* * The array of features. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@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 FeatureOperationsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureOperationsListResult 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 FeatureOperationsListResult. + */ + public static FeatureOperationsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FeatureOperationsListResult deserializedFeatureOperationsListResult = new FeatureOperationsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> FeatureResultInner.fromJson(reader1)); + deserializedFeatureOperationsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedFeatureOperationsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFeatureOperationsListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/FeatureProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/FeatureProperties.java index 46e66845752f3..1d4f2b834b5c8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/FeatureProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/FeatureProperties.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.resources.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; /** * Information about feature. */ @Fluent -public final class FeatureProperties { +public final class FeatureProperties implements JsonSerializable { /* * The registration state of the feature for the subscription. */ - @JsonProperty(value = "state") private String state; /** @@ -51,4 +54,40 @@ public FeatureProperties withState(String state) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureProperties 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 FeatureProperties. + */ + public static FeatureProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FeatureProperties deserializedFeatureProperties = new FeatureProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedFeatureProperties.state = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFeatureProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ForceDeletionResourceType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ForceDeletionResourceType.java index b4b2dd58fb155..df0275c06c2c6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ForceDeletionResourceType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ForceDeletionResourceType.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; @@ -26,7 +25,6 @@ public final class ForceDeletionResourceType extends ExpandableStringEnum { /* * HTTP message content. */ - @JsonProperty(value = "content") private Object content; /** @@ -51,4 +54,40 @@ public HttpMessage withContent(Object content) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeUntypedField("content", this.content); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HttpMessage from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HttpMessage 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 HttpMessage. + */ + public static HttpMessage fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HttpMessage deserializedHttpMessage = new HttpMessage(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("content".equals(fieldName)) { + deserializedHttpMessage.content = reader.readUntyped(); + } else { + reader.skipChildren(); + } + } + + return deserializedHttpMessage; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Identity.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Identity.java index ea8622b9f2eaf..867944d34536a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Identity.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Identity.java @@ -5,38 +5,39 @@ package com.azure.resourcemanager.resources.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; /** * Identity for the resource. */ @Fluent -public final class Identity { +public final class Identity implements JsonSerializable { /* * The principal ID of resource identity. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private String principalId; /* * The tenant ID of resource. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; /* * The identity type. */ - @JsonProperty(value = "type") private ResourceIdentityType type; /* - * The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * The list of user identities associated with the resource. The user identity dictionary key references will be ARM + * resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}'. */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; /** @@ -122,4 +123,50 @@ public void validate() { }); } } + + /** + * {@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 Identity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Identity 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 Identity. + */ + public static Identity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Identity deserializedIdentity = new Identity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedIdentity.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedIdentity.tenantId = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedIdentity.type = ResourceIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> IdentityUserAssignedIdentitiesValue.fromJson(reader1)); + deserializedIdentity.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedIdentity; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/IdentityUserAssignedIdentitiesValue.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/IdentityUserAssignedIdentitiesValue.java index dd785200dd9d6..5808634dfd652 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/IdentityUserAssignedIdentitiesValue.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/IdentityUserAssignedIdentitiesValue.java @@ -5,23 +5,26 @@ package com.azure.resourcemanager.resources.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; /** * The IdentityUserAssignedIdentitiesValue model. */ @Immutable -public final class IdentityUserAssignedIdentitiesValue { +public final class IdentityUserAssignedIdentitiesValue + implements JsonSerializable { /* * The principal id of user assigned identity. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private String principalId; /* * The client id of user assigned identity. */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private String clientId; /** @@ -55,4 +58,42 @@ public String clientId() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityUserAssignedIdentitiesValue from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityUserAssignedIdentitiesValue 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 IdentityUserAssignedIdentitiesValue. + */ + public static IdentityUserAssignedIdentitiesValue fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityUserAssignedIdentitiesValue deserializedIdentityUserAssignedIdentitiesValue + = new IdentityUserAssignedIdentitiesValue(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedIdentityUserAssignedIdentitiesValue.principalId = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedIdentityUserAssignedIdentitiesValue.clientId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityUserAssignedIdentitiesValue; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/KeyVaultParameterReference.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/KeyVaultParameterReference.java index 31cee62d3714b..0e19a2ff350bc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/KeyVaultParameterReference.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/KeyVaultParameterReference.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; /** * Azure Key Vault parameter reference. */ @Fluent -public final class KeyVaultParameterReference { +public final class KeyVaultParameterReference implements JsonSerializable { /* * Azure Key Vault reference. */ - @JsonProperty(value = "keyVault", required = true) private KeyVaultReference keyVault; /* * Azure Key Vault secret name. */ - @JsonProperty(value = "secretName", required = true) private String secretName; /* * Azure Key Vault secret version. */ - @JsonProperty(value = "secretVersion") private String secretVersion; /** @@ -118,4 +119,47 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(KeyVaultParameterReference.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("keyVault", this.keyVault); + jsonWriter.writeStringField("secretName", this.secretName); + jsonWriter.writeStringField("secretVersion", this.secretVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyVaultParameterReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyVaultParameterReference 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 KeyVaultParameterReference. + */ + public static KeyVaultParameterReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyVaultParameterReference deserializedKeyVaultParameterReference = new KeyVaultParameterReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVault".equals(fieldName)) { + deserializedKeyVaultParameterReference.keyVault = KeyVaultReference.fromJson(reader); + } else if ("secretName".equals(fieldName)) { + deserializedKeyVaultParameterReference.secretName = reader.getString(); + } else if ("secretVersion".equals(fieldName)) { + deserializedKeyVaultParameterReference.secretVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyVaultParameterReference; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/KeyVaultReference.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/KeyVaultReference.java index c863171093ca4..20a2ecffd3596 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/KeyVaultReference.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/KeyVaultReference.java @@ -6,17 +6,20 @@ 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; /** * Azure Key Vault reference. */ @Fluent -public final class KeyVaultReference { +public final class KeyVaultReference implements JsonSerializable { /* * Azure Key Vault resource id. */ - @JsonProperty(value = "id", required = true) private String id; /** @@ -58,4 +61,41 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(KeyVaultReference.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyVaultReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyVaultReference 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 KeyVaultReference. + */ + public static KeyVaultReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyVaultReference deserializedKeyVaultReference = new KeyVaultReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedKeyVaultReference.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyVaultReference; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationListResult.java index df7786bab9031..12b4a22c85f48 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationListResult.java @@ -5,19 +5,22 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.LocationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Location list operation response. */ @Fluent -public final class LocationListResult { +public final class LocationListResult implements JsonSerializable { /* * An array of locations. */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,41 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocationListResult 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 LocationListResult. + */ + public static LocationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocationListResult deserializedLocationListResult = new LocationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> LocationInner.fromJson(reader1)); + deserializedLocationListResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedLocationListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationMetadata.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationMetadata.java index 09d28d96a07ce..ca31eab5f1cc1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationMetadata.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationMetadata.java @@ -5,66 +5,61 @@ package com.azure.resourcemanager.resources.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; /** * Location metadata information. */ @Fluent -public final class LocationMetadata { +public final class LocationMetadata implements JsonSerializable { /* * The type of the region. */ - @JsonProperty(value = "regionType", access = JsonProperty.Access.WRITE_ONLY) private RegionType regionType; /* * The category of the region. */ - @JsonProperty(value = "regionCategory", access = JsonProperty.Access.WRITE_ONLY) private RegionCategory regionCategory; /* * The geography of the location. */ - @JsonProperty(value = "geography", access = JsonProperty.Access.WRITE_ONLY) private String geography; /* * The geography group of the location. */ - @JsonProperty(value = "geographyGroup", access = JsonProperty.Access.WRITE_ONLY) private String geographyGroup; /* * The longitude of the location. */ - @JsonProperty(value = "longitude", access = JsonProperty.Access.WRITE_ONLY) private String longitude; /* * The latitude of the location. */ - @JsonProperty(value = "latitude", access = JsonProperty.Access.WRITE_ONLY) private String latitude; /* * The physical location of the Azure location. */ - @JsonProperty(value = "physicalLocation", access = JsonProperty.Access.WRITE_ONLY) private String physicalLocation; /* * The regions paired to this region. */ - @JsonProperty(value = "pairedRegion") private List pairedRegion; /* * The home location of an edge zone. */ - @JsonProperty(value = "homeLocation", access = JsonProperty.Access.WRITE_ONLY) private String homeLocation; /** @@ -175,4 +170,57 @@ public void validate() { pairedRegion().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("pairedRegion", this.pairedRegion, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocationMetadata from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocationMetadata 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 LocationMetadata. + */ + public static LocationMetadata fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocationMetadata deserializedLocationMetadata = new LocationMetadata(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("regionType".equals(fieldName)) { + deserializedLocationMetadata.regionType = RegionType.fromString(reader.getString()); + } else if ("regionCategory".equals(fieldName)) { + deserializedLocationMetadata.regionCategory = RegionCategory.fromString(reader.getString()); + } else if ("geography".equals(fieldName)) { + deserializedLocationMetadata.geography = reader.getString(); + } else if ("geographyGroup".equals(fieldName)) { + deserializedLocationMetadata.geographyGroup = reader.getString(); + } else if ("longitude".equals(fieldName)) { + deserializedLocationMetadata.longitude = reader.getString(); + } else if ("latitude".equals(fieldName)) { + deserializedLocationMetadata.latitude = reader.getString(); + } else if ("physicalLocation".equals(fieldName)) { + deserializedLocationMetadata.physicalLocation = reader.getString(); + } else if ("pairedRegion".equals(fieldName)) { + List pairedRegion = reader.readArray(reader1 -> PairedRegion.fromJson(reader1)); + deserializedLocationMetadata.pairedRegion = pairedRegion; + } else if ("homeLocation".equals(fieldName)) { + deserializedLocationMetadata.homeLocation = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLocationMetadata; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationType.java index 17bb40c92dbfb..e315543514239 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LocationType.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The location type. */ @@ -36,7 +33,6 @@ public enum LocationType { * @param value the serialized value to parse. * @return the parsed LocationType object, or null if unable to parse. */ - @JsonCreator public static LocationType fromString(String value) { if (value == null) { return null; @@ -53,7 +49,6 @@ public static LocationType fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LockLevel.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LockLevel.java index c40e26125b33f..2057c590155a9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LockLevel.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/LockLevel.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -44,7 +43,6 @@ public LockLevel() { * @param name a name to look for. * @return the corresponding LockLevel. */ - @JsonCreator public static LockLevel fromString(String name) { return fromString(name, LockLevel.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagedByTenant.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagedByTenant.java index 32d618e108e10..20a0f058292c2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagedByTenant.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagedByTenant.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.resources.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; /** * Information about a tenant managing the subscription. */ @Immutable -public final class ManagedByTenant { +public final class ManagedByTenant implements JsonSerializable { /* * The tenant ID of the managing tenant. This is a GUID. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; /** @@ -40,4 +43,39 @@ public String tenantId() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedByTenant from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedByTenant 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 ManagedByTenant. + */ + public static ManagedByTenant fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedByTenant deserializedManagedByTenant = new ManagedByTenant(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tenantId".equals(fieldName)) { + deserializedManagedByTenant.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedByTenant; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagedResourceReference.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagedResourceReference.java index 52fb16e6b16c4..019a96e0a4b56 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagedResourceReference.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagedResourceReference.java @@ -5,7 +5,10 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The managed resource model. @@ -15,15 +18,18 @@ public final class ManagedResourceReference extends ResourceReference { /* * Current management state of the resource in the deployment stack. */ - @JsonProperty(value = "status") private ResourceStatusMode status; /* * denyAssignment settings applied to the resource. */ - @JsonProperty(value = "denyStatus") private DenyStatusMode denyStatus; + /* + * The resourceId of a resource managed by the deployment stack. + */ + private String id; + /** * Creates an instance of ManagedResourceReference class. */ @@ -70,6 +76,16 @@ public ManagedResourceReference withDenyStatus(DenyStatusMode denyStatus) { return this; } + /** + * Get the id property: The resourceId of a resource managed by the deployment stack. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Validates the instance. * @@ -79,4 +95,45 @@ public ManagedResourceReference withDenyStatus(DenyStatusMode denyStatus) { public void validate() { super.validate(); } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("denyStatus", this.denyStatus == null ? null : this.denyStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedResourceReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedResourceReference 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 ManagedResourceReference. + */ + public static ManagedResourceReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedResourceReference deserializedManagedResourceReference = new ManagedResourceReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedResourceReference.id = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedManagedResourceReference.status = ResourceStatusMode.fromString(reader.getString()); + } else if ("denyStatus".equals(fieldName)) { + deserializedManagedResourceReference.denyStatus = DenyStatusMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedResourceReference; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagementLockListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagementLockListResult.java index 5c725adada778..dc942d8c0ef20 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagementLockListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagementLockListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.ManagementLockObjectInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The list of locks. */ @Fluent -public final class ManagementLockListResult { +public final class ManagementLockListResult implements JsonSerializable { /* * The list of locks. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@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 ManagementLockListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagementLockListResult 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 ManagementLockListResult. + */ + public static ManagementLockListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagementLockListResult deserializedManagementLockListResult = new ManagementLockListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagementLockObjectInner.fromJson(reader1)); + deserializedManagementLockListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagementLockListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagementLockListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagementLockOwner.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagementLockOwner.java index c49b69fa1f239..301791b928a81 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagementLockOwner.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ManagementLockOwner.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.resources.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; /** * Lock owner properties. */ @Fluent -public final class ManagementLockOwner { +public final class ManagementLockOwner implements JsonSerializable { /* * The application ID of the lock owner. */ - @JsonProperty(value = "applicationId") private String applicationId; /** @@ -51,4 +54,40 @@ public ManagementLockOwner withApplicationId(String applicationId) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("applicationId", this.applicationId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagementLockOwner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagementLockOwner 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 ManagementLockOwner. + */ + public static ManagementLockOwner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagementLockOwner deserializedManagementLockOwner = new ManagementLockOwner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("applicationId".equals(fieldName)) { + deserializedManagementLockOwner.applicationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagementLockOwner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/NonComplianceMessage.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/NonComplianceMessage.java index 26bc20353a015..c6cd29abd9224 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/NonComplianceMessage.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/NonComplianceMessage.java @@ -6,24 +6,29 @@ 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; /** * A message that describes why a resource is non-compliant with the policy. This is shown in 'deny' error messages and * on resource's non-compliant compliance results. */ @Fluent -public final class NonComplianceMessage { +public final class NonComplianceMessage implements JsonSerializable { /* - * A message that describes why a resource is non-compliant with the policy. This is shown in 'deny' error messages and on resource's non-compliant compliance results. + * A message that describes why a resource is non-compliant with the policy. This is shown in 'deny' error messages + * and on resource's non-compliant compliance results. */ - @JsonProperty(value = "message", required = true) private String message; /* - * The policy definition reference ID within a policy set definition the message is intended for. This is only applicable if the policy assignment assigns a policy set definition. If this is not provided the message applies to all policies assigned by this policy assignment. + * The policy definition reference ID within a policy set definition the message is intended for. This is only + * applicable if the policy assignment assigns a policy set definition. If this is not provided the message applies + * to all policies assigned by this policy assignment. */ - @JsonProperty(value = "policyDefinitionReferenceId") private String policyDefinitionReferenceId; /** @@ -91,4 +96,44 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(NonComplianceMessage.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeStringField("policyDefinitionReferenceId", this.policyDefinitionReferenceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NonComplianceMessage from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NonComplianceMessage 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 NonComplianceMessage. + */ + public static NonComplianceMessage fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NonComplianceMessage deserializedNonComplianceMessage = new NonComplianceMessage(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("message".equals(fieldName)) { + deserializedNonComplianceMessage.message = reader.getString(); + } else if ("policyDefinitionReferenceId".equals(fieldName)) { + deserializedNonComplianceMessage.policyDefinitionReferenceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNonComplianceMessage; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeployment.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeployment.java index 97dd1236057af..53efc5f82bcb0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeployment.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeployment.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.resources.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; /** * Deployment on error behavior. */ @Fluent -public final class OnErrorDeployment { +public final class OnErrorDeployment implements JsonSerializable { /* * The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment. */ - @JsonProperty(value = "type") private OnErrorDeploymentType type; /* * The deployment to be used on error case. */ - @JsonProperty(value = "deploymentName") private String deploymentName; /** @@ -79,4 +81,43 @@ public OnErrorDeployment withDeploymentName(String deploymentName) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("deploymentName", this.deploymentName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OnErrorDeployment from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OnErrorDeployment 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 OnErrorDeployment. + */ + public static OnErrorDeployment fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OnErrorDeployment deserializedOnErrorDeployment = new OnErrorDeployment(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedOnErrorDeployment.type = OnErrorDeploymentType.fromString(reader.getString()); + } else if ("deploymentName".equals(fieldName)) { + deserializedOnErrorDeployment.deploymentName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOnErrorDeployment; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeploymentExtended.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeploymentExtended.java index db86b1cba0fb6..7df55b249c7c3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeploymentExtended.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeploymentExtended.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.resources.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; /** * Deployment on error behavior with additional details. */ @Fluent -public final class OnErrorDeploymentExtended { +public final class OnErrorDeploymentExtended implements JsonSerializable { /* * The state of the provisioning for the on error deployment. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /* * The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment. */ - @JsonProperty(value = "type") private OnErrorDeploymentType type; /* * The deployment to be used on error case. */ - @JsonProperty(value = "deploymentName") private String deploymentName; /** @@ -94,4 +95,45 @@ public OnErrorDeploymentExtended withDeploymentName(String deploymentName) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("deploymentName", this.deploymentName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OnErrorDeploymentExtended from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OnErrorDeploymentExtended 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 OnErrorDeploymentExtended. + */ + public static OnErrorDeploymentExtended fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OnErrorDeploymentExtended deserializedOnErrorDeploymentExtended = new OnErrorDeploymentExtended(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedOnErrorDeploymentExtended.provisioningState = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedOnErrorDeploymentExtended.type = OnErrorDeploymentType.fromString(reader.getString()); + } else if ("deploymentName".equals(fieldName)) { + deserializedOnErrorDeploymentExtended.deploymentName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOnErrorDeploymentExtended; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeploymentType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeploymentType.java index 718e57aa198a4..d3aa6204cc2f4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeploymentType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OnErrorDeploymentType.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment. */ @@ -36,7 +33,6 @@ public enum OnErrorDeploymentType { * @param value the serialized value to parse. * @return the parsed OnErrorDeploymentType object, or null if unable to parse. */ - @JsonCreator public static OnErrorDeploymentType fromString(String value) { if (value == null) { return null; @@ -53,7 +49,6 @@ public static OnErrorDeploymentType fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OperationDisplay.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OperationDisplay.java index 9370521038771..8f239d6960935 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OperationDisplay.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OperationDisplay.java @@ -5,35 +5,35 @@ package com.azure.resourcemanager.resources.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 object that represents the operation. */ @Fluent -public final class OperationDisplay { +public final class OperationDisplay implements JsonSerializable { /* * Service provider: Microsoft.Resources */ - @JsonProperty(value = "provider") private String provider; /* * Resource on which the operation is performed: Profile, endpoint, etc. */ - @JsonProperty(value = "resource") private String resource; /* * Operation type: Read, write, delete, etc. */ - @JsonProperty(value = "operation") private String operation; /* * Description of the operation. */ - @JsonProperty(value = "description") private String description; /** @@ -129,4 +129,49 @@ public OperationDisplay withDescription(String description) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", this.provider); + jsonWriter.writeStringField("resource", this.resource); + jsonWriter.writeStringField("operation", this.operation); + jsonWriter.writeStringField("description", this.description); + 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OperationListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OperationListResult.java index 0fa87f3d5224b..5124f432fcf28 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OperationListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OperationListResult.java @@ -5,8 +5,12 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -14,17 +18,15 @@ * the next set of results. */ @Fluent -public final class OperationListResult { +public final class OperationListResult implements JsonSerializable { /* * List of Microsoft.Resources operations. */ - @JsonProperty(value = "value") private List value; /* * URL to get the next set of operation list results if there are any. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -83,4 +85,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@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 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/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideKind.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideKind.java index 28faa300e15cb..f5f1d8233667c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideKind.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideKind.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public OverrideKind() { * @param name a name to look for. * @return the corresponding OverrideKind. */ - @JsonCreator public static OverrideKind fromString(String name) { return fromString(name, OverrideKind.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideModel.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideModel.java index 2fac661e712e7..5ecf5ef448977 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideModel.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/OverrideModel.java @@ -5,30 +5,31 @@ package com.azure.resourcemanager.resources.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; /** * The policy property value override. */ @Fluent -public final class OverrideModel { +public final class OverrideModel implements JsonSerializable { /* * The override kind. */ - @JsonProperty(value = "kind") private OverrideKind kind; /* * The value to override the policy property. */ - @JsonProperty(value = "value") private String value; /* * The list of the selector expressions. */ - @JsonProperty(value = "selectors") private List selectors; /** @@ -107,4 +108,47 @@ public void validate() { selectors().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeArrayField("selectors", this.selectors, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OverrideModel from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OverrideModel 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 OverrideModel. + */ + public static OverrideModel fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OverrideModel deserializedOverrideModel = new OverrideModel(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedOverrideModel.kind = OverrideKind.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedOverrideModel.value = reader.getString(); + } else if ("selectors".equals(fieldName)) { + List selectors = reader.readArray(reader1 -> Selector.fromJson(reader1)); + deserializedOverrideModel.selectors = selectors; + } else { + reader.skipChildren(); + } + } + + return deserializedOverrideModel; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PairedRegion.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PairedRegion.java index 89514a0328056..9a4bd8d29a570 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PairedRegion.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PairedRegion.java @@ -5,29 +5,31 @@ package com.azure.resourcemanager.resources.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; /** * Information regarding paired region. */ @Immutable -public final class PairedRegion { +public final class PairedRegion implements JsonSerializable { /* * The name of the paired region. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* - * The fully qualified ID of the location. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74/locations/westus. + * The fully qualified ID of the location. For example, + * /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74/locations/westus. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * The subscription ID. */ - @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; /** @@ -71,4 +73,43 @@ public String subscriptionId() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PairedRegion from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PairedRegion 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 PairedRegion. + */ + public static PairedRegion fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PairedRegion deserializedPairedRegion = new PairedRegion(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPairedRegion.name = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedPairedRegion.id = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedPairedRegion.subscriptionId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPairedRegion; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterDefinitionsValue.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterDefinitionsValue.java index 6398d029a160b..860097945f00a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterDefinitionsValue.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterDefinitionsValue.java @@ -5,36 +5,36 @@ package com.azure.resourcemanager.resources.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; /** * The definition of a parameter that can be provided to the policy. */ @Fluent -public final class ParameterDefinitionsValue { +public final class ParameterDefinitionsValue implements JsonSerializable { /* * The data type of the parameter. */ - @JsonProperty(value = "type") private ParameterType type; /* * The allowed values for the parameter. */ - @JsonProperty(value = "allowedValues") private List allowedValues; /* * The default value for the parameter if no value is provided. */ - @JsonProperty(value = "defaultValue") private Object defaultValue; /* * General metadata for the parameter. */ - @JsonProperty(value = "metadata") private ParameterDefinitionsValueMetadata metadata; /** @@ -133,4 +133,51 @@ public void validate() { metadata().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeArrayField("allowedValues", this.allowedValues, + (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeUntypedField("defaultValue", this.defaultValue); + jsonWriter.writeJsonField("metadata", this.metadata); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ParameterDefinitionsValue from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ParameterDefinitionsValue 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 ParameterDefinitionsValue. + */ + public static ParameterDefinitionsValue fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ParameterDefinitionsValue deserializedParameterDefinitionsValue = new ParameterDefinitionsValue(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedParameterDefinitionsValue.type = ParameterType.fromString(reader.getString()); + } else if ("allowedValues".equals(fieldName)) { + List allowedValues = reader.readArray(reader1 -> reader1.readUntyped()); + deserializedParameterDefinitionsValue.allowedValues = allowedValues; + } else if ("defaultValue".equals(fieldName)) { + deserializedParameterDefinitionsValue.defaultValue = reader.readUntyped(); + } else if ("metadata".equals(fieldName)) { + deserializedParameterDefinitionsValue.metadata = ParameterDefinitionsValueMetadata.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedParameterDefinitionsValue; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterDefinitionsValueMetadata.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterDefinitionsValueMetadata.java index 57bed654a0b74..dfff6d1832175 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterDefinitionsValueMetadata.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterDefinitionsValueMetadata.java @@ -5,46 +5,45 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.HashMap; +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.LinkedHashMap; import java.util.Map; /** * General metadata for the parameter. */ @Fluent -public final class ParameterDefinitionsValueMetadata { +public final class ParameterDefinitionsValueMetadata implements JsonSerializable { /* * The display name for the parameter. */ - @JsonProperty(value = "displayName") private String displayName; /* * The description of the parameter. */ - @JsonProperty(value = "description") private String description; /* - * Used when assigning the policy definition through the portal. Provides a context aware list of values for the user to choose from. + * Used when assigning the policy definition through the portal. Provides a context aware list of values for the + * user to choose from. */ - @JsonProperty(value = "strongType") private String strongType; /* - * Set to true to have Azure portal create role assignments on the resource ID or resource scope value of this parameter during policy assignment. This property is useful in case you wish to assign permissions outside the assignment scope. + * Set to true to have Azure portal create role assignments on the resource ID or resource scope value of this + * parameter during policy assignment. This property is useful in case you wish to assign permissions outside the + * assignment scope. */ - @JsonProperty(value = "assignPermissions") private Boolean assignPermissions; /* * General metadata for the parameter. */ - @JsonIgnore private Map additionalProperties; /** @@ -144,7 +143,6 @@ public ParameterDefinitionsValueMetadata withAssignPermissions(Boolean assignPer * * @return the additionalProperties value. */ - @JsonAnyGetter public Map additionalProperties() { return this.additionalProperties; } @@ -160,14 +158,6 @@ public ParameterDefinitionsValueMetadata withAdditionalProperties(Map(); - } - additionalProperties.put(key, value); - } - /** * Validates the instance. * @@ -175,4 +165,62 @@ void withAdditionalProperties(String key, Object value) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("strongType", this.strongType); + jsonWriter.writeBooleanField("assignPermissions", this.assignPermissions); + if (additionalProperties != null) { + for (Map.Entry additionalProperty : additionalProperties.entrySet()) { + jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ParameterDefinitionsValueMetadata from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ParameterDefinitionsValueMetadata 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 ParameterDefinitionsValueMetadata. + */ + public static ParameterDefinitionsValueMetadata fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ParameterDefinitionsValueMetadata deserializedParameterDefinitionsValueMetadata + = new ParameterDefinitionsValueMetadata(); + Map additionalProperties = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedParameterDefinitionsValueMetadata.displayName = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedParameterDefinitionsValueMetadata.description = reader.getString(); + } else if ("strongType".equals(fieldName)) { + deserializedParameterDefinitionsValueMetadata.strongType = reader.getString(); + } else if ("assignPermissions".equals(fieldName)) { + deserializedParameterDefinitionsValueMetadata.assignPermissions + = reader.getNullable(JsonReader::getBoolean); + } else { + if (additionalProperties == null) { + additionalProperties = new LinkedHashMap<>(); + } + + additionalProperties.put(fieldName, reader.readUntyped()); + } + } + deserializedParameterDefinitionsValueMetadata.additionalProperties = additionalProperties; + + return deserializedParameterDefinitionsValueMetadata; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterType.java index ad88acab67f4c..ae80ed6899e56 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -62,7 +61,6 @@ public ParameterType() { * @param name a name to look for. * @return the corresponding ParameterType. */ - @JsonCreator public static ParameterType fromString(String name) { return fromString(name, ParameterType.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterValuesValue.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterValuesValue.java index e05135234e60c..b4c7a039b66f4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterValuesValue.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParameterValuesValue.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.resources.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 value of a parameter. */ @Fluent -public final class ParameterValuesValue { +public final class ParameterValuesValue implements JsonSerializable { /* * The value of the parameter. */ - @JsonProperty(value = "value") private Object value; /** @@ -51,4 +54,40 @@ public ParameterValuesValue withValue(Object value) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeUntypedField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ParameterValuesValue from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ParameterValuesValue 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 ParameterValuesValue. + */ + public static ParameterValuesValue fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ParameterValuesValue deserializedParameterValuesValue = new ParameterValuesValue(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedParameterValuesValue.value = reader.readUntyped(); + } else { + reader.skipChildren(); + } + } + + return deserializedParameterValuesValue; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParametersLink.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParametersLink.java index 7346d01bb1834..0cfd4c0abc905 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParametersLink.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ParametersLink.java @@ -6,23 +6,25 @@ 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; /** * Entity representing the reference to the deployment parameters. */ @Fluent -public final class ParametersLink { +public final class ParametersLink implements JsonSerializable { /* * The URI of the parameters file. */ - @JsonProperty(value = "uri", required = true) private String uri; /* * If included, must match the ContentVersion in the template. */ - @JsonProperty(value = "contentVersion") private String contentVersion; /** @@ -84,4 +86,44 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ParametersLink.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("contentVersion", this.contentVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ParametersLink from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ParametersLink 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 ParametersLink. + */ + public static ParametersLink fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ParametersLink deserializedParametersLink = new ParametersLink(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uri".equals(fieldName)) { + deserializedParametersLink.uri = reader.getString(); + } else if ("contentVersion".equals(fieldName)) { + deserializedParametersLink.contentVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedParametersLink; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Peers.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Peers.java index 8ad8592ba7ea3..54f8e706e1933 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Peers.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Peers.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.resources.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; /** * Information about shared availability zone. */ @Immutable -public final class Peers { +public final class Peers implements JsonSerializable { /* * The subscription ID. */ - @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; /* * The availabilityZone. */ - @JsonProperty(value = "availabilityZone", access = JsonProperty.Access.WRITE_ONLY) private String availabilityZone; /** @@ -55,4 +57,41 @@ public String availabilityZone() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Peers from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Peers 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 Peers. + */ + public static Peers fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Peers deserializedPeers = new Peers(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("subscriptionId".equals(fieldName)) { + deserializedPeers.subscriptionId = reader.getString(); + } else if ("availabilityZone".equals(fieldName)) { + deserializedPeers.availabilityZone = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPeers; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Permission.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Permission.java index 67c92701fdfc9..2bff4c7f0372c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Permission.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Permission.java @@ -5,36 +5,36 @@ package com.azure.resourcemanager.resources.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; /** * Role definition permissions. */ @Fluent -public final class Permission { +public final class Permission implements JsonSerializable { /* * Allowed actions. */ - @JsonProperty(value = "actions") private List actions; /* * Denied actions. */ - @JsonProperty(value = "notActions") private List notActions; /* * Allowed Data actions. */ - @JsonProperty(value = "dataActions") private List dataActions; /* * Denied Data actions. */ - @JsonProperty(value = "notDataActions") private List notDataActions; /** @@ -130,4 +130,54 @@ public Permission withNotDataActions(List notDataActions) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("notActions", this.notActions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("dataActions", this.dataActions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("notDataActions", this.notDataActions, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Permission from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Permission 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 Permission. + */ + public static Permission fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Permission deserializedPermission = new Permission(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actions".equals(fieldName)) { + List actions = reader.readArray(reader1 -> reader1.getString()); + deserializedPermission.actions = actions; + } else if ("notActions".equals(fieldName)) { + List notActions = reader.readArray(reader1 -> reader1.getString()); + deserializedPermission.notActions = notActions; + } else if ("dataActions".equals(fieldName)) { + List dataActions = reader.readArray(reader1 -> reader1.getString()); + deserializedPermission.dataActions = dataActions; + } else if ("notDataActions".equals(fieldName)) { + List notDataActions = reader.readArray(reader1 -> reader1.getString()); + deserializedPermission.notDataActions = notDataActions; + } else { + reader.skipChildren(); + } + } + + return deserializedPermission; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Plan.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Plan.java index 6e4dcdf0313a5..77f0d824cecd7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Plan.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Plan.java @@ -5,41 +5,40 @@ package com.azure.resourcemanager.resources.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; /** * Plan for the resource. */ @Fluent -public final class Plan { +public final class Plan implements JsonSerializable { /* * The plan ID. */ - @JsonProperty(value = "name") private String name; /* * The publisher ID. */ - @JsonProperty(value = "publisher") private String publisher; /* * The offer ID. */ - @JsonProperty(value = "product") private String product; /* * The promotion code. */ - @JsonProperty(value = "promotionCode") private String promotionCode; /* * The plan's version. */ - @JsonProperty(value = "version") private String version; /** @@ -155,4 +154,52 @@ public Plan withVersion(String version) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("publisher", this.publisher); + jsonWriter.writeStringField("product", this.product); + jsonWriter.writeStringField("promotionCode", this.promotionCode); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Plan from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Plan 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 Plan. + */ + public static Plan fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Plan deserializedPlan = new Plan(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPlan.name = reader.getString(); + } else if ("publisher".equals(fieldName)) { + deserializedPlan.publisher = reader.getString(); + } else if ("product".equals(fieldName)) { + deserializedPlan.product = reader.getString(); + } else if ("promotionCode".equals(fieldName)) { + deserializedPlan.promotionCode = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedPlan.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPlan; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyAssignmentListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyAssignmentListResult.java index 7f931d750a57a..27ddb467d5408 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyAssignmentListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyAssignmentListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.PolicyAssignmentInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of policy assignments. */ @Fluent -public final class PolicyAssignmentListResult { +public final class PolicyAssignmentListResult implements JsonSerializable { /* * An array of policy assignments. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@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 PolicyAssignmentListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyAssignmentListResult 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 PolicyAssignmentListResult. + */ + public static PolicyAssignmentListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyAssignmentListResult deserializedPolicyAssignmentListResult = new PolicyAssignmentListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PolicyAssignmentInner.fromJson(reader1)); + deserializedPolicyAssignmentListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPolicyAssignmentListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyAssignmentListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyAssignmentUpdate.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyAssignmentUpdate.java index 6fbe778d127f6..084b3d11f4ebd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyAssignmentUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyAssignmentUpdate.java @@ -5,31 +5,32 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.PolicyAssignmentUpdateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The policy assignment for Patch request. */ @Fluent -public final class PolicyAssignmentUpdate { +public final class PolicyAssignmentUpdate implements JsonSerializable { /* * The policy assignment properties for Patch request. */ - @JsonProperty(value = "properties") private PolicyAssignmentUpdateProperties innerProperties; /* * The location of the policy assignment. Only required when utilizing managed identity. */ - @JsonProperty(value = "location") private String location; /* * The managed identity associated with the policy assignment. */ - @JsonProperty(value = "identity") private Identity identity; /** @@ -146,4 +147,47 @@ public void validate() { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyAssignmentUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyAssignmentUpdate 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 PolicyAssignmentUpdate. + */ + public static PolicyAssignmentUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyAssignmentUpdate deserializedPolicyAssignmentUpdate = new PolicyAssignmentUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedPolicyAssignmentUpdate.innerProperties + = PolicyAssignmentUpdateProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedPolicyAssignmentUpdate.location = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedPolicyAssignmentUpdate.identity = Identity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyAssignmentUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionGroup.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionGroup.java index 08f318f132878..b7b1cffe968e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionGroup.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionGroup.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; /** * The policy definition group. */ @Fluent -public final class PolicyDefinitionGroup { +public final class PolicyDefinitionGroup implements JsonSerializable { /* * The name of the group. */ - @JsonProperty(value = "name", required = true) private String name; /* * The group's display name. */ - @JsonProperty(value = "displayName") private String displayName; /* * The group's category. */ - @JsonProperty(value = "category") private String category; /* * The group's description. */ - @JsonProperty(value = "description") private String description; /* * A resource ID of a resource that contains additional metadata about the group. */ - @JsonProperty(value = "additionalMetadataId") private String additionalMetadataId; /** @@ -164,4 +163,53 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PolicyDefinitionGroup.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("category", this.category); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("additionalMetadataId", this.additionalMetadataId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyDefinitionGroup from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyDefinitionGroup 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 PolicyDefinitionGroup. + */ + public static PolicyDefinitionGroup fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyDefinitionGroup deserializedPolicyDefinitionGroup = new PolicyDefinitionGroup(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPolicyDefinitionGroup.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedPolicyDefinitionGroup.displayName = reader.getString(); + } else if ("category".equals(fieldName)) { + deserializedPolicyDefinitionGroup.category = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedPolicyDefinitionGroup.description = reader.getString(); + } else if ("additionalMetadataId".equals(fieldName)) { + deserializedPolicyDefinitionGroup.additionalMetadataId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyDefinitionGroup; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionListResult.java index 202e2ce87fa2b..45aa09d8030ba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.PolicyDefinitionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of policy definitions. */ @Fluent -public final class PolicyDefinitionListResult { +public final class PolicyDefinitionListResult implements JsonSerializable { /* * An array of policy definitions. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@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 PolicyDefinitionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyDefinitionListResult 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 PolicyDefinitionListResult. + */ + public static PolicyDefinitionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyDefinitionListResult deserializedPolicyDefinitionListResult = new PolicyDefinitionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PolicyDefinitionInner.fromJson(reader1)); + deserializedPolicyDefinitionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPolicyDefinitionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyDefinitionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionReference.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionReference.java index e401d87f937f6..eb4f9c85778c5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionReference.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyDefinitionReference.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.List; import java.util.Map; @@ -15,30 +18,25 @@ * The policy definition reference. */ @Fluent -public final class PolicyDefinitionReference { +public final class PolicyDefinitionReference implements JsonSerializable { /* * The ID of the policy definition or policy set definition. */ - @JsonProperty(value = "policyDefinitionId", required = true) private String policyDefinitionId; /* * The parameter values for the referenced policy rule. The keys are the parameter names. */ - @JsonProperty(value = "parameters") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map parameters; /* * A unique id (within the policy set definition) for this policy definition reference. */ - @JsonProperty(value = "policyDefinitionReferenceId") private String policyDefinitionReferenceId; /* * The name of the groups that this policy definition reference belongs to. */ - @JsonProperty(value = "groupNames") private List groupNames; /** @@ -152,4 +150,53 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PolicyDefinitionReference.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("policyDefinitionId", this.policyDefinitionId); + jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("policyDefinitionReferenceId", this.policyDefinitionReferenceId); + jsonWriter.writeArrayField("groupNames", this.groupNames, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyDefinitionReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyDefinitionReference 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 PolicyDefinitionReference. + */ + public static PolicyDefinitionReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyDefinitionReference deserializedPolicyDefinitionReference = new PolicyDefinitionReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("policyDefinitionId".equals(fieldName)) { + deserializedPolicyDefinitionReference.policyDefinitionId = reader.getString(); + } else if ("parameters".equals(fieldName)) { + Map parameters + = reader.readMap(reader1 -> ParameterValuesValue.fromJson(reader1)); + deserializedPolicyDefinitionReference.parameters = parameters; + } else if ("policyDefinitionReferenceId".equals(fieldName)) { + deserializedPolicyDefinitionReference.policyDefinitionReferenceId = reader.getString(); + } else if ("groupNames".equals(fieldName)) { + List groupNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPolicyDefinitionReference.groupNames = groupNames; + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyDefinitionReference; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyExemptionListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyExemptionListResult.java index ae7694bad005a..110f799b7f1c2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyExemptionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyExemptionListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.PolicyExemptionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of policy exemptions. */ @Fluent -public final class PolicyExemptionListResult { +public final class PolicyExemptionListResult implements JsonSerializable { /* * An array of policy exemptions. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** @@ -71,4 +73,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyExemptionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyExemptionListResult 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 PolicyExemptionListResult. + */ + public static PolicyExemptionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyExemptionListResult deserializedPolicyExemptionListResult = new PolicyExemptionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PolicyExemptionInner.fromJson(reader1)); + deserializedPolicyExemptionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPolicyExemptionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyExemptionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyExemptionUpdate.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyExemptionUpdate.java index 66f79b0960d8b..b6512f956b1d2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyExemptionUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyExemptionUpdate.java @@ -5,19 +5,22 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.PolicyExemptionUpdateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The policy exemption for Patch request. */ @Fluent -public final class PolicyExemptionUpdate { +public final class PolicyExemptionUpdate implements JsonSerializable { /* * The policy exemption properties for Patch request. */ - @JsonProperty(value = "properties") private PolicyExemptionUpdateProperties innerProperties; /** @@ -93,4 +96,41 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicyExemptionUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicyExemptionUpdate 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 PolicyExemptionUpdate. + */ + public static PolicyExemptionUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicyExemptionUpdate deserializedPolicyExemptionUpdate = new PolicyExemptionUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedPolicyExemptionUpdate.innerProperties + = PolicyExemptionUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicyExemptionUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicySetDefinitionListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicySetDefinitionListResult.java index da81e2fca1896..e0ec7418d419a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicySetDefinitionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicySetDefinitionListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.PolicySetDefinitionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of policy set definitions. */ @Fluent -public final class PolicySetDefinitionListResult { +public final class PolicySetDefinitionListResult implements JsonSerializable { /* * An array of policy set definitions. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,46 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@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 PolicySetDefinitionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicySetDefinitionListResult 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 PolicySetDefinitionListResult. + */ + public static PolicySetDefinitionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicySetDefinitionListResult deserializedPolicySetDefinitionListResult + = new PolicySetDefinitionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PolicySetDefinitionInner.fromJson(reader1)); + deserializedPolicySetDefinitionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPolicySetDefinitionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicySetDefinitionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyType.java index 54c856d8228c5..695fef4b60899 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PolicyType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -47,7 +46,6 @@ public PolicyType() { * @param name a name to look for. * @return the corresponding PolicyType. */ - @JsonCreator public static PolicyType fromString(String name) { return fromString(name, PolicyType.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PropertyChangeType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PropertyChangeType.java index 4e799b541e13a..4039bbd6743df 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PropertyChangeType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/PropertyChangeType.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The type of property change. */ @@ -51,7 +48,6 @@ public enum PropertyChangeType { * @param value the serialized value to parse. * @return the parsed PropertyChangeType object, or null if unable to parse. */ - @JsonCreator public static PropertyChangeType fromString(String value) { if (value == null) { return null; @@ -68,7 +64,6 @@ public static PropertyChangeType fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderAuthorizationConsentState.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderAuthorizationConsentState.java index ce635249d2363..9234ef0e7af94 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderAuthorizationConsentState.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderAuthorizationConsentState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -47,7 +46,6 @@ public ProviderAuthorizationConsentState() { * @param name a name to look for. * @return the corresponding ProviderAuthorizationConsentState. */ - @JsonCreator public static ProviderAuthorizationConsentState fromString(String name) { return fromString(name, ProviderAuthorizationConsentState.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderConsentDefinition.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderConsentDefinition.java index 8615a3bd82db3..e7127c6ea51d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderConsentDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderConsentDefinition.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.resources.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 provider consent. */ @Fluent -public final class ProviderConsentDefinition { +public final class ProviderConsentDefinition implements JsonSerializable { /* * A value indicating whether authorization is consented or not. */ - @JsonProperty(value = "consentToAuthorization") private Boolean consentToAuthorization; /** @@ -51,4 +54,41 @@ public ProviderConsentDefinition withConsentToAuthorization(Boolean consentToAut */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("consentToAuthorization", this.consentToAuthorization); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProviderConsentDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderConsentDefinition 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 ProviderConsentDefinition. + */ + public static ProviderConsentDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderConsentDefinition deserializedProviderConsentDefinition = new ProviderConsentDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("consentToAuthorization".equals(fieldName)) { + deserializedProviderConsentDefinition.consentToAuthorization + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedProviderConsentDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderExtendedLocation.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderExtendedLocation.java index 8b4ebc1fdf7a4..39b5bc17b40f9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderExtendedLocation.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderExtendedLocation.java @@ -5,30 +5,31 @@ package com.azure.resourcemanager.resources.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; /** * The provider extended location. */ @Fluent -public final class ProviderExtendedLocation { +public final class ProviderExtendedLocation implements JsonSerializable { /* * The azure location. */ - @JsonProperty(value = "location") private String location; /* * The extended location type. */ - @JsonProperty(value = "type") private String type; /* * The extended locations for the azure location. */ - @JsonProperty(value = "extendedLocations") private List extendedLocations; /** @@ -104,4 +105,48 @@ public ProviderExtendedLocation withExtendedLocations(List extendedLocat */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeArrayField("extendedLocations", this.extendedLocations, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProviderExtendedLocation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderExtendedLocation 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 ProviderExtendedLocation. + */ + public static ProviderExtendedLocation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderExtendedLocation deserializedProviderExtendedLocation = new ProviderExtendedLocation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedProviderExtendedLocation.location = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedProviderExtendedLocation.type = reader.getString(); + } else if ("extendedLocations".equals(fieldName)) { + List extendedLocations = reader.readArray(reader1 -> reader1.getString()); + deserializedProviderExtendedLocation.extendedLocations = extendedLocations; + } else { + reader.skipChildren(); + } + } + + return deserializedProviderExtendedLocation; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderListResult.java index 3e36de6f97c6e..79d549cb5d27c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.ProviderInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of resource providers. */ @Fluent -public final class ProviderListResult { +public final class ProviderListResult implements JsonSerializable { /* * An array of resource providers. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** @@ -71,4 +73,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProviderListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderListResult 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 ProviderListResult. + */ + public static ProviderListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderListResult deserializedProviderListResult = new ProviderListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ProviderInner.fromJson(reader1)); + deserializedProviderListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedProviderListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedProviderListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderPermission.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderPermission.java index 214a2acc0c0ed..20fcfdd158060 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderPermission.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderPermission.java @@ -5,35 +5,35 @@ package com.azure.resourcemanager.resources.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 provider permission. */ @Fluent -public final class ProviderPermission { +public final class ProviderPermission implements JsonSerializable { /* * The application id. */ - @JsonProperty(value = "applicationId") private String applicationId; /* * Role definition properties. */ - @JsonProperty(value = "roleDefinition") private RoleDefinition roleDefinition; /* * Role definition properties. */ - @JsonProperty(value = "managedByRoleDefinition") private RoleDefinition managedByRoleDefinition; /* * The provider authorization consent state. */ - @JsonProperty(value = "providerAuthorizationConsentState") private ProviderAuthorizationConsentState providerAuthorizationConsentState; /** @@ -136,4 +136,51 @@ public void validate() { managedByRoleDefinition().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("applicationId", this.applicationId); + jsonWriter.writeJsonField("roleDefinition", this.roleDefinition); + jsonWriter.writeJsonField("managedByRoleDefinition", this.managedByRoleDefinition); + jsonWriter.writeStringField("providerAuthorizationConsentState", + this.providerAuthorizationConsentState == null ? null : this.providerAuthorizationConsentState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProviderPermission from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderPermission 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 ProviderPermission. + */ + public static ProviderPermission fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderPermission deserializedProviderPermission = new ProviderPermission(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("applicationId".equals(fieldName)) { + deserializedProviderPermission.applicationId = reader.getString(); + } else if ("roleDefinition".equals(fieldName)) { + deserializedProviderPermission.roleDefinition = RoleDefinition.fromJson(reader); + } else if ("managedByRoleDefinition".equals(fieldName)) { + deserializedProviderPermission.managedByRoleDefinition = RoleDefinition.fromJson(reader); + } else if ("providerAuthorizationConsentState".equals(fieldName)) { + deserializedProviderPermission.providerAuthorizationConsentState + = ProviderAuthorizationConsentState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedProviderPermission; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderRegistrationRequest.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderRegistrationRequest.java index d3c557aa692c0..07f195f351bf0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderRegistrationRequest.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderRegistrationRequest.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.resources.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 provider registration definition. */ @Fluent -public final class ProviderRegistrationRequest { +public final class ProviderRegistrationRequest implements JsonSerializable { /* * The provider consent. */ - @JsonProperty(value = "thirdPartyProviderConsent") private ProviderConsentDefinition thirdPartyProviderConsent; /** @@ -55,4 +58,41 @@ public void validate() { thirdPartyProviderConsent().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("thirdPartyProviderConsent", this.thirdPartyProviderConsent); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProviderRegistrationRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderRegistrationRequest 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 ProviderRegistrationRequest. + */ + public static ProviderRegistrationRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderRegistrationRequest deserializedProviderRegistrationRequest = new ProviderRegistrationRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("thirdPartyProviderConsent".equals(fieldName)) { + deserializedProviderRegistrationRequest.thirdPartyProviderConsent + = ProviderConsentDefinition.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedProviderRegistrationRequest; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderResourceType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderResourceType.java index ccf7af85ff95c..5246d3382bdbb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderResourceType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProviderResourceType.java @@ -5,8 +5,11 @@ package com.azure.resourcemanager.resources.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.List; import java.util.Map; @@ -14,66 +17,55 @@ * Resource type managed by the resource provider. */ @Fluent -public final class ProviderResourceType { +public final class ProviderResourceType implements JsonSerializable { /* * The resource type. */ - @JsonProperty(value = "resourceType") private String resourceType; /* * The collection of locations where this resource type can be created. */ - @JsonProperty(value = "locations") private List locations; /* * The location mappings that are supported by this resource type. */ - @JsonProperty(value = "locationMappings") private List locationMappings; /* * The aliases that are supported by this resource type. */ - @JsonProperty(value = "aliases") private List aliases; /* * The API version. */ - @JsonProperty(value = "apiVersions") private List apiVersions; /* * The default API version. */ - @JsonProperty(value = "defaultApiVersion", access = JsonProperty.Access.WRITE_ONLY) private String defaultApiVersion; /* * The zoneMappings property. */ - @JsonProperty(value = "zoneMappings") private List zoneMappings; /* * The API profiles for the resource provider. */ - @JsonProperty(value = "apiProfiles", access = JsonProperty.Access.WRITE_ONLY) private List apiProfiles; /* * The additional capabilities offered by this resource type. */ - @JsonProperty(value = "capabilities") private String capabilities; /* * The properties. */ - @JsonProperty(value = "properties") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map properties; /** @@ -279,4 +271,74 @@ public void validate() { apiProfiles().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceType", this.resourceType); + jsonWriter.writeArrayField("locations", this.locations, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("locationMappings", this.locationMappings, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("aliases", this.aliases, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("apiVersions", this.apiVersions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("zoneMappings", this.zoneMappings, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("capabilities", this.capabilities); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProviderResourceType from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderResourceType 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 ProviderResourceType. + */ + public static ProviderResourceType fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderResourceType deserializedProviderResourceType = new ProviderResourceType(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceType".equals(fieldName)) { + deserializedProviderResourceType.resourceType = reader.getString(); + } else if ("locations".equals(fieldName)) { + List locations = reader.readArray(reader1 -> reader1.getString()); + deserializedProviderResourceType.locations = locations; + } else if ("locationMappings".equals(fieldName)) { + List locationMappings + = reader.readArray(reader1 -> ProviderExtendedLocation.fromJson(reader1)); + deserializedProviderResourceType.locationMappings = locationMappings; + } else if ("aliases".equals(fieldName)) { + List aliases = reader.readArray(reader1 -> Alias.fromJson(reader1)); + deserializedProviderResourceType.aliases = aliases; + } else if ("apiVersions".equals(fieldName)) { + List apiVersions = reader.readArray(reader1 -> reader1.getString()); + deserializedProviderResourceType.apiVersions = apiVersions; + } else if ("defaultApiVersion".equals(fieldName)) { + deserializedProviderResourceType.defaultApiVersion = reader.getString(); + } else if ("zoneMappings".equals(fieldName)) { + List zoneMappings = reader.readArray(reader1 -> ZoneMapping.fromJson(reader1)); + deserializedProviderResourceType.zoneMappings = zoneMappings; + } else if ("apiProfiles".equals(fieldName)) { + List apiProfiles = reader.readArray(reader1 -> ApiProfile.fromJson(reader1)); + deserializedProviderResourceType.apiProfiles = apiProfiles; + } else if ("capabilities".equals(fieldName)) { + deserializedProviderResourceType.capabilities = reader.getString(); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedProviderResourceType.properties = properties; + } else { + reader.skipChildren(); + } + } + + return deserializedProviderResourceType; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProvisioningOperation.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProvisioningOperation.java index aadc49fe2bdf4..d34a627d73fee 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProvisioningOperation.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProvisioningOperation.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The name of the current provisioning operation. */ @@ -76,7 +73,6 @@ public enum ProvisioningOperation { * @param value the serialized value to parse. * @return the parsed ProvisioningOperation object, or null if unable to parse. */ - @JsonCreator public static ProvisioningOperation fromString(String value) { if (value == null) { return null; @@ -93,7 +89,6 @@ public static ProvisioningOperation fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProvisioningState.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProvisioningState.java index 1b1a361ba0611..1f4f6e82c1f65 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProvisioningState.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -87,7 +86,6 @@ public ProvisioningState() { * @param name a name to look for. * @return the corresponding ProvisioningState. */ - @JsonCreator public static ProvisioningState fromString(String name) { return fromString(name, ProvisioningState.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RegionCategory.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RegionCategory.java index 7cc8326a6afbb..e46a3814fadf3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RegionCategory.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RegionCategory.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public RegionCategory() { * @param name a name to look for. * @return the corresponding RegionCategory. */ - @JsonCreator public static RegionCategory fromString(String name) { return fromString(name, RegionCategory.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RegionType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RegionType.java index 418dc483e84f6..51bb6d8ba4963 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RegionType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RegionType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public RegionType() { * @param name a name to look for. * @return the corresponding RegionType. */ - @JsonCreator public static RegionType fromString(String name) { return fromString(name, RegionType.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceChangeType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceChangeType.java index eb00ba6da6d48..0a2a6297cda21 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceChangeType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceChangeType.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The type of change that was captured in the resource. */ @@ -41,7 +38,6 @@ public enum ResourceChangeType { * @param value the serialized value to parse. * @return the parsed ResourceChangeType object, or null if unable to parse. */ - @JsonCreator public static ResourceChangeType fromString(String value) { if (value == null) { return null; @@ -58,7 +54,6 @@ public static ResourceChangeType fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupListResult.java index 926a5ce2858ee..9938940908123 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.ResourceGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of resource groups. */ @Fluent -public final class ResourceGroupListResult { +public final class ResourceGroupListResult implements JsonSerializable { /* * An array of resource groups. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** @@ -71,4 +73,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceGroupListResult 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 ResourceGroupListResult. + */ + public static ResourceGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceGroupListResult deserializedResourceGroupListResult = new ResourceGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ResourceGroupInner.fromJson(reader1)); + deserializedResourceGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedResourceGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceGroupListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupPatchable.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupPatchable.java index 5880524f4d7c5..91bd0f385b23d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupPatchable.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupPatchable.java @@ -5,38 +5,36 @@ package com.azure.resourcemanager.resources.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; /** * Resource group information. */ @Fluent -public final class ResourceGroupPatchable { +public final class ResourceGroupPatchable implements JsonSerializable { /* * The name of the resource group. */ - @JsonProperty(value = "name") private String name; /* * The resource group properties. */ - @JsonProperty(value = "properties") private ResourceGroupProperties properties; /* * The ID of the resource that manages this resource group. */ - @JsonProperty(value = "managedBy") private String managedBy; /* * The tags attached to the resource group. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** @@ -135,4 +133,50 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("managedBy", this.managedBy); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceGroupPatchable from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceGroupPatchable 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 ResourceGroupPatchable. + */ + public static ResourceGroupPatchable fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceGroupPatchable deserializedResourceGroupPatchable = new ResourceGroupPatchable(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedResourceGroupPatchable.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedResourceGroupPatchable.properties = ResourceGroupProperties.fromJson(reader); + } else if ("managedBy".equals(fieldName)) { + deserializedResourceGroupPatchable.managedBy = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedResourceGroupPatchable.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceGroupPatchable; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupProperties.java index c63f0d6f3f7ec..6f7a5212eb7e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroupProperties.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.resources.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; /** * The resource group properties. */ @Immutable -public final class ResourceGroupProperties { +public final class ResourceGroupProperties implements JsonSerializable { /* - * The provisioning state. + * The provisioning state. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /** @@ -40,4 +43,39 @@ public String provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceGroupProperties 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 ResourceGroupProperties. + */ + public static ResourceGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceGroupProperties deserializedResourceGroupProperties = new ResourceGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedResourceGroupProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceGroupProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceIdentityType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceIdentityType.java index 9c21ce81ca4eb..c7f94fe1b09fc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceIdentityType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceIdentityType.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The identity type. */ @@ -46,7 +43,6 @@ public enum ResourceIdentityType { * @param value the serialized value to parse. * @return the parsed ResourceIdentityType object, or null if unable to parse. */ - @JsonCreator public static ResourceIdentityType fromString(String value) { if (value == null) { return null; @@ -63,7 +59,6 @@ public static ResourceIdentityType fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceListResult.java index 421e3d5484e79..56d4d25dbf27c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.GenericResourceExpandedInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of resource groups. */ @Fluent -public final class ResourceListResult { +public final class ResourceListResult implements JsonSerializable { /* * An array of resources. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** @@ -71,4 +73,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceListResult 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 ResourceListResult. + */ + public static ResourceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceListResult deserializedResourceListResult = new ResourceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> GenericResourceExpandedInner.fromJson(reader1)); + deserializedResourceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedResourceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceName.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceName.java index 2f8b3dfeb2fff..bc821bf00b1ed 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceName.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceName.java @@ -6,23 +6,25 @@ 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; /** * Name and Type of the Resource. */ @Fluent -public final class ResourceName { +public final class ResourceName implements JsonSerializable { /* * Name of the resource */ - @JsonProperty(value = "name", required = true) private String name; /* * The type of the resource */ - @JsonProperty(value = "type", required = true) private String type; /** @@ -88,4 +90,44 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ResourceName.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceName from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceName 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 ResourceName. + */ + public static ResourceName fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceName deserializedResourceName = new ResourceName(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedResourceName.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedResourceName.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceName; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceNameStatus.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceNameStatus.java index a195c753540fe..d680bb57c8135 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceNameStatus.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceNameStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public ResourceNameStatus() { * @param name a name to look for. * @return the corresponding ResourceNameStatus. */ - @JsonCreator public static ResourceNameStatus fromString(String name) { return fromString(name, ResourceNameStatus.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourcePropertyChangeType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourcePropertyChangeType.java index f183bd949c689..d6cced8b76a1a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourcePropertyChangeType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourcePropertyChangeType.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The type of change that occurred. */ @@ -41,7 +38,6 @@ public enum ResourcePropertyChangeType { * @param value the serialized value to parse. * @return the parsed ResourcePropertyChangeType object, or null if unable to parse. */ - @JsonCreator public static ResourcePropertyChangeType fromString(String value) { if (value == null) { return null; @@ -58,7 +54,6 @@ public static ResourcePropertyChangeType fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java index 5ddb06ebc5c51..d426ef4c736b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReference.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.resources.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; /** * The resource Id model. */ @Immutable -public class ResourceReference { +public class ResourceReference implements JsonSerializable { /* * The fully qualified resource Id. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /** @@ -40,4 +43,39 @@ public String id() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceReference 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 ResourceReference. + */ + public static ResourceReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceReference deserializedResourceReference = new ResourceReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedResourceReference.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceReference; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReferenceExtended.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReferenceExtended.java index cad17ccc65143..7c0a4e5200d01 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReferenceExtended.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceReferenceExtended.java @@ -6,7 +6,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The resourceId extended model. This is used to document failed resources with a resourceId and a corresponding error. @@ -16,9 +19,13 @@ public final class ResourceReferenceExtended extends ResourceReference { /* * The error detail. */ - @JsonProperty(value = "error") private ManagementError error; + /* + * The resourceId of a resource managed by the deployment stack. + */ + private String id; + /** * Creates an instance of ResourceReferenceExtended class. */ @@ -45,6 +52,16 @@ public ResourceReferenceExtended withError(ManagementError error) { return this; } + /** + * Get the id property: The resourceId of a resource managed by the deployment stack. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Validates the instance. * @@ -54,4 +71,42 @@ public ResourceReferenceExtended withError(ManagementError error) { public void validate() { super.validate(); } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceReferenceExtended from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceReferenceExtended 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 ResourceReferenceExtended. + */ + public static ResourceReferenceExtended fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceReferenceExtended deserializedResourceReferenceExtended = new ResourceReferenceExtended(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedResourceReferenceExtended.id = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedResourceReferenceExtended.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceReferenceExtended; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceSelector.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceSelector.java index 4c0f75b53d6c3..c3659917e0d63 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceSelector.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceSelector.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.resources.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; /** * The resource selector to filter policies by resource properties. */ @Fluent -public final class ResourceSelector { +public final class ResourceSelector implements JsonSerializable { /* * The name of the resource selector. */ - @JsonProperty(value = "name") private String name; /* * The list of the selector expressions. */ - @JsonProperty(value = "selectors") private List selectors; /** @@ -81,4 +83,44 @@ public void validate() { selectors().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("selectors", this.selectors, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSelector from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSelector 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 ResourceSelector. + */ + public static ResourceSelector fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSelector deserializedResourceSelector = new ResourceSelector(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedResourceSelector.name = reader.getString(); + } else if ("selectors".equals(fieldName)) { + List selectors = reader.readArray(reader1 -> Selector.fromJson(reader1)); + deserializedResourceSelector.selectors = selectors; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSelector; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceStatusMode.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceStatusMode.java index 14b5250e0c949..9296088a19f13 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceStatusMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceStatusMode.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public ResourceStatusMode() { * @param name a name to look for. * @return the corresponding ResourceStatusMode. */ - @JsonCreator public static ResourceStatusMode fromString(String name) { return fromString(name, ResourceStatusMode.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceTypeAliases.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceTypeAliases.java index 3b042d8330644..194ab8c5f4fb5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceTypeAliases.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceTypeAliases.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.resources.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; /** * The resource type aliases definition. */ @Fluent -public final class ResourceTypeAliases { +public final class ResourceTypeAliases implements JsonSerializable { /* * The resource type name. */ - @JsonProperty(value = "resourceType") private String resourceType; /* * The aliases for property names. */ - @JsonProperty(value = "aliases") private List aliases; /** @@ -81,4 +83,44 @@ public void validate() { aliases().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceType", this.resourceType); + jsonWriter.writeArrayField("aliases", this.aliases, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeAliases from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeAliases 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 ResourceTypeAliases. + */ + public static ResourceTypeAliases fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeAliases deserializedResourceTypeAliases = new ResourceTypeAliases(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceType".equals(fieldName)) { + deserializedResourceTypeAliases.resourceType = reader.getString(); + } else if ("aliases".equals(fieldName)) { + List aliases = reader.readArray(reader1 -> Alias.fromJson(reader1)); + deserializedResourceTypeAliases.aliases = aliases; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeAliases; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourcesMoveInfo.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourcesMoveInfo.java index abd85cf04e18f..d635101ee83a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourcesMoveInfo.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourcesMoveInfo.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.resources.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; /** * Parameters of move resources. */ @Fluent -public final class ResourcesMoveInfo { +public final class ResourcesMoveInfo implements JsonSerializable { /* * The IDs of the resources. */ - @JsonProperty(value = "resources") private List resources; /* * The target resource group. */ - @JsonProperty(value = "targetResourceGroup") private String targetResourceGroup; /** @@ -78,4 +80,44 @@ public ResourcesMoveInfo withTargetResourceGroup(String targetResourceGroup) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("resources", this.resources, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("targetResourceGroup", this.targetResourceGroup); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourcesMoveInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourcesMoveInfo 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 ResourcesMoveInfo. + */ + public static ResourcesMoveInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourcesMoveInfo deserializedResourcesMoveInfo = new ResourcesMoveInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resources".equals(fieldName)) { + List resources = reader.readArray(reader1 -> reader1.getString()); + deserializedResourcesMoveInfo.resources = resources; + } else if ("targetResourceGroup".equals(fieldName)) { + deserializedResourcesMoveInfo.targetResourceGroup = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourcesMoveInfo; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RoleDefinition.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RoleDefinition.java index a67054f52f8fc..dcad3b31e1247 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RoleDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/RoleDefinition.java @@ -5,42 +5,41 @@ package com.azure.resourcemanager.resources.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; /** * Role definition properties. */ @Fluent -public final class RoleDefinition { +public final class RoleDefinition implements JsonSerializable { /* * The role definition ID. */ - @JsonProperty(value = "id") private String id; /* * The role definition name. */ - @JsonProperty(value = "name") private String name; /* * If this is a service role. */ - @JsonProperty(value = "isServiceRole") private Boolean isServiceRole; /* * Role definition permissions. */ - @JsonProperty(value = "permissions") private List permissions; /* * Role definition assignable scopes. */ - @JsonProperty(value = "scopes") private List scopes; /** @@ -159,4 +158,54 @@ public void validate() { permissions().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeBooleanField("isServiceRole", this.isServiceRole); + jsonWriter.writeArrayField("permissions", this.permissions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoleDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoleDefinition 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 RoleDefinition. + */ + public static RoleDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoleDefinition deserializedRoleDefinition = new RoleDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRoleDefinition.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRoleDefinition.name = reader.getString(); + } else if ("isServiceRole".equals(fieldName)) { + deserializedRoleDefinition.isServiceRole = reader.getNullable(JsonReader::getBoolean); + } else if ("permissions".equals(fieldName)) { + List permissions = reader.readArray(reader1 -> Permission.fromJson(reader1)); + deserializedRoleDefinition.permissions = permissions; + } else if ("scopes".equals(fieldName)) { + List scopes = reader.readArray(reader1 -> reader1.getString()); + deserializedRoleDefinition.scopes = scopes; + } else { + reader.skipChildren(); + } + } + + return deserializedRoleDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ScopedDeployment.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ScopedDeployment.java index 586b28a2d8b59..c5c44d89a57e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ScopedDeployment.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ScopedDeployment.java @@ -6,32 +6,31 @@ 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; /** * Deployment operation parameters. */ @Fluent -public final class ScopedDeployment { +public final class ScopedDeployment implements JsonSerializable { /* * The location to store the deployment data. */ - @JsonProperty(value = "location", required = true) private String location; /* * The deployment properties. */ - @JsonProperty(value = "properties", required = true) private DeploymentProperties properties; /* * Deployment tags */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** @@ -119,4 +118,48 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ScopedDeployment.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScopedDeployment from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScopedDeployment 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 ScopedDeployment. + */ + public static ScopedDeployment fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScopedDeployment deserializedScopedDeployment = new ScopedDeployment(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedScopedDeployment.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedScopedDeployment.properties = DeploymentProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedScopedDeployment.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedScopedDeployment; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ScopedDeploymentWhatIf.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ScopedDeploymentWhatIf.java index 756d788a7b986..3ad6d29326904 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ScopedDeploymentWhatIf.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ScopedDeploymentWhatIf.java @@ -6,23 +6,25 @@ 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; /** * Deployment What-if operation parameters. */ @Fluent -public final class ScopedDeploymentWhatIf { +public final class ScopedDeploymentWhatIf implements JsonSerializable { /* * The location to store the deployment data. */ - @JsonProperty(value = "location", required = true) private String location; /* * The deployment properties. */ - @JsonProperty(value = "properties", required = true) private DeploymentWhatIfProperties properties; /** @@ -92,4 +94,44 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ScopedDeploymentWhatIf.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScopedDeploymentWhatIf from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScopedDeploymentWhatIf 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 ScopedDeploymentWhatIf. + */ + public static ScopedDeploymentWhatIf fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScopedDeploymentWhatIf deserializedScopedDeploymentWhatIf = new ScopedDeploymentWhatIf(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedScopedDeploymentWhatIf.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedScopedDeploymentWhatIf.properties = DeploymentWhatIfProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScopedDeploymentWhatIf; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Selector.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Selector.java index 812bc7278dff0..93cc522e0e863 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Selector.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Selector.java @@ -5,30 +5,31 @@ package com.azure.resourcemanager.resources.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; /** * The selector expression. */ @Fluent -public final class Selector { +public final class Selector implements JsonSerializable { /* * The selector kind. */ - @JsonProperty(value = "kind") private SelectorKind kind; /* * The list of values to filter in. */ - @JsonProperty(value = "in") private List in; /* * The list of values to filter out. */ - @JsonProperty(value = "notIn") private List notIn; /** @@ -104,4 +105,48 @@ public Selector withNotIn(List notIn) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeArrayField("in", this.in, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("notIn", this.notIn, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Selector from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Selector 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 Selector. + */ + public static Selector fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Selector deserializedSelector = new Selector(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedSelector.kind = SelectorKind.fromString(reader.getString()); + } else if ("in".equals(fieldName)) { + List in = reader.readArray(reader1 -> reader1.getString()); + deserializedSelector.in = in; + } else if ("notIn".equals(fieldName)) { + List notIn = reader.readArray(reader1 -> reader1.getString()); + deserializedSelector.notIn = notIn; + } else { + reader.skipChildren(); + } + } + + return deserializedSelector; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SelectorKind.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SelectorKind.java index 6c163c3951aaf..3a67798752653 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SelectorKind.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SelectorKind.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -47,7 +46,6 @@ public SelectorKind() { * @param name a name to look for. * @return the corresponding SelectorKind. */ - @JsonCreator public static SelectorKind fromString(String name) { return fromString(name, SelectorKind.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Sku.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Sku.java index b0665110be908..0054b66f2401f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Sku.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Sku.java @@ -5,47 +5,45 @@ package com.azure.resourcemanager.resources.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; /** * SKU for the resource. */ @Fluent -public final class Sku { +public final class Sku implements JsonSerializable { /* * The SKU name. */ - @JsonProperty(value = "name") private String name; /* * The SKU tier. */ - @JsonProperty(value = "tier") private String tier; /* * The SKU size. */ - @JsonProperty(value = "size") private String size; /* * The SKU family. */ - @JsonProperty(value = "family") private String family; /* * The SKU model. */ - @JsonProperty(value = "model") private String model; /* * The SKU capacity. */ - @JsonProperty(value = "capacity") private Integer capacity; /** @@ -181,4 +179,55 @@ public Sku withCapacity(Integer capacity) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("tier", this.tier); + jsonWriter.writeStringField("size", this.size); + jsonWriter.writeStringField("family", this.family); + jsonWriter.writeStringField("model", this.model); + jsonWriter.writeNumberField("capacity", this.capacity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Sku from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Sku 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 Sku. + */ + public static Sku fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Sku deserializedSku = new Sku(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSku.name = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedSku.tier = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedSku.size = reader.getString(); + } else if ("family".equals(fieldName)) { + deserializedSku.family = reader.getString(); + } else if ("model".equals(fieldName)) { + deserializedSku.model = reader.getString(); + } else if ("capacity".equals(fieldName)) { + deserializedSku.capacity = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedSku; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SpendingLimit.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SpendingLimit.java index b12ee32b0151b..85495e7189b2e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SpendingLimit.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SpendingLimit.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The subscription spending limit. */ @@ -41,7 +38,6 @@ public enum SpendingLimit { * @param value the serialized value to parse. * @return the parsed SpendingLimit object, or null if unable to parse. */ - @JsonCreator public static SpendingLimit fromString(String value) { if (value == null) { return null; @@ -58,7 +54,6 @@ public static SpendingLimit fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/StatusMessage.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/StatusMessage.java index c6fbe4707a4fe..0f5497561f4cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/StatusMessage.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/StatusMessage.java @@ -6,25 +6,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; -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; /** * Operation status message object. */ @Fluent -public final class StatusMessage { +public final class StatusMessage implements JsonSerializable { /* * Status of the deployment operation. */ - @JsonProperty(value = "status") private String status; /* - * Error Response - * * The error reported by the operation. */ - @JsonProperty(value = "error") private ManagementError error; /** @@ -54,9 +54,7 @@ public StatusMessage withStatus(String status) { } /** - * Get the error property: Error Response - * - * The error reported by the operation. + * Get the error property: The error reported by the operation. * * @return the error value. */ @@ -65,9 +63,7 @@ public ManagementError error() { } /** - * Set the error property: Error Response - * - * The error reported by the operation. + * Set the error property: The error reported by the operation. * * @param error the error value to set. * @return the StatusMessage object itself. @@ -84,4 +80,43 @@ public StatusMessage withError(ManagementError error) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StatusMessage from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StatusMessage 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 StatusMessage. + */ + public static StatusMessage fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StatusMessage deserializedStatusMessage = new StatusMessage(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedStatusMessage.status = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedStatusMessage.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStatusMessage; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationApprovalType.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationApprovalType.java index e5b9066bd37bb..440fdf0a44ca2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationApprovalType.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationApprovalType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -43,7 +42,6 @@ public SubscriptionFeatureRegistrationApprovalType() { * @param name a name to look for. * @return the corresponding SubscriptionFeatureRegistrationApprovalType. */ - @JsonCreator public static SubscriptionFeatureRegistrationApprovalType fromString(String name) { return fromString(name, SubscriptionFeatureRegistrationApprovalType.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationList.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationList.java index ef3576a295fe2..939e9cf91a2d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationList.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationList.java @@ -5,25 +5,28 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.SubscriptionFeatureRegistrationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The list of subscription feature registrations. */ @Fluent -public final class SubscriptionFeatureRegistrationList { +public final class SubscriptionFeatureRegistrationList + implements JsonSerializable { /* * The link used to get the next page of subscription feature registrations list. */ - @JsonProperty(value = "nextLink") private String nextLink; /* * The list of subscription feature registrations. */ - @JsonProperty(value = "value") private List value; /** @@ -82,4 +85,46 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionFeatureRegistrationList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionFeatureRegistrationList 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 SubscriptionFeatureRegistrationList. + */ + public static SubscriptionFeatureRegistrationList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionFeatureRegistrationList deserializedSubscriptionFeatureRegistrationList + = new SubscriptionFeatureRegistrationList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationList.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SubscriptionFeatureRegistrationInner.fromJson(reader1)); + deserializedSubscriptionFeatureRegistrationList.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionFeatureRegistrationList; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationProperties.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationProperties.java index 572923853785b..d1e72903fced3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationProperties.java @@ -5,8 +5,12 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; @@ -14,90 +18,76 @@ * The SubscriptionFeatureRegistrationProperties model. */ @Fluent -public final class SubscriptionFeatureRegistrationProperties { +public final class SubscriptionFeatureRegistrationProperties + implements JsonSerializable { /* * The tenantId. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; /* * The subscriptionId. */ - @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; /* * The featureName. */ - @JsonProperty(value = "featureName", access = JsonProperty.Access.WRITE_ONLY) private String featureName; /* * The featureDisplayName. */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) private String displayName; /* * The providerNamespace. */ - @JsonProperty(value = "providerNamespace", access = JsonProperty.Access.WRITE_ONLY) private String providerNamespace; /* * The state. */ - @JsonProperty(value = "state") private SubscriptionFeatureRegistrationState state; /* * Authorization Profile */ - @JsonProperty(value = "authorizationProfile") private AuthorizationProfile authorizationProfile; /* * Key-value pairs for meta data. */ - @JsonProperty(value = "metadata") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map metadata; /* * The feature release date. */ - @JsonProperty(value = "releaseDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime releaseDate; /* * The feature registration date. */ - @JsonProperty(value = "registrationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime registrationDate; /* * The feature documentation link. */ - @JsonProperty(value = "documentationLink", access = JsonProperty.Access.WRITE_ONLY) private String documentationLink; /* * The feature approval type. */ - @JsonProperty(value = "approvalType", access = JsonProperty.Access.WRITE_ONLY) private SubscriptionFeatureRegistrationApprovalType approvalType; /* * Indicates whether feature should be displayed in Portal. */ - @JsonProperty(value = "shouldFeatureDisplayInPortal") private Boolean shouldFeatureDisplayInPortal; /* * The feature description. */ - @JsonProperty(value = "description") private String description; /** @@ -299,4 +289,78 @@ public void validate() { authorizationProfile().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeJsonField("authorizationProfile", this.authorizationProfile); + jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("shouldFeatureDisplayInPortal", this.shouldFeatureDisplayInPortal); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionFeatureRegistrationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionFeatureRegistrationProperties 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 SubscriptionFeatureRegistrationProperties. + */ + public static SubscriptionFeatureRegistrationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionFeatureRegistrationProperties deserializedSubscriptionFeatureRegistrationProperties + = new SubscriptionFeatureRegistrationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tenantId".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.tenantId = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.subscriptionId = reader.getString(); + } else if ("featureName".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.featureName = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.displayName = reader.getString(); + } else if ("providerNamespace".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.providerNamespace = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.state + = SubscriptionFeatureRegistrationState.fromString(reader.getString()); + } else if ("authorizationProfile".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.authorizationProfile + = AuthorizationProfile.fromJson(reader); + } else if ("metadata".equals(fieldName)) { + Map metadata = reader.readMap(reader1 -> reader1.getString()); + deserializedSubscriptionFeatureRegistrationProperties.metadata = metadata; + } else if ("releaseDate".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.releaseDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("registrationDate".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.registrationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("documentationLink".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.documentationLink = reader.getString(); + } else if ("approvalType".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.approvalType + = SubscriptionFeatureRegistrationApprovalType.fromString(reader.getString()); + } else if ("shouldFeatureDisplayInPortal".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.shouldFeatureDisplayInPortal + = reader.getNullable(JsonReader::getBoolean); + } else if ("description".equals(fieldName)) { + deserializedSubscriptionFeatureRegistrationProperties.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionFeatureRegistrationProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationState.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationState.java index d7172c64961b8..8eff92828a998 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationState.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionFeatureRegistrationState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -63,7 +62,6 @@ public SubscriptionFeatureRegistrationState() { * @param name a name to look for. * @return the corresponding SubscriptionFeatureRegistrationState. */ - @JsonCreator public static SubscriptionFeatureRegistrationState fromString(String name) { return fromString(name, SubscriptionFeatureRegistrationState.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionListResult.java index f8cc8ed682cbd..cecc7ba9e0e45 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionListResult.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.resources.fluent.models.SubscriptionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Subscription list operation response. */ @Fluent -public final class SubscriptionListResult { +public final class SubscriptionListResult implements JsonSerializable { /* * An array of subscriptions. */ - @JsonProperty(value = "value") private List value; /* * The URL to get the next set of results. */ - @JsonProperty(value = "nextLink", required = true) private String nextLink; /** @@ -90,4 +92,45 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(SubscriptionListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionListResult 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 SubscriptionListResult. + */ + public static SubscriptionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionListResult deserializedSubscriptionListResult = new SubscriptionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedSubscriptionListResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SubscriptionInner.fromJson(reader1)); + deserializedSubscriptionListResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionPolicies.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionPolicies.java index 146b68ab8f4ff..e02aa82ae58c5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionPolicies.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionPolicies.java @@ -5,29 +5,31 @@ package com.azure.resourcemanager.resources.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; /** * Subscription policies. */ @Immutable -public final class SubscriptionPolicies { +public final class SubscriptionPolicies implements JsonSerializable { /* - * The subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions. + * The subscription location placement ID. The ID indicates which regions are visible for a subscription. For + * example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions. */ - @JsonProperty(value = "locationPlacementId", access = JsonProperty.Access.WRITE_ONLY) private String locationPlacementId; /* * The subscription quota ID. */ - @JsonProperty(value = "quotaId", access = JsonProperty.Access.WRITE_ONLY) private String quotaId; /* * The subscription spending limit. */ - @JsonProperty(value = "spendingLimit", access = JsonProperty.Access.WRITE_ONLY) private SpendingLimit spendingLimit; /** @@ -72,4 +74,43 @@ public SpendingLimit spendingLimit() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionPolicies from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionPolicies 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 SubscriptionPolicies. + */ + public static SubscriptionPolicies fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionPolicies deserializedSubscriptionPolicies = new SubscriptionPolicies(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("locationPlacementId".equals(fieldName)) { + deserializedSubscriptionPolicies.locationPlacementId = reader.getString(); + } else if ("quotaId".equals(fieldName)) { + deserializedSubscriptionPolicies.quotaId = reader.getString(); + } else if ("spendingLimit".equals(fieldName)) { + deserializedSubscriptionPolicies.spendingLimit = SpendingLimit.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionPolicies; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionState.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionState.java index 55ec15f1ff1b3..f757cbeeee146 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionState.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/SubscriptionState.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. */ @@ -51,7 +48,6 @@ public enum SubscriptionState { * @param value the serialized value to parse. * @return the parsed SubscriptionState object, or null if unable to parse. */ - @JsonCreator public static SubscriptionState fromString(String value) { if (value == null) { return null; @@ -68,7 +64,6 @@ public static SubscriptionState fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagCount.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagCount.java index e0f1e023024f3..ae52c560ee6e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagCount.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagCount.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.resources.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; /** * Tag count. */ @Fluent -public final class TagCount { +public final class TagCount implements JsonSerializable { /* * Type of count. */ - @JsonProperty(value = "type") private String type; /* * Value of count. */ - @JsonProperty(value = "value") private Integer value; /** @@ -77,4 +79,43 @@ public TagCount withValue(Integer value) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeNumberField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TagCount from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TagCount 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 TagCount. + */ + public static TagCount fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TagCount deserializedTagCount = new TagCount(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedTagCount.type = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedTagCount.value = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedTagCount; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Tags.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Tags.java index 618ed1bd66892..4a39869877775 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Tags.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Tags.java @@ -5,20 +5,21 @@ package com.azure.resourcemanager.resources.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; /** * A dictionary of name and value pairs. */ @Fluent -public final class Tags { +public final class Tags implements JsonSerializable { /* * Dictionary of */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** @@ -54,4 +55,41 @@ public Tags withTags(Map tags) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Tags from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Tags 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 Tags. + */ + public static Tags fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Tags deserializedTags = new Tags(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedTags.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedTags; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsListResult.java index 60c0a16f5d189..37bb5d51bda84 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.resources.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.resources.fluent.models.TagDetailsInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of subscription tags. */ @Fluent -public final class TagsListResult { +public final class TagsListResult implements JsonSerializable { /* * An array of tags. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** @@ -71,4 +73,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TagsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TagsListResult 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 TagsListResult. + */ + public static TagsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TagsListResult deserializedTagsListResult = new TagsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> TagDetailsInner.fromJson(reader1)); + deserializedTagsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTagsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTagsListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsPatchOperation.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsPatchOperation.java index de3507bed4205..d3f8593ecec2a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsPatchOperation.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsPatchOperation.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public TagsPatchOperation() { * @param name a name to look for. * @return the corresponding TagsPatchOperation. */ - @JsonCreator public static TagsPatchOperation fromString(String name) { return fromString(name, TagsPatchOperation.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsPatchResource.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsPatchResource.java index 7f274fe11f777..b6ef454067537 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsPatchResource.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TagsPatchResource.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.resources.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; /** * Wrapper resource for tags patch API request only. */ @Fluent -public final class TagsPatchResource { +public final class TagsPatchResource implements JsonSerializable { /* * The operation type for the patch API. */ - @JsonProperty(value = "operation") private TagsPatchOperation operation; /* * The set of tags. */ - @JsonProperty(value = "properties") private Tags properties; /** @@ -80,4 +82,43 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("operation", this.operation == null ? null : this.operation.toString()); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TagsPatchResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TagsPatchResource 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 TagsPatchResource. + */ + public static TagsPatchResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TagsPatchResource deserializedTagsPatchResource = new TagsPatchResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operation".equals(fieldName)) { + deserializedTagsPatchResource.operation = TagsPatchOperation.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedTagsPatchResource.properties = Tags.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTagsPatchResource; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TargetResource.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TargetResource.java index 4ba719e859d08..3a0601374f22e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TargetResource.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TargetResource.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.resources.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; /** * Target resource. */ @Fluent -public final class TargetResource { +public final class TargetResource implements JsonSerializable { /* * The ID of the resource. */ - @JsonProperty(value = "id") private String id; /* * The name of the resource. */ - @JsonProperty(value = "resourceName") private String resourceName; /* * The type of the resource. */ - @JsonProperty(value = "resourceType") private String resourceType; /** @@ -103,4 +104,46 @@ public TargetResource withResourceType(String resourceType) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("resourceName", this.resourceName); + jsonWriter.writeStringField("resourceType", this.resourceType); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TargetResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TargetResource 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 TargetResource. + */ + public static TargetResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TargetResource deserializedTargetResource = new TargetResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTargetResource.id = reader.getString(); + } else if ("resourceName".equals(fieldName)) { + deserializedTargetResource.resourceName = reader.getString(); + } else if ("resourceType".equals(fieldName)) { + deserializedTargetResource.resourceType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTargetResource; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TemplateLink.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TemplateLink.java index 7a508c9714937..399ef62866323 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TemplateLink.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TemplateLink.java @@ -5,41 +5,42 @@ package com.azure.resourcemanager.resources.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; /** * Entity representing the reference to the template. */ @Fluent -public final class TemplateLink { +public final class TemplateLink implements JsonSerializable { /* * The URI of the template to deploy. Use either the uri or id property, but not both. */ - @JsonProperty(value = "uri") private String uri; /* * The resource id of a Template Spec. Use either the id or uri property, but not both. */ - @JsonProperty(value = "id") private String id; /* - * The relativePath property can be used to deploy a linked template at a location relative to the parent. If the parent template was linked with a TemplateSpec, this will reference an artifact in the TemplateSpec. If the parent was linked with a URI, the child deployment will be a combination of the parent and relativePath URIs + * The relativePath property can be used to deploy a linked template at a location relative to the parent. If the + * parent template was linked with a TemplateSpec, this will reference an artifact in the TemplateSpec. If the + * parent was linked with a URI, the child deployment will be a combination of the parent and relativePath URIs */ - @JsonProperty(value = "relativePath") private String relativePath; /* * If included, must match the ContentVersion in the template. */ - @JsonProperty(value = "contentVersion") private String contentVersion; /* * The query string (for example, a SAS token) to be used with the templateLink URI. */ - @JsonProperty(value = "queryString") private String queryString; /** @@ -161,4 +162,52 @@ public TemplateLink withQueryString(String queryString) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("relativePath", this.relativePath); + jsonWriter.writeStringField("contentVersion", this.contentVersion); + jsonWriter.writeStringField("queryString", this.queryString); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TemplateLink from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TemplateLink 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 TemplateLink. + */ + public static TemplateLink fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TemplateLink deserializedTemplateLink = new TemplateLink(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uri".equals(fieldName)) { + deserializedTemplateLink.uri = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedTemplateLink.id = reader.getString(); + } else if ("relativePath".equals(fieldName)) { + deserializedTemplateLink.relativePath = reader.getString(); + } else if ("contentVersion".equals(fieldName)) { + deserializedTemplateLink.contentVersion = reader.getString(); + } else if ("queryString".equals(fieldName)) { + deserializedTemplateLink.queryString = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTemplateLink; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TenantCategory.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TenantCategory.java index 379bc95fff745..a60dbdaef4c54 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TenantCategory.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TenantCategory.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * Category of the tenant. */ @@ -41,7 +38,6 @@ public enum TenantCategory { * @param value the serialized value to parse. * @return the parsed TenantCategory object, or null if unable to parse. */ - @JsonCreator public static TenantCategory fromString(String value) { if (value == null) { return null; @@ -58,7 +54,6 @@ public static TenantCategory fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TenantListResult.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TenantListResult.java index 48c89b9796130..248adcb739373 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TenantListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/TenantListResult.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.resources.fluent.models.TenantIdDescriptionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Tenant Ids information. */ @Fluent -public final class TenantListResult { +public final class TenantListResult implements JsonSerializable { /* * An array of tenants. */ - @JsonProperty(value = "value") private List value; /* * The URL to use for getting the next set of results. */ - @JsonProperty(value = "nextLink", required = true) private String nextLink; /** @@ -89,4 +91,46 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(TenantListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TenantListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantListResult 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 TenantListResult. + */ + public static TenantListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TenantListResult deserializedTenantListResult = new TenantListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedTenantListResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> TenantIdDescriptionInner.fromJson(reader1)); + deserializedTenantListResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedTenantListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionManagementGroupMode.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionManagementGroupMode.java index f08096eebf99a..99e4b9b08171e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionManagementGroupMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionManagementGroupMode.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public UnmanageActionManagementGroupMode() { * @param name a name to look for. * @return the corresponding UnmanageActionManagementGroupMode. */ - @JsonCreator public static UnmanageActionManagementGroupMode fromString(String name) { return fromString(name, UnmanageActionManagementGroupMode.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionResourceGroupMode.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionResourceGroupMode.java index 65d1923ecf6a9..a6f8a8a3bef11 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionResourceGroupMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionResourceGroupMode.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public UnmanageActionResourceGroupMode() { * @param name a name to look for. * @return the corresponding UnmanageActionResourceGroupMode. */ - @JsonCreator public static UnmanageActionResourceGroupMode fromString(String name) { return fromString(name, UnmanageActionResourceGroupMode.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionResourceMode.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionResourceMode.java index 38ccf6a0de88a..7523a8e4dec9a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionResourceMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/UnmanageActionResourceMode.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public UnmanageActionResourceMode() { * @param name a name to look for. * @return the corresponding UnmanageActionResourceMode. */ - @JsonCreator public static UnmanageActionResourceMode fromString(String name) { return fromString(name, UnmanageActionResourceMode.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfChange.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfChange.java index df9e1cb14f195..c233828b07738 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfChange.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfChange.java @@ -6,48 +6,46 @@ 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; import java.util.List; /** * Information about a single resource change predicted by What-If operation. */ @Fluent -public final class WhatIfChange { +public final class WhatIfChange implements JsonSerializable { /* * Resource ID */ - @JsonProperty(value = "resourceId", required = true) private String resourceId; /* * Type of change that will be made to the resource when the deployment is executed. */ - @JsonProperty(value = "changeType", required = true) private ChangeType changeType; /* * The explanation about why the resource is unsupported by What-If. */ - @JsonProperty(value = "unsupportedReason") private String unsupportedReason; /* * The snapshot of the resource before the deployment is executed. */ - @JsonProperty(value = "before") private Object before; /* * The predicted snapshot of the resource after the deployment is executed. */ - @JsonProperty(value = "after") private Object after; /* * The predicted changes to resource properties. */ - @JsonProperty(value = "delta") private List delta; /** @@ -196,4 +194,58 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(WhatIfChange.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("changeType", this.changeType == null ? null : this.changeType.toString()); + jsonWriter.writeStringField("unsupportedReason", this.unsupportedReason); + jsonWriter.writeUntypedField("before", this.before); + jsonWriter.writeUntypedField("after", this.after); + jsonWriter.writeArrayField("delta", this.delta, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WhatIfChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WhatIfChange 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 WhatIfChange. + */ + public static WhatIfChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WhatIfChange deserializedWhatIfChange = new WhatIfChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedWhatIfChange.resourceId = reader.getString(); + } else if ("changeType".equals(fieldName)) { + deserializedWhatIfChange.changeType = ChangeType.fromString(reader.getString()); + } else if ("unsupportedReason".equals(fieldName)) { + deserializedWhatIfChange.unsupportedReason = reader.getString(); + } else if ("before".equals(fieldName)) { + deserializedWhatIfChange.before = reader.readUntyped(); + } else if ("after".equals(fieldName)) { + deserializedWhatIfChange.after = reader.readUntyped(); + } else if ("delta".equals(fieldName)) { + List delta + = reader.readArray(reader1 -> WhatIfPropertyChange.fromJson(reader1)); + deserializedWhatIfChange.delta = delta; + } else { + reader.skipChildren(); + } + } + + return deserializedWhatIfChange; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfPropertyChange.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfPropertyChange.java index baa47929b52f7..373f5aa1131b8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfPropertyChange.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfPropertyChange.java @@ -6,42 +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; import java.util.List; /** * The predicted change to the resource property. */ @Fluent -public final class WhatIfPropertyChange { +public final class WhatIfPropertyChange implements JsonSerializable { /* * The path of the property. */ - @JsonProperty(value = "path", required = true) private String path; /* * The type of property change. */ - @JsonProperty(value = "propertyChangeType", required = true) private PropertyChangeType propertyChangeType; /* * The value of the property before the deployment is executed. */ - @JsonProperty(value = "before") private Object before; /* * The value of the property after the deployment is executed. */ - @JsonProperty(value = "after") private Object after; /* * Nested property changes. */ - @JsonProperty(value = "children") private List children; /** @@ -171,4 +170,57 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(WhatIfPropertyChange.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeStringField("propertyChangeType", + this.propertyChangeType == null ? null : this.propertyChangeType.toString()); + jsonWriter.writeUntypedField("before", this.before); + jsonWriter.writeUntypedField("after", this.after); + jsonWriter.writeArrayField("children", this.children, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WhatIfPropertyChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WhatIfPropertyChange 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 WhatIfPropertyChange. + */ + public static WhatIfPropertyChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WhatIfPropertyChange deserializedWhatIfPropertyChange = new WhatIfPropertyChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("path".equals(fieldName)) { + deserializedWhatIfPropertyChange.path = reader.getString(); + } else if ("propertyChangeType".equals(fieldName)) { + deserializedWhatIfPropertyChange.propertyChangeType + = PropertyChangeType.fromString(reader.getString()); + } else if ("before".equals(fieldName)) { + deserializedWhatIfPropertyChange.before = reader.readUntyped(); + } else if ("after".equals(fieldName)) { + deserializedWhatIfPropertyChange.after = reader.readUntyped(); + } else if ("children".equals(fieldName)) { + List children + = reader.readArray(reader1 -> WhatIfPropertyChange.fromJson(reader1)); + deserializedWhatIfPropertyChange.children = children; + } else { + reader.skipChildren(); + } + } + + return deserializedWhatIfPropertyChange; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfResultFormat.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfResultFormat.java index 94b7409864bbe..9dbf6ba14b386 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfResultFormat.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/WhatIfResultFormat.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.resources.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The format of the What-If results. */ @@ -36,7 +33,6 @@ public enum WhatIfResultFormat { * @param value the serialized value to parse. * @return the parsed WhatIfResultFormat object, or null if unable to parse. */ - @JsonCreator public static WhatIfResultFormat fromString(String value) { if (value == null) { return null; @@ -53,7 +49,6 @@ public static WhatIfResultFormat fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ZoneMapping.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ZoneMapping.java index a55ba5fc8d2cd..fa558688d9351 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ZoneMapping.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ZoneMapping.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.resources.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; /** * The ZoneMapping model. */ @Fluent -public final class ZoneMapping { +public final class ZoneMapping implements JsonSerializable { /* * The location of the zone mapping. */ - @JsonProperty(value = "location") private String location; /* * The zones property. */ - @JsonProperty(value = "zones") private List zones; /** @@ -78,4 +80,44 @@ public ZoneMapping withZones(List zones) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ZoneMapping from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ZoneMapping 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 ZoneMapping. + */ + public static ZoneMapping fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ZoneMapping deserializedZoneMapping = new ZoneMapping(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedZoneMapping.location = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedZoneMapping.zones = zones; + } else { + reader.skipChildren(); + } + } + + return deserializedZoneMapping; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/module-info.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/module-info.java index 0fee0a1883a7a..aa5ef8ccc420e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/module-info.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/module-info.java @@ -118,14 +118,8 @@ com.azure.resourcemanager.storage, com.azure.resourcemanager.trafficmanager; - // open packages specifically for azure core and jackson - opens com.azure.resourcemanager.resources.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.resources.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.resources.fluentcore.model.implementation to - com.azure.core, - com.fasterxml.jackson.databind; + // open packages specifically for azure core + opens com.azure.resourcemanager.resources.fluent.models to com.azure.core; + opens com.azure.resourcemanager.resources.models to com.azure.core; + opens com.azure.resourcemanager.resources.fluentcore.model.implementation to com.azure.core; } diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json index 8461b099d7d14..ccbedca6ffc52 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.resources.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.resources.implementation.DeploymentsClientImpl$DeploymentsService" ], [ "com.azure.resourcemanager.resources.implementation.ProvidersClientImpl$ProvidersService" ], [ "com.azure.resourcemanager.resources.implementation.ProviderResourceTypesClientImpl$ProviderResourceTypesService" ], [ "com.azure.resourcemanager.resources.implementation.ResourcesClientImpl$ResourcesService" ], [ "com.azure.resourcemanager.resources.implementation.ResourceGroupsClientImpl$ResourceGroupsService" ], [ "com.azure.resourcemanager.resources.implementation.TagOperationsClientImpl$TagOperationsService" ], [ "com.azure.resourcemanager.resources.implementation.DeploymentOperationsClientImpl$DeploymentOperationsService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.resources.implementation.DeploymentOperationsClientImpl$DeploymentOperationsService" ], [ "com.azure.resourcemanager.resources.implementation.DeploymentsClientImpl$DeploymentsService" ], [ "com.azure.resourcemanager.resources.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.resources.implementation.ProviderResourceTypesClientImpl$ProviderResourceTypesService" ], [ "com.azure.resourcemanager.resources.implementation.ProvidersClientImpl$ProvidersService" ], [ "com.azure.resourcemanager.resources.implementation.ResourceGroupsClientImpl$ResourceGroupsService" ], [ "com.azure.resourcemanager.resources.implementation.ResourcesClientImpl$ResourcesService" ], [ "com.azure.resourcemanager.resources.implementation.TagOperationsClientImpl$TagOperationsService" ] ] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/reflect-config.json b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/reflect-config.json index 79d371aefe049..8878e547a7984 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/reflect-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources/reflect-config.json @@ -1,471 +1 @@ -[ { - "name" : "com.azure.resourcemanager.resources.models.OperationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.OperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.OperationDisplay", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.DeploymentInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.TemplateLink", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentParameter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.KeyVaultParameterReference", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.KeyVaultReference", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ParametersLink", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DebugSetting", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.OnErrorDeployment", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ExpressionEvaluationOptions", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.DeploymentExtendedInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentPropertiesExtended", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.ProviderInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ProviderResourceType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ProviderExtendedLocation", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.Alias", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPath", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPattern", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPathMetadata", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ZoneMapping", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ApiProfile", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.Dependency", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.BasicDependency", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.OnErrorDeploymentExtended", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceReference", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.DeploymentValidateResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.DeploymentExportResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ScopedDeployment", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ScopedDeploymentWhatIf", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentWhatIfProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentWhatIfSettings", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.WhatIfOperationResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.WhatIfOperationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.WhatIfChange", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.WhatIfPropertyChange", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentWhatIf", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.ProviderPermissionListResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ProviderPermission", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.RoleDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.Permission", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ProviderRegistrationRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ProviderConsentDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ProviderListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.ProviderResourceTypeListResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.GenericResourceExpandedInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.GenericResourceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.Plan", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.Sku", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.Identity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.IdentityUserAssignedIdentitiesValue", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ExtendedLocation", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.ResourceGroupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceGroupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceGroupPatchable", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ExportTemplateRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.ResourceGroupExportResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceGroupListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourcesMoveInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.TagValueInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.TagCount", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.TagDetailsInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.TagsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.DeploymentOperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentOperationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.StatusMessage", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.TargetResource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.HttpMessage", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentOperationsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.TemplateHashResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.TagsResourceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.Tags", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.TagsPatchResource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ExpressionEvaluationOptionsScopeType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPathTokenType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPathAttributes", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ProviderAuthorizationConsentState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ExtendedLocationType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ExportTemplateOutputFormat", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.TagsPatchOperation", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.OnErrorDeploymentType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPatternType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.WhatIfResultFormat", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ChangeType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.PropertyChangeType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceIdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ProvisioningOperation", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -} ] \ No newline at end of file +[ ] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_change/reflect-config.json b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_change/reflect-config.json index eb7158a76a0b6..8878e547a7984 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_change/reflect-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_change/reflect-config.json @@ -1,41 +1 @@ -[ { - "name" : "com.azure.resourcemanager.resources.models.ChangeResourceListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.ChangeResourceResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ChangeProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ChangeAttributes", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ChangeBase", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceChangeType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourcePropertyChangeType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ChangeCategory", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -} ] \ No newline at end of file +[ ] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_deploymentstacks/reflect-config.json b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_deploymentstacks/reflect-config.json index 054b4af315472..50d6c81cf1ecf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_deploymentstacks/reflect-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_deploymentstacks/reflect-config.json @@ -1,9 +1,4 @@ [ { - "name" : "com.azure.resourcemanager.resources.models.DeploymentStackListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { "name" : "com.azure.resourcemanager.resources.fluent.models.DeploymentStackInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, @@ -14,27 +9,7 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentStacksTemplateLink", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentParameter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.KeyVaultParameterReference", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.KeyVaultReference", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentStacksParametersLink", + "name" : "com.azure.resourcemanager.resources.fluent.models.DeploymentStackValidateResultInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true @@ -43,43 +18,18 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentStacksDebugSetting", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DenySettings", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceReference", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceReferenceExtended", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ManagedResourceReference", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.resources.models.AzureResourceBase", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.resources.fluent.models.DeploymentStackTemplateDefinitionInner", + "name" : "com.azure.resourcemanager.resources.models.DenySettings", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.resources.fluent.models.DeploymentStackValidateResultInner", + "name" : "com.azure.resourcemanager.resources.models.DeploymentParameter", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true @@ -89,42 +39,42 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentStacksDeleteDetachEnum", + "name" : "com.azure.resourcemanager.resources.models.DeploymentStacksDebugSetting", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.resources.models.DenySettingsMode", + "name" : "com.azure.resourcemanager.resources.models.DeploymentStacksParametersLink", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.resources.models.DeploymentStackProvisioningState", + "name" : "com.azure.resourcemanager.resources.models.DeploymentStacksTemplateLink", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.resources.models.ResourceStatusMode", + "name" : "com.azure.resourcemanager.resources.models.KeyVaultParameterReference", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.resources.models.DenyStatusMode", + "name" : "com.azure.resourcemanager.resources.models.KeyVaultReference", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.resources.models.UnmanageActionResourceMode", + "name" : "com.azure.resourcemanager.resources.models.ManagedResourceReference", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.resources.models.UnmanageActionResourceGroupMode", + "name" : "com.azure.resourcemanager.resources.models.ResourceReference", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.resources.models.UnmanageActionManagementGroupMode", + "name" : "com.azure.resourcemanager.resources.models.ResourceReferenceExtended", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_feature/proxy-config.json b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_feature/proxy-config.json index 42494964dbfb6..ceb4cab09a868 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_feature/proxy-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_feature/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.resources.implementation.FeaturesClientImpl$FeaturesService" ], [ "com.azure.resourcemanager.resources.implementation.SubscriptionFeatureRegistrationsClientImpl$SubscriptionFeatureRegistrationsService" ], [ "com.azure.resourcemanager.resources.implementation.FeatureClientImpl$FeatureClientService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.resources.implementation.FeatureClientImpl$FeatureClientService" ], [ "com.azure.resourcemanager.resources.implementation.FeaturesClientImpl$FeaturesService" ], [ "com.azure.resourcemanager.resources.implementation.SubscriptionFeatureRegistrationsClientImpl$SubscriptionFeatureRegistrationsService" ] ] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_feature/reflect-config.json b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_feature/reflect-config.json index 72c29d643d0cb..8878e547a7984 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_feature/reflect-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_feature/reflect-config.json @@ -1,61 +1 @@ -[ { - "name" : "com.azure.resourcemanager.resources.models.OperationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.OperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.OperationDisplay", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.FeatureOperationsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.FeatureResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.FeatureProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.SubscriptionFeatureRegistrationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.SubscriptionFeatureRegistrationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AuthorizationProfile", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.SubscriptionFeatureRegistrationList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.SubscriptionFeatureRegistrationState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.SubscriptionFeatureRegistrationApprovalType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -} ] \ No newline at end of file +[ ] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_lock/reflect-config.json b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_lock/reflect-config.json index 1a826c49a0369..8878e547a7984 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_lock/reflect-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_lock/reflect-config.json @@ -1,41 +1 @@ -[ { - "name" : "com.azure.resourcemanager.resources.models.OperationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.OperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.OperationDisplay", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.ManagementLockObjectInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.ManagementLockProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ManagementLockOwner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ManagementLockListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.LockLevel", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -} ] \ No newline at end of file +[ ] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/proxy-config.json b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/proxy-config.json index 71c2992b00c8d..9ff91bf2de1a9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/proxy-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.resources.implementation.DataPolicyManifestsClientImpl$DataPolicyManifestsService" ], [ "com.azure.resourcemanager.resources.implementation.PolicyDefinitionsClientImpl$PolicyDefinitionsService" ], [ "com.azure.resourcemanager.resources.implementation.PolicySetDefinitionsClientImpl$PolicySetDefinitionsService" ], [ "com.azure.resourcemanager.resources.implementation.PolicyAssignmentsClientImpl$PolicyAssignmentsService" ], [ "com.azure.resourcemanager.resources.implementation.PolicyExemptionsClientImpl$PolicyExemptionsService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.resources.implementation.DataPolicyManifestsClientImpl$DataPolicyManifestsService" ], [ "com.azure.resourcemanager.resources.implementation.PolicyAssignmentsClientImpl$PolicyAssignmentsService" ], [ "com.azure.resourcemanager.resources.implementation.PolicyDefinitionsClientImpl$PolicyDefinitionsService" ], [ "com.azure.resourcemanager.resources.implementation.PolicyExemptionsClientImpl$PolicyExemptionsService" ], [ "com.azure.resourcemanager.resources.implementation.PolicySetDefinitionsClientImpl$PolicySetDefinitionsService" ] ] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/reflect-config.json b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/reflect-config.json index 794747b30bae9..8878e547a7984 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/reflect-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_policy/reflect-config.json @@ -1,251 +1 @@ -[ { - "name" : "com.azure.resourcemanager.resources.fluent.models.DataPolicyManifestInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.DataPolicyManifestProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceTypeAliases", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.Alias", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPath", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPattern", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPathMetadata", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DataEffect", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.DataManifestResourceFunctionsDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DataManifestCustomResourceFunctionDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.DataPolicyManifestListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ParameterDefinitionsValue", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ParameterDefinitionsValueMetadata", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.PolicyDefinitionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.PolicySetDefinitionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.PolicySetDefinitionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.PolicyDefinitionReference", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ParameterValuesValue", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.PolicyDefinitionGroup", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.PolicySetDefinitionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.PolicyAssignmentInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.PolicyAssignmentProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.NonComplianceMessage", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceSelector", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.Selector", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.OverrideModel", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.Identity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.IdentityUserAssignedIdentitiesValue", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.PolicyAssignmentUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.PolicyAssignmentUpdateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.PolicyAssignmentListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.PolicyExemptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.PolicyExemptionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.PolicyExemptionUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.PolicyExemptionUpdateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.PolicyExemptionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPathTokenType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPathAttributes", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.PolicyType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ParameterType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.EnforcementMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.SelectorKind", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.OverrideKind", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ExemptionCategory", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AssignmentScopeValidation", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasPatternType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AliasType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceIdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -} ] \ No newline at end of file +[ ] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_subscription/proxy-config.json b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_subscription/proxy-config.json index f1bf17da84d99..2ceb14c9b2cbe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_subscription/proxy-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_subscription/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.resources.implementation.SubscriptionsClientImpl$SubscriptionsService" ], [ "com.azure.resourcemanager.resources.implementation.TenantsClientImpl$TenantsService" ], [ "com.azure.resourcemanager.resources.implementation.ResourceNamesClientImpl$ResourceNamesService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.resources.implementation.ResourceNamesClientImpl$ResourceNamesService" ], [ "com.azure.resourcemanager.resources.implementation.SubscriptionsClientImpl$SubscriptionsService" ], [ "com.azure.resourcemanager.resources.implementation.TenantsClientImpl$TenantsService" ] ] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_subscription/reflect-config.json b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_subscription/reflect-config.json index 9d3f8b5f17ca5..8878e547a7984 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_subscription/reflect-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources_subscription/reflect-config.json @@ -1,121 +1 @@ -[ { - "name" : "com.azure.resourcemanager.resources.models.LocationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.LocationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.LocationMetadata", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.PairedRegion", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AvailabilityZoneMappings", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.SubscriptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.SubscriptionPolicies", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ManagedByTenant", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.SubscriptionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.TenantListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.TenantIdDescriptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.CheckZonePeersRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.CheckZonePeersResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.AvailabilityZonePeers", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.Peers", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.fluent.models.CheckResourceNameResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.RegionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.RegionCategory", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.ResourceNameStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.LocationType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.SubscriptionState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.SpendingLimit", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.resources.models.TenantCategory", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -} ] \ No newline at end of file +[ ] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java index ee24a3c341af1..367e44b059751 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java @@ -6,9 +6,12 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.Context; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.resources.fluent.models.GenericResourceExpandedInner; import com.azure.core.management.Region; import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; @@ -22,7 +25,6 @@ import com.azure.resourcemanager.resources.models.ResourceGroups; import com.azure.resourcemanager.resources.models.ResourceIdentityType; import com.azure.resourcemanager.resources.models.Sku; -import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -40,6 +42,7 @@ public class GenericResourcesTests extends ResourceManagementTest { private String testId; private String rgName; private String newRgName; + private final SerializerAdapter serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { @@ -75,7 +78,7 @@ public void canCreateUpdateMoveResource() throws Exception { .withProviderNamespace("Microsoft.Web") .withoutPlan() .withParentResourcePath("") - .withProperties(new ObjectMapper().readTree("{\"SiteMode\":\"Limited\",\"ComputeMode\":\"Shared\"}")) + .withProperties(serializerAdapter.deserialize("{\"SiteMode\":\"Limited\",\"ComputeMode\":\"Shared\"}", Object.class, SerializerEncoding.JSON)) .create(); //List PagedIterable resourceList = genericResources.listByResourceGroup(rgName); @@ -97,7 +100,7 @@ public void canCreateUpdateMoveResource() throws Exception { Assertions.assertNotNull(resource); // Update resource.update() - .withProperties(new ObjectMapper().readTree("{\"SiteMode\":\"Limited\",\"ComputeMode\":\"Dynamic\"}")) + .withProperties(serializerAdapter.deserialize("{\"SiteMode\":\"Limited\",\"ComputeMode\":\"Dynamic\"}", Object.class, SerializerEncoding.JSON)) .apply(); // Delete genericResources.deleteById(resource.id()); @@ -167,7 +170,7 @@ public void canCreateDeleteResourceSyncPoll() throws Exception { .withProviderNamespace("Microsoft.Web") .withoutPlan() .withParentResourcePath("") - .withProperties(new ObjectMapper().readTree("{\"SiteMode\":\"Limited\",\"ComputeMode\":\"Shared\"}")) + .withProperties(serializerAdapter.deserialize("{\"SiteMode\":\"Limited\",\"ComputeMode\":\"Shared\"}", Object.class, SerializerEncoding.JSON)) .beginCreate(); LongRunningOperationStatus pollStatus = acceptedResource.getActivationResponse().getStatus(); @@ -217,7 +220,7 @@ public void canCreateUpdateKindSkuIdentity() throws Exception { .withKind("Storage") .withSku(new Sku().withName("Standard_LRS")) .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withProperties(new ObjectMapper().readTree("{\"minimumTlsVersion\": \"TLS1_2\", \"supportsHttpsTrafficOnly\": true}")) + .withProperties(serializerAdapter.deserialize("{\"minimumTlsVersion\": \"TLS1_2\", \"supportsHttpsTrafficOnly\": true}", Object.class, SerializerEncoding.JSON)) .withApiVersion(apiVersion) .create(); Assertions.assertEquals("Storage", storageResource.kind()); diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java index 07463be0ecbcd..f4ee5ae542fd9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/PolicyTests.java @@ -4,8 +4,11 @@ package com.azure.resourcemanager.resources; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.Region; +import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.test.annotation.DoNotRecord; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.core.management.Region; import com.azure.resourcemanager.resources.models.EnforcementMode; import com.azure.resourcemanager.resources.models.GenericResource; import com.azure.resourcemanager.resources.models.ParameterDefinitionsValue; @@ -15,7 +18,6 @@ import com.azure.resourcemanager.resources.models.PolicyType; import com.azure.resourcemanager.resources.models.ResourceGroup; import com.azure.resourcemanager.test.utils.TestUtilities; -import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -26,6 +28,7 @@ public class PolicyTests extends ResourceManagementTest { private String policyRule = "{\"if\":{\"not\":{\"field\":\"location\",\"in\":[\"southcentralus\",\"westeurope\"]}},\"then\":{\"effect\":\"deny\"}}"; private String policyRule2 = "{\"if\":{\"not\":{\"field\":\"name\",\"like\":\"[concat(parameters('prefix'),'*',parameters('suffix'))]\"}},\"then\":{\"effect\":\"deny\"}}"; + private final SerializerAdapter serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); @Override protected void cleanUpResources() { @@ -131,7 +134,7 @@ public void canCRUDPolicyAssignment() throws Exception { .withoutPlan() .withApiVersion("2020-12-01") .withParentResourcePath("") - .withProperties(new ObjectMapper().readTree("{\"SiteMode\":\"Limited\",\"ComputeMode\":\"Shared\"}")) + .withProperties(serializerAdapter.deserialize("{\"SiteMode\":\"Limited\",\"ComputeMode\":\"Shared\"}", Object.class, SerializerEncoding.JSON)) .create(); PolicyAssignment assignment2 = resourceClient.policyAssignments().define(assignmentName2) diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/implementation/TypeSerializationTests.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/implementation/TypeSerializationTests.java index d066f826f02cc..c494ae7d26fac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/implementation/TypeSerializationTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/test/java/com/azure/resourcemanager/resources/implementation/TypeSerializationTests.java @@ -6,18 +6,17 @@ import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.resources.models.DeploymentParameter; -import com.azure.resourcemanager.resources.models.DeploymentProperties; +import com.azure.core.util.serializer.TypeReference; import com.azure.resourcemanager.resources.fluent.models.DeploymentExtendedInner; import com.azure.resourcemanager.resources.fluent.models.DeploymentInner; +import com.azure.resourcemanager.resources.models.DeploymentParameter; +import com.azure.resourcemanager.resources.models.DeploymentProperties; import com.azure.resourcemanager.resources.models.Tags; import com.azure.resourcemanager.resources.models.TagsPatchOperation; import com.azure.resourcemanager.resources.models.TagsPatchResource; -import com.fasterxml.jackson.core.type.TypeReference; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import java.io.IOException; import java.lang.reflect.Field; import java.util.AbstractMap; import java.util.Collections; @@ -111,23 +110,20 @@ public void testTagsPatchResourceSerialization() throws Exception { @Test public void testDeploymentSerialization() throws Exception { final String templateJson = "{ \"/subscriptions//resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/\": {} }"; + final String parametersJson = "{\"id1\": {\"value\": \"myParameterType\"}}"; DeploymentImpl deployment = new DeploymentImpl(new DeploymentExtendedInner(), "", null); deployment.withTemplate(templateJson); + deployment.withParameters(parametersJson); + SerializerAdapter serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); String deploymentJson = serializerAdapter.serialize(createRequestFromInner(deployment), SerializerEncoding.JSON); Assertions.assertTrue(deploymentJson.contains("Microsoft.ManagedIdentity")); + Assertions.assertTrue(deploymentJson.contains("myParameterType")); } - private static DeploymentInner createRequestFromInner(DeploymentImpl deployment) throws NoSuchFieldException, IllegalAccessException, IOException { - String parametersJson = SERIALIZER_ADAPTER.serialize( - deployment.parameters(), - SerializerEncoding.JSON); - Map parameters = SERIALIZER_ADAPTER.deserialize( - parametersJson, - TYPE_REFERENCE_MAP_DEPLOYMENT_PARAMETER.getType(), - SerializerEncoding.JSON); + private static DeploymentInner createRequestFromInner(DeploymentImpl deployment) throws NoSuchFieldException, IllegalAccessException { Field field = DeploymentImpl.class.getDeclaredField("deploymentCreateUpdateParameters"); field.setAccessible(true); @@ -138,7 +134,7 @@ private static DeploymentInner createRequestFromInner(DeploymentImpl deployment) inner.properties().withMode(deployment.mode()); inner.properties().withTemplate(implInner.properties().template()); inner.properties().withTemplateLink(deployment.templateLink()); - inner.properties().withParameters(parameters); + inner.properties().withParameters(implInner.properties().parameters()); inner.properties().withParametersLink(deployment.parametersLink()); return inner; } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/AuthorizationOperationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/AuthorizationOperationsListSamples.java index 255a8aed3909b..579798e41842b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/AuthorizationOperationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/AuthorizationOperationsListSamples.java @@ -9,7 +9,8 @@ */ public final class AuthorizationOperationsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ListProviderOperations.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ListProviderOperations.json */ /** * Sample code: List provider operations. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesGetSamples.java index 736e363b65732..3c35416700739 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesGetSamples.java @@ -9,7 +9,8 @@ */ public final class ChangesGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-05-01/examples/GetChange.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2022-05-01/examples/GetChange.json */ /** * Sample code: GetChange. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesListSamples.java index 2c3e2fc2747c2..a6e857e516120 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ChangesListSamples.java @@ -9,7 +9,8 @@ */ public final class ChangesListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-05-01/examples/ListChanges.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2022-05-01/examples/ListChanges.json */ /** * Sample code: ListChanges. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsGetByPolicyModeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsGetByPolicyModeSamples.java index bcd1edbb89fd8..1c60139c82f2e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsGetByPolicyModeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsGetByPolicyModeSamples.java @@ -9,7 +9,9 @@ */ public final class DataPolicyManifestsGetByPolicyModeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/getDataPolicyManifest.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/getDataPolicyManifest + * .json */ /** * Sample code: Retrieve a data policy manifest by policy mode. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsListSamples.java index d3d461855e1fd..01b3e5eb74a59 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DataPolicyManifestsListSamples.java @@ -9,7 +9,8 @@ */ public final class DataPolicyManifestsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/listDataPolicyManifests.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/ + * listDataPolicyManifests.json */ /** * Sample code: List data policy manifests. @@ -25,7 +26,8 @@ public static void listDataPolicyManifests(com.azure.resourcemanager.AzureResour } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/listDataPolicyManifestsNamespaceFilter.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-09-01/examples/ + * listDataPolicyManifestsNamespaceFilter.json */ /** * Sample code: List data policy manifests with namespace filter. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java index 22aefa61934d2..ccfe9e9aa1897 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java @@ -19,7 +19,8 @@ */ public final class DeploymentStacksCreateOrUpdateAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupCreate.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackManagementGroupCreate.json */ /** * Sample code: DeploymentStacksManagementGroupCreateOrUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java index 87d304662f9cf..c24fd884fccfa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java @@ -19,7 +19,8 @@ */ public final class DeploymentStacksCreateOrUpdateAtResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackResourceGroupCreate.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackResourceGroupCreate.json */ /** * Sample code: DeploymentStacksResourceGroupCreateOrUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java index c12cd971185e0..ead85871e0797 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java @@ -19,7 +19,8 @@ */ public final class DeploymentStacksCreateOrUpdateAtSubscriptionSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionCreate.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackSubscriptionCreate.json */ /** * Sample code: DeploymentStacksSubscriptionCreateOrUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java index 23cbb8baaf73e..2cd0df0feff12 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtManagementGroupSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksDeleteAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupDelete.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackManagementGroupDelete.json */ /** * Sample code: DeploymentStacksManagementGroupDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java index 5c1888d2f8cd3..d5725b70e715a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteAtSubscriptionSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksDeleteAtSubscriptionSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionDelete.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackSubscriptionDelete.json */ /** * Sample code: DeploymentStacksSubscriptionDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java index de6ff4a1d438d..2710ecf07f0b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackResourceGroupDelete.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackResourceGroupDelete.json */ /** * Sample code: DeploymentStacksResourceGroupDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java index bd3574d1a17b7..905104a7e73f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksExportTemplateAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupExportTemplate.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackManagementGroupExportTemplate.json */ /** * Sample code: DeploymentStacksManagementGroupExportTemplate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java index cdd59aab4c198..6cd99e5d3659d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksExportTemplateAtResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackExportTemplate.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackExportTemplate.json */ /** * Sample code: DeploymentStacksResourceGroupExportTemplate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java index febeb569a7a10..903475914aa21 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksExportTemplateAtSubscriptionSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionExportTemplate.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackSubscriptionExportTemplate.json */ /** * Sample code: DeploymentStacksSubscriptionExportTemplate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java index 92ec5bfbd1bd5..94d28e9abae5a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtManagementGroupSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksGetAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupGet.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackManagementGroupGet.json */ /** * Sample code: DeploymentStacksManagementGroupGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java index 459bd6436b528..b4e103b2dca19 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetAtSubscriptionSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksGetAtSubscriptionSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionGet.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackSubscriptionGet.json */ /** * Sample code: DeploymentStacksSubscriptionGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java index 3ee7ee599a14a..44ec809fd69d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksGetByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackResourceGroupGet.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackResourceGroupGet.json */ /** * Sample code: DeploymentStacksResourceGroupGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java index 2792d929e9c28..9cea846cb1733 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListAtManagementGroupSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksListAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupList.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackManagementGroupList.json */ /** * Sample code: DeploymentStacksManagementGroupList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java index 27c70adf99fc1..7c54e608d5149 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksListByResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackResourceGroupList.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackResourceGroupList.json */ /** * Sample code: DeploymentStacksResourceGroupList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java index ef36c63f04ba3..4cbdc0c328875 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksListSamples.java @@ -9,7 +9,8 @@ */ public final class DeploymentStacksListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionList.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackSubscriptionList.json */ /** * Sample code: DeploymentStacksSubscriptionList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java index 7af51e6ba25b0..b80107fe0185a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java @@ -20,7 +20,8 @@ */ public final class DeploymentStacksValidateStackAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupValidate.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackManagementGroupValidate.json */ /** * Sample code: DeploymentStacksManagementGroupValidate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java index 35ca155dcf3aa..3b24391d1fc6c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java @@ -20,7 +20,8 @@ */ public final class DeploymentStacksValidateStackAtResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackResourceGroupValidate.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackResourceGroupValidate.json */ /** * Sample code: DeploymentStacksResourceGroupValidate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java index 67f54099043ad..d0d67bd6fe663 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java @@ -20,7 +20,8 @@ */ public final class DeploymentStacksValidateStackAtSubscriptionSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionValidate.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * DeploymentStackSubscriptionValidate.json */ /** * Sample code: DeploymentStacksSubscriptionValidate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCalculateTemplateHashSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCalculateTemplateHashSamples.java index 4123c3e2b6846..852498a9efc05 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCalculateTemplateHashSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCalculateTemplateHashSamples.java @@ -13,7 +13,9 @@ */ public final class DeploymentsCalculateTemplateHashSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/CalculateTemplateHash.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/CalculateTemplateHash. + * json */ /** * Sample code: Calculate template hash. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtManagementGroupScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtManagementGroupScopeSamples.java index ece5883602bc5..a54b4590ae6f8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtManagementGroupScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtManagementGroupScopeSamples.java @@ -16,7 +16,8 @@ */ public final class DeploymentsCreateOrUpdateAtManagementGroupScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentAtManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * PutDeploymentAtManagementGroup.json */ /** * Sample code: Create deployment at management group scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtScopeSamples.java index 60e1781212c8e..f706f6e6fdbfc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtScopeSamples.java @@ -16,7 +16,8 @@ */ public final class DeploymentsCreateOrUpdateAtScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentAtScope.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentAtScope.json */ /** * Sample code: Create deployment at a given scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtSubscriptionScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtSubscriptionScopeSamples.java index 329040d7fd6b9..54a9a8e0af92b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtSubscriptionScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtSubscriptionScopeSamples.java @@ -16,7 +16,8 @@ */ public final class DeploymentsCreateOrUpdateAtSubscriptionScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentSubscriptionTemplateSpecsWithId.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * PutDeploymentSubscriptionTemplateSpecsWithId.json */ /** * Sample code: Create a deployment that will deploy a templateSpec with the given resourceId. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtTenantScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtTenantScopeSamples.java index 6b3a45c0eea17..dadefed5d23eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtTenantScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateAtTenantScopeSamples.java @@ -16,7 +16,9 @@ */ public final class DeploymentsCreateOrUpdateAtTenantScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentAtTenant.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentAtTenant. + * json */ /** * Sample code: Create deployment at tenant scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateSamples.java index f54bb3805c56a..63223beeb8779 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsCreateOrUpdateSamples.java @@ -18,7 +18,8 @@ */ public final class DeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentResourceGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * PutDeploymentResourceGroup.json */ /** * Sample code: Create a deployment that will deploy a template with a uri and queryString. @@ -42,7 +43,8 @@ public static void createADeploymentThatWillDeployATemplateWithAUriAndQueryStrin } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentResourceGroupTemplateSpecsWithId.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * PutDeploymentResourceGroupTemplateSpecsWithId.json */ /** * Sample code: Create a deployment that will deploy a templateSpec with the given resourceId. @@ -64,7 +66,8 @@ public static void createADeploymentThatWillDeployATemplateSpecWithTheGivenResou } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * PutDeploymentWithOnErrorDeploymentSpecificDeployment.json */ /** * Sample code: Create a deployment that will redeploy another deployment on failure. @@ -88,7 +91,8 @@ public static void createADeploymentThatWillRedeployAnotherDeploymentOnFailure( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * PutDeploymentWithOnErrorDeploymentLastSuccessful.json */ /** * Sample code: Create a deployment that will redeploy the last successful deployment on failure. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtManagementGroupScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtManagementGroupScopeSamples.java index ddec5ec54c347..a0c54147e5b51 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtManagementGroupScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtManagementGroupScopeSamples.java @@ -16,7 +16,8 @@ */ public final class DeploymentsWhatIfAtManagementGroupScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PostDeploymentWhatIfOnManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * PostDeploymentWhatIfOnManagementGroup.json */ /** * Sample code: Predict template changes at management group scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtSubscriptionScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtSubscriptionScopeSamples.java index 272891002139f..c0308fd6f167d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtSubscriptionScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtSubscriptionScopeSamples.java @@ -16,7 +16,8 @@ */ public final class DeploymentsWhatIfAtSubscriptionScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PostDeploymentWhatIfOnSubscription.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * PostDeploymentWhatIfOnSubscription.json */ /** * Sample code: Predict template changes at subscription scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtTenantScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtTenantScopeSamples.java index 93830d302b310..bdf1f6758a4ff 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtTenantScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfAtTenantScopeSamples.java @@ -16,7 +16,8 @@ */ public final class DeploymentsWhatIfAtTenantScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PostDeploymentWhatIfOnTenant.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * PostDeploymentWhatIfOnTenant.json */ /** * Sample code: Predict template changes at management group scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfSamples.java index 20809a7f4fc2b..6e9e6502bde71 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/DeploymentsWhatIfSamples.java @@ -16,7 +16,8 @@ */ public final class DeploymentsWhatIfSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PostDeploymentWhatIfOnResourceGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * PostDeploymentWhatIfOnResourceGroup.json */ /** * Sample code: Predict template changes at resource group scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesGetSamples.java index aa0feb090e059..200d4ddb711ac 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesGetSamples.java @@ -9,7 +9,8 @@ */ public final class FeaturesGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/getFeature.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/getFeature.json */ /** * Sample code: Get feature. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListAllSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListAllSamples.java index d4444bba98ff3..c500fe3df762a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListAllSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListAllSamples.java @@ -9,7 +9,9 @@ */ public final class FeaturesListAllSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/listSubscriptionFeatures.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/listSubscriptionFeatures. + * json */ /** * Sample code: List subscription Features. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListSamples.java index f98bdabb2c2f8..4f1a77fd83871 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesListSamples.java @@ -9,7 +9,8 @@ */ public final class FeaturesListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/listProviderFeatures.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/listProviderFeatures.json */ /** * Sample code: List provider Features. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesRegisterSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesRegisterSamples.java index 2443af36ebce8..a1480c6340bba 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesRegisterSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesRegisterSamples.java @@ -9,7 +9,8 @@ */ public final class FeaturesRegisterSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/registerFeature.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/registerFeature.json */ /** * Sample code: Register feature. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesUnregisterSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesUnregisterSamples.java index edf273e3a87ff..2b122e1199232 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesUnregisterSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/FeaturesUnregisterSamples.java @@ -9,7 +9,8 @@ */ public final class FeaturesUnregisterSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/unregisterFeature.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/unregisterFeature.json */ /** * Sample code: Register feature. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples.java index 07aa73f67655f..b3d425a79712d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples.java @@ -12,7 +12,8 @@ */ public final class ManagementLocksCreateOrUpdateAtResourceGroupLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_CreateOrUpdateAtResourceGroupLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_CreateOrUpdateAtResourceGroupLevel.json */ /** * Sample code: Create management lock at resource group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceLevelSamples.java index 71adaefd22aa4..4422d51156fcc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtResourceLevelSamples.java @@ -12,7 +12,8 @@ */ public final class ManagementLocksCreateOrUpdateAtResourceLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_CreateOrUpdateAtResourceLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_CreateOrUpdateAtResourceLevel.json */ /** * Sample code: Create management lock at resource level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples.java index f34c497c52de7..1f6b592808c2e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples.java @@ -12,7 +12,8 @@ */ public final class ManagementLocksCreateOrUpdateAtSubscriptionLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_CreateOrUpdateAtSubscriptionLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_CreateOrUpdateAtSubscriptionLevel.json */ /** * Sample code: Create management lock at subscription level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateByScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateByScopeSamples.java index 1cd780114c0c2..55927636099c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateByScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksCreateOrUpdateByScopeSamples.java @@ -12,7 +12,8 @@ */ public final class ManagementLocksCreateOrUpdateByScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_CreateOrUpdateAtScope.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_CreateOrUpdateAtScope.json */ /** * Sample code: Create management lock at scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtResourceLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtResourceLevelSamples.java index 68fac93e637f5..abbc09448cd6e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtResourceLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtResourceLevelSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksDeleteAtResourceLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_DeleteAtResourceLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_DeleteAtResourceLevel.json */ /** * Sample code: Delete management lock at resource level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtSubscriptionLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtSubscriptionLevelSamples.java index 4cb3a26724675..eee3953db7f8d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtSubscriptionLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteAtSubscriptionLevelSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksDeleteAtSubscriptionLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_DeleteAtSubscriptionLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_DeleteAtSubscriptionLevel.json */ /** * Sample code: Delete management lock at subscription level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteByScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteByScopeSamples.java index 626c2d0f2344d..f04a90755277c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteByScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteByScopeSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksDeleteByScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_DeleteAtScope.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_DeleteAtScope.json */ /** * Sample code: Delete management lock at scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteSamples.java index 3884bb4c684c4..9dfff17327dd1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_DeleteAtResourceGroupLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_DeleteAtResourceGroupLevel.json */ /** * Sample code: Delete management lock at resource group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtResourceLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtResourceLevelSamples.java index 195de0577b386..251b73ea92d1b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtResourceLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtResourceLevelSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksGetAtResourceLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_GetAtResourceLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_GetAtResourceLevel.json */ /** * Sample code: Get management lock at resource level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtSubscriptionLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtSubscriptionLevelSamples.java index e406b8c35ddb8..6570d9448972b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtSubscriptionLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetAtSubscriptionLevelSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksGetAtSubscriptionLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_GetAtSubscriptionLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_GetAtSubscriptionLevel.json */ /** * Sample code: Get management lock at subscription level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByResourceGroupSamples.java index b92426a6df3b7..82758782129e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_GetAtResourceGroupLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_GetAtResourceGroupLevel.json */ /** * Sample code: Get management lock at resource group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByScopeSamples.java index a21a7dcc710b9..b78a074446d71 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksGetByScopeSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksGetByScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_GetAtScope.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_GetAtScope.json */ /** * Sample code: Get management lock at scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListAtResourceLevelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListAtResourceLevelSamples.java index 955e89af4bc4a..dd15ade02072e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListAtResourceLevelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListAtResourceLevelSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksListAtResourceLevelSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_ListAtResourceLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_ListAtResourceLevel.json */ /** * Sample code: List management locks at resource level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByResourceGroupSamples.java index 9c378b17e4ed0..9943904ed3f38 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksListByResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_ListAtResourceGroupLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_ListAtResourceGroupLevel.json */ /** * Sample code: List management groups at resource group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByScopeSamples.java index 1906199f44089..ae2e8a2814554 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListByScopeSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksListByScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_ListAtScope.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_ListAtScope.json */ /** * Sample code: List management locks at scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListSamples.java index 174fe3ad3de15..793794ec1fdd1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ManagementLocksListSamples.java @@ -9,7 +9,8 @@ */ public final class ManagementLocksListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ManagementLocks_ListAtSubscriptionLevel.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01/examples/ + * ManagementLocks_ListAtSubscriptionLevel.json */ /** * Sample code: List management locks at subscription level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateByIdSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateByIdSamples.java index e9d0475e71fa3..bd6cba268ca7f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateByIdSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateByIdSamples.java @@ -20,7 +20,8 @@ */ public final class PolicyAssignmentsCreateByIdSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/createPolicyAssignmentById.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * createPolicyAssignmentById.json */ /** * Sample code: Create or update policy assignment by ID. @@ -49,7 +50,8 @@ public static void createOrUpdatePolicyAssignmentByID(com.azure.resourcemanager. } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/createPolicyAssignmentWithIdentityById.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * createPolicyAssignmentWithIdentityById.json */ /** * Sample code: Create or update policy assignment with a managed identity by ID. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateSamples.java index b2dabffb20f1a..b0cdb74a6ced8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsCreateSamples.java @@ -28,7 +28,8 @@ */ public final class PolicyAssignmentsCreateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/createPolicyAssignmentWithResourceSelectors.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * createPolicyAssignmentWithResourceSelectors.json */ /** * Sample code: Create or update a policy assignment with resource selectors. @@ -55,7 +56,8 @@ public static void createOrUpdateAPolicyAssignmentWithResourceSelectors( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/createPolicyAssignment.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * createPolicyAssignment.json */ /** * Sample code: Create or update a policy assignment. @@ -83,7 +85,8 @@ public static void createOrUpdateAPolicyAssignment(com.azure.resourcemanager.Azu } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/createPolicyAssignmentWithIdentity.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * createPolicyAssignmentWithIdentity.json */ /** * Sample code: Create or update a policy assignment with a system assigned identity. @@ -112,7 +115,8 @@ public static void createOrUpdateAPolicyAssignmentWithASystemAssignedIdentity( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/createPolicyAssignmentNonComplianceMessages.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * createPolicyAssignmentNonComplianceMessages.json */ /** * Sample code: Create or update a policy assignment with multiple non-compliance messages. @@ -140,7 +144,8 @@ public static void createOrUpdateAPolicyAssignmentWithMultipleNonComplianceMessa } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/createPolicyAssignmentWithUserAssignedIdentity.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * createPolicyAssignmentWithUserAssignedIdentity.json */ /** * Sample code: Create or update a policy assignment with a user assigned identity. @@ -172,7 +177,8 @@ public static void createOrUpdateAPolicyAssignmentWithAUserAssignedIdentity( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/createPolicyAssignmentWithOverrides.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * createPolicyAssignmentWithOverrides.json */ /** * Sample code: Create or update a policy assignment with overrides. @@ -201,7 +207,8 @@ public static void createOrUpdateAPolicyAssignmentWithOverrides( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/createPolicyAssignmentWithoutEnforcement.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * createPolicyAssignmentWithoutEnforcement.json */ /** * Sample code: Create or update a policy assignment without enforcing policy effect during resource creation or diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteByIdSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteByIdSamples.java index ed840e1a1fad9..4bded8450a7d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteByIdSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteByIdSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyAssignmentsDeleteByIdSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/deletePolicyAssignmentById.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * deletePolicyAssignmentById.json */ /** * Sample code: Delete a policy assignment by ID. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteSamples.java index 4caba163b4693..cd68b699895d4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyAssignmentsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/deletePolicyAssignment.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * deletePolicyAssignment.json */ /** * Sample code: Delete a policy assignment. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetByIdSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetByIdSamples.java index 0ac5dfa6a0e18..64a6417ccc04a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetByIdSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetByIdSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyAssignmentsGetByIdSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/getPolicyAssignmentById.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * getPolicyAssignmentById.json */ /** * Sample code: Retrieve a policy assignment by ID. @@ -27,7 +28,8 @@ public static void retrieveAPolicyAssignmentByID(com.azure.resourcemanager.Azure } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/getPolicyAssignmentWithIdentityById.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * getPolicyAssignmentWithIdentityById.json */ /** * Sample code: Retrieve a policy assignment with a managed identity by ID. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetSamples.java index 21edfe007faf6..79bd38ddd1228 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsGetSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyAssignmentsGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/getPolicyAssignmentWithOverrides.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * getPolicyAssignmentWithOverrides.json */ /** * Sample code: Retrieve a policy assignment with overrides. @@ -26,7 +27,8 @@ public static void retrieveAPolicyAssignmentWithOverrides(com.azure.resourcemana } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/getPolicyAssignmentWithUserAssignedIdentity.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * getPolicyAssignmentWithUserAssignedIdentity.json */ /** * Sample code: Retrieve a policy assignment with a user assigned identity. @@ -44,7 +46,8 @@ public static void retrieveAPolicyAssignmentWithOverrides(com.azure.resourcemana } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/getPolicyAssignmentWithResourceSelectors.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * getPolicyAssignmentWithResourceSelectors.json */ /** * Sample code: Retrieve a policy assignment with resource selectors. @@ -62,7 +65,9 @@ public static void retrieveAPolicyAssignmentWithOverrides(com.azure.resourcemana } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/getPolicyAssignment.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/getPolicyAssignment. + * json */ /** * Sample code: Retrieve a policy assignment. @@ -79,7 +84,8 @@ public static void retrieveAPolicyAssignment(com.azure.resourcemanager.AzureReso } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/getPolicyAssignmentWithIdentity.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * getPolicyAssignmentWithIdentity.json */ /** * Sample code: Retrieve a policy assignment with a system assigned identity. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListByResourceGroupSamples.java index ab23e33e777ba..0ee3d9d231ed1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyAssignmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/listPolicyAssignmentsForResourceGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * listPolicyAssignmentsForResourceGroup.json */ /** * Sample code: List policy assignments that apply to a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForManagementGroupSamples.java index a9b0fb594318d..2bdd7e97cfcd4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForManagementGroupSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyAssignmentsListForManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/listPolicyAssignmentsForManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * listPolicyAssignmentsForManagementGroup.json */ /** * Sample code: List policy assignments that apply to a management group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForResourceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForResourceSamples.java index 8f40e9b9dc9f2..41c3281ee5cd5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForResourceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListForResourceSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyAssignmentsListForResourceSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/listPolicyAssignmentsForResource.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * listPolicyAssignmentsForResource.json */ /** * Sample code: List all policy assignments that apply to a resource. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListSamples.java index 186f87127d69b..5355981d250e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsListSamples.java @@ -9,7 +9,9 @@ */ public final class PolicyAssignmentsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/listPolicyAssignments.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/listPolicyAssignments + * .json */ /** * Sample code: List policy assignments that apply to a subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateByIdSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateByIdSamples.java index 4e5f048a5d984..a9d408e34aa2e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateByIdSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateByIdSamples.java @@ -13,7 +13,8 @@ */ public final class PolicyAssignmentsUpdateByIdSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/updatePolicyAssignmentWithIdentityById.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * updatePolicyAssignmentWithIdentityById.json */ /** * Sample code: Update policy assignment with a managed identity by ID. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateSamples.java index 9ee59ca49c05a..fb8d673adb1d3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyAssignmentsUpdateSamples.java @@ -22,7 +22,8 @@ */ public final class PolicyAssignmentsUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/updatePolicyAssignmentWithResourceSelectors.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * updatePolicyAssignmentWithResourceSelectors.json */ /** * Sample code: Update a policy assignment with resource selectors. @@ -44,7 +45,8 @@ public final class PolicyAssignmentsUpdateSamples { } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/updatePolicyAssignmentWithUserAssignedIdentity.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * updatePolicyAssignmentWithUserAssignedIdentity.json */ /** * Sample code: Update a policy assignment with a user assigned identity. @@ -67,7 +69,8 @@ public final class PolicyAssignmentsUpdateSamples { } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/updatePolicyAssignmentWithOverrides.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * updatePolicyAssignmentWithOverrides.json */ /** * Sample code: Update a policy assignment with overrides. @@ -89,7 +92,8 @@ public static void updateAPolicyAssignmentWithOverrides(com.azure.resourcemanage } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/updatePolicyAssignmentWithIdentity.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/ + * updatePolicyAssignmentWithIdentity.json */ /** * Sample code: Update a policy assignment with a system assigned identity. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples.java index 0f54d228bd911..6ba1ba2ec0944 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples.java @@ -19,7 +19,8 @@ */ public final class PolicyDefinitionsCreateOrUpdateAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/createOrUpdatePolicyDefinitionAtManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * createOrUpdatePolicyDefinitionAtManagementGroup.json */ /** * Sample code: Create or update a policy definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateSamples.java index af33165f8a723..ecccb6c4d9eef 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsCreateOrUpdateSamples.java @@ -20,7 +20,8 @@ */ public final class PolicyDefinitionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/createOrUpdatePolicyDefinitionAdvancedParams.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * createOrUpdatePolicyDefinitionAdvancedParams.json */ /** * Sample code: Create or update a policy definition with advanced parameters. @@ -54,7 +55,8 @@ public static void createOrUpdateAPolicyDefinitionWithAdvancedParameters( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/createOrUpdatePolicyDefinition.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * createOrUpdatePolicyDefinition.json */ /** * Sample code: Create or update a policy definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteAtManagementGroupSamples.java index cd1d227714c3a..5513000da7cbf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteAtManagementGroupSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyDefinitionsDeleteAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/deletePolicyDefinitionAtManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * deletePolicyDefinitionAtManagementGroup.json */ /** * Sample code: Delete a policy definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteSamples.java index 28c3130721b68..056a24b7f0193 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyDefinitionsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/deletePolicyDefinition.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * deletePolicyDefinition.json */ /** * Sample code: Delete a policy definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetAtManagementGroupSamples.java index f8b882c9b3c63..598d156a3381c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetAtManagementGroupSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyDefinitionsGetAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/getPolicyDefinitionAtManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * getPolicyDefinitionAtManagementGroup.json */ /** * Sample code: Retrieve a policy definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetBuiltInSamples.java index 3ad5d423eec2c..24e01b1138c3d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetBuiltInSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyDefinitionsGetBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/getBuiltinPolicyDefinition.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * getBuiltinPolicyDefinition.json */ /** * Sample code: Retrieve a built-in policy definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetSamples.java index 3e093030959d2..24fa405608b1f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsGetSamples.java @@ -9,7 +9,9 @@ */ public final class PolicyDefinitionsGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/getPolicyDefinition.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/getPolicyDefinition. + * json */ /** * Sample code: Retrieve a policy definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListBuiltInSamples.java index c12089e02839b..b65d646998c4d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListBuiltInSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyDefinitionsListBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/listBuiltInPolicyDefinitions.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * listBuiltInPolicyDefinitions.json */ /** * Sample code: List built-in policy definitions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListByManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListByManagementGroupSamples.java index 01c922222038a..f1572790df647 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListByManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListByManagementGroupSamples.java @@ -9,7 +9,8 @@ */ public final class PolicyDefinitionsListByManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/listPolicyDefinitionsByManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * listPolicyDefinitionsByManagementGroup.json */ /** * Sample code: List policy definitions by management group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListSamples.java index bf5b505c39568..285e8f2f2196f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyDefinitionsListSamples.java @@ -9,7 +9,9 @@ */ public final class PolicyDefinitionsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/listPolicyDefinitions.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/listPolicyDefinitions + * .json */ /** * Sample code: List policy definitions by subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsCreateOrUpdateSamples.java index 222f3ae7911e3..ed5964d39caa4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsCreateOrUpdateSamples.java @@ -20,7 +20,9 @@ */ public final class PolicyExemptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/createOrUpdatePolicyExemption.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ + * createOrUpdatePolicyExemption.json */ /** * Sample code: Create or update a policy exemption. @@ -48,7 +50,9 @@ public static void createOrUpdateAPolicyExemption(com.azure.resourcemanager.Azur } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/createOrUpdatePolicyExemptionWithResourceSelectors.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ + * createOrUpdatePolicyExemptionWithResourceSelectors.json */ /** * Sample code: Create or update a policy exemption with resource selectors. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsDeleteSamples.java index f167dcbd4837a..54b10313d942c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsDeleteSamples.java @@ -9,7 +9,9 @@ */ public final class PolicyExemptionsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/deletePolicyExemption.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ + * deletePolicyExemption.json */ /** * Sample code: Delete a policy exemption. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsGetSamples.java index 5325b6d452a2f..9982f49a9b667 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsGetSamples.java @@ -9,7 +9,9 @@ */ public final class PolicyExemptionsGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/getPolicyExemptionWithResourceSelectors.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ + * getPolicyExemptionWithResourceSelectors.json */ /** * Sample code: Retrieve a policy exemption with resource selectors. @@ -27,7 +29,9 @@ public final class PolicyExemptionsGetSamples { } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/getPolicyExemption.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ + * getPolicyExemption.json */ /** * Sample code: Retrieve a policy exemption. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListByResourceGroupSamples.java index d38b8d2bdf5c2..11280371ebfb0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListByResourceGroupSamples.java @@ -9,7 +9,9 @@ */ public final class PolicyExemptionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/listPolicyExemptionsForResourceGroup.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ + * listPolicyExemptionsForResourceGroup.json */ /** * Sample code: List policy exemptions that apply to a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForManagementGroupSamples.java index cb8cbd9264dc9..fcc7123fab5f2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForManagementGroupSamples.java @@ -9,7 +9,9 @@ */ public final class PolicyExemptionsListForManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/listPolicyExemptionsForManagementGroup.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ + * listPolicyExemptionsForManagementGroup.json */ /** * Sample code: List policy exemptions that apply to a management group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForResourceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForResourceSamples.java index 33525d2849578..773f344b809a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForResourceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListForResourceSamples.java @@ -9,7 +9,9 @@ */ public final class PolicyExemptionsListForResourceSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/listPolicyExemptionsForResource.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ + * listPolicyExemptionsForResource.json */ /** * Sample code: List all policy exemptions that apply to a resource. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListSamples.java index 9d405101b6216..ea90b7f255796 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsListSamples.java @@ -9,7 +9,9 @@ */ public final class PolicyExemptionsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/listPolicyExemptionsForSubscription.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ + * listPolicyExemptionsForSubscription.json */ /** * Sample code: List policy exemptions that apply to a subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsUpdateSamples.java index ee43f99976c2a..3611cb93928ae 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicyExemptionsUpdateSamples.java @@ -16,7 +16,9 @@ */ public final class PolicyExemptionsUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/updatePolicyExemptionWithResourceSelectors.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Authorization/preview/2022-07-01-preview/examples/ + * updatePolicyExemptionWithResourceSelectors.json */ /** * Sample code: Update a policy exemption with resource selectors. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples.java index 283d819dbc032..219fa74777340 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples.java @@ -20,7 +20,8 @@ */ public final class PolicySetDefinitionsCreateOrUpdateAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/createOrUpdatePolicySetDefinitionWithGroupsAtManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * createOrUpdatePolicySetDefinitionWithGroupsAtManagementGroup.json */ /** * Sample code: Create or update a policy set definition with groups at management group level. @@ -65,7 +66,8 @@ public static void createOrUpdateAPolicySetDefinitionWithGroupsAtManagementGroup } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/createOrUpdatePolicySetDefinitionAtManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * createOrUpdatePolicySetDefinitionAtManagementGroup.json */ /** * Sample code: Create or update a policy set definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateSamples.java index e52ee500dc007..38f2d9d490a34 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsCreateOrUpdateSamples.java @@ -23,7 +23,8 @@ */ public final class PolicySetDefinitionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/createOrUpdatePolicySetDefinitionWithGroups.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * createOrUpdatePolicySetDefinitionWithGroups.json */ /** * Sample code: Create or update a policy set definition with groups. @@ -66,7 +67,8 @@ public static void createOrUpdateAPolicySetDefinitionWithGroups( } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/createOrUpdatePolicySetDefinition.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * createOrUpdatePolicySetDefinition.json */ /** * Sample code: Create or update a policy set definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteAtManagementGroupSamples.java index 75cbee2d0dae5..a7fd404c7c3ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteAtManagementGroupSamples.java @@ -9,7 +9,8 @@ */ public final class PolicySetDefinitionsDeleteAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/deletePolicySetDefinitionAtManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * deletePolicySetDefinitionAtManagementGroup.json */ /** * Sample code: Delete a policy set definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteSamples.java index 1726a69fb6e7e..d8479f17e3c14 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class PolicySetDefinitionsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/deletePolicySetDefinition.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * deletePolicySetDefinition.json */ /** * Sample code: Delete a policy set definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetAtManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetAtManagementGroupSamples.java index b54a465a0e9de..11539a39c71f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetAtManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetAtManagementGroupSamples.java @@ -9,7 +9,8 @@ */ public final class PolicySetDefinitionsGetAtManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/getPolicySetDefinitionAtManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * getPolicySetDefinitionAtManagementGroup.json */ /** * Sample code: Retrieve a policy set definition at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetBuiltInSamples.java index 58a1f6bbdb5c9..bcb3812d212d2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetBuiltInSamples.java @@ -9,7 +9,8 @@ */ public final class PolicySetDefinitionsGetBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/getBuiltInPolicySetDefinition.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * getBuiltInPolicySetDefinition.json */ /** * Sample code: Retrieve a built-in policy set definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetSamples.java index e4e81b824095e..dd9589b8f078e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsGetSamples.java @@ -9,7 +9,8 @@ */ public final class PolicySetDefinitionsGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/getPolicySetDefinition.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * getPolicySetDefinition.json */ /** * Sample code: Retrieve a policy set definition. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListBuiltInSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListBuiltInSamples.java index 0142879006e12..0be375a9d6222 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListBuiltInSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListBuiltInSamples.java @@ -9,7 +9,8 @@ */ public final class PolicySetDefinitionsListBuiltInSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/listBuiltInPolicySetDefinitions.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * listBuiltInPolicySetDefinitions.json */ /** * Sample code: List built-in policy set definitions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListByManagementGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListByManagementGroupSamples.java index 7a78544777e6c..885aae36e6ebe 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListByManagementGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListByManagementGroupSamples.java @@ -9,7 +9,8 @@ */ public final class PolicySetDefinitionsListByManagementGroupSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/listPolicySetDefinitionsByManagementGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * listPolicySetDefinitionsByManagementGroup.json */ /** * Sample code: List policy set definitions at management group level. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListSamples.java index 97dc46eafd0ce..005c34abe6b2f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/PolicySetDefinitionsListSamples.java @@ -9,7 +9,8 @@ */ public final class PolicySetDefinitionsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/listPolicySetDefinitions.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2021-06-01/examples/ + * listPolicySetDefinitions.json */ /** * Sample code: List policy set definitions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProviderResourceTypesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProviderResourceTypesListSamples.java index 079cbccff18d2..7e080b20b1add 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProviderResourceTypesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProviderResourceTypesListSamples.java @@ -9,7 +9,9 @@ */ public final class ProviderResourceTypesListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetProviderResourceTypes.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetProviderResourceTypes. + * json */ /** * Sample code: Get provider resource types. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetAtTenantScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetAtTenantScopeSamples.java index 9fe9a02c991af..e8f971d1e5187 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetAtTenantScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetAtTenantScopeSamples.java @@ -9,7 +9,9 @@ */ public final class ProvidersGetAtTenantScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetNamedProviderAtTenant.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetNamedProviderAtTenant. + * json */ /** * Sample code: Get a resource provider at tenant scope. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetSamples.java index fd10948500e86..aa2c7f9002a50 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersGetSamples.java @@ -9,7 +9,8 @@ */ public final class ProvidersGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetProvider.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetProvider.json */ /** * Sample code: Get provider. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersListSamples.java index d72aac7537d0b..5605cae689634 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersListSamples.java @@ -9,7 +9,8 @@ */ public final class ProvidersListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetProviders.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetProviders.json */ /** * Sample code: Get providers. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersProviderPermissionsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersProviderPermissionsSamples.java index 4dd877176276a..0207d56b1cfc3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersProviderPermissionsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ProvidersProviderPermissionsSamples.java @@ -9,7 +9,9 @@ */ public final class ProvidersProviderPermissionsSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetProviderPermissions.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetProviderPermissions. + * json */ /** * Sample code: Get provider resource types. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsCreateOrUpdateSamples.java index 64554f2fce652..599fb05294910 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsCreateOrUpdateSamples.java @@ -11,7 +11,8 @@ */ public final class ResourceGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/CreateResourceGroup.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/CreateResourceGroup.json */ /** * Sample code: Create or update a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsDeleteSamples.java index 666d58ed499c4..117e6664c58b2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class ResourceGroupsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ForceDeleteVMsInResourceGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * ForceDeleteVMsInResourceGroup.json */ /** * Sample code: Force delete all the Virtual Machines in a resource group. @@ -26,7 +27,8 @@ public final class ResourceGroupsDeleteSamples { } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ForceDeleteVMsAndVMSSInResourceGroup.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * ForceDeleteVMsAndVMSSInResourceGroup.json */ /** * Sample code: Force delete all the Virtual Machines and Virtual Machine Scale Sets in a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsExportTemplateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsExportTemplateSamples.java index d96b2899519fd..1bc2f8db03d2a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsExportTemplateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceGroupsExportTemplateSamples.java @@ -13,7 +13,8 @@ */ public final class ResourceGroupsExportTemplateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ExportResourceGroupAsBicep.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * ExportResourceGroupAsBicep.json */ /** * Sample code: Export a resource group as Bicep. @@ -33,7 +34,8 @@ public static void exportAResourceGroupAsBicep(com.azure.resourcemanager.AzureRe } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ExportResourceGroup.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ExportResourceGroup.json */ /** * Sample code: Export a resource group. @@ -50,7 +52,8 @@ public static void exportAResourceGroup(com.azure.resourcemanager.AzureResourceM } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ExportResourceGroupWithFiltering.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/ + * ExportResourceGroupWithFiltering.json */ /** * Sample code: Export a resource group with filtering. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceNameCheckResourceNameSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceNameCheckResourceNameSamples.java index ea8186bb9f5e1..58290cee0e9c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceNameCheckResourceNameSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/ResourceNameCheckResourceNameSamples.java @@ -11,7 +11,8 @@ */ public final class ResourceNameCheckResourceNameSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/CheckResourceName.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/CheckResourceName.json */ /** * Sample code: CheckValidityForAResourceName. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsCreateOrUpdateSamples.java index f921e8190f623..ceacd4b66959c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsCreateOrUpdateSamples.java @@ -12,7 +12,9 @@ */ public final class SubscriptionFeatureRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/SubscriptionFeatureRegistrationPUT.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/ + * SubscriptionFeatureRegistrationPUT.json */ /** * Sample code: Creates a feature registration. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsDeleteSamples.java index c689f9b7882d7..35b1094795a1f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsDeleteSamples.java @@ -9,7 +9,9 @@ */ public final class SubscriptionFeatureRegistrationsDeleteSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/SubscriptionFeatureRegistrationDELETE.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/ + * SubscriptionFeatureRegistrationDELETE.json */ /** * Sample code: Deletes a feature registration. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsGetSamples.java index eefa3a6150a18..d21cbc8d70bde 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsGetSamples.java @@ -9,7 +9,9 @@ */ public final class SubscriptionFeatureRegistrationsGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/SubscriptionFeatureRegistrationGET.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/ + * SubscriptionFeatureRegistrationGET.json */ /** * Sample code: Gets a feature registration. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListBySubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListBySubscriptionSamples.java index 89e030a56b20e..50d9043ba0369 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListBySubscriptionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListBySubscriptionSamples.java @@ -9,7 +9,9 @@ */ public final class SubscriptionFeatureRegistrationsListBySubscriptionSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/SubscriptionFeatureRegistrationLIST.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/ + * SubscriptionFeatureRegistrationLIST.json */ /** * Sample code: Gets a list of feature registrations. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListSamples.java index be1cc6eea4225..e2bd6675a8643 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionFeatureRegistrationsListSamples.java @@ -9,7 +9,9 @@ */ public final class SubscriptionFeatureRegistrationsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/SubscriptionFeatureRegistrationLISTALL.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/ + * SubscriptionFeatureRegistrationLISTALL.json */ /** * Sample code: Gets a list of feature registrations. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsCheckZonePeersSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsCheckZonePeersSamples.java index 12d67c8c5b7d7..5325c8fcd1995 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsCheckZonePeersSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsCheckZonePeersSamples.java @@ -12,7 +12,8 @@ */ public final class SubscriptionsCheckZonePeersSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/PostCheckZonePeers.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/PostCheckZonePeers.json */ /** * Sample code: GetLogicalZoneMapping. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsGetSamples.java index 04d931df16245..b4103fd39c51e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsGetSamples.java @@ -9,7 +9,8 @@ */ public final class SubscriptionsGetSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetSubscription.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetSubscription.json */ /** * Sample code: GetASingleSubscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListLocationsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListLocationsSamples.java index 7ffb16b7d7809..b27e73159edfc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListLocationsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListLocationsSamples.java @@ -9,7 +9,8 @@ */ public final class SubscriptionsListLocationsSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetLocationsWithExtendedLocations.json + * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/ + * GetLocationsWithExtendedLocations.json */ /** * Sample code: GetLocationsWithExtendedLocations. @@ -25,7 +26,8 @@ public static void getLocationsWithExtendedLocations(com.azure.resourcemanager.A } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetLocations.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetLocations.json */ /** * Sample code: GetLocationsWithASubscriptionId. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListSamples.java index b0c857f9eab6e..bd4ddcc1c5a31 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/SubscriptionsListSamples.java @@ -9,7 +9,8 @@ */ public final class SubscriptionsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetSubscriptions.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetSubscriptions.json */ /** * Sample code: GetAllSubscriptions. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsCreateOrUpdateAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsCreateOrUpdateAtScopeSamples.java index ab498055b3483..1a5d7aef4eb80 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsCreateOrUpdateAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsCreateOrUpdateAtScopeSamples.java @@ -14,7 +14,8 @@ */ public final class TagOperationsCreateOrUpdateAtScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutTagsResource.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutTagsResource.json */ /** * Sample code: Update tags on a resource. @@ -34,7 +35,8 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutTagsSubscription.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutTagsSubscription.json */ /** * Sample code: Update tags on a subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java index 8482e0c5daef1..232db1b5320bd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsDeleteAtScopeSamples.java @@ -9,7 +9,8 @@ */ public final class TagOperationsDeleteAtScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeleteTagsResource.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeleteTagsResource.json */ /** * Sample code: Update tags on a resource. @@ -27,7 +28,9 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeleteTagsSubscription.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeleteTagsSubscription. + * json */ /** * Sample code: Update tags on a subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java index e1842575c7d96..552d153244cee 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsGetAtScopeSamples.java @@ -9,7 +9,8 @@ */ public final class TagOperationsGetAtScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetTagsResource.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetTagsResource.json */ /** * Sample code: Get tags on a resource. @@ -27,7 +28,8 @@ public static void getTagsOnAResource(com.azure.resourcemanager.AzureResourceMan } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetTagsSubscription.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/GetTagsSubscription.json */ /** * Sample code: Get tags on a subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java index b9a6cd6fdc5e1..d5483d262a0d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TagOperationsUpdateAtScopeSamples.java @@ -15,7 +15,8 @@ */ public final class TagOperationsUpdateAtScopeSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PatchTagsResource.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PatchTagsResource.json */ /** * Sample code: Update tags on a resource. @@ -36,7 +37,9 @@ public static void updateTagsOnAResource(com.azure.resourcemanager.AzureResource } /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PatchTagsSubscription.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PatchTagsSubscription. + * json */ /** * Sample code: Update tags on a subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TenantsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TenantsListSamples.java index 9c483e4a5c61d..525cd08b2cc0b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TenantsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/resources/generated/TenantsListSamples.java @@ -9,7 +9,8 @@ */ public final class TenantsListSamples { /* - * x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetTenants.json + * x-ms-original-file: + * specification/resources/resource-manager/Microsoft.Resources/stable/2022-12-01/examples/GetTenants.json */ /** * Sample code: GetAllTenants. diff --git a/sdk/resourcemanager/gulpfile.js b/sdk/resourcemanager/gulpfile.js index 221040d08fc2e..01ac79fe9f116 100644 --- a/sdk/resourcemanager/gulpfile.js +++ b/sdk/resourcemanager/gulpfile.js @@ -143,7 +143,6 @@ function codegen(project, cb) { " --java " + " --azure-arm " + " --modelerfour.additional-checks=false " + - " --stream-style-serialization=false " + " --generate-samples " + generator + ` --java.namespace=${mappings[project].package} ` +